{
    "openapi": "3.0.0",
    "info": {
        "title": "A4L Money API",
        "description": "A4L Money API Documentation",
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "version": "2.0.0"
    },
    "servers": [
        {
            "url": "http://localhost/app4legal/api/v2/money",
            "description": "A4L Money API"
        }
    ],
    "paths": {
        "/accounts": {
            "get": {
                "tags": [
                    "Accounts"
                ],
                "summary": "List accounts",
                "description": "List all accounts",
                "operationId": "ea02f2fa7055dde5fe541e4951b8dcd9",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search accounts by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search accounts by organization Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "model_type",
                        "in": "query",
                        "description": "Search accounts by model type",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Search accounts by status",
                        "schema": {
                            "type": "string",
                            "example": "active"
                        },
                        "example": "active"
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter accounts by the above query parameters. <br />\n              <b>Example:</b> { \"name[eq]\" : \"My Account\" } which will search for accounts with name = \"My Account\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort accounts in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "organization_id"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort accounts in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "organization_id"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "accounts"
                ],
                "summary": "Create account",
                "description": "Create New Account",
                "operationId": "3fcea2837f8b17a867ef31d461a4cd8f",
                "requestBody": {
                    "description": "Create New Account",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "organization_id": 1,
                                "account_type_id": 22,
                                "number": "8",
                                "currency_id": "1",
                                "name": "Account name",
                                "fl1name": "",
                                "fl2name": "",
                                "description": "desc..",
                                "fl1description": "App4Legal, Dubai",
                                "fl2description": "2",
                                "show_in_dashboard": "1",
                                "is_visible_in_advisor": "0",
                                "is_visible_all_users": "0",
                                "visible_to_users[]": "0000000001"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/accounts/{id}": {
            "get": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Get account",
                "description": "Get account",
                "operationId": "84abc51c184150fa5443de22a1055677",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/accounts/update-additional-fields/{id}": {
            "post": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Update account addresses",
                "description": "Update primary or secondary language addresses for a given account",
                "operationId": "e36de01858f26790b696e5b998d89e0f",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the account to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 77
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "tax_number": {
                                        "type": "string",
                                        "example": "300123456700003"
                                    },
                                    "additional_id_type": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "additional_id_value": {
                                        "type": "string",
                                        "example": "CR-123456789"
                                    },
                                    "address": {
                                        "type": "string",
                                        "example": "King Fahd Road, Building 12"
                                    },
                                    "address2": {
                                        "type": "string",
                                        "example": "Office 202"
                                    },
                                    "zip": {
                                        "type": "string",
                                        "example": "12271"
                                    },
                                    "city": {
                                        "type": "string",
                                        "example": "Riyadh"
                                    },
                                    "country_id": {
                                        "type": "integer",
                                        "example": 682
                                    },
                                    "state": {
                                        "type": "string",
                                        "example": "Riyadh Province"
                                    },
                                    "street_name": {
                                        "type": "string",
                                        "example": "King Fahd Road"
                                    },
                                    "additional_street_name": {
                                        "type": "string",
                                        "example": "Olaya District"
                                    },
                                    "building_number": {
                                        "type": "string",
                                        "example": "B12"
                                    },
                                    "address_additional_number": {
                                        "type": "string",
                                        "example": "Unit 5"
                                    },
                                    "district_neighborhood": {
                                        "type": "string",
                                        "example": "Al Olaya"
                                    },
                                    "address_type": {
                                        "type": "string",
                                        "enum": [
                                            "primary_language_address",
                                            "secondary_language_address"
                                        ],
                                        "example": "primary_language_address"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Account has been updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Account has been updated."
                                        },
                                        "account": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 77
                                                },
                                                "organization_id": {
                                                    "type": "string",
                                                    "example": "0003"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Tesla Inc."
                                                },
                                                "account_label": {
                                                    "type": "string",
                                                    "example": "Tesla (SAR)"
                                                },
                                                "account_full_name": {
                                                    "type": "string",
                                                    "example": "Tesla - Saudi Arabia"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Leading EV manufacturer"
                                                },
                                                "account_data": {
                                                    "type": "string",
                                                    "example": "Tesla Riyadh Office"
                                                },
                                                "system_account": {
                                                    "type": "string",
                                                    "example": "no"
                                                },
                                                "account_type_id": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "account_type": {
                                                    "type": "string",
                                                    "example": "Third Party"
                                                },
                                                "number": {
                                                    "type": "string",
                                                    "example": "ACC-001"
                                                },
                                                "currency_id": {
                                                    "type": "integer",
                                                    "example": 194
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "example": "SAR"
                                                },
                                                "model_id": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "member_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "model_name": {
                                                    "type": "string",
                                                    "example": "Company"
                                                },
                                                "model_type": {
                                                    "type": "string",
                                                    "example": "client"
                                                },
                                                "tax_number": {
                                                    "type": "string",
                                                    "example": "300123456700003"
                                                },
                                                "additional_id_type": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "additional_id_value": {
                                                    "type": "string",
                                                    "example": "CR-123456789"
                                                },
                                                "address": {
                                                    "type": "string",
                                                    "example": "King Fahd Road, Building 12"
                                                },
                                                "address2": {
                                                    "type": "string",
                                                    "example": "Office 202"
                                                },
                                                "zip": {
                                                    "type": "string",
                                                    "example": "12271"
                                                },
                                                "city": {
                                                    "type": "string",
                                                    "example": "Riyadh"
                                                },
                                                "country_id": {
                                                    "type": "integer",
                                                    "example": 682
                                                },
                                                "state": {
                                                    "type": "string",
                                                    "example": "Riyadh Province"
                                                },
                                                "street_name": {
                                                    "type": "string",
                                                    "example": "King Fahd Road"
                                                },
                                                "additional_street_name": {
                                                    "type": "string",
                                                    "example": "Olaya District"
                                                },
                                                "building_number": {
                                                    "type": "string",
                                                    "example": "B12"
                                                },
                                                "address_additional_number": {
                                                    "type": "string",
                                                    "example": "Unit 5"
                                                },
                                                "district_neighborhood": {
                                                    "type": "string",
                                                    "example": "Al Olaya"
                                                },
                                                "organization": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "0003"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "ZATCA Riyadh"
                                                        },
                                                        "country": {
                                                            "type": "string",
                                                            "example": "SA"
                                                        },
                                                        "city": {
                                                            "type": "string",
                                                            "example": "Riyadh"
                                                        },
                                                        "state": {
                                                            "type": "string",
                                                            "example": "Riyadh"
                                                        },
                                                        "zip": {
                                                            "type": "string",
                                                            "example": "12271"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "client": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "00000002"
                                                        },
                                                        "term_id": {
                                                            "type": "string",
                                                            "example": null,
                                                            "nullable": true
                                                        },
                                                        "discount_percentage": {
                                                            "type": "string",
                                                            "example": "0.000"
                                                        },
                                                        "phone": {
                                                            "type": "string",
                                                            "example": "+966112233445"
                                                        },
                                                        "mobile": {
                                                            "type": "string",
                                                            "example": "+966512345678"
                                                        },
                                                        "emails": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string",
                                                                "example": "info@tesla.com"
                                                            }
                                                        },
                                                        "member_label": {
                                                            "type": "string",
                                                            "example": "COM00000001"
                                                        },
                                                        "ledes": {
                                                            "type": "integer",
                                                            "example": 0
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The tax number field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/accounts/import": {
            "post": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Import Accounts",
                "description": "Mass import accounts list through excel file",
                "operationId": "79e06b79dd0e9cd3bc471640777c6802",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Excel File Containing Accounts",
                                        "type": "file"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "422": {
                        "description": "Unprocessable Content"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-accounts": {
            "get": {
                "tags": [
                    "AnalyticAccounts"
                ],
                "summary": "List all analytic accounts",
                "description": "List all analytic accounts",
                "operationId": "81e97102b2ee3814be797e49dfa308fd",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search by analytic name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "Search by id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "parent_id",
                        "in": "query",
                        "description": "Search by parent analytic id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"name[value]\" : \"abc\", \"name[operator]\" : \"contains\" } which will search for all records that have a name contains \"abc\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "AnalyticAccounts"
                ],
                "summary": "Create new analytic accounts",
                "description": "Create new analytic accounts",
                "operationId": "33ce4ef4065fd36e30697f6c88751472",
                "requestBody": {
                    "description": "Create new analytic accounts",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "name": "department",
                                "items": [
                                    {
                                        "name": "Accounting"
                                    },
                                    {
                                        "name": "Sales"
                                    },
                                    {
                                        "name": "Marketing"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-accounts/{id}": {
            "get": {
                "tags": [
                    "AnalyticAccounts"
                ],
                "summary": "Get analytics by id",
                "description": "Get analytics by id",
                "operationId": "aa8e3c1d821504575f6356b67320ca16",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "AnalyticAccounts"
                ],
                "summary": "update exist analytic accounts",
                "description": "update exist analytic accounts",
                "operationId": "87146a294966213e336031fd63782797",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "analytic accounts Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update exist analytic accounts",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "name": "Region",
                                "items": [
                                    {
                                        "id": 5,
                                        "name": "Middle East"
                                    },
                                    {
                                        "id": 6,
                                        "name": "America"
                                    },
                                    {
                                        "id": null,
                                        "name": "Africa"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "AnalyticAccounts"
                ],
                "summary": "Delete analytic accounts",
                "description": "Delete analytic accounts",
                "operationId": "b718a618f8eef637f111eda6fc600da3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "analytic accounts Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-accounts/fetch-parent-accounts": {
            "get": {
                "tags": [
                    "AnalyticAccounts"
                ],
                "summary": "Fetch parent accounts",
                "description": "Fetch parent analytic accounts and thiere items",
                "operationId": "9b5553fc7fe9dd2c433d209338e77f67",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "properties": {
                                                "parent_analytic_accounts": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "parent_id": {
                                                                "type": "integer",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Revenues"
                                                            },
                                                            "items": {
                                                                "type": "array",
                                                                "items": {
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer",
                                                                            "example": 2
                                                                        },
                                                                        "parent_id": {
                                                                            "type": "integer",
                                                                            "example": 1
                                                                        },
                                                                        "name": {
                                                                            "type": "string",
                                                                            "example": "Revenue Project 3456"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-account-templates": {
            "get": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "List all analytic accounts templates",
                "description": "List all analytic accounts templates",
                "operationId": "6a81620bda39c2a1ac605edcdf093004",
                "parameters": [
                    {
                        "name": "template_name",
                        "in": "query",
                        "description": "Search by analytic template name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "Search by id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "module_type",
                        "in": "query",
                        "description": "Search by module type ex: INV, EXP,..",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"template_name[value]\" : \"abc\", \"template_name[operator]\" : \"contains\" } which will search for all records that have a name contains \"abc\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "template_name",
                                "module_type"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "Create new analytic accounts template",
                "description": "Create new analytic accounts template",
                "operationId": "becbe08751acfb00de0604e4a369e04e",
                "requestBody": {
                    "description": "Create new analytic accounts template",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "template_name": "exp. template",
                                "module_type": "EXP",
                                "organization_ids": [
                                    "10001",
                                    "0002"
                                ],
                                "is_default": 1,
                                "details": [
                                    {
                                        "analytic_id": 8,
                                        "percentage": 40
                                    },
                                    {
                                        "analytic_id": 3,
                                        "percentage": 60
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-account-templates/{id}": {
            "get": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "Get analytics template by id",
                "description": "Get analytics template by id",
                "operationId": "b1fbab04f21d5b4498d42ceba62bcd69",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "update exist analytic accounts template",
                "description": "update exist analytic accounts template",
                "operationId": "682b2ea569bee2c5588b19e571db8980",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "analytic accounts template Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update exist analytic accounts template",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "template_name": "exp. template",
                                "module_type": "EXP",
                                "organization_ids": [],
                                "is_default": 1,
                                "details": [
                                    {
                                        "id": 3,
                                        "analytic_id": 8,
                                        "percentage": 40
                                    },
                                    {
                                        "id": null,
                                        "analytic_id": 3,
                                        "percentage": 60
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "Delete analytic accounts template",
                "description": "Delete analytic accounts template",
                "operationId": "027422e793afc197c4de2dc9711ea30a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "analytic accounts template Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-account-templates/prepare-data": {
            "get": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "Get list like analytics, organizations used in analytic template page",
                "description": "Get list like analytics, organizations used in analytic template page",
                "operationId": "ea027c29c4a897f7d84d264176e8f2fc",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/analytic-account-templates/{id}/update-is-default": {
            "get": {
                "tags": [
                    "AnalyticAccountTemplates"
                ],
                "summary": "Update analytic template as default or not",
                "description": "Update analytic template as default or not",
                "operationId": "0c1b152ad0b61ba5ac7a4d081fdc82f1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bank-reconciliations": {
            "get": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "List all bank reconciliations",
                "description": "List all bank reconciliations",
                "operationId": "06f4e0cd276541eace3221222e71b79f",
                "parameters": [
                    {
                        "name": "account_name",
                        "in": "query",
                        "description": "Search by account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "balance",
                        "in": "query",
                        "description": "Search by balance",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "Search by id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "to_date",
                        "in": "query",
                        "description": "Search by to date",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"account_name[value]\" : \"abc\", \"account_name[operator]\" : \"contains\" } which will search for all records that have a name containse \"abc\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "from_date",
                                "to_date",
                                "account_name",
                                "balance",
                                "status"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "from_date",
                                "to_date",
                                "account_name",
                                "balance",
                                "status"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "Create reconciliation",
                "description": "Create reconciliation",
                "operationId": "08d0625a8a1eaa9be31355d16bcf27a6",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Create bank reconciliation",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "account_id": "1",
                                "to_date": "2022-09-09",
                                "balance": 2200,
                                "status": "in_progress",
                                "description": "",
                                "voucher_detail_ids": [
                                    128,
                                    951,
                                    125,
                                    672
                                ],
                                "uploaded_file": "...attached file..."
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bank-reconciliations/{id}": {
            "get": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "Get reconciliation by id",
                "description": "Get reconciliation by id",
                "operationId": "432ad4abfbb07df7b7a55140c8e63871",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "update reconciliation",
                "description": "update reconciliation",
                "operationId": "c8e5c34beed7cf9610b338c96bdbfc0a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "reconciliation Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update bank reconciliation",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "account_id": "1",
                                "to_date": "2022-09-09",
                                "balance": 2200,
                                "status": "completed",
                                "description": "any text",
                                "voucher_detail_ids": [
                                    128,
                                    951,
                                    125,
                                    672
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "Delete reconciliations",
                "description": "Delete reconciliations",
                "operationId": "8f6a87c64d29f929cb37e815ee26b3b8",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "reconciliations Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bank-reconciliations/export-excel/{id}": {
            "get": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "Export specific reconciliation to excel",
                "description": "Export specific reconciliation to excel",
                "operationId": "77b54c598d39ba6431df66737d1b5bdc",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bank-reconciliations/transactions": {
            "get": {
                "tags": [
                    "BankReconciliations"
                ],
                "summary": "Get voucher details transactions",
                "description": "get voucher details transactiosn that related to a specific account, and before specific date and not yet checked as reconciled except if reconciled for the selected id",
                "operationId": "55e058ad09ee32d695469efec3f4fab9",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "account_id",
                        "in": "path",
                        "description": "Search for the specific account id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "to_date",
                        "in": "path",
                        "description": "Search till this date",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "bank_reconciliations_id",
                        "in": "path",
                        "description": "in case of edit send the edited bank reconciliations id",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-audits": {
            "get": {
                "tags": [
                    "AdvisorAudits"
                ],
                "summary": "List all Bill Audits",
                "description": "List all Bill Audits",
                "operationId": "0a885969d58fcaebfa316c960f026e0f",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bills/get-approval-steps/{id}": {
            "get": {
                "tags": [
                    "Approval Center"
                ],
                "summary": "Load the approval steps for a bill",
                "description": "Load approval steps",
                "operationId": "4807ca0468ba7116e31ac0daaee2410b",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bills/update-status/{id}": {
            "put": {
                "tags": [
                    "Bill"
                ],
                "summary": "Update the bill status",
                "description": "Update the bill status",
                "operationId": "6468d4a14be291814c87954a7adf1f97",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-custom-fields": {
            "get": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "List all bill custom fields",
                "description": "List all bill custom fields",
                "operationId": "a0caca3e99972bba7c820cc1b3bb97d8",
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Search by custom field type",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"type[value]\" : \"short_text\", \"type[operator]\" : \"contains\" } which will search for all records that have a type containse \"short_text\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "field_order"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "field_order"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "Create bill custom field",
                "description": "Create bill custom field",
                "operationId": "22961fe67490f08f6355ae22847b14f0",
                "requestBody": {
                    "description": "Create bill custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "type": "short_text",
                                "organization_ids": [
                                    1,
                                    2
                                ],
                                "list_options": [],
                                "languages": {
                                    "1": "Custom Bill Field 1",
                                    "2": "حقل الفاتورة للدفع المخصصة 1",
                                    "3": "Champ de facture fournisseur personnalisé 1"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-custom-fields/{id}": {
            "get": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "Get bill custom field by id",
                "description": "Get bill custom field by id",
                "operationId": "c0e9e73c53a5ed65b35ce71e35ca247d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "update bill custom field",
                "description": "update bill custom field",
                "operationId": "248223ded4e5f1bd869664d351d279ee",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "bill custom field Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update bill custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "type": "list",
                                "organization_ids": [],
                                "list_options": [
                                    "test first option",
                                    "test second option"
                                ],
                                "languages": {
                                    "1": "Custom Bill Field 1",
                                    "2": "حقل الفاتورة للدفع المخصصة 1",
                                    "3": "Champ de facture fournisseur personnalisé 1"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "Delete an bill custom field",
                "description": "Delete an bill custom field",
                "operationId": "4efb3249b249f4ee8bf46c5f96dcf65f",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "bill custom field Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-custom-fields/prepare-data": {
            "get": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "Get list like languages, types, organizations used in bill custom field page",
                "description": "Get list like languages, types, organizations used in bill custom field page",
                "operationId": "b58f01c3e7c6a4785d5525b7c7f36ba9",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-custom-fields/reorder-fields": {
            "post": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "re-order bill custom fields",
                "description": "re-order bill custom fields",
                "operationId": "1c3647979af8c87e2863d4b2193a2d18",
                "requestBody": {
                    "description": "reorder bill custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "orderIds": [
                                    4,
                                    1,
                                    5,
                                    3,
                                    2
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-custom-fields/lookup": {
            "get": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "get list option for specific lookup like: contacts, users,..",
                "description": "get list option for specific lookup like: contacts, users,..",
                "operationId": "e4ecf3d8f15344d8e5811a8c6eee2444",
                "parameters": [
                    {
                        "name": "source",
                        "in": "query",
                        "description": "the source of the lookup ex: contacts, users",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bill-custom-fields/bulk-delete": {
            "delete": {
                "tags": [
                    "BillCustomFields"
                ],
                "summary": "Bulk Delete Bill Custom Fields",
                "description": "Bulk Delete Bill Custom Fields",
                "operationId": "a07ee103f8356d448aecc5ed8908c298",
                "parameters": [
                    {
                        "name": "ids[]",
                        "in": "path",
                        "description": "Custom Fields IDs to be deleted",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/bills/{bill_header_id}/payments-list": {
            "get": {
                "tags": [
                    "Bill Payments"
                ],
                "summary": "List bill payments",
                "description": "List all bill payments",
                "operationId": "4a846ac2e7f007d83fe538885a21984a",
                "parameters": [
                    {
                        "name": "bill_header_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_method",
                        "in": "query",
                        "description": "Search Bill Payments by payment method",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "total",
                        "in": "query",
                        "description": "Search Bill Payments by payment total",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter bill payments by the above query parameters. <br />\n    <b>Example:</b> { \"total[gt]\" : 6000 } which will search for bill payments that have a payment total greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort bill payments in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "payment_method",
                                "payment_total"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort bill payments in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "payment_method",
                                "payment_total"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "bill_payments": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "payment_id": {
                                                        "type": "integer",
                                                        "example": 108
                                                    },
                                                    "payment_voucher_id": {
                                                        "type": "integer",
                                                        "example": 3247
                                                    },
                                                    "payment_method": {
                                                        "type": "string",
                                                        "example": "Cash"
                                                    },
                                                    "payment_total": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 2
                                                    },
                                                    "bill_payment_total": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 2
                                                    },
                                                    "payment_reference": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "account_id": {
                                                        "type": "integer",
                                                        "example": 373
                                                    },
                                                    "account_name": {
                                                        "type": "string",
                                                        "example": "Global Finance Bank"
                                                    },
                                                    "account_currency": {
                                                        "type": "string",
                                                        "example": "USD"
                                                    },
                                                    "account_currency_id": {
                                                        "type": "integer",
                                                        "example": 127
                                                    },
                                                    "supplier_account_id": {
                                                        "type": "integer",
                                                        "example": 571
                                                    },
                                                    "supplier_account_name": {
                                                        "type": "string",
                                                        "example": "Acme Legal Supplies Ltd"
                                                    },
                                                    "date": {
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "2026-05-18"
                                                    },
                                                    "exchange_rate": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1
                                                    },
                                                    "bill_number": {
                                                        "type": "string",
                                                        "example": "BIL-0000001"
                                                    },
                                                    "attachment": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "created_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2026-05-18 14:44:21"
                                                    },
                                                    "modified_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2026-05-18 14:44:21"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 2
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bills/{bill_header_id}/payments/{id}": {
            "get": {
                "tags": [
                    "Bill Payments"
                ],
                "summary": "Get Bill payment",
                "description": "Get bill payment",
                "operationId": "4e2f5a843870081ba7afb22bf99651da",
                "parameters": [
                    {
                        "name": "bill_header_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "bill_payment": {
                                            "properties": {
                                                "payment_id": {
                                                    "type": "integer",
                                                    "example": 108
                                                },
                                                "payment_voucher_id": {
                                                    "type": "integer",
                                                    "example": 3247
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "payment_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 2
                                                },
                                                "bill_payment_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 2
                                                },
                                                "payment_reference": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 373
                                                },
                                                "account_name": {
                                                    "type": "string",
                                                    "example": "Global Finance Bank"
                                                },
                                                "account_currency": {
                                                    "type": "string",
                                                    "example": "USD"
                                                },
                                                "account_currency_id": {
                                                    "type": "integer",
                                                    "example": 127
                                                },
                                                "supplier_account_id": {
                                                    "type": "integer",
                                                    "example": 571
                                                },
                                                "supplier_account_name": {
                                                    "type": "string",
                                                    "example": "Acme Legal Supplies Ltd"
                                                },
                                                "date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2026-05-18"
                                                },
                                                "exchange_rate": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1
                                                },
                                                "bill_number": {
                                                    "type": "string",
                                                    "example": "BIL-0000001"
                                                },
                                                "attachment": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2026-05-18 14:44:21"
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2026-05-18 14:44:21"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bills/{bill_header_id}/payments": {
            "post": {
                "tags": [
                    "Bill Payments"
                ],
                "summary": "Create Bill Payment",
                "description": "Create Bill Payment",
                "operationId": "7225e6059ed211336dfccb5c18e442cc",
                "parameters": [
                    {
                        "name": "bill_header_id",
                        "in": "path",
                        "description": "Bill Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "organization_id",
                                    "paid_on",
                                    "deposit_account_id",
                                    "deposit_amount",
                                    "payment_method"
                                ],
                                "properties": {
                                    "organization_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "paid_on": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2023-11-02"
                                    },
                                    "deposit_account_id": {
                                        "type": "integer",
                                        "example": 31
                                    },
                                    "deposit_amount": {
                                        "type": "number",
                                        "example": 400
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "enum": [
                                            "Bank Transfer",
                                            "Cash",
                                            "Cheque",
                                            "Credit Card",
                                            "Other",
                                            "Online payment"
                                        ],
                                        "example": "Cash"
                                    },
                                    "comments": {
                                        "type": "string",
                                        "example": "Partial payment"
                                    },
                                    "payment_reference": {
                                        "type": "string",
                                        "example": "TXN-20231102-01"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Bill payment has been created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Bill payment has been created."
                                        },
                                        "bill_payment": {
                                            "properties": {
                                                "payment_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "payment_voucher_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "payment_total": {
                                                    "type": "number",
                                                    "example": 400
                                                },
                                                "payment_reference": {
                                                    "type": "string",
                                                    "example": "TXN-20231102-01"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Partial payment"
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "supplier_account_id": {
                                                    "type": "integer",
                                                    "example": 97
                                                },
                                                "date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2021-11-02"
                                                },
                                                "bill_number": {
                                                    "type": "string",
                                                    "example": "BIL-0000001"
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "example": "Partial payment"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-30T10:30:02.000000Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/bills/{bill_header_id}/payments/{payment_voucher_id}": {
            "put": {
                "tags": [
                    "Bill Payments"
                ],
                "summary": "Update bill payment",
                "description": "Update bill payment",
                "operationId": "9fc6f88b6e51677e28f1ff43cbbe5cfb",
                "parameters": [
                    {
                        "name": "bill_header_id",
                        "in": "path",
                        "description": "Bill Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_voucher_id",
                        "in": "path",
                        "description": "Payment Voucher Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Bill Payment",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "paid_on": "2021-11-02",
                                "deposit_account_id": 31,
                                "deposit_amount": 400,
                                "payment_method": "Cash",
                                "payment_reference": "TXN-20231102-01",
                                "comments": "Partially Paid"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Bill payment has been updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Bill payment has been updated."
                                        },
                                        "bill_payment": {
                                            "properties": {
                                                "payment_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "payment_voucher_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "payment_total": {
                                                    "type": "number",
                                                    "example": 400
                                                },
                                                "payment_reference": {
                                                    "type": "string",
                                                    "example": "TXN-20231102-01"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Partial payment"
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "supplier_account_id": {
                                                    "type": "integer",
                                                    "example": 97
                                                },
                                                "date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2021-11-02"
                                                },
                                                "bill_number": {
                                                    "type": "string",
                                                    "example": "BIL-0000001"
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "example": "Partial payment"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-30T10:30:02.000000Z"
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-10-02T08:25:12.000000Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Bill Payments"
                ],
                "summary": "Delete bill payment",
                "description": "Delete bill payment",
                "operationId": "1824588e99b91bbfc9b065da37a79b5e",
                "parameters": [
                    {
                        "name": "bill_header_id",
                        "in": "path",
                        "description": "Bill Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_voucher_id",
                        "in": "path",
                        "description": "Payment Voucher Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "bill_payment has been deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/clients/{id}/accounts": {
            "post": {
                "tags": [
                    "clients"
                ],
                "summary": "Create client account",
                "description": "Create New Client Account",
                "operationId": "28e1b2e49e3077b2f3dd42082f1385bf",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Create New Client Account",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "organization_id": 1,
                                "name": 22,
                                "number": "8",
                                "currency_id": "1",
                                "description": "desc..",
                                "bill_to": "App4Legal, Dubai",
                                "is_visible_in_advisor": "0"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit-notes": {
            "get": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "List credit notes",
                "description": "List all credit notes",
                "operationId": "48b596e5e6f943f29573c3ba3213b737",
                "parameters": [
                    {
                        "name": "account_id",
                        "in": "query",
                        "description": "Search Credit Notes by account Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "account_name",
                        "in": "query",
                        "description": "Search Credit Notes by account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "account_number",
                        "in": "query",
                        "description": "Search Credit Notes by account number",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "balance_due",
                        "in": "query",
                        "description": "Search Credit Notes by balance due",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "credit_note_date",
                        "in": "query",
                        "description": "Search Credit Notes by credit note date",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "credit_note_number",
                        "in": "query",
                        "description": "Search Credit Notes by credit note number",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "non_taxable",
                        "in": "query",
                        "description": "Search for non-taxable credit notes",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search Credit Notes by organization id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "refunds_made",
                        "in": "query",
                        "description": "Search Credit Notes by refunds made",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Search Credit Notes by status",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sub_total",
                        "in": "query",
                        "description": "Search Credit Notes by sub-total",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "sub_total_after_discount",
                        "in": "query",
                        "description": "Search Credit Notes by sub-total after discount",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "total",
                        "in": "query",
                        "description": "Search Credit Notes by total",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "total_discount",
                        "in": "query",
                        "description": "Search Credit Notes by total discount",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "total_tax",
                        "in": "query",
                        "description": "Search Credit Notes by total tax",
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Search Credit Notes by voucher header id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter Credit Notes by the above query parameters. <br /><b>Example:</b> { \"total[gt]\" : 6000 }",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort Credit Notes in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "balance_due",
                                "credit_note_date",
                                "credit_note_number",
                                "refunds_made",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort Credit Notes in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "balance_due",
                                "credit_note_date",
                                "credit_note_number",
                                "refunds_made",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "credit_note": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 358
                                                    },
                                                    "voucher_header_id": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "account": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 403
                                                            },
                                                            "organization_id": {
                                                                "type": "string",
                                                                "example": "0005"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Lexzur KSA"
                                                            },
                                                            "account_label": {
                                                                "type": "string",
                                                                "example": "Lexzur KSA (SAR)"
                                                            },
                                                            "account_type": {
                                                                "type": "string",
                                                                "example": "Third Party"
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "SAR"
                                                            },
                                                            "organization": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string",
                                                                        "example": "0005"
                                                                    },
                                                                    "name": {
                                                                        "type": "string",
                                                                        "example": "zatca"
                                                                    },
                                                                    "country": {
                                                                        "type": "string",
                                                                        "example": "SA"
                                                                    },
                                                                    "city": {
                                                                        "type": "string",
                                                                        "example": "Riyadh"
                                                                    },
                                                                    "state": {
                                                                        "type": "string",
                                                                        "example": "Riyadh"
                                                                    },
                                                                    "zip": {
                                                                        "type": "string",
                                                                        "example": "1000"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "credit_note_number": {
                                                        "type": "string",
                                                        "example": "DRFT0000008"
                                                    },
                                                    "bill_to": {
                                                        "type": "string",
                                                        "example": "Lexzur KSA"
                                                    },
                                                    "credit_note_date": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-11-11 00:00:00"
                                                    },
                                                    "paid_status": {
                                                        "type": "string",
                                                        "example": "draft"
                                                    },
                                                    "total": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 12369.79
                                                    },
                                                    "balance_due": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0
                                                    },
                                                    "related_invoices": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 151
                                                                },
                                                                "invoice_date": {
                                                                    "type": "string",
                                                                    "format": "date-time",
                                                                    "example": "2024-11-11 00:00:00"
                                                                },
                                                                "invoice_total": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 20707.85
                                                                },
                                                                "invoice_number": {
                                                                    "type": "string",
                                                                    "example": "INV0000007"
                                                                },
                                                                "balance_due": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 20707.85
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "credit_note_details": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 439
                                                                },
                                                                "item_title": {
                                                                    "type": "string",
                                                                    "example": "Corportation"
                                                                },
                                                                "unit_price": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 100
                                                                },
                                                                "quantity": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 1
                                                                },
                                                                "discount_percentage": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 20
                                                                },
                                                                "total": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 80
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": "http://localhost/lexzur/api/v2/money/credit-notes?page=2"
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 16
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 2
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Create Credit Notes",
                "description": "Create New Credit Notes",
                "operationId": "4c14dedf965dc7986dbe71f7604a30c5",
                "requestBody": {
                    "description": "Create Credit Note",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "organization_id": {
                                        "type": "string",
                                        "example": "0005"
                                    },
                                    "user_id": {
                                        "type": "string",
                                        "example": "0000000001"
                                    },
                                    "account_id": {
                                        "type": "integer",
                                        "example": 403
                                    },
                                    "prefix": {
                                        "type": "string",
                                        "example": "DRFT"
                                    },
                                    "reference_number": {
                                        "type": "string",
                                        "example": "0000007"
                                    },
                                    "credit_note_reference": {
                                        "type": "string",
                                        "example": ""
                                    },
                                    "credit_note_reason_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "bill_to": {
                                        "type": "string",
                                        "example": "Lexzur,KSA"
                                    },
                                    "related_invoices": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "credit_note_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2024-11-13"
                                    },
                                    "credit_note_type_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "transaction_type_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "due_on": {
                                        "type": "string",
                                        "format": "date",
                                        "example": ""
                                    },
                                    "term_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "notes": {
                                        "type": "string",
                                        "example": ""
                                    },
                                    "paid_status": {
                                        "type": "string",
                                        "example": "draft"
                                    },
                                    "display_tax": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "display_discount": {
                                        "type": "string",
                                        "example": "both_item_before_level"
                                    },
                                    "discount_percentage": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 10
                                    },
                                    "discount_value_type": {
                                        "type": "string",
                                        "example": "percentage"
                                    },
                                    "display_adjust": {
                                        "type": "string",
                                        "example": "invoice_level_before_tax"
                                    },
                                    "adjust_percentage": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 12.620106123619676
                                    },
                                    "adjust_amount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 88
                                    },
                                    "adjust_value_type": {
                                        "type": "string",
                                        "example": "amount"
                                    },
                                    "adjust_label": {
                                        "type": "string",
                                        "example": "Adjustment"
                                    },
                                    "lines_total_discount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 76.7
                                    },
                                    "lines_total_subtotal": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 774
                                    },
                                    "lines_total_tax": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 39.71
                                    },
                                    "lines_totals": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 697.3
                                    },
                                    "credit_note_details": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 384
                                                },
                                                "item_id": {
                                                    "type": "integer",
                                                    "example": 22
                                                },
                                                "tax_id": {
                                                    "type": "integer",
                                                    "example": 8
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Incorporation"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 352
                                                },
                                                "quantity": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1
                                                },
                                                "discount_type": {
                                                    "type": "string",
                                                    "example": "percentage"
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 11
                                                },
                                                "tax_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 5
                                                },
                                                "item_description": {
                                                    "type": "string",
                                                    "example": "item 1"
                                                },
                                                "item_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-11-13"
                                                },
                                                "partner_shares": {
                                                    "type": "string",
                                                    "example": null
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "example": [
                                            {
                                                "account_id": 384,
                                                "item_id": 22,
                                                "tax_id": 8,
                                                "item_title": "Incorporation",
                                                "unit_price": 352,
                                                "quantity": 1,
                                                "discount_type": "percentage",
                                                "discount_percentage": 11,
                                                "tax_percentage": 5,
                                                "item_description": "item 1",
                                                "item_date": "2024-11-13",
                                                "partner_shares": null
                                            },
                                            {
                                                "account_id": 384,
                                                "item_id": 22,
                                                "tax_id": 7,
                                                "item_title": "Consultancy",
                                                "unit_price": 422,
                                                "quantity": 1,
                                                "discount_type": "percentage",
                                                "discount_percentage": 9,
                                                "tax_percentage": 6,
                                                "item_description": "item 2",
                                                "item_date": "2024-11-13",
                                                "partner_shares": null
                                            }
                                        ]
                                    },
                                    "credit_note_expenses": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "credit_note_time_logs": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "related_matters": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "is_skip_account_fields_checking": {
                                        "type": "integer",
                                        "example": 1
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "credit_note has been created."
                                        },
                                        "credit_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 401
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "account": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 403
                                                        },
                                                        "parent_id": {
                                                            "type": "integer",
                                                            "nullable": true
                                                        },
                                                        "organization_id": {
                                                            "type": "string",
                                                            "example": "0005"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Lexzur,KSA"
                                                        },
                                                        "account_label": {
                                                            "type": "string",
                                                            "example": "Lexzur,KSA (SAR)"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "account_data": {
                                                            "type": "string",
                                                            "example": "Lexzur,KSA"
                                                        },
                                                        "system_account": {
                                                            "type": "string",
                                                            "example": "no"
                                                        },
                                                        "account_type_id": {
                                                            "type": "integer",
                                                            "example": 15
                                                        },
                                                        "account_type": {
                                                            "type": "string",
                                                            "example": "Third Party"
                                                        },
                                                        "number": {
                                                            "type": "string",
                                                            "example": "1"
                                                        },
                                                        "currency_id": {
                                                            "type": "integer",
                                                            "example": 194
                                                        },
                                                        "currency": {
                                                            "type": "string",
                                                            "example": "SAR"
                                                        },
                                                        "model_id": {
                                                            "type": "integer",
                                                            "example": 24
                                                        },
                                                        "member_id": {
                                                            "type": "integer",
                                                            "example": 4
                                                        },
                                                        "model_name": {
                                                            "type": "string",
                                                            "example": "Person"
                                                        },
                                                        "model_type": {
                                                            "type": "string",
                                                            "example": "client"
                                                        },
                                                        "tax_number": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_id_type": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_id_value": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "address": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "organization": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "0005"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "zatca"
                                                                },
                                                                "country": {
                                                                    "type": "string",
                                                                    "example": "SA"
                                                                },
                                                                "city": {
                                                                    "type": "string",
                                                                    "example": "Riyadh"
                                                                },
                                                                "state": {
                                                                    "type": "string",
                                                                    "example": "Riyadh"
                                                                },
                                                                "zip": {
                                                                    "type": "string",
                                                                    "example": "1000"
                                                                }
                                                            },
                                                            "type": "object"
                                                        },
                                                        "client": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "00000024"
                                                                },
                                                                "discount_percentage": {
                                                                    "type": "string",
                                                                    "example": "0.000"
                                                                },
                                                                "member_label": {
                                                                    "type": "string",
                                                                    "example": "PER00000004"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "credit_note_number": {
                                                    "type": "string",
                                                    "example": "DRFT0000015"
                                                },
                                                "prefix_type": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": "DRFT"
                                                },
                                                "reference_number": {
                                                    "type": "string",
                                                    "example": "0000015"
                                                },
                                                "bill_to": {
                                                    "type": "string",
                                                    "example": "Lexzur,KSA"
                                                },
                                                "credit_note_date": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-13 00:00:00"
                                                },
                                                "paid_status": {
                                                    "type": "string",
                                                    "example": "draft"
                                                },
                                                "display_tax": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "display_discount": {
                                                    "type": "string",
                                                    "example": "both_item_before_level"
                                                },
                                                "display_item_date": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "display_item_quantity": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "credit_note_reason_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "term_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "terms": {
                                                    "type": "string",
                                                    "example": "In Advance"
                                                },
                                                "lines_total_discount": {
                                                    "type": "string",
                                                    "example": "76.700000000000"
                                                },
                                                "lines_total_subtotal": {
                                                    "type": "string",
                                                    "example": "774.000000000000"
                                                },
                                                "lines_total_tax": {
                                                    "type": "string",
                                                    "example": "38.70000000000"
                                                },
                                                "lines_totals": {
                                                    "type": "string",
                                                    "example": "697.300000000000"
                                                },
                                                "total": {
                                                    "type": "string",
                                                    "example": "736.6000000000000"
                                                },
                                                "refunds_made": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "invoices_closed": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 755.28
                                                },
                                                "balance_due": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "exchange_rate": {
                                                    "type": "string",
                                                    "example": "1.0000000000000000"
                                                },
                                                "discount_percentage": {
                                                    "type": "string",
                                                    "example": "10.000000000000"
                                                },
                                                "discount_amount": {
                                                    "type": "string",
                                                    "example": "69.730000000000"
                                                },
                                                "adjust_percentage": {
                                                    "type": "string",
                                                    "example": "10.00000000000"
                                                },
                                                "adjust_amount": {
                                                    "type": "string",
                                                    "example": "69.73"
                                                },
                                                "adjust_label": {
                                                    "type": "string",
                                                    "example": "Adjustment"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-13 16:28:47"
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "System Administrator"
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-13 16:28:47"
                                                },
                                                "modified_by_name": {
                                                    "type": "string",
                                                    "example": "System Administrator"
                                                },
                                                "case_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "sub_total": {
                                                    "type": "string",
                                                    "example": "774.000000000000"
                                                },
                                                "total_discount": {
                                                    "type": "string",
                                                    "example": "146.430000000000"
                                                },
                                                "total_tax": {
                                                    "type": "string",
                                                    "example": "38.700000000000"
                                                },
                                                "taxable": {
                                                    "type": "string",
                                                    "example": "38.710000000000000000000000000000"
                                                },
                                                "non_taxable": {
                                                    "type": "string",
                                                    "example": "697.3000000000000000000000000000"
                                                },
                                                "sub_total_after_discount": {
                                                    "type": "string",
                                                    "example": "627.570000000000"
                                                },
                                                "sub_total_after_adjustment": {
                                                    "type": "string",
                                                    "example": "627.570000000000"
                                                },
                                                "tax_number": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "services_subtotal": {
                                                    "type": "string",
                                                    "example": "774.000000000000"
                                                },
                                                "services_tax": {
                                                    "type": "string",
                                                    "example": "38.700000000000"
                                                },
                                                "expenses_subtotal": {
                                                    "type": "string",
                                                    "example": "0.000000000000"
                                                },
                                                "expenses_tax": {
                                                    "type": "string",
                                                    "example": "0.000000000000"
                                                },
                                                "related_invoices": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 173
                                                            },
                                                            "credit_note_header_id": {
                                                                "type": "integer",
                                                                "example": 401
                                                            },
                                                            "invoice_header_id": {
                                                                "type": "integer",
                                                                "example": 300
                                                            },
                                                            "voucher_header_id": {
                                                                "type": "integer",
                                                                "example": 802
                                                            },
                                                            "total": {
                                                                "type": "string",
                                                                "example": "755.280000000000"
                                                            },
                                                            "invoice_date": {
                                                                "type": "string",
                                                                "format": "date-time",
                                                                "example": "2024-11-13 00:00:00"
                                                            },
                                                            "invoice_total": {
                                                                "type": "string",
                                                                "example": "819.350"
                                                            },
                                                            "paid_status": {
                                                                "type": "string",
                                                                "example": "open"
                                                            },
                                                            "invoice_number": {
                                                                "type": "string",
                                                                "example": "INV0000011"
                                                            },
                                                            "balance_due": {
                                                                "type": "string",
                                                                "example": "819.350000000000"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_details": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 521
                                                            },
                                                            "account_id": {
                                                                "type": "integer",
                                                                "example": 384
                                                            },
                                                            "item_id": {
                                                                "type": "integer",
                                                                "example": 22
                                                            },
                                                            "tax_id": {
                                                                "type": "integer",
                                                                "example": 8
                                                            },
                                                            "item_title": {
                                                                "type": "string",
                                                                "example": "Incorporation"
                                                            },
                                                            "unit_price": {
                                                                "type": "string",
                                                                "example": "352.000000000000"
                                                            },
                                                            "quantity": {
                                                                "type": "string",
                                                                "example": "1.000000000000"
                                                            },
                                                            "discount_percentage": {
                                                                "type": "string",
                                                                "example": "11.000000000000"
                                                            },
                                                            "discount_amount": {
                                                                "type": "string",
                                                                "example": "38.720000000000"
                                                            },
                                                            "tax_percentage": {
                                                                "type": "string",
                                                                "example": "5.000000000000"
                                                            },
                                                            "item_description": {
                                                                "type": "string",
                                                                "example": "item 1"
                                                            },
                                                            "line_sub_total": {
                                                                "type": "string",
                                                                "example": "352.000000000000"
                                                            },
                                                            "tax_amount": {
                                                                "type": "string",
                                                                "example": "16.070000000000"
                                                            },
                                                            "total": {
                                                                "type": "string",
                                                                "example": "313.280000000000"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_expenses": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_time_logs": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_bill_items": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "related_matters": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "refunds": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "e_invoicing_key": {
                                                    "type": "string",
                                                    "example": "saudi"
                                                },
                                                "credit_note_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "transaction_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit-notes/{id}": {
            "get": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Get Credit Note",
                "description": "Get Credit Note by id",
                "operationId": "a94a8cb5cbb71592dde84d9cda5540f9",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "credit_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 287
                                                },
                                                "voucher_header_id": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "account": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 403
                                                        },
                                                        "parent_id": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "organization_id": {
                                                            "type": "string",
                                                            "example": "0005"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Lexzur KSA"
                                                        },
                                                        "account_label": {
                                                            "type": "string",
                                                            "example": "Lexzur KSA (SAR)"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "account_data": {
                                                            "type": "string",
                                                            "example": "Lexzur KSA"
                                                        },
                                                        "system_account": {
                                                            "type": "string",
                                                            "example": "no"
                                                        },
                                                        "account_type_id": {
                                                            "type": "integer",
                                                            "example": 15
                                                        },
                                                        "account_type": {
                                                            "type": "string",
                                                            "example": "Third Party"
                                                        },
                                                        "number": {
                                                            "type": "string",
                                                            "example": "1"
                                                        },
                                                        "currency_id": {
                                                            "type": "integer",
                                                            "example": 194
                                                        },
                                                        "currency": {
                                                            "type": "string",
                                                            "example": "SAR"
                                                        },
                                                        "model_id": {
                                                            "type": "integer",
                                                            "example": 24
                                                        },
                                                        "member_id": {
                                                            "type": "integer",
                                                            "example": 4
                                                        },
                                                        "model_name": {
                                                            "type": "string",
                                                            "example": "Person"
                                                        },
                                                        "model_type": {
                                                            "type": "string",
                                                            "example": "client"
                                                        },
                                                        "tax_number": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_id_type": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_id_value": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "address": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "address2": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "zip": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "city": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "country_id": {
                                                            "type": "integer",
                                                            "nullable": true
                                                        },
                                                        "state": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "street_name": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_street_name": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "building_number": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "address_additional_number": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "district_neighborhood": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "rate_per_hour": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "advisor_rate_per_hour": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "related_to_advisor_account": {
                                                            "type": "boolean",
                                                            "example": false
                                                        },
                                                        "company_id": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "visible_to_users": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "organization": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "0005"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "zatca"
                                                                },
                                                                "country": {
                                                                    "type": "string",
                                                                    "example": "SA"
                                                                },
                                                                "city": {
                                                                    "type": "string",
                                                                    "example": "Riyadh"
                                                                },
                                                                "state": {
                                                                    "type": "string",
                                                                    "example": "Riyadh"
                                                                },
                                                                "zip": {
                                                                    "type": "string",
                                                                    "example": "1000"
                                                                },
                                                                "integration_type": {
                                                                    "type": "string",
                                                                    "nullable": true
                                                                }
                                                            },
                                                            "type": "object"
                                                        },
                                                        "client": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "00000024"
                                                                },
                                                                "term_id": {
                                                                    "type": "string",
                                                                    "nullable": true
                                                                },
                                                                "discount_percentage": {
                                                                    "type": "string",
                                                                    "example": "0.000"
                                                                },
                                                                "phone": {
                                                                    "type": "string",
                                                                    "example": ""
                                                                },
                                                                "mobile": {
                                                                    "type": "string",
                                                                    "example": ""
                                                                },
                                                                "emails": {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string",
                                                                        "example": ""
                                                                    }
                                                                },
                                                                "member_label": {
                                                                    "type": "string",
                                                                    "example": "PER00000004"
                                                                },
                                                                "ledes": {
                                                                    "type": "integer",
                                                                    "example": 0
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "credit_note_number": {
                                                    "type": "string",
                                                    "example": "DRFT0000001"
                                                },
                                                "prefix_type": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": "DRFT"
                                                },
                                                "suffix": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "reference_number": {
                                                    "type": "string",
                                                    "example": "0000001"
                                                },
                                                "bill_to": {
                                                    "type": "string",
                                                    "example": "Lexzur KSA"
                                                },
                                                "credit_note_date": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-06 00:00:00"
                                                },
                                                "paid_status": {
                                                    "type": "string",
                                                    "example": "draft"
                                                },
                                                "display_tax": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "display_discount": {
                                                    "type": "string",
                                                    "example": "no"
                                                },
                                                "display_item_date": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "display_item_quantity": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "credit_note_reason_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "term_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "terms": {
                                                    "type": "string",
                                                    "example": "In Advance"
                                                },
                                                "lines_total_discount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "lines_total_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "lines_total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "lines_totals": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 275
                                                },
                                                "refunds_made": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "invoices_closed": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 275
                                                },
                                                "balance_due": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "notes": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "exchange_rate": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1
                                                },
                                                "discount_id": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "discount_value_type": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "display_adjust": {
                                                    "type": "string",
                                                    "example": "invoice_level_after_tax"
                                                },
                                                "adjust_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 10
                                                },
                                                "adjust_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 25
                                                },
                                                "adjust_value_type": {
                                                    "type": "string",
                                                    "example": "percentage"
                                                },
                                                "adjust_label": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "credit_note_reference": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-06 13:59:06"
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "System Administrator"
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-06 13:59:06"
                                                },
                                                "modified_by_name": {
                                                    "type": "string",
                                                    "example": "System Administrator"
                                                },
                                                "invoices_close": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 275
                                                },
                                                "case_id": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "matter_code": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "case_subject": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "assignee": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "case_internal_reference": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "practice_area": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "case_category": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "total_discount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "taxable": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "non_taxable": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "sub_total_after_discount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "sub_total_after_adjustment": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "tax_number": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "credit_note_sync_type": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "services_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "services_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "expenses_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "expenses_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "bill_items_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "bill_items_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "time_logs_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "time_logs_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "related_invoices": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 140
                                                            },
                                                            "credit_note_header_id": {
                                                                "type": "integer",
                                                                "example": 287
                                                            },
                                                            "invoice_header_id": {
                                                                "type": "integer",
                                                                "example": 277
                                                            },
                                                            "voucher_header_id": {
                                                                "type": "integer",
                                                                "example": 765
                                                            },
                                                            "total": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 275
                                                            },
                                                            "invoice_date": {
                                                                "type": "string",
                                                                "format": "date-time",
                                                                "example": "2024-11-06 00:00:00"
                                                            },
                                                            "invoice_total": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 500
                                                            },
                                                            "paid_status": {
                                                                "type": "string",
                                                                "example": "open"
                                                            },
                                                            "invoice_number": {
                                                                "type": "string",
                                                                "example": "INV0000001"
                                                            },
                                                            "balance_due": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 500
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_details": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 212
                                                            },
                                                            "account_id": {
                                                                "type": "integer",
                                                                "example": 384
                                                            },
                                                            "item_id": {
                                                                "type": "integer",
                                                                "example": 22
                                                            },
                                                            "tax_id": {
                                                                "type": "string",
                                                                "nullable": true
                                                            },
                                                            "discount_id": {
                                                                "type": "string",
                                                                "nullable": true
                                                            },
                                                            "item_title": {
                                                                "type": "string",
                                                                "example": "Incorporation"
                                                            },
                                                            "unit_price": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 250
                                                            },
                                                            "quantity": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 1
                                                            },
                                                            "discount_percentage": {
                                                                "type": "number",
                                                                "nullable": true
                                                            },
                                                            "discount_amount": {
                                                                "type": "number",
                                                                "nullable": true
                                                            },
                                                            "tax_percentage": {
                                                                "type": "number",
                                                                "nullable": true
                                                            },
                                                            "item_description": {
                                                                "type": "string",
                                                                "nullable": true
                                                            },
                                                            "discount_type": {
                                                                "type": "string",
                                                                "example": "percentage"
                                                            },
                                                            "line_sub_total": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 250
                                                            },
                                                            "sub_total_after_line_disc": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 250
                                                            },
                                                            "tax_amount": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 0
                                                            },
                                                            "total": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 250
                                                            },
                                                            "item_date": {
                                                                "type": "string",
                                                                "format": "date",
                                                                "example": "2024-11-06"
                                                            },
                                                            "partner_shares": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_expenses": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "credit_note_time_logs": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "credit_note_bill_items": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "related_matters": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "refunds": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "e_invoicing_key": {
                                                    "type": "string",
                                                    "example": "saudi"
                                                },
                                                "credit_note_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "transaction_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Update Credit Note",
                "description": "Update Credit Note",
                "operationId": "2e8b8ad383fdc60df02f26a3ed36a99a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Credit Note",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "organization_id": {
                                        "type": "string",
                                        "example": "0005"
                                    },
                                    "user_id": {
                                        "type": "string",
                                        "example": "0000000001"
                                    },
                                    "account_id": {
                                        "type": "integer",
                                        "example": 403
                                    },
                                    "prefix": {
                                        "type": "string",
                                        "example": "DRFT"
                                    },
                                    "reference_number": {
                                        "type": "string",
                                        "example": "0000007"
                                    },
                                    "credit_note_reference": {
                                        "type": "string",
                                        "example": ""
                                    },
                                    "credit_note_reason_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "bill_to": {
                                        "type": "string",
                                        "example": "Lexzur,KSA"
                                    },
                                    "related_invoices": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "credit_note_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2024-11-13"
                                    },
                                    "credit_note_type_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "transaction_type_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "due_on": {
                                        "type": "string",
                                        "format": "date",
                                        "example": ""
                                    },
                                    "term_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "notes": {
                                        "type": "string",
                                        "example": ""
                                    },
                                    "paid_status": {
                                        "type": "string",
                                        "example": "draft"
                                    },
                                    "display_tax": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "display_discount": {
                                        "type": "string",
                                        "example": "both_item_before_level"
                                    },
                                    "discount_percentage": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 10
                                    },
                                    "discount_value_type": {
                                        "type": "string",
                                        "example": "percentage"
                                    },
                                    "display_adjust": {
                                        "type": "string",
                                        "example": "invoice_level_before_tax"
                                    },
                                    "adjust_percentage": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 10
                                    },
                                    "adjust_amount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 69.73
                                    },
                                    "adjust_value_type": {
                                        "type": "string",
                                        "example": "percentage"
                                    },
                                    "adjust_label": {
                                        "type": "string",
                                        "example": "Adjustment"
                                    },
                                    "lines_total_discount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 76.7
                                    },
                                    "lines_total_subtotal": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 774
                                    },
                                    "lines_total_tax": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 38.7
                                    },
                                    "lines_totals": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 697.3
                                    },
                                    "credit_note_details": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 384
                                                },
                                                "item_id": {
                                                    "type": "integer",
                                                    "example": 22
                                                },
                                                "tax_id": {
                                                    "type": "integer",
                                                    "example": 8
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Incorporation"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 352
                                                },
                                                "quantity": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1
                                                },
                                                "discount_type": {
                                                    "type": "string",
                                                    "example": "percentage"
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 11
                                                },
                                                "tax_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 5
                                                },
                                                "item_description": {
                                                    "type": "string",
                                                    "example": "item 1"
                                                },
                                                "item_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-11-13"
                                                },
                                                "partner_shares": {
                                                    "type": "string",
                                                    "example": null
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "example": [
                                            {
                                                "account_id": 384,
                                                "item_id": 22,
                                                "tax_id": 8,
                                                "item_title": "Incorporation",
                                                "unit_price": 352,
                                                "quantity": 1,
                                                "discount_type": "percentage",
                                                "discount_percentage": 11,
                                                "tax_percentage": 5,
                                                "item_description": "item 1",
                                                "item_date": "2024-11-13",
                                                "partner_shares": null
                                            },
                                            {
                                                "account_id": 384,
                                                "item_id": 22,
                                                "tax_id": 7,
                                                "item_title": "Consultancy",
                                                "unit_price": 422,
                                                "quantity": 1,
                                                "discount_type": "percentage",
                                                "discount_percentage": 9,
                                                "tax_percentage": 6,
                                                "item_description": "item 2",
                                                "item_date": "2024-11-13",
                                                "partner_shares": null
                                            }
                                        ]
                                    },
                                    "credit_note_expenses": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "credit_note_time_logs": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "related_matters": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "is_skip_account_fields_checking": {
                                        "type": "integer",
                                        "example": 1
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "credit_note has been updated."
                                        },
                                        "credit_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 401
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "account": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 403
                                                        },
                                                        "parent_id": {
                                                            "type": "integer",
                                                            "nullable": true
                                                        },
                                                        "organization_id": {
                                                            "type": "string",
                                                            "example": "0005"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Lexzur,KSA"
                                                        },
                                                        "account_label": {
                                                            "type": "string",
                                                            "example": "Lexzur,KSA (SAR)"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "account_data": {
                                                            "type": "string",
                                                            "example": "Lexzur,KSA"
                                                        },
                                                        "system_account": {
                                                            "type": "string",
                                                            "example": "no"
                                                        },
                                                        "account_type_id": {
                                                            "type": "integer",
                                                            "example": 15
                                                        },
                                                        "account_type": {
                                                            "type": "string",
                                                            "example": "Third Party"
                                                        },
                                                        "number": {
                                                            "type": "string",
                                                            "example": "1"
                                                        },
                                                        "currency_id": {
                                                            "type": "integer",
                                                            "example": 194
                                                        },
                                                        "currency": {
                                                            "type": "string",
                                                            "example": "SAR"
                                                        },
                                                        "model_id": {
                                                            "type": "integer",
                                                            "example": 24
                                                        },
                                                        "member_id": {
                                                            "type": "integer",
                                                            "example": 4
                                                        },
                                                        "model_name": {
                                                            "type": "string",
                                                            "example": "Person"
                                                        },
                                                        "model_type": {
                                                            "type": "string",
                                                            "example": "client"
                                                        },
                                                        "tax_number": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_id_type": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "additional_id_value": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "address": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "organization": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "0005"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "zatca"
                                                                },
                                                                "country": {
                                                                    "type": "string",
                                                                    "example": "SA"
                                                                },
                                                                "city": {
                                                                    "type": "string",
                                                                    "example": "Riyadh"
                                                                },
                                                                "state": {
                                                                    "type": "string",
                                                                    "example": "Riyadh"
                                                                },
                                                                "zip": {
                                                                    "type": "string",
                                                                    "example": "1000"
                                                                }
                                                            },
                                                            "type": "object"
                                                        },
                                                        "client": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "00000024"
                                                                },
                                                                "discount_percentage": {
                                                                    "type": "string",
                                                                    "example": "0.000"
                                                                },
                                                                "member_label": {
                                                                    "type": "string",
                                                                    "example": "PER00000004"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "credit_note_number": {
                                                    "type": "string",
                                                    "example": "DRFT0000015"
                                                },
                                                "prefix_type": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": "DRFT"
                                                },
                                                "reference_number": {
                                                    "type": "string",
                                                    "example": "0000015"
                                                },
                                                "bill_to": {
                                                    "type": "string",
                                                    "example": "Lexzur,KSA"
                                                },
                                                "credit_note_date": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-13 00:00:00"
                                                },
                                                "paid_status": {
                                                    "type": "string",
                                                    "example": "draft"
                                                },
                                                "display_tax": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "display_discount": {
                                                    "type": "string",
                                                    "example": "both_item_before_level"
                                                },
                                                "display_item_date": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "display_item_quantity": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "credit_note_reason_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "term_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "terms": {
                                                    "type": "string",
                                                    "example": "In Advance"
                                                },
                                                "lines_total_discount": {
                                                    "type": "string",
                                                    "example": "76.700000000000"
                                                },
                                                "lines_total_subtotal": {
                                                    "type": "string",
                                                    "example": "774.000000000000"
                                                },
                                                "lines_total_tax": {
                                                    "type": "string",
                                                    "example": "38.700000000000"
                                                },
                                                "lines_totals": {
                                                    "type": "string",
                                                    "example": "697.300000000000"
                                                },
                                                "total": {
                                                    "type": "string",
                                                    "example": "736.000000000000"
                                                },
                                                "refunds_made": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "invoices_closed": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 755.28
                                                },
                                                "balance_due": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "exchange_rate": {
                                                    "type": "string",
                                                    "example": "1.0000000000000000"
                                                },
                                                "discount_percentage": {
                                                    "type": "string",
                                                    "example": "10.000000000000"
                                                },
                                                "discount_amount": {
                                                    "type": "string",
                                                    "example": "69.730000000000"
                                                },
                                                "adjust_percentage": {
                                                    "type": "string",
                                                    "example": "10.0000000000"
                                                },
                                                "adjust_amount": {
                                                    "type": "string",
                                                    "example": "69.73"
                                                },
                                                "adjust_label": {
                                                    "type": "string",
                                                    "example": "Adjustment"
                                                },
                                                "adjust_value_type": {
                                                    "type": "string",
                                                    "example": "percentage"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-13 16:28:47"
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "System Administrator"
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-11-13 16:28:47"
                                                },
                                                "modified_by_name": {
                                                    "type": "string",
                                                    "example": "System Administrator"
                                                },
                                                "case_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "sub_total": {
                                                    "type": "string",
                                                    "example": "774.000000000000"
                                                },
                                                "total_discount": {
                                                    "type": "string",
                                                    "example": "146.430000000000"
                                                },
                                                "total_tax": {
                                                    "type": "string",
                                                    "example": "39.710000000000"
                                                },
                                                "taxable": {
                                                    "type": "string",
                                                    "example": "38.710000000000000000000000000000"
                                                },
                                                "non_taxable": {
                                                    "type": "string",
                                                    "example": "697.3000000000000000000000000000"
                                                },
                                                "sub_total_after_discount": {
                                                    "type": "string",
                                                    "example": "627.570000000000"
                                                },
                                                "sub_total_after_adjustment": {
                                                    "type": "string",
                                                    "example": "609.300000000000"
                                                },
                                                "tax_number": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "services_subtotal": {
                                                    "type": "string",
                                                    "example": "774.000000000000"
                                                },
                                                "services_tax": {
                                                    "type": "string",
                                                    "example": "39.710000000000"
                                                },
                                                "expenses_subtotal": {
                                                    "type": "string",
                                                    "example": "0.000000000000"
                                                },
                                                "expenses_tax": {
                                                    "type": "string",
                                                    "example": "0.000000000000"
                                                },
                                                "related_invoices": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 173
                                                            },
                                                            "credit_note_header_id": {
                                                                "type": "integer",
                                                                "example": 401
                                                            },
                                                            "invoice_header_id": {
                                                                "type": "integer",
                                                                "example": 300
                                                            },
                                                            "voucher_header_id": {
                                                                "type": "integer",
                                                                "example": 802
                                                            },
                                                            "total": {
                                                                "type": "string",
                                                                "example": "755.280000000000"
                                                            },
                                                            "invoice_date": {
                                                                "type": "string",
                                                                "format": "date-time",
                                                                "example": "2024-11-13 00:00:00"
                                                            },
                                                            "invoice_total": {
                                                                "type": "string",
                                                                "example": "819.350"
                                                            },
                                                            "paid_status": {
                                                                "type": "string",
                                                                "example": "open"
                                                            },
                                                            "invoice_number": {
                                                                "type": "string",
                                                                "example": "INV0000011"
                                                            },
                                                            "balance_due": {
                                                                "type": "string",
                                                                "example": "819.350000000000"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_details": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 521
                                                            },
                                                            "account_id": {
                                                                "type": "integer",
                                                                "example": 384
                                                            },
                                                            "item_id": {
                                                                "type": "integer",
                                                                "example": 22
                                                            },
                                                            "tax_id": {
                                                                "type": "integer",
                                                                "example": 8
                                                            },
                                                            "item_title": {
                                                                "type": "string",
                                                                "example": "Incorporation"
                                                            },
                                                            "unit_price": {
                                                                "type": "string",
                                                                "example": "352.000000000000"
                                                            },
                                                            "quantity": {
                                                                "type": "string",
                                                                "example": "1.000000000000"
                                                            },
                                                            "discount_percentage": {
                                                                "type": "string",
                                                                "example": "11.000000000000"
                                                            },
                                                            "discount_amount": {
                                                                "type": "string",
                                                                "example": "38.720000000000"
                                                            },
                                                            "tax_percentage": {
                                                                "type": "string",
                                                                "example": "5.000000000000"
                                                            },
                                                            "item_description": {
                                                                "type": "string",
                                                                "example": "item 1"
                                                            },
                                                            "line_sub_total": {
                                                                "type": "string",
                                                                "example": "352.000000000000"
                                                            },
                                                            "tax_amount": {
                                                                "type": "string",
                                                                "example": "16.070000000000"
                                                            },
                                                            "total": {
                                                                "type": "string",
                                                                "example": "313.280000000000"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_expenses": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_time_logs": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "credit_note_bill_items": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "related_matters": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "refunds": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "e_invoicing_key": {
                                                    "type": "string",
                                                    "example": "saudi"
                                                },
                                                "credit_note_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "transaction_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "credit_note not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Delete Credit Note",
                "description": "Delete Credit Note",
                "operationId": "e71c1b6fb4de3244beecc0cb00e4309f",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "credit_note has been deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "credit_note not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit-notes/{id}/status/draft": {
            "patch": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Mark Credit Note as draft",
                "description": "Mark Credit Note as draft",
                "operationId": "b7e207b82a5227372e946dc2144f1c17",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit-notes/{id}/status/cancelled": {
            "patch": {
                "tags": [
                    "Credit Notes"
                ],
                "summary": "Mark Credit Note as cancelled",
                "description": "Mark Credit Note as cancelled",
                "operationId": "0caf25939daa2d93c1808c2409c3728d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit-notes/{id}/status/open": {
            "patch": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Mark Credit Note as open",
                "description": "Mark Credit Note as open",
                "operationId": "51c02e496ad37471672449a47a41ac26",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit-notes/{id}/send-to-sync": {
            "patch": {
                "tags": [
                    "CreditNotes"
                ],
                "summary": "Send Credit Note to Sync",
                "operationId": "08fe6c480b6ac397721eea5910f62bca",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit_note_refunds": {
            "get": {
                "tags": [
                    "CreditNoteRefunds"
                ],
                "summary": "List credit notes refunds",
                "description": "List all credit notes refunds",
                "operationId": "4f752d39a48ef83edaf3334858d9f4fc",
                "parameters": [
                    {
                        "name": "credit_note_header_id",
                        "in": "query",
                        "description": "Search Credit Notes Refunds by credit note header Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Search Credit Notes Refunds by voucher header id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter Credit Notes by the above query parameters. <br />\n              <b>Example:</b> { \"voucher_header_id[gt]\" : 5 } which will search for credit notes refunds that have a voucher header id greater than \"5\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/credit_note_refunds/{id}": {
            "get": {
                "tags": [
                    "CreditNoteRefunds"
                ],
                "summary": "Get Credit Note Refund",
                "description": "Get Credit Note Refund by id",
                "operationId": "e42b42bfe48a5ebff9bfc2a3a30c6fd8",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "CreditNoteRefunds"
                ],
                "summary": "Delete Credit Note Refund",
                "description": "Delete Credit Note Refund",
                "operationId": "975cec3627d3e1f254bf4fb99d37c16b",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Credit Note Refund Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/deposits": {
            "get": {
                "tags": [
                    "Deposits"
                ],
                "summary": "List deposits",
                "description": "List all deposits",
                "operationId": "0f158ab00e5c08274616bd96739d8713",
                "parameters": [
                    {
                        "name": "deposit_id",
                        "in": "query",
                        "description": "Search deposits by deposit id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "asset_account",
                        "in": "query",
                        "description": "Search deposits by asset account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "asset_account_id",
                        "in": "query",
                        "description": "Search deposits by asset account id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "liability_account",
                        "in": "query",
                        "description": "Search deposits by liability account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "liability_account_id",
                        "in": "query",
                        "description": "Search deposits by liability account id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "trust_deposited",
                        "in": "query",
                        "description": "Search deposits by trust deposited amount",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "client_name",
                        "in": "query",
                        "description": "Search deposits by client name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "deposited_on",
                        "in": "query",
                        "description": "Search deposits by deposited on date",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "description",
                        "in": "query",
                        "description": "Search deposits by description",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "payment_method",
                        "in": "query",
                        "description": "Search deposits by payment method",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter deposits by the above query parameters. <br />\n              <b>Example:</b> { \"trust_deposited[gt]\" : 6000 } which will search for deposits that have a deposited trust greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort deposits in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "trust_deposited",
                                "payment_method"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort deposits in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "trust_deposited",
                                "payment_method"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Get All Deposits",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Success"
                                        },
                                        "deposit": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "deposit_id": {
                                                        "type": "string",
                                                        "example": "DP1"
                                                    },
                                                    "organization_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "voucher_header_id": {
                                                        "type": "integer",
                                                        "example": 10
                                                    },
                                                    "deposited_on": {
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "2024-01-15"
                                                    },
                                                    "client_id": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "client_name": {
                                                        "type": "string",
                                                        "example": "John Doe"
                                                    },
                                                    "currency_id": {
                                                        "type": "integer",
                                                        "example": 234
                                                    },
                                                    "exchange_rate": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1
                                                    },
                                                    "foreign_amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 100
                                                    },
                                                    "trust_deposited": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 100
                                                    },
                                                    "payment_method": {
                                                        "type": "string",
                                                        "example": "Cash"
                                                    },
                                                    "ref_num": {
                                                        "type": "string",
                                                        "example": "0000001"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "Deposit description"
                                                    },
                                                    "liability_account_id": {
                                                        "type": "integer",
                                                        "example": 119
                                                    },
                                                    "liability_account": {
                                                        "type": "string",
                                                        "example": "John Doe Trust Liability Account - USD (2)"
                                                    },
                                                    "liability_account_fl1": {
                                                        "type": "string",
                                                        "example": "John Doe Trust Liability Account - USD (2)"
                                                    },
                                                    "liability_account_fl2": {
                                                        "type": "string",
                                                        "example": "John Doe Trust Liability Account - USD (2)"
                                                    },
                                                    "asset_account_id": {
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "asset_account": {
                                                        "type": "string",
                                                        "example": "Trust Asset Account - USD (1)"
                                                    },
                                                    "asset_account_fl1": {
                                                        "type": "string",
                                                        "example": "Compte d'actifs fiduciaires - USD (1)"
                                                    },
                                                    "asset_account_fl2": {
                                                        "type": "string",
                                                        "example": "حساب ائتماني للعملاء - USD (1)"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": "http://localhost/lexzur/api/v2/money/deposits?page=2"
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 25
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 10
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Deposits"
                ],
                "summary": "Create deposit",
                "description": "Create deposit",
                "operationId": "fe7b868e93be1ebe2470db1dc72388af",
                "requestBody": {
                    "description": "Create Deposit",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "deposited_on": "2024-08-29",
                                "payment_method": "Cash",
                                "foreign_amount": 250,
                                "currency_id": 234,
                                "description": "new deposit added",
                                "client_id": 1,
                                "trust_asset_account": 20,
                                "organization_id": "0001"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Create Deposit",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "deposit has been created."
                                        },
                                        "deposit": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "deposit_id": {
                                                    "type": "string",
                                                    "example": "DP15"
                                                },
                                                "organization_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 19
                                                },
                                                "deposited_on": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-08-29"
                                                },
                                                "client_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "client_name": {
                                                    "type": "string",
                                                    "example": "Jane Doe"
                                                },
                                                "currency_id": {
                                                    "type": "integer",
                                                    "example": 234
                                                },
                                                "exchange_rate": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1
                                                },
                                                "foreign_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "trust_deposited": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 250
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "ref_num": {
                                                    "type": "string",
                                                    "example": "0000015"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "new deposit added"
                                                },
                                                "liability_account_id": {
                                                    "type": "integer",
                                                    "example": 29
                                                },
                                                "liability_account": {
                                                    "type": "string",
                                                    "example": "Jane Doe Trust Liability Account - LBP (9)"
                                                },
                                                "liability_account_fl1": {
                                                    "type": "string",
                                                    "example": "Jane Doe Trust Liability Account - LBP (9)"
                                                },
                                                "liability_account_fl2": {
                                                    "type": "string",
                                                    "example": "Jane Doe Trust Liability Account - LBP (9)"
                                                },
                                                "asset_account_id": {
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "asset_account": {
                                                    "type": "string",
                                                    "example": "Trust Asset Account - USD (1)"
                                                },
                                                "asset_account_fl1": {
                                                    "type": "string",
                                                    "example": "Compte d'actifs fiduciaires - USD (1)"
                                                },
                                                "asset_account_fl2": {
                                                    "type": "string",
                                                    "example": "حساب ائتماني للعملاء - USD (1)"
                                                },
                                                "trust_fund": {
                                                    "type": "string",
                                                    "example": "1,120.00 USD"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/deposits/{id}": {
            "get": {
                "tags": [
                    "Deposits"
                ],
                "summary": "Get deposit",
                "description": "Get deposit",
                "operationId": "ae266966c3f05842dbc067b4ee2b5f24",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Get Deposit",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Success"
                                        },
                                        "deposit": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "deposit_id": {
                                                        "type": "string",
                                                        "example": "DP1"
                                                    },
                                                    "organization_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "voucher_header_id": {
                                                        "type": "integer",
                                                        "example": 10
                                                    },
                                                    "deposited_on": {
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "2024-01-15"
                                                    },
                                                    "client_id": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "client_name": {
                                                        "type": "string",
                                                        "example": "John Doe"
                                                    },
                                                    "currency_id": {
                                                        "type": "integer",
                                                        "example": 234
                                                    },
                                                    "exchange_rate": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1
                                                    },
                                                    "foreign_amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 100
                                                    },
                                                    "trust_deposited": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 100
                                                    },
                                                    "payment_method": {
                                                        "type": "string",
                                                        "example": "Cash"
                                                    },
                                                    "ref_num": {
                                                        "type": "string",
                                                        "example": "0000001"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "Deposit description"
                                                    },
                                                    "liability_account_id": {
                                                        "type": "integer",
                                                        "example": 119
                                                    },
                                                    "liability_account": {
                                                        "type": "string",
                                                        "example": "John Doe Trust Liability Account - USD (2)"
                                                    },
                                                    "liability_account_fl1": {
                                                        "type": "string",
                                                        "example": "John Doe Trust Liability Account - USD (2)"
                                                    },
                                                    "liability_account_fl2": {
                                                        "type": "string",
                                                        "example": "John Doe Trust Liability Account - USD (2)"
                                                    },
                                                    "asset_account_id": {
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "asset_account": {
                                                        "type": "string",
                                                        "example": "Trust Asset Account - USD (1)"
                                                    },
                                                    "asset_account_fl1": {
                                                        "type": "string",
                                                        "example": "Compte d'actifs fiduciaires - USD (1)"
                                                    },
                                                    "asset_account_fl2": {
                                                        "type": "string",
                                                        "example": "حساب ائتماني للعملاء - USD (1)"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Deposit not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "De"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Deposits"
                ],
                "summary": "Update deposit",
                "description": "Update deposit",
                "operationId": "1a8cd5c30eeacbed0fdec47364145ca0",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Deposit Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Deposit",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "deposited_on": "2024-09-1",
                                "payment_method": "Cash",
                                "foreign_amount": 275,
                                "currency_id": 234,
                                "description": "Trust Asset % Account",
                                "client_id": 1,
                                "trust_asset_account": 20,
                                "organization_id": "0001"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Deposit has been updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "deposit has been updated."
                                        },
                                        "deposit": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "deposit_id": {
                                                    "type": "string",
                                                    "example": "DP15"
                                                },
                                                "organization_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 19
                                                },
                                                "deposited_on": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-1"
                                                },
                                                "client_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "client_name": {
                                                    "type": "string",
                                                    "example": "Jane Doe"
                                                },
                                                "currency_id": {
                                                    "type": "integer",
                                                    "example": 234
                                                },
                                                "exchange_rate": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1
                                                },
                                                "foreign_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 275
                                                },
                                                "trust_deposited": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 275
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "ref_num": {
                                                    "type": "string",
                                                    "example": "0000015"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "new deposit added"
                                                },
                                                "liability_account_id": {
                                                    "type": "integer",
                                                    "example": 29
                                                },
                                                "liability_account": {
                                                    "type": "string",
                                                    "example": "Jane Doe Trust Liability Account - LBP (9)"
                                                },
                                                "liability_account_fl1": {
                                                    "type": "string",
                                                    "example": "Jane Doe Trust Liability Account - LBP (9)"
                                                },
                                                "liability_account_fl2": {
                                                    "type": "string",
                                                    "example": "Jane Doe Trust Liability Account - LBP (9)"
                                                },
                                                "asset_account_id": {
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "asset_account": {
                                                    "type": "string",
                                                    "example": "Trust Asset Account - USD (1)"
                                                },
                                                "asset_account_fl1": {
                                                    "type": "string",
                                                    "example": "Compte d'actifs fiduciaires - USD (1)"
                                                },
                                                "asset_account_fl2": {
                                                    "type": "string",
                                                    "example": "حساب ائتماني للعملاء - USD (1)"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Deposit doesn't exist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Deposit doesn't exist!"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Deposits"
                ],
                "summary": "Delete deposit",
                "description": "Delete deposit",
                "operationId": "3f67e19cf4733bf0fb37796c963615b5",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Deposit Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "deposit has been deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Deposit doesn't exist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Deposit doesn't exist!"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/deposits/trust-fund-form/{caseId}": {
            "get": {
                "tags": [
                    "Trust Fund"
                ],
                "summary": "Get metadata for creating a deposit",
                "description": "Returns data required to populate the deposit creation form such as exchange rates, currencies, accounts, and trust account info.",
                "operationId": "be178ac26f06d9a879c40ade3d55e19c",
                "responses": {
                    "200": {
                        "description": "Deposit metadata loaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "title": {
                                            "type": "string",
                                            "example": "Add Deposit"
                                        },
                                        "rates": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "string"
                                            }
                                        },
                                        "trust_asset_account": {
                                            "properties": {
                                                "name": {
                                                    "type": "string",
                                                    "example": "Main USD Account"
                                                },
                                                "account_number": {
                                                    "type": "string",
                                                    "example": "100100"
                                                },
                                                "currencyCode": {
                                                    "type": "string",
                                                    "example": "USD"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "trust_asset_account_id": {
                                            "type": "integer",
                                            "example": 12345
                                        },
                                        "trust_assets_accounts_list": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "account_name": {
                                                        "type": "string"
                                                    },
                                                    "accountName": {
                                                        "type": "string"
                                                    },
                                                    "full_account_name": {
                                                        "type": "string"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "allowed_decimal_format": {
                                            "type": "integer",
                                            "example": 2
                                        },
                                        "trust_asset_accounts_per_client": {
                                            "type": "object",
                                            "additionalProperties": [
                                                {
                                                    "type": "integer",
                                                    "example": 123,
                                                    "property": "asset_acc_id"
                                                },
                                                {
                                                    "type": "string",
                                                    "example": "Client Trust Account (123456)",
                                                    "property": "asset_acc_name"
                                                }
                                            ]
                                        },
                                        "currencies": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "string"
                                            }
                                        },
                                        "payment_method_values": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "client": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "user 1"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Failed to load data"
                    }
                }
            }
        },
        "/discounts": {
            "get": {
                "tags": [
                    "Discounts"
                ],
                "summary": "List discounts",
                "description": "List all discounts",
                "operationId": "8a7522da8d0dce71e662a064b768d32c",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search discounts by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter discounts by the above query parameters. <br />\n              <b>Example:</b> { \"name[eq]\" : \"My Discount\" } which will search for discounts with name = \"My Discount\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort discounts in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "percentage"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort discounts in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "percentage"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "discounts": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "user_id": {
                                                        "type": "integer",
                                                        "example": 5
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "ADI Company Annual Retainer Discount"
                                                    },
                                                    "fl1name": {
                                                        "type": "string",
                                                        "example": "Réduction sur l’abonnement annuel d’ADICompany"
                                                    },
                                                    "fl2name": {
                                                        "type": "string",
                                                        "example": "خصم سنوي لشركة ADI"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "10% discount on ADI Company annual retainer"
                                                    },
                                                    "percentage": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 10
                                                    },
                                                    "created_by": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "created_by_name": {
                                                        "type": "string",
                                                        "example": "Sarah Johnson"
                                                    },
                                                    "created_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2025-10-09T10:30:02.000000Z"
                                                    },
                                                    "modified_by": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "modified_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": null
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "example": [
                                                {
                                                    "id": 1,
                                                    "user_id": 5,
                                                    "name": "ADICompany Annual Retainer Discount",
                                                    "fl1name": "Réduction sur l’abonnement annuel d’ADICompany",
                                                    "fl2name": "خصم سنوي لشركة ADI",
                                                    "description": "10% discount on ADICompany annual retainer",
                                                    "percentage": 10,
                                                    "created_by": 2,
                                                    "created_by_name": "Sarah Johnson",
                                                    "created_on": "2025-10-09T10:30:02.000000Z",
                                                    "modified_by": 2,
                                                    "modified_on": null
                                                },
                                                {
                                                    "id": 2,
                                                    "user_id": 6,
                                                    "name": "Corporate Retainer Discount",
                                                    "fl1name": "Réduction sur l’abonnement de service juridique d’entreprise",
                                                    "fl2name": "خصم على الاشتراك القانوني للشركات",
                                                    "description": "10% discount on annual corporate legal retainer services",
                                                    "percentage": 10,
                                                    "created_by": 3,
                                                    "created_by_name": "Joe Johnson",
                                                    "created_on": "2025-10-09T10:30:02.000000Z",
                                                    "modified_by": null,
                                                    "modified_on": null
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Discounts"
                ],
                "summary": "Create Discount",
                "description": "Create a new discount",
                "operationId": "7144c094c34c5038215cc37155f9a8dd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name,description,percentage"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Discount Name",
                                        "type": "string",
                                        "example": "Startup Legal Boost Discount"
                                    },
                                    "fl1name": {
                                        "description": "Discount Name(french)",
                                        "type": "string",
                                        "example": "Réduction Lancement Juridique pour Startups"
                                    },
                                    "fl2name": {
                                        "description": "Discount Name(العربية)",
                                        "type": "string",
                                        "example": "خصم دعم الشركات الناشئة القانونية"
                                    },
                                    "description": {
                                        "description": "Description of the Discount",
                                        "type": "string",
                                        "example": "20% off all LegalTech plans for new startups during their first year."
                                    },
                                    "percentage": {
                                        "description": "Discount Percentage Value",
                                        "type": "number",
                                        "format": "float",
                                        "example": 20
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Discount has been created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "discount has been created."
                                        },
                                        "discount": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": "5"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Startup Legal Boost Discount"
                                                },
                                                "fl1name": {
                                                    "type": "string",
                                                    "example": "Réduction Lancement Juridique pour Startups"
                                                },
                                                "fl2name": {
                                                    "type": "string",
                                                    "example": "خصم دعم الشركات الناشئة القانونية"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "20% off all LegalTech plans for new startups during their first year."
                                                },
                                                "percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 20
                                                },
                                                "created_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "Sarah Johnson"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-10-09T10:30:02.000000Z"
                                                },
                                                "modified_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "null"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/discounts/{id}": {
            "get": {
                "tags": [
                    "Discounts"
                ],
                "summary": "Get discount",
                "description": "View all discounts ",
                "operationId": "5e024424a0ac67e3c53efca2bd795cc7",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the discount to retrieve",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Discount retrieved successfully."
                                        },
                                        "discount": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "ADI Company Annual Retainer Discount"
                                                },
                                                "fl1name": {
                                                    "type": "string",
                                                    "example": "Réduction sur l’abonnement annuel d’ADICompany"
                                                },
                                                "fl2name": {
                                                    "type": "string",
                                                    "example": "خصم سنوي لشركة ADI"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "10% discount on ADICompany annual retainer"
                                                },
                                                "percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 10
                                                },
                                                "created_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "Sarah Johnson"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-10-09T10:30:02.000000Z"
                                                },
                                                "modified_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": null
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Discounts"
                ],
                "summary": "Update Discount",
                "description": "Update an existing discount record",
                "operationId": "8b4eba71e362672e0da5dd72b4a0da87",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Discount Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name,description,percentage"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Discount Name",
                                        "type": "string",
                                        "example": "Startup Legal Boost Discount"
                                    },
                                    "fl1name": {
                                        "description": "Discount Name(french)",
                                        "type": "string",
                                        "example": "Réduction Lancement Juridique pour Startups"
                                    },
                                    "fl2name": {
                                        "description": "Discount Name(العربية)",
                                        "type": "string",
                                        "example": "خصم دعم الشركات الناشئة القانونية"
                                    },
                                    "description": {
                                        "description": "Description of the Discount",
                                        "type": "string",
                                        "example": "20% off all LegalTech plans for new startups during their first year."
                                    },
                                    "percentage": {
                                        "description": "Discount Percentage Value",
                                        "type": "number",
                                        "format": "float",
                                        "example": 20
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Discount has been updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "discount": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Startup Legal Boost Discount"
                                                },
                                                "fl1name": {
                                                    "type": "string",
                                                    "example": "Réduction Lancement Juridique pour Startups"
                                                },
                                                "fl2name": {
                                                    "type": "string",
                                                    "example": "خصم دعم الشركات الناشئة القانونية"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "20% off all LegalTech plans for new startups during their first year."
                                                },
                                                "percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 20
                                                },
                                                "created_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "Sarah Johnson"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-10-09T10:30:02.000000Z"
                                                },
                                                "modified_by": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-10-09T11:00:00.000000Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/exchange-rates": {
            "get": {
                "tags": [
                    "Exchange Rates"
                ],
                "summary": "List of exchange rates",
                "description": "List of all exchange rates paginated",
                "operationId": "1a39af6762b36ad56ff9b182c82d539c",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search exchange rates by organization ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "exchange_rates": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "currency_id": {
                                                        "type": "integer",
                                                        "example": 75
                                                    },
                                                    "organization_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "rate": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 50.2
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 200
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Exchange Rate not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/exchangerate/{id}": {
            "put": {
                "tags": [
                    "Exchange Rates"
                ],
                "summary": "Update Exchange Rate",
                "description": "Update Exchange Rate",
                "operationId": "5b583711c5fb77fa04b81e9271e9ede4",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Exchange rate Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "$ref": "#/components/requestBodies/UpdateExchangerateRequestBody"
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-categories/": {
            "get": {
                "tags": [
                    "Expense Categories"
                ],
                "summary": "List Expense Categories",
                "description": "List all expense categories",
                "operationId": "71adc8c17396bed2e91d1270aa2f0039",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Filter by organization ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Resources have been retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "expense_categories": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "account_id": {
                                                        "type": "integer",
                                                        "example": 17
                                                    },
                                                    "amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 400
                                                    },
                                                    "expense_code": {
                                                        "type": "string",
                                                        "example": null
                                                    },
                                                    "is_utbms": {
                                                        "type": "integer",
                                                        "example": 0
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "Advance of Expert Fee"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "Advance of Expert Fee"
                                                    },
                                                    "parent_id": {
                                                        "type": "string",
                                                        "example": null
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-categories": {
            "post": {
                "tags": [
                    "Expense Categories"
                ],
                "summary": "Create Expense Category",
                "description": "Create New Expense Category",
                "operationId": "9ca4958fc89f1ecd41c60cb2ba842ff4",
                "requestBody": {
                    "description": "Create New Expense Category",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "account_id": 11,
                                "name": "Transportation",
                                "amount": "100",
                                "expense_category_id": "1"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses": {
            "get": {
                "tags": [
                    "Expenses"
                ],
                "summary": "List expenses",
                "description": "List all expenses",
                "operationId": "b9dc1730c130c79d72d688459647f3f0",
                "parameters": [
                    {
                        "name": "expense_category_id",
                        "in": "query",
                        "description": "Search expenses by expense category",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search expenses by organization id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Search expenses by voucher header id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "amount",
                        "in": "query",
                        "description": "Search expenses by amount",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "billing_status",
                        "in": "query",
                        "description": "Search expenses by billing status",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Search expenses by status",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "payment_method",
                        "in": "query",
                        "description": "Search expenses by payment method",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter expenses by the above query parameters. <br />\n              <b>Example:</b> { \"amount[gt]\" : 6000 } which will search for expenses that have an amount greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort expenses in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "amount",
                                "billing_status",
                                "status",
                                "payment_method"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort expenses in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "amount",
                                "billing_status",
                                "status",
                                "payment_method"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Create expense",
                "description": "Create expense",
                "operationId": "6ce7f35fea159ae07b2c00979007af03",
                "requestBody": {
                    "description": "Create Expense",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "paid_on": "2024-01-25",
                                "expense_category_id": 44,
                                "paid_through": 325,
                                "payment_method": "Cash",
                                "amount": 50,
                                "tax_id": 1,
                                "comments": "Legal Expenses",
                                "expense_reference": "123456",
                                "task_id": 24,
                                "hearing_id": 6,
                                "event_id": 6,
                                "client_id": 78,
                                "client_account_id": 100,
                                "supplier_id": 1,
                                "billing_status": "to-invoice",
                                "related_matter": 4,
                                "related_contract": null,
                                "expense_document": null,
                                "task_code_id": null,
                                "analytic_accounts": [
                                    {
                                        "analytic_accounts_id": 2,
                                        "percentage": 40
                                    },
                                    {
                                        "analytic_accounts_id": 2,
                                        "percentage": 60
                                    },
                                    {
                                        "analytic_accounts_id": 6,
                                        "percentage": 100
                                    }
                                ],
                                "organization_id": "1"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}": {
            "get": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Get expense",
                "description": "Get expense",
                "operationId": "212efb407ab7ae4beab120ae2c46a24a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Update expense",
                "description": "Update expense",
                "operationId": "0186f677e7ea8007e6d598c5cad908c3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Expense",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "paid_on": "2024-01-25",
                                "expense_category_id": 44,
                                "paid_through": 325,
                                "payment_method": "Cash",
                                "amount": 50,
                                "tax_id": 1,
                                "comments": "Legal Expenses",
                                "expense_reference": "123456",
                                "task_id": 24,
                                "hearing_id": 6,
                                "event_id": 6,
                                "client_id": 78,
                                "client_account_id": 100,
                                "supplier_id": 1,
                                "billing_status": "to-invoice",
                                "related_matter": 4,
                                "related_contract": null,
                                "expense_document": null,
                                "task_code_id": null,
                                "analytic_accounts": [
                                    {
                                        "analytic_accounts_id": 2,
                                        "percentage": 40
                                    },
                                    {
                                        "analytic_accounts_id": 2,
                                        "percentage": 60
                                    },
                                    {
                                        "analytic_accounts_id": 6,
                                        "percentage": 100
                                    }
                                ],
                                "organization_id": "1"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Delete expense",
                "description": "Delete expense",
                "operationId": "26f7671fdcbe5d8101d8b7377f4f840e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/status/open": {
            "patch": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Mark expense as open",
                "description": "Mark expense as open",
                "operationId": "951b8cb410a871d540f5d44577e336a5",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/status/approved": {
            "patch": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Mark expense as approved",
                "description": "Mark expense as approved",
                "operationId": "db309a2720991f7bbb55ed293e617b0a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/status/needs-revision": {
            "patch": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Mark expense as needs revision",
                "description": "Mark expense as needs revision",
                "operationId": "ccb8b79dedfb04e10785272c1a55c319",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/status/cancelled": {
            "patch": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Mark expense as cancelled",
                "description": "Mark expense as cancelled",
                "operationId": "82cd2b3e700aa758a0248b3247d37514",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/change-billing-status": {
            "patch": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Change expense billing status",
                "description": "Change expense billing status",
                "operationId": "4adc5dec83a71452c8a319030c8545f9",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "change billing status data",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "billing_status": "non-billable",
                                "client_id": 25,
                                "client_account_id": 72
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/import": {
            "post": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Import Expenses",
                "description": "Mass import expenses list through excel file",
                "operationId": "29a091b8e2d75446a4aad1b1c52e28b6",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Excel File Containing Expenses",
                                        "type": "file"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "422": {
                        "description": "Unprocessable Content"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/analytic-account": {
            "patch": {
                "tags": [
                    "Expenses Analytic Account"
                ],
                "summary": "Update expense analytic account",
                "description": "Update expense analytic account",
                "operationId": "e2150e1890c95f9f4b792371cd23673e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Expense analytic account",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": [
                                {
                                    "analytic_accounts_id": 2,
                                    "percentage": 40
                                },
                                {
                                    "analytic_accounts_id": 2,
                                    "percentage": 60
                                },
                                {
                                    "analytic_accounts_id": 6,
                                    "percentage": 100
                                }
                            ]
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{id}/custom-fields": {
            "patch": {
                "tags": [
                    "expenses"
                ],
                "summary": "Update Expense Custom Fields",
                "operationId": "3738ab984fe6941f4c684e65d52e148e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Expense Custom Fields Ids and Values",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "custom_fields": {
                                    "19": "Hello World!",
                                    "20": "Hello World Again!"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{expense_id}": {
            "patch": {
                "tags": [
                    "Expenses"
                ],
                "summary": "Inline Edit an Expense",
                "description": "Inline Edit an Expense",
                "operationId": "2fe9f1f7bee8782e280beb56f70976e9",
                "parameters": [
                    {
                        "name": "expense_id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "example": {
                                    "expense_reference": "exp-00000009"
                                },
                                "additionalProperties": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Resource has been updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "expense has been updated."
                                        },
                                        "expense": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 9
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 14
                                                },
                                                "expense_number": {
                                                    "type": "string",
                                                    "example": "EXP-00000009"
                                                },
                                                "paid_on": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-02-04"
                                                },
                                                "expense_reference": {
                                                    "type": "string",
                                                    "example": "exp-00000009"
                                                },
                                                "expense_category_id": {
                                                    "type": "integer",
                                                    "example": 26
                                                },
                                                "amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 500
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "billing_status": {
                                                    "type": "string",
                                                    "example": "internal"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "open"
                                                },
                                                "paid_through_account_id": {
                                                    "type": "integer",
                                                    "example": 28
                                                },
                                                "currency_id": {
                                                    "type": "integer",
                                                    "example": 75
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "example": "EUR"
                                                },
                                                "tax_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "example": "Expenses related to legal services."
                                                },
                                                "supplier": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "John Snow"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "Person"
                                                        },
                                                        "tax_number": {
                                                            "type": "string",
                                                            "example": "123456789"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "matter": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "contract": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "task": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "hearing": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "event": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "client": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "client_account_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "exchange_rate": {
                                                    "type": "string",
                                                    "example": "1.070000000000"
                                                },
                                                "analytic_accounts": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "task_code_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "attachment": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "expense_category": {
                                                    "type": "string",
                                                    "example": "BBA Fee"
                                                },
                                                "paid_through": {
                                                    "type": "string",
                                                    "example": "Legal Expenses - EUR (12345678900)"
                                                },
                                                "tax": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "client_account": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "custom_field_values": {
                                                    "type": "object"
                                                },
                                                "custom_fields": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-custom-fields": {
            "get": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "List all expense custom fields",
                "description": "List all expense custom fields",
                "operationId": "071e69a9c36fbd79b718c090e48d070d",
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Search by custom field type",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"type[value]\" : \"short_text\", \"type[operator]\" : \"contains\" } which will search for all records that have a type containse \"short_text\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "field_order"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "field_order"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "Create expense custom field",
                "description": "Create expense custom field",
                "operationId": "cd4607550b523f129b41c15aa42de4c0",
                "requestBody": {
                    "description": "Create expense custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "type": "short_text",
                                "organization_ids": [
                                    1,
                                    2
                                ],
                                "list_options": [],
                                "languages": {
                                    "1": "Custom Expense Field 1",
                                    "2": "حقل الفاتورة المخصصة 1",
                                    "3": "Champ de facture personnalisé 1"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-custom-fields/{id}": {
            "get": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "Get expense custom field by id",
                "description": "Get expense custom field by id",
                "operationId": "c603d02f32418fce4b90d8514635e037",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "update expense custom field",
                "description": "update expense custom field",
                "operationId": "d1f9c3586a1af06d0242039734197a7a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "expense custom field Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update expense custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "type": "list",
                                "organization_ids": [],
                                "list_options": [
                                    "test first option",
                                    "test second option"
                                ],
                                "languages": {
                                    "1": "Custom Expense Field 1",
                                    "2": "حقل الفاتورة المخصصة 1",
                                    "3": "Champ de facture personnalisé 1"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "Delete an expense custom field",
                "description": "Delete an expense custom field",
                "operationId": "35c6474317ff727889d0a69835c54998",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "expense custom field Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-custom-fields/prepare-data": {
            "get": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "Get list like languages, types, organizations used in expense custom field page",
                "description": "Get list like languages, types, organizations used in expense custom field page",
                "operationId": "a64b61cd3cab6aadcd243a7e064f2d77",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-custom-fields/reorder-fields": {
            "post": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "re-order expense custom fields",
                "description": "re-order expense custom fields",
                "operationId": "e2970af605c6b74a209b921ac7769acb",
                "requestBody": {
                    "description": "reorder expense custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "orderIds": [
                                    4,
                                    1,
                                    5,
                                    3,
                                    2
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-custom-fields/lookup": {
            "get": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "get list option for specific lookup like: contacts, users,..",
                "description": "get list option for specific lookup like: contacts, users,..",
                "operationId": "1366d0984d8f26f1f47ccdceace248f6",
                "parameters": [
                    {
                        "name": "source",
                        "in": "query",
                        "description": "the source of the lookup ex: contacts, users",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expense-custom-fields/bulk-delete": {
            "delete": {
                "tags": [
                    "ExpenseCustomFields"
                ],
                "summary": "Bulk Delete Expense Custom Fields",
                "description": "Bulk Delete Expense Custom Fields",
                "operationId": "b667b74965c109fcc56b9cb1e8fd85c3",
                "parameters": [
                    {
                        "name": "ids[]",
                        "in": "path",
                        "description": "Custom Fields IDs to be deleted",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/expenses/{expense_id}/notes": {
            "get": {
                "tags": [
                    "Expense Notes"
                ],
                "summary": "List Expense Notes",
                "description": "List all expense notes",
                "operationId": "f86c41cac59afa269811843135300141",
                "parameters": [
                    {
                        "name": "expense_id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "Search expense notes by note Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "transition",
                        "in": "query",
                        "description": "Search expense notes by transition",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter expense notes by the above query parameters. <br />\n              <b>Example:</b> { \"transition[eq]\" : \"comment\" } which will search for expense notes with transition = \"comment\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort expense notes in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "transition",
                                "created_date",
                                "modified_date"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort expense notes in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "transition",
                                "created_date",
                                "modified_date"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Resources have been retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "notes": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "expense_id": {
                                                        "type": "string",
                                                        "example": "00000006"
                                                    },
                                                    "is_comment": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "note": {
                                                        "type": "string",
                                                        "example": null
                                                    },
                                                    "full_note": {
                                                        "type": "string",
                                                        "example": "Expense created by John Doe on 2024-09-09 10:30"
                                                    },
                                                    "transition": {
                                                        "type": "string",
                                                        "example": "create"
                                                    },
                                                    "transition_message": {
                                                        "type": "string",
                                                        "example": "Expense created by John Doe on 2024-09-09 10:30"
                                                    },
                                                    "profile_picture_url": {
                                                        "type": "string",
                                                        "example": "http://localhost/lexzur/api/v2/core/user/profile-pic/2?expires=1732536771&signature=212e41935c577d34011b9a5dfb9fd041359255115230259b001b2eb9168554c5"
                                                    },
                                                    "created_by": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "created_by_name": {
                                                        "type": "string",
                                                        "example": "John Doe"
                                                    },
                                                    "created_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-09-09T10:30:02.000000Z"
                                                    },
                                                    "modified_by": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "modified_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-09-10T11:31:02.000000Z"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "example": [
                                                {
                                                    "id": 1,
                                                    "expense_id": "00000006",
                                                    "is_comment": false,
                                                    "note": null,
                                                    "full_note": "Expense created by John Doe on 2024-09-09 10:30",
                                                    "transition": "create",
                                                    "transition_message": "Expense created by John Doe on 2024-09-09 10:30",
                                                    "profile_picture_url": "http://localhost/lexzur/api/v2/core/user/profile-pic/2?expires=1732536771&signature=212e41935c577d34011b9a5dfb9fd041359255115230259b001b2eb9168554c5",
                                                    "created_by": 2,
                                                    "created_by_name": "John Doe",
                                                    "created_on": "2024-09-09T10:30:02.000000Z",
                                                    "modified_by": 2,
                                                    "modified_on": "2024-09-10T11:31:02.000000Z"
                                                },
                                                {
                                                    "id": 2,
                                                    "expense_id": "00000006",
                                                    "is_comment": true,
                                                    "note": "Expense Comment/Note Content.",
                                                    "full_note": "Expense Comment/Note Content",
                                                    "transition": "comment",
                                                    "transition_message": null,
                                                    "profile_picture_url": "http://localhost/lexzur/api/v2/core/user/profile-pic/3?expires=1732536771&signature=2d1c3f78e5b7d85a9d346e0b543f7f09b765b734b45e228674a92f9ad98b7e53",
                                                    "created_by": 3,
                                                    "created_by_name": "Jane Smith",
                                                    "created_on": "2024-09-09T11:30:02.000000Z",
                                                    "modified_by": 3,
                                                    "modified_on": "2024-09-10T12:31:02.000000Z"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Expense Notes"
                ],
                "summary": "Create Expense Note",
                "description": "Create Expense Note",
                "operationId": "ed01cadb74564a78c18e651538c842d1",
                "parameters": [
                    {
                        "name": "expense_id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "comment"
                                ],
                                "properties": {
                                    "comment": {
                                        "description": "Expense Comment/Note",
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Resource has been created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "expense_note has been created."
                                        },
                                        "expense_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "expense_id": {
                                                    "type": "string",
                                                    "example": "00000006"
                                                },
                                                "is_comment": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "note": {
                                                    "type": "string",
                                                    "example": "Expense Comment/Note Content"
                                                },
                                                "full_note": {
                                                    "type": "string",
                                                    "example": "Expense Comment/Note Content"
                                                },
                                                "transition": {
                                                    "type": "string",
                                                    "example": "comment"
                                                },
                                                "transition_message": {
                                                    "type": "string",
                                                    "example": null
                                                },
                                                "profile_picture_url": {
                                                    "type": "string",
                                                    "example": "http://localhost/lexzur/api/v2/core/user/profile-pic/2?expires=1732536771&signature=212e41935c577d34011b9a5dfb9fd041359255115230259b001b2eb9168554c5"
                                                },
                                                "created_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "John Doe"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-09T10:30:02.000000Z"
                                                },
                                                "modified_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-10T11:31:02.000000Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/expenses/{expense_id}/notes/{note_id}": {
            "put": {
                "tags": [
                    "Expense Notes"
                ],
                "summary": "Update Expense Note",
                "description": "Update Expense Note",
                "operationId": "8cf4a4d4f62d2d1dcf5f5e4073f3bfc8",
                "parameters": [
                    {
                        "name": "expense_id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "note_id",
                        "in": "path",
                        "description": "Expense Note Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "comment"
                                ],
                                "properties": {
                                    "comment": {
                                        "description": "Expense Comment/Note",
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Resource has been updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "expense_note has been updated."
                                        },
                                        "expense_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "expense_id": {
                                                    "type": "string",
                                                    "example": "00000006"
                                                },
                                                "is_comment": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "note": {
                                                    "type": "string",
                                                    "example": "Expense Comment/Note Content"
                                                },
                                                "full_note": {
                                                    "type": "string",
                                                    "example": "Expense Comment/Note Content"
                                                },
                                                "transition": {
                                                    "type": "string",
                                                    "example": "comment"
                                                },
                                                "transition_message": {
                                                    "type": "string",
                                                    "example": null
                                                },
                                                "profile_picture_url": {
                                                    "type": "string",
                                                    "example": "http://localhost/lexzur/api/v2/core/user/profile-pic/2?expires=1732536771&signature=212e41935c577d34011b9a5dfb9fd041359255115230259b001b2eb9168554c5"
                                                },
                                                "created_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_by_name": {
                                                    "type": "string",
                                                    "example": "John Doe"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-09T10:30:02.000000Z"
                                                },
                                                "modified_by": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "modified_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-10T11:31:02.000000Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Expense Notes"
                ],
                "summary": "Delete Expense Note",
                "description": "Delete Expense Note",
                "operationId": "515682335391afab975eacccaf76bc00",
                "parameters": [
                    {
                        "name": "expense_id",
                        "in": "path",
                        "description": "Expense Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "note_id",
                        "in": "path",
                        "description": "Expense Note Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Resource has been deleted successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "expense_note has been deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-custom-fields": {
            "get": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "List all invoice custom fields",
                "description": "List all invoice custom fields",
                "operationId": "93a6de5fa306b9873607cb9dd40fe14d",
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Search by custom field type",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"type[value]\" : \"short_text\", \"type[operator]\" : \"contains\" } which will search for all records that have a type containse \"short_text\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "field_order"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "field_order"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "Create invoice custom field",
                "description": "Create invoice custom field",
                "operationId": "7b2e49aa11da74032de00ecd6c190748",
                "requestBody": {
                    "description": "Create invoice custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "type": "short_text",
                                "organization_ids": [
                                    1,
                                    2
                                ],
                                "list_options": [],
                                "languages": {
                                    "1": "Custom Invoice Field 1",
                                    "2": "حقل الفاتورة المخصصة 1",
                                    "3": "Champ de facture personnalisé 1"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-custom-fields/{id}": {
            "get": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "Get invoice custom field by id",
                "description": "Get invoice custom field by id",
                "operationId": "96feb16dd3dd89e757a1a0ad6f17ed1d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "update invoice custom field",
                "description": "update invoice custom field",
                "operationId": "1f1d283085b60e047447e652d2dc4621",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "invoice custom field Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update invoice custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "type": "list",
                                "organization_ids": [],
                                "list_options": [
                                    "test first option",
                                    "test second option"
                                ],
                                "languages": {
                                    "1": "Custom Invoice Field 1",
                                    "2": "حقل الفاتورة المخصصة 1",
                                    "3": "Champ de facture personnalisé 1"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "Delete an invoice custom field",
                "description": "Delete an invoice custom field",
                "operationId": "697784289527123994c392453cd4e919",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "invoice custom field Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-custom-fields/prepare-data": {
            "get": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "Get list like languages, types, organizations used in invoice custom field page",
                "description": "Get list like languages, types, organizations used in invoice custom field page",
                "operationId": "18075c39c8a2ef76f5050c3690e57f72",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-custom-fields/reorder-fields": {
            "post": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "re-order invoice custom fields",
                "description": "re-order invoice custom fields",
                "operationId": "e163a80584fbefb2c2dfb3d0a642e38a",
                "requestBody": {
                    "description": "reorder invoice custom field",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "orderIds": [
                                    4,
                                    1,
                                    5,
                                    3,
                                    2
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-custom-fields/lookup": {
            "get": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "get list option for specific lookup like: contacts, users,..",
                "description": "get list option for specific lookup like: contacts, users,..",
                "operationId": "2ecb600249318faac1a0f85330b29816",
                "parameters": [
                    {
                        "name": "source",
                        "in": "query",
                        "description": "the source of the lookup ex: contacts, users",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-custom-fields/bulk-delete": {
            "delete": {
                "tags": [
                    "InvoiceCustomFields"
                ],
                "summary": "Bulk Delete Invoice Custom Fields",
                "description": "Bulk Delete Invoice Custom Fields",
                "operationId": "0bd94db2103c093f04c26bb74c02a07a",
                "parameters": [
                    {
                        "name": "ids[]",
                        "in": "path",
                        "description": "Custom Fields IDs to be deleted",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/invoices": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "List invoices",
                "description": "List all invoices",
                "operationId": "083e1828fec9624bd07c41d35b2d358b",
                "parameters": [
                    {
                        "name": "account_id",
                        "in": "query",
                        "description": "Search Invoices by account Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "account_name",
                        "in": "query",
                        "description": "Search Invoices by account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "account_number",
                        "in": "query",
                        "description": "Search Invoices by account number",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "balance_due",
                        "in": "query",
                        "description": "Search Invoices by balance due",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "invoice_date",
                        "in": "query",
                        "description": "Search Invoices by invoice date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "due_on",
                        "in": "query",
                        "description": "Search Invoices by due on date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "invoice_number",
                        "in": "query",
                        "description": "Search Invoices by invoice number",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "non_taxable",
                        "in": "query",
                        "description": "Search for non taxable invoices",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search Invoices by organization id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "payment_made",
                        "in": "query",
                        "description": "Search Invoices by payments made",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Search Invoices by status",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sub_total",
                        "in": "query",
                        "description": "Search Invoices by sub-total",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "sub_total_after_discount",
                        "in": "query",
                        "description": "Search Invoices by sub-total after discount",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "total",
                        "in": "query",
                        "description": "Search Invoices by total",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "total_discount",
                        "in": "query",
                        "description": "Search Invoices by total discount",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "total_tax",
                        "in": "query",
                        "description": "Search Invoices by total tax",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Search Invoices by voucher header id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "modified_on",
                        "in": "query",
                        "description": "Search Invoices by last modify date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter invoices by the above query parameters. <br />\n              <b>Example:</b> { \"total[gt]\" : 6000 } which will search for invoices that have a total greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort invoices in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "balance_due",
                                "invoice_date",
                                "invoice_number",
                                "payment_made",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort invoices in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "balance_due",
                                "invoice_date",
                                "invoice_number",
                                "payment_made",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Create invoice",
                "description": "Create invoice",
                "operationId": "49b652d8eb250ad3406aa3c96e660ded",
                "requestBody": {
                    "description": "Create Invoice",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "organization_id": "1",
                                "user_id": "1",
                                "account_id": 22,
                                "prefix": "INV-",
                                "reference_number": "0000009",
                                "suffix": "",
                                "purchase_order": "1234",
                                "invoice_reference": "9191",
                                "bill_to": "App4Legal, Dubai",
                                "invoice_date": "2021-06-15",
                                "due_on": "2021-06-25",
                                "term_id": 3,
                                "notes": "",
                                "paid_status": "open",
                                "invoice_reminder": {
                                    "reminder_time": 5,
                                    "reminder_time_type": "day",
                                    "reminder_type": "popup"
                                },
                                "invoice_details": [
                                    {
                                        "account_id": 14,
                                        "item_id": 1,
                                        "sub_item_id": null,
                                        "tax_id": 1,
                                        "discount_id": null,
                                        "item": "Annual Legal Mgt.",
                                        "unit_price": 6000,
                                        "quantity": 2,
                                        "discount_percentage": 5,
                                        "tax_percentage": 11,
                                        "item_description": "Annual Fees",
                                        "item_date": null,
                                        "partner_shares": [
                                            {
                                                "partner_account_id": 54,
                                                "partner_name": "InfoSysta",
                                                "partner_commission": 5
                                            }
                                        ]
                                    },
                                    {
                                        "account_id": 15,
                                        "item_id": 2,
                                        "sub_item_id": null,
                                        "tax_id": null,
                                        "discount_id": null,
                                        "item": "Consultancy",
                                        "unit_price": 500,
                                        "quantity": 2,
                                        "discount_percentage": null,
                                        "item_description": "Annual Fees",
                                        "item_date": null
                                    }
                                ],
                                "invoice_expenses": [
                                    {
                                        "account_id": 17,
                                        "tax_id": null,
                                        "discount_id": null,
                                        "expense_id": 5,
                                        "item": "BBA Fee",
                                        "unit_price": 400,
                                        "quantity": 1,
                                        "discount_percentage": null,
                                        "item_description": "2021-06-15",
                                        "item_date": null,
                                        "partner_shares": [
                                            {
                                                "partner_account_id": 54,
                                                "partner_name": "InfoSysta",
                                                "partner_commission": 6
                                            }
                                        ]
                                    }
                                ],
                                "invoice_time_logs": [
                                    {
                                        "account_id": 14,
                                        "tax_id": null,
                                        "discount_id": null,
                                        "time_log_id": 12,
                                        "item": "UC0",
                                        "user_id": "0000000001",
                                        "unit_price": 300,
                                        "quantity": 1,
                                        "discount_amount": 25,
                                        "item_description": "2021-06-02 - 1",
                                        "item_date": null
                                    }
                                ],
                                "related_matters": [
                                    {
                                        "matter_id": "00000001"
                                    },
                                    {
                                        "matter_id": "00000020"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{id}": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Get invoice",
                "description": "Get invoice",
                "operationId": "b5a2ff4f4c0d0983d251acdc95aea903",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Update invoice",
                "description": "Update invoice",
                "operationId": "6d99628785dd275107049e38f4ecc7f3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Invoice",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "user_id": "1",
                                "account_id": 22,
                                "prefix": "INV-",
                                "reference_number": "0000009",
                                "suffix": "",
                                "purchase_order": "1234",
                                "invoice_reference": "9191",
                                "bill_to": "App4Legal, Dubai",
                                "invoice_date": "2021-06-15",
                                "due_on": "2021-06-25",
                                "term_id": 3,
                                "notes": "",
                                "paid_status": "open",
                                "invoice_reminder": {
                                    "reminder_time": 5,
                                    "reminder_time_type": "day",
                                    "reminder_type": "popup"
                                },
                                "invoice_details": [
                                    {
                                        "account_id": 14,
                                        "item_id": 1,
                                        "sub_item_id": null,
                                        "tax_id": 1,
                                        "discount_id": null,
                                        "item": "Annual Legal Mgt.",
                                        "unit_price": 6000,
                                        "quantity": 2,
                                        "discount_percentage": 5,
                                        "tax_percentage": 11,
                                        "item_description": "Annual Fees",
                                        "item_date": null,
                                        "partner_shares": [
                                            {
                                                "partner_account_id": 54,
                                                "partner_name": "InfoSysta",
                                                "partner_commission": 5
                                            }
                                        ]
                                    },
                                    {
                                        "account_id": 15,
                                        "item_id": 2,
                                        "sub_item_id": null,
                                        "tax_id": null,
                                        "discount_id": null,
                                        "item": "Consultancy",
                                        "unit_price": 500,
                                        "quantity": 2,
                                        "discount_percentage": null,
                                        "item_description": "Annual Fees",
                                        "item_date": null
                                    }
                                ],
                                "invoice_expenses": [
                                    {
                                        "account_id": 17,
                                        "tax_id": null,
                                        "discount_id": null,
                                        "expense_id": 5,
                                        "item": "BBA Fee",
                                        "unit_price": 400,
                                        "quantity": 1,
                                        "discount_percentage": null,
                                        "item_description": "2021-06-15",
                                        "item_date": null,
                                        "partner_shares": [
                                            {
                                                "partner_account_id": 54,
                                                "partner_name": "InfoSysta",
                                                "partner_commission": 6
                                            }
                                        ]
                                    }
                                ],
                                "invoice_time_logs": [
                                    {
                                        "account_id": 14,
                                        "tax_id": null,
                                        "discount_id": null,
                                        "time_log_id": 12,
                                        "item": "UC0",
                                        "user_id": "0000000001",
                                        "unit_price": 300,
                                        "quantity": 1,
                                        "discount_amount": 25,
                                        "item_description": "2021-06-02 - 1",
                                        "item_date": null
                                    }
                                ],
                                "related_matters": [
                                    {
                                        "matter_id": "00000001"
                                    },
                                    {
                                        "matter_id": "00000020"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Delete invoice",
                "description": "Delete invoice",
                "operationId": "25d31b59692bb116ab97c031378c9bef",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{id}/status/draft": {
            "patch": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Mark invoice as draft",
                "description": "Mark invoice as draft",
                "operationId": "f6e5ac22b1e514d09859525db75d995d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{id}/status/cancelled": {
            "patch": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Mark invoice as cancelled",
                "description": "Mark invoice as cancelled",
                "operationId": "709ee406f25192facb6b0ec314db1d0d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{id}/status/open": {
            "patch": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Mark invoice as open",
                "description": "Mark invoice as open",
                "operationId": "89743d0812a8904c515a157f8333db8c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/export-ledes/{id}": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Get invoice LEDES format content",
                "description": "Get invoice LEDES format content",
                "operationId": "e534a8e33e449675a1aeae70f53b7b42",
                "parameters": [
                    {
                        "name": "isLEDES1998BI",
                        "in": "query",
                        "description": "1 for LEDES1998BI and 0 for LEDES1998B",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{id}/custom-fields": {
            "patch": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Update Invoice Custom Fields",
                "operationId": "63a6c9ff29ff2383d97df9b6292d6dd2",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Invoice Custom Fields Ids and Values",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "custom_fields": {
                                    "19": "Hello World!",
                                    "20": "Hello World Again!"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{id}/send-to-sync": {
            "patch": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Send Invoice to Sync",
                "operationId": "dd7c698e506a4ec96bd74798068a420a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/filter-widgets": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Get Invoice Widgets Data",
                "description": "Retrieves aggregated data for invoice widgets based on the organization ID.",
                "operationId": "db1e7418a7cb80b93bc0b2be55e03786",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Organization ID to filter the data",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "paidStatus": {
                                                "type": "string",
                                                "example": "overdue"
                                            },
                                            "count": {
                                                "type": "integer",
                                                "example": 40
                                            },
                                            "total": {
                                                "type": "number",
                                                "format": "float",
                                                "example": 60604.92
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-notes": {
            "get": {
                "tags": [
                    "Invoice Notes"
                ],
                "summary": "List invoice notes",
                "description": "Retrieve all invoice notes",
                "operationId": "6d0697c0bdf0541590777630443a081d",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search invoice notes by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter invoice notes by query parameters.<br />\n     *              <b>Example:</b> { \"name[eq]\" : \"Late Payment\" } to search for a note with that name.",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort invoice notes in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort invoice notes in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items per page. Default: 50, Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invoice notes retrieved successfully."
                                        },
                                        "invoice_notes": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "Note 1"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "Thank you for your service."
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "example": [
                                                {
                                                    "id": 1,
                                                    "name": "Note 1",
                                                    "description": "Thank you for your service"
                                                },
                                                {
                                                    "id": 2,
                                                    "name": "Note 2",
                                                    "description": "Thank you for you business",
                                                    "is_default": "true"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Invoice Notes"
                ],
                "summary": "Create invoice note",
                "description": "Create a new invoice note",
                "operationId": "923ae1eb61cf8326086c1ebd92c21f76",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Invoice note name",
                                        "type": "string",
                                        "example": "Late Payment"
                                    },
                                    "description": {
                                        "description": "Invoice note description",
                                        "type": "string",
                                        "example": "Applied for overdue invoices."
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invoice note has been created successfully."
                                        },
                                        "invoice_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Late Payment"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Applied for overdue invoices."
                                                },
                                                "is_default": {
                                                    "type": "boolean",
                                                    "example": false
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-notes/{id}": {
            "get": {
                "tags": [
                    "Invoice Notes"
                ],
                "summary": "Get invoice note",
                "description": "Retrieve a specific invoice note by ID",
                "operationId": "ef0973e29f24f1352aef6ce177d552f7",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice note ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invoice note retrieved successfully."
                                        },
                                        "invoice_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Note 1"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Thank you for your service."
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Invoice Notes"
                ],
                "summary": "Update invoice note",
                "description": "Update an existing invoice note",
                "operationId": "5e4e6c1bd0421b8c8287dab40bee074a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice note ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Updated Note"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Updated note description."
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invoice note  has been updated."
                                        },
                                        "invoice_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Note 1"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Thank you"
                                                },
                                                "is_default": {
                                                    "type": "boolean",
                                                    "example": false
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Invoice Notes"
                ],
                "summary": "Delete invoice note",
                "description": "Delete a specific invoice note by ID",
                "operationId": "f1de2461c9df0b2a27fa61170b89ada4",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice note ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "invoice_note has been deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoice-notes/{id}/default": {
            "put": {
                "tags": [
                    "Invoice Notes"
                ],
                "summary": "Set invoice note to default",
                "description": "update default state",
                "operationId": "e28d19122567ea8b24dc2f6e208d3c4b",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Invoice note ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Invoice note  has been updated.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invoice note default state updated successfully."
                                        },
                                        "invoice_note": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Note 1"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Thank you"
                                                },
                                                "is_default": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{invoice_header_id}/payments": {
            "get": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "List invoice payments",
                "description": "List all invoice payments",
                "operationId": "ad4a274dcb77c00de4f24f6ebd7cc7ac",
                "parameters": [
                    {
                        "name": "invoice_header_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_method",
                        "in": "query",
                        "description": "Search Invoice Payments by payment method",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_total",
                        "in": "query",
                        "description": "Search Invoice Payments by account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "payment_voucher_id",
                        "in": "query",
                        "description": "Search Invoice Payments by voucher id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter invoice payments by the above query parameters. <br />\n    <b>Example:</b> { \"payment_total[gt]\" : 6000 } which will search for invoice payments that have a payment total greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort invoice payments in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "payment_method",
                                "payment_total"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort invoice payments in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "payment_method",
                                "payment_total"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "Create Invoice Payment",
                "description": "Create Invoice Payment",
                "operationId": "85ac83e6d2cbadbd4a7caa9f185b70c5",
                "parameters": [
                    {
                        "name": "invoice_header_id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "organization_id",
                                    "paid_on",
                                    "deposit_account_id",
                                    "deposit_amount",
                                    "payment_method"
                                ],
                                "properties": {
                                    "organization_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "paid_on": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2023-11-02"
                                    },
                                    "deposit_account_id": {
                                        "type": "integer",
                                        "example": 31
                                    },
                                    "deposit_amount": {
                                        "type": "number",
                                        "example": 400
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "enum": [
                                            "Bank Transfer",
                                            "Cash",
                                            "Cheque",
                                            "Credit Card",
                                            "Other",
                                            "Online payment",
                                            "Trust Account"
                                        ],
                                        "example": "Cash"
                                    },
                                    "comments": {
                                        "type": "string",
                                        "example": "Partial payment"
                                    },
                                    "payment_reference": {
                                        "type": "string",
                                        "example": "TXN-20231102-01"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Invoice payment has been created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invoice payment has been created."
                                        },
                                        "invoice_payment": {
                                            "properties": {
                                                "payment_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2021-11-02"
                                                },
                                                "invoice_number": {
                                                    "type": "string",
                                                    "example": "INV-0000001"
                                                },
                                                "payment_total": {
                                                    "type": "number",
                                                    "example": 400
                                                },
                                                "payment_method": {
                                                    "type": "string",
                                                    "example": "Cash"
                                                },
                                                "comments": {
                                                    "type": "string",
                                                    "example": "Partial payment"
                                                },
                                                "payment_reference": {
                                                    "type": "string",
                                                    "example": "TXN-20231102-01"
                                                },
                                                "created_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-30T10:30:02.000000Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{invoice_header_id}/payments/{id}": {
            "get": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "Get Invoice payment",
                "description": "Get invoice payment",
                "operationId": "0c1f4f302c71a42cb0b0e9d78c5e89fb",
                "parameters": [
                    {
                        "name": "invoice_header_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/clients/{client_id}/trust-accounts": {
            "get": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "Get trust accounts with balances for specific client",
                "description": "Returns trust accounts list for specific client.",
                "operationId": "c57aa09fa6af8a35edf1e0ed0fc5ad4d",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "0001"
                        }
                    },
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Client ID",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 2
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "data": {
                                            "properties": {
                                                "trust_accounts": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 20
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Trust Asset Account"
                                                            },
                                                            "account_label": {
                                                                "type": "string",
                                                                "example": "Trust Asset Account (USD)"
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "USD"
                                                            },
                                                            "currency_id": {
                                                                "type": "integer",
                                                                "example": 234
                                                            },
                                                            "balance": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 10000000000
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/accounts/{client_account_id}/unpaid-invoices": {
            "get": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "List unpaid invoices for specific client account",
                "description": "List unpaid invoices for specific client account",
                "operationId": "f759e900b6f73ee8d094ff2bb0401bf0",
                "parameters": [
                    {
                        "name": "client_account_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search Invoices by organization id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort invoices in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "balance_due",
                                "invoice_date",
                                "invoice_number",
                                "payment_made",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort invoices in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "balance_due",
                                "invoice_date",
                                "invoice_number",
                                "payment_made",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "invoices": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 358
                                                    },
                                                    "invoice_header_id": {
                                                        "type": "integer",
                                                        "example": 358
                                                    },
                                                    "voucher_header_id": {
                                                        "type": "integer",
                                                        "example": 1464
                                                    },
                                                    "account": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 403
                                                            },
                                                            "parent_id": {
                                                                "type": "string",
                                                                "nullable": true
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Lexzur KSA"
                                                            },
                                                            "organization_id": {
                                                                "type": "string",
                                                                "example": "0005"
                                                            },
                                                            "account_label": {
                                                                "type": "string",
                                                                "example": "Lexzur KSA (SAR)"
                                                            },
                                                            "currency_id": {
                                                                "type": "integer",
                                                                "example": 194
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "SAR"
                                                            },
                                                            "model_name": {
                                                                "type": "string",
                                                                "example": "Person"
                                                            },
                                                            "member_id": {
                                                                "type": "integer",
                                                                "example": 55
                                                            },
                                                            "client": {
                                                                "properties": {
                                                                    "ledes": {
                                                                        "type": "integer",
                                                                        "example": 0
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "invoice_number": {
                                                        "type": "string",
                                                        "example": "INV-0000124"
                                                    },
                                                    "prefix_type": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "prefix": {
                                                        "type": "string",
                                                        "example": "INV"
                                                    },
                                                    "suffix": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "purchase_order": {
                                                        "type": "string",
                                                        "example": "PO 1243"
                                                    },
                                                    "invoice_reference": {
                                                        "type": "string",
                                                        "example": ""
                                                    },
                                                    "bill_to": {
                                                        "type": "string",
                                                        "example": "Lexzur KSA"
                                                    },
                                                    "invoice_date": {
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "2025-12-17"
                                                    },
                                                    "due_on": {
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "2026-01-08"
                                                    },
                                                    "paid_status": {
                                                        "type": "string",
                                                        "example": "open"
                                                    },
                                                    "approval_status": {
                                                        "type": "string",
                                                        "example": "approved"
                                                    },
                                                    "display_tax": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "display_discount": {
                                                        "type": "string",
                                                        "example": "both_item_before_level"
                                                    },
                                                    "display_item_date": {
                                                        "type": "integer",
                                                        "example": 0
                                                    },
                                                    "display_item_quantity": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "term_id": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "terms": {
                                                        "type": "string",
                                                        "example": "30 Days"
                                                    },
                                                    "term_days_nb": {
                                                        "type": "integer",
                                                        "example": 30
                                                    },
                                                    "lines_total_discount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0
                                                    },
                                                    "lines_total_subtotal": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 2000
                                                    },
                                                    "lines_total_tax": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 150
                                                    },
                                                    "lines_totals": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 2000
                                                    },
                                                    "total": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 2150
                                                    },
                                                    "payments_made": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "total_credit_notes": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "balance_due": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 2150
                                                    },
                                                    "notes": {
                                                        "type": "string",
                                                        "example": ""
                                                    },
                                                    "exchange_rate": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1.0e-5
                                                    },
                                                    "discount_id": {
                                                        "type": "integer",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "discount_percentage": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0
                                                    },
                                                    "discount_amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0
                                                    },
                                                    "discount_value_type": {
                                                        "type": "string",
                                                        "example": "percentage"
                                                    },
                                                    "display_adjust": {
                                                        "type": "string",
                                                        "example": "no"
                                                    },
                                                    "adjust_amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0
                                                    },
                                                    "adjust_percentage": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0
                                                    },
                                                    "adjust_value_type": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "adjust_label": {
                                                        "type": "string",
                                                        "example": ""
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": ""
                                                    },
                                                    "related_quote_id": {
                                                        "type": "integer",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "invoice_sync_type": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "created_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-11-13 16:28:47"
                                                    },
                                                    "created_by_name": {
                                                        "type": "string",
                                                        "example": "System Administrator"
                                                    },
                                                    "modified_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-11-13 16:28:47"
                                                    },
                                                    "modified_by_name": {
                                                        "type": "string",
                                                        "example": "System Administrator"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "overdue"
                                                    },
                                                    "voucher_type": {
                                                        "type": "string",
                                                        "example": "INV"
                                                    },
                                                    "invoice_template_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": null
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 16
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 16
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/bulk-payment": {
            "post": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "Create Bulk Invoices Payment",
                "description": "Create Bulk Invoices Payment",
                "operationId": "e5ede867acad1b4cd59173b5ba34d56c",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "organization_id",
                                    "client_account_id",
                                    "deposit_account_id",
                                    "payment_method",
                                    "payment_rows"
                                ],
                                "properties": {
                                    "organization_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "client_account_id": {
                                        "type": "integer",
                                        "example": 9
                                    },
                                    "deposit_account_id": {
                                        "type": "integer",
                                        "example": 31
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "enum": [
                                            "Bank Transfer",
                                            "Cash",
                                            "Cheque",
                                            "Credit Card",
                                            "Other",
                                            "Online payment",
                                            "Trust Account"
                                        ],
                                        "example": "Cash"
                                    },
                                    "trust_asset_account": {
                                        "description": "client trust asset account, required in case of payment method is Trust Account",
                                        "type": "integer",
                                        "example": 31
                                    },
                                    "comments": {
                                        "type": "string",
                                        "example": "Partial payment"
                                    },
                                    "payment_reference": {
                                        "type": "string",
                                        "example": "TXN-20231102-01"
                                    },
                                    "payment_rows": {
                                        "description": "invoice payment rows",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "invoice_header_id",
                                                "deposit_amount",
                                                "paid_on"
                                            ],
                                            "properties": {
                                                "invoice_header_id": {
                                                    "description": "invoice header id",
                                                    "type": "integer",
                                                    "example": 594
                                                },
                                                "deposit_amount": {
                                                    "description": "payment amount",
                                                    "type": "number",
                                                    "example": 4000
                                                },
                                                "paid_on": {
                                                    "description": "paid on date",
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-11-17"
                                                },
                                                "bank_charges": {
                                                    "description": "bank charges amount",
                                                    "type": "number",
                                                    "example": 200
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "invoices_payment": {
                                            "type": "object",
                                            "example": null,
                                            "nullable": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/payments/form-data": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Get invoice payment form data",
                "description": "Returns available asset and trust accounts for invoice payment.",
                "operationId": "d47e08987c72d06fb234d82e8eeaaa21",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "0001"
                        }
                    },
                    {
                        "name": "invoice_payment_id",
                        "in": "query",
                        "description": "Invoice Payment ID (nullable)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": null,
                            "nullable": true
                        }
                    },
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Client ID",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 2
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "invoice_payment_form_data": {
                                            "properties": {
                                                "asset_accounts": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 454
                                                            },
                                                            "parent_id": {
                                                                "type": "integer",
                                                                "example": 450,
                                                                "nullable": true
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "account 123456"
                                                            },
                                                            "account_label": {
                                                                "type": "string",
                                                                "example": "account 123456 - USD (123129)"
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "USD"
                                                            },
                                                            "currency_id": {
                                                                "type": "integer",
                                                                "example": 234
                                                            },
                                                            "type_id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "trust_accounts": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 20
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Trust Asset Account"
                                                            },
                                                            "account_label": {
                                                                "type": "string",
                                                                "example": "Trust Asset Account (USD)"
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "USD"
                                                            },
                                                            "currency_id": {
                                                                "type": "integer",
                                                                "example": 234
                                                            },
                                                            "balance": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 10000000000
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The due date field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/{invoice_header_id}/payments/{payment_voucher_id}": {
            "put": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "Update invoice payment",
                "description": "Update invoice payment",
                "operationId": "ced8e3b5d08c8d370004c91b9d74b982",
                "parameters": [
                    {
                        "name": "invoice_header_id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_voucher_id",
                        "in": "path",
                        "description": "Payment Voucher Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Invoice Payment",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "paid_on": "2021-11-02",
                                "deposit_account_id": 31,
                                "deposit_amount": 400,
                                "payment_method": "Cash",
                                "comments": "Cash",
                                "payment_reference": "Cash"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Invoice Payments"
                ],
                "summary": "Delete invoice payment",
                "description": "Delete invoice payment",
                "operationId": "e1f0c3c00065a9ce80b2b1b5053c5178",
                "parameters": [
                    {
                        "name": "invoice_header_id",
                        "in": "path",
                        "description": "Invoice Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_voucher_id",
                        "in": "path",
                        "description": "Payment Voucher Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/related-items/{client_id}": {
            "get": {
                "tags": [
                    "Invoicing"
                ],
                "summary": "Retrieve related time logs, expenses and bill items for a client",
                "description": "Returns time logs, billable items, expenses, and fixed rates related to the client's invoicing data. Includes both matter and non-matter data, along with invoiced counts.",
                "operationId": "295d7adb00725be2562571176493a9bb",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "The ID of the client",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1234
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "The ID of the organization (left-padded)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "0001"
                        }
                    },
                    {
                        "name": "client_account_id",
                        "in": "query",
                        "description": "Client's account ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 4321
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Optional voucher header ID",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 5678
                        }
                    },
                    {
                        "name": "cases_ids",
                        "in": "query",
                        "description": "Comma-separated list of case IDs",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "101,102,103"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful retrieval of invoicing items",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "items": {
                                            "properties": {
                                                "expenses": {
                                                    "properties": {
                                                        "non_matters_expenses": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/InvoiceRelatedExpenseResource"
                                                            }
                                                        },
                                                        "matters_expenses": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/InvoiceRelatedExpenseResource"
                                                            }
                                                        },
                                                        "invoiced_expenses_count": {
                                                            "type": "integer",
                                                            "example": 5
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "time_logs": {
                                                    "properties": {
                                                        "matters_time_logs": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        },
                                                        "invoiced_time_logs_count": {
                                                            "type": "integer",
                                                            "example": 10
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "bill_items": {
                                                    "properties": {
                                                        "non_matters_bill_items": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/InvoiceRelatedBillableItemResource"
                                                            }
                                                        },
                                                        "matters_bill_items": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/InvoiceRelatedBillableItemResource"
                                                            }
                                                        },
                                                        "invoiced_bill_items_count": {
                                                            "type": "integer",
                                                            "example": 8
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "fixed_rates": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/InvoiceRelatedFixedRateResource"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request - Invalid input or missing required parameters",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "Invalid input provided"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Unexpected failure",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "An unexpected error occurred"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/related-invoiced-items/{client_id}/{type}": {
            "get": {
                "tags": [
                    "Invoicing"
                ],
                "summary": "Retrieve related invoiced items",
                "description": "Retrieves invoiced items for a client based on the type (e.g., invoice_time_logs, invoice_expenses, invoice_bill_items).",
                "operationId": "547b977e60571d7df43ee49b5cf6ea0e",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "The client ID for which to retrieve invoiced items",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "path",
                        "description": "Type of invoiced item (invoice_time_logs, invoice_expenses, invoice_bill_items)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "invoice_time_logs",
                                "invoice_expenses",
                                "invoice_bill_items"
                            ]
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "The organization ID (required in query)",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int32"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Voucher header ID for filtering (optional)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "format": "int32"
                        }
                    },
                    {
                        "name": "cases_ids",
                        "in": "query",
                        "description": "Comma-separated list of case IDs (optional)",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "format": "int32"
                            }
                        }
                    },
                    {
                        "name": "client_account_id",
                        "in": "query",
                        "description": "Client account ID (optional, used for certain types like invoice_expenses or invoice_bill_items)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "format": "int32"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful retrieval of related invoiced items",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "items": {
                                            "type": "array",
                                            "items": {
                                                "oneOf": [
                                                    {
                                                        "$ref": "#/components/schemas/DraftInvoicedTimeLogResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/DraftInvoicedExpenseResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/DraftInvoicedBillableItemResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error with error message",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "An error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/invoices/related-matters/{matter_id}/invoicing-data": {
            "get": {
                "tags": [
                    "Invoicing"
                ],
                "summary": "Retrieve invoicing details for a specific matter",
                "description": "Fetches related matter and client account details based on the matter ID.",
                "operationId": "fede22fa3f6efced37ffcdbe0bf95f52",
                "parameters": [
                    {
                        "name": "matter_id",
                        "in": "path",
                        "description": "ID of the legal matter",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful retrieval of invoicing data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "invoicing_data"
                                        },
                                        "data": {
                                            "properties": {
                                                "related_matter": {
                                                    "$ref": "#/components/schemas/InvoiceRelatedMatterResource"
                                                },
                                                "client_accounts": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/AccountResource"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request or validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "An unexpected error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/items": {
            "get": {
                "tags": [
                    "Items"
                ],
                "summary": "List items",
                "description": "List all items",
                "operationId": "6301f15d5f977009763be2ee41dd5931",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search items by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search items by organization Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "price",
                        "in": "query",
                        "description": "Search items by price",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter items by the above query parameters. <br />\n              <b>Example:</b> { \"price[gt]\" : 500 } which will search for items with price greater than 500.",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort items in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "unit_name",
                                "unit_price"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort items in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "unit_name",
                                "unit_price"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Items"
                ],
                "summary": "Create Item",
                "description": "Create Item",
                "operationId": "2f63de98d8cd12cb7e4050d590598e75",
                "requestBody": {
                    "$ref": "#/components/requestBodies/CreateItemRequestBody"
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/items/{id}": {
            "get": {
                "tags": [
                    "Items"
                ],
                "summary": "Get item",
                "description": "Get item",
                "operationId": "d1faefe9c55b2f6de44a244d09d0c956",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/items/{id}/subitems": {
            "get": {
                "tags": [
                    "Items"
                ],
                "summary": "List sub items",
                "description": "List all sub items",
                "operationId": "4458131603e52b5d1cbec9dfa12f15af",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search sub items by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search sub items by organization Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "price",
                        "in": "query",
                        "description": "Search sub items by price",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter sub items by the above query parameters. <br />\n              <b>Example:</b> { \"price[gt]\" : 500 } which will search for sub items with price greater than 500.",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort sub items in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "unit_name",
                                "unit_price"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort sub items in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "unit_name",
                                "unit_price"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/items/{id}/subitems/{sub_item_id}": {
            "get": {
                "tags": [
                    "Items"
                ],
                "summary": "Get sub item",
                "description": "Get sub item",
                "operationId": "1696de9dc1b27bb06b75a4357f597295",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sub_item_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/journals": {
            "get": {
                "tags": [
                    "Journals"
                ],
                "summary": "List journals",
                "description": "List all journals",
                "operationId": "d41cbcb005f81794a83e0c212e6a1fae",
                "parameters": [
                    {
                        "name": "journal_id",
                        "in": "query",
                        "description": "Search journals by journal id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Search journals by voucher header id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search journals by organization id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "amount",
                        "in": "query",
                        "description": "Search journals by total amount",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "description",
                        "in": "query",
                        "description": "Search journals by journal header description",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Search journals by journal date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter journals by the above query parameters. <br />\n              <b>Example:</b> { \"amount[gt]\" : 6000 } which will search for journals that have an amount greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort journals in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "amount",
                                "date"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort journals in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "amount",
                                "date"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Journals"
                ],
                "summary": "Create journal",
                "description": "Create journal",
                "operationId": "42525d976ed5e058771b0a32864d64af",
                "requestBody": {
                    "description": "Create Journal",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "organization_id": "1",
                                "currency_id": "5",
                                "exchange_rate": "82000",
                                "journal_reference": "ref..",
                                "date": "2022-09-09",
                                "description": "comment..",
                                "journal_document": "in case if there is an attach",
                                "journal_details": [
                                    [
                                        {
                                            "account_id": "22",
                                            "voucher_type": "D",
                                            "local_amount": "150000",
                                            "amount": "10",
                                            "description": "desc.."
                                        },
                                        {
                                            "account_id": "98",
                                            "voucher_type": "C",
                                            "local_amount": "150000",
                                            "amount": "150000",
                                            "description": ""
                                        }
                                    ]
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/journals/{id}": {
            "get": {
                "tags": [
                    "Journals"
                ],
                "summary": "Get journal",
                "description": "Get journal",
                "operationId": "bc6a8ea5044ce888f0815d40e27ed67b",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Journals"
                ],
                "summary": "Update journal",
                "description": "Update journal",
                "operationId": "57f3562f07b3b034313a4c9660adb31e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Journal Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Journal",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "organization_id": "1",
                                "currency_id": "5",
                                "exchange_rate": "82000",
                                "journal_reference": "ref..",
                                "date": "2022-09-09",
                                "description": "comment..",
                                "journal_details": [
                                    [
                                        {
                                            "account_id": "22",
                                            "voucher_type": "D",
                                            "local_amount": "150000",
                                            "amount": "10",
                                            "description": "desc.."
                                        },
                                        {
                                            "account_id": "98",
                                            "voucher_type": "C",
                                            "local_amount": "150000",
                                            "amount": "150000",
                                            "description": ""
                                        }
                                    ]
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Journals"
                ],
                "summary": "Delete journal",
                "description": "Delete journal",
                "operationId": "50081c0f65da7ed5309f57f74ef4cd52",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Journal Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/journals/import": {
            "post": {
                "tags": [
                    "Journals"
                ],
                "summary": "Import Journals",
                "description": "Mass import journals list through excel file",
                "operationId": "6621558adbc694bc6a624bd9907b5b17",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Excel File Containing Journals",
                                        "type": "file"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "422": {
                        "description": "Unprocessable Content"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/organizations": {
            "get": {
                "tags": [
                    "Organizations"
                ],
                "summary": "List organizations",
                "description": "List all organizations/entities",
                "operationId": "d0e01acebd092043090181948fadd30d",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search organizations by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter organizations by the above query parameters.<br />\n              <b>Example:</b> { \"name[eq]\" : \"My Organization\" } which will search for organization with name = \"My Organization\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort organizations in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort organizations in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/organizations/{id}": {
            "get": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Get organization",
                "description": "Get organization/entity",
                "operationId": "f01a89ffaf12991dd331cc70b75ad0c7",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/partners": {
            "get": {
                "tags": [
                    "Partners"
                ],
                "summary": "List partners",
                "description": "List all partners",
                "operationId": "e0a40c822f9e84a4c505a04e515c544e",
                "parameters": [
                    {
                        "name": "company_id",
                        "in": "query",
                        "description": "Filter by company id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "contact_id",
                        "in": "query",
                        "description": "Filter by contact id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "isThirdParty",
                        "in": "query",
                        "description": "Filter by third party flag",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "yes",
                                "no"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by company name, contact name, or partner id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter partners by supported query rules",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort partners in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "company_id",
                                "contact_id",
                                "isThirdParty",
                                "createdOn",
                                "modifiedOn"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort partners in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "company_id",
                                "contact_id",
                                "isThirdParty",
                                "createdOn",
                                "modifiedOn"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The page number to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page, default 50, max 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "partners": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 12
                                                    },
                                                    "company_id": {
                                                        "type": "integer",
                                                        "example": 45,
                                                        "nullable": true
                                                    },
                                                    "contact_id": {
                                                        "type": "integer",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "isThirdParty": {
                                                        "type": "string",
                                                        "example": "no"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "example": "Company"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "Lexzur LLC"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "Lexzur LLC"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Partners"
                ],
                "summary": "Create partner",
                "description": "Create a partner",
                "operationId": "f14eca9e9610174de45158af295273cc",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "company_id": {
                                        "description": "Company id; required when contact_id is not sent",
                                        "type": "integer",
                                        "example": 45,
                                        "nullable": true
                                    },
                                    "contact_id": {
                                        "description": "Contact id; required when company_id is not sent",
                                        "type": "integer",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "isThirdParty": {
                                        "type": "string",
                                        "enum": [
                                            "yes",
                                            "no"
                                        ],
                                        "example": "no",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "partner has been created."
                                        },
                                        "partner": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "company_id": {
                                                    "type": "integer",
                                                    "example": 45,
                                                    "nullable": true
                                                },
                                                "contact_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "isThirdParty": {
                                                    "type": "string",
                                                    "example": "no"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "example": "Company"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Lexzur LLC"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Lexzur LLC"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/partners/{id}": {
            "get": {
                "tags": [
                    "Partners"
                ],
                "summary": "Get partner",
                "description": "Get a single partner",
                "operationId": "4dd783497b5feed6df7960d4790a0a33",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "partner": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "company_id": {
                                                    "type": "integer",
                                                    "example": 45,
                                                    "nullable": true
                                                },
                                                "contact_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "isThirdParty": {
                                                    "type": "string",
                                                    "example": "no"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "example": "Company"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Lexzur LLC"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Lexzur LLC"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Partner not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Partners"
                ],
                "summary": "Update partner",
                "description": "Update a partner",
                "operationId": "f9f0d2d34140ba57342f6ce3ad005dec",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "company_id": {
                                        "description": "Set to change the partner to company-backed; sends contact_id to null if omitted",
                                        "type": "integer",
                                        "example": 45,
                                        "nullable": true
                                    },
                                    "contact_id": {
                                        "description": "Set to change the partner to contact-backed; sends company_id to null if omitted",
                                        "type": "integer",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "isThirdParty": {
                                        "type": "string",
                                        "enum": [
                                            "yes",
                                            "no"
                                        ],
                                        "example": "yes",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "partner has been updated."
                                        },
                                        "partner": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "company_id": {
                                                    "type": "integer",
                                                    "example": 45,
                                                    "nullable": true
                                                },
                                                "contact_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "isThirdParty": {
                                                    "type": "string",
                                                    "example": "yes"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "example": "Company"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Lexzur LLC"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Lexzur LLC"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Partner not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Partners"
                ],
                "summary": "Delete partner",
                "description": "Delete a partner",
                "operationId": "07d367fe91e49c790fa9f9c97ece3707",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "partner has been deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Partner not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/partners/export": {
            "get": {
                "tags": [
                    "Partners"
                ],
                "summary": "Export partners",
                "description": "Export filtered partners to Excel",
                "operationId": "03d9d04f83f78db7a66cefaa112eb9c7",
                "parameters": [
                    {
                        "name": "company_id",
                        "in": "query",
                        "description": "Filter by company id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "contact_id",
                        "in": "query",
                        "description": "Filter by contact id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "isThirdParty",
                        "in": "query",
                        "description": "Filter by third party flag",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "yes",
                                "no"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by company name, contact name, or partner id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort partners in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "company_id",
                                "contact_id",
                                "isThirdParty",
                                "createdOn",
                                "modifiedOn"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort partners in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "company_id",
                                "contact_id",
                                "isThirdParty",
                                "createdOn",
                                "modifiedOn"
                            ]
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter partners by the supported query rules",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/billing-settings/invoice-prefix": {
            "patch": {
                "tags": [
                    "Invoice Number Prefix"
                ],
                "summary": "Set Invoice Number Prefix",
                "description": "Updates the invoice number prefix for the given organization.",
                "operationId": "setInvoiceNumberPrefix",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "header",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "prefix"
                                ],
                                "properties": {
                                    "prefix": {
                                        "description": "Primary invoice prefix",
                                        "type": "string",
                                        "example": "INV"
                                    },
                                    "secondary_prefix": {
                                        "description": "Secondary invoice prefix",
                                        "type": "string",
                                        "example": "INV-SEC"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Invoice prefix saved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "invoice_prefix saved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "prefix": {
                                                    "description": "Primary invoice prefix",
                                                    "type": "string",
                                                    "example": "INV"
                                                },
                                                "secondary_prefix": {
                                                    "description": "Secondary invoice prefix",
                                                    "type": "string",
                                                    "example": "INV-SEC"
                                                },
                                                "module": {
                                                    "description": "Module identifier",
                                                    "type": "string",
                                                    "example": "invoice"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The prefix field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/billing-settings/credit-note-prefix": {
            "patch": {
                "tags": [
                    "Credit Note Number Prefix"
                ],
                "summary": "Set Credit Note Number Prefix",
                "description": "Updates the credit note number prefix for the given organization.",
                "operationId": "setCreditNoteNumberPrefix",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "header",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "prefix"
                                ],
                                "properties": {
                                    "prefix": {
                                        "description": "Primary credit note prefix",
                                        "type": "string",
                                        "example": "CN"
                                    },
                                    "secondary_prefix": {
                                        "description": "Secondary credit note prefix",
                                        "type": "string",
                                        "example": "CN-SEC"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Credit note prefix saved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "credit_note_prefix saved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "prefix": {
                                                    "description": "Primary credit note prefix",
                                                    "type": "string",
                                                    "example": "CN"
                                                },
                                                "secondary_prefix": {
                                                    "description": "Secondary credit note prefix",
                                                    "type": "string",
                                                    "example": "CN-SEC"
                                                },
                                                "module": {
                                                    "description": "Module identifier",
                                                    "type": "string",
                                                    "example": "credit_note"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The prefix field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/billing-settings/debit-note-prefix": {
            "patch": {
                "tags": [
                    "Debit Note Number Prefix"
                ],
                "summary": "Set Debit Note Number Prefix",
                "description": "Updates the debit note number prefix for the given organization.",
                "operationId": "setDebitNoteNumberPrefix",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "header",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "prefix"
                                ],
                                "properties": {
                                    "prefix": {
                                        "description": "Debit note prefix",
                                        "type": "string",
                                        "example": "DN"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Debit note prefix saved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "debit_note_prefix saved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "prefix": {
                                                    "description": "Debit note prefix",
                                                    "type": "string",
                                                    "example": "DN"
                                                },
                                                "secondary_prefix": {
                                                    "description": "Always null for debit notes",
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "module": {
                                                    "description": "Module identifier",
                                                    "type": "string",
                                                    "example": "debit_note"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The prefix field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/quotes": {
            "get": {
                "tags": [
                    "Quotes"
                ],
                "summary": "List Quotes",
                "description": "Retrieve a list of all quotes",
                "operationId": "0c53e0822690a82e2f4440e3c3b4f173",
                "parameters": [
                    {
                        "name": "account_id",
                        "in": "query",
                        "description": "Search Quotes by account Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "account_name",
                        "in": "query",
                        "description": "Search Quotes by account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "account_number",
                        "in": "query",
                        "description": "Search Quotes by account number",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "quote_date",
                        "in": "query",
                        "description": "Search Quotes by invoice date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "quote_number",
                        "in": "query",
                        "description": "Search Quotes by invoice number",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search Invoices by organization id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Search Quotes by status",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sub_total",
                        "in": "query",
                        "description": "Search Quotes by sub-total",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "total",
                        "in": "query",
                        "description": "Search Quotes by total",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "total_discount",
                        "in": "query",
                        "description": "Search Quotes by total discount",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "total_tax",
                        "in": "query",
                        "description": "Search Quotes by total tax",
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "voucher_header_id",
                        "in": "query",
                        "description": "Search Quotes by voucher header id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter Quotes by the above query parameters. <br /> <b>Example:</b> { \"total[gt]\" : 6000 } which will search for Quotes that have a total greater than \"6000\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort Quotes in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "quote_date",
                                "quote_number",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort quotes in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "quote_date",
                                "quote_number",
                                "total"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "quotes": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 4
                                                    },
                                                    "voucher_header_id": {
                                                        "type": "integer",
                                                        "example": 9
                                                    },
                                                    "account": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 25
                                                            },
                                                            "parent_id": {
                                                                "type": "integer",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "organization_id": {
                                                                "type": "string",
                                                                "example": "0001"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "client 1"
                                                            },
                                                            "account_label": {
                                                                "type": "string",
                                                                "example": "client 1 (USD)"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "account_data": {
                                                                "type": "string",
                                                                "example": "9999"
                                                            },
                                                            "system_account": {
                                                                "type": "string",
                                                                "example": "no"
                                                            },
                                                            "account_type_id": {
                                                                "type": "integer",
                                                                "example": 15
                                                            },
                                                            "account_type": {
                                                                "type": "string",
                                                                "example": "Third Party"
                                                            },
                                                            "number": {
                                                                "type": "string",
                                                                "example": "2"
                                                            },
                                                            "currency_id": {
                                                                "type": "integer",
                                                                "example": 234
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "USD"
                                                            },
                                                            "model_id": {
                                                                "type": "integer",
                                                                "example": 2
                                                            },
                                                            "member_id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "model_name": {
                                                                "type": "string",
                                                                "example": "Company"
                                                            },
                                                            "model_type": {
                                                                "type": "string",
                                                                "example": "client"
                                                            },
                                                            "tax_number": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "additional_id_type": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "additional_id_value": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "address": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "address2": {
                                                                "type": "string",
                                                                "example": ""
                                                            },
                                                            "zip": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "city": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "country_id": {
                                                                "type": "integer",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "state": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "street_name": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "additional_street_name": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "building_number": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "address_additional_number": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "district_neighborhood": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "rate_per_hour": {
                                                                "type": "integer",
                                                                "example": 300
                                                            },
                                                            "advisor_rate_per_hour": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "related_to_advisor_account": {
                                                                "type": "boolean",
                                                                "example": false
                                                            },
                                                            "company_id": {
                                                                "type": "string",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "visible_to_users": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "organization": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string",
                                                                        "example": "0001"
                                                                    },
                                                                    "name": {
                                                                        "type": "string",
                                                                        "example": "My Entity"
                                                                    },
                                                                    "country": {
                                                                        "type": "string",
                                                                        "example": "US"
                                                                    },
                                                                    "address_1": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "address_2": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "city": {
                                                                        "type": "string",
                                                                        "example": ""
                                                                    },
                                                                    "state": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "zip": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "integration_type": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    }
                                                                },
                                                                "type": "object"
                                                            },
                                                            "client": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string",
                                                                        "example": "00000002"
                                                                    },
                                                                    "term_id": {
                                                                        "type": "integer",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "discount_percentage": {
                                                                        "type": "string",
                                                                        "example": "0.000"
                                                                    },
                                                                    "phone": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "mobile": {
                                                                        "type": "string",
                                                                        "example": null,
                                                                        "nullable": true
                                                                    },
                                                                    "emails": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "member_label": {
                                                                        "type": "string",
                                                                        "example": "COM00000001"
                                                                    },
                                                                    "ledes": {
                                                                        "type": "integer",
                                                                        "example": 0
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "organization_id": {
                                                        "type": "string",
                                                        "example": "0001"
                                                    },
                                                    "quote_number": {
                                                        "type": "string",
                                                        "example": "0000003"
                                                    },
                                                    "prefix": {
                                                        "type": "string",
                                                        "example": ""
                                                    },
                                                    "reference_number": {
                                                        "type": "string",
                                                        "example": "0000003"
                                                    },
                                                    "suffix": {
                                                        "type": "string",
                                                        "example": ""
                                                    },
                                                    "purchase_order": {
                                                        "type": "string",
                                                        "example": "2134124"
                                                    },
                                                    "quote_reference": {
                                                        "type": "string",
                                                        "example": "213"
                                                    },
                                                    "bill_to": {
                                                        "type": "string",
                                                        "example": "9999"
                                                    },
                                                    "quote_date": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-09-17 00:00:00"
                                                    },
                                                    "due_on": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-10-18 00:00:00"
                                                    },
                                                    "paid_status": {
                                                        "type": "string",
                                                        "example": "open"
                                                    },
                                                    "display_tax": {
                                                        "type": "integer",
                                                        "example": 0
                                                    },
                                                    "display_discount": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "display_item_date": {
                                                        "type": "integer",
                                                        "example": 0
                                                    },
                                                    "quote_reminder": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "string",
                                                                "example": "00000004"
                                                            },
                                                            "user_id": {
                                                                "type": "string",
                                                                "example": "0000000002"
                                                            },
                                                            "summary": {
                                                                "type": "string",
                                                                "example": "The Quote 213 is due on 2024-10-18 00:00 \\n Quote id: 213 \\n Client: client 1"
                                                            },
                                                            "reminder_date": {
                                                                "type": "string",
                                                                "format": "date",
                                                                "example": "2024-09-17"
                                                            },
                                                            "reminder_time": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "reminder_time_type": {
                                                                "type": "string",
                                                                "example": "day"
                                                            },
                                                            "reminder_type": {
                                                                "type": "string",
                                                                "example": "popup"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "term_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "terms": {
                                                        "type": "string",
                                                        "example": "In Advance"
                                                    },
                                                    "term_days_nb": {
                                                        "type": "integer",
                                                        "example": 0
                                                    },
                                                    "total": {
                                                        "type": "string",
                                                        "example": "1999.990"
                                                    },
                                                    "notes": {
                                                        "type": "string",
                                                        "example": "Thank you asadasdasdfor your business."
                                                    },
                                                    "exchange_rate": {
                                                        "type": "string",
                                                        "example": "1.0000000000000000"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "sdadfvvssvsfdvc"
                                                    },
                                                    "quote_details": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 11
                                                                },
                                                                "account_id": {
                                                                    "type": "integer",
                                                                    "example": 14
                                                                },
                                                                "quantity": {
                                                                    "type": "string",
                                                                    "example": "2"
                                                                },
                                                                "description": {
                                                                    "type": "string",
                                                                    "example": "Product 1"
                                                                },
                                                                "rate": {
                                                                    "type": "string",
                                                                    "example": "2000.000"
                                                                },
                                                                "discount": {
                                                                    "type": "string",
                                                                    "example": "0.00"
                                                                },
                                                                "total": {
                                                                    "type": "string",
                                                                    "example": "4000.00"
                                                                },
                                                                "quote_id": {
                                                                    "type": "integer",
                                                                    "example": 4
                                                                },
                                                                "taxable": {
                                                                    "type": "boolean",
                                                                    "example": true
                                                                },
                                                                "item_date": {
                                                                    "type": "string",
                                                                    "format": "date-time",
                                                                    "example": "2024-09-17 00:00:00"
                                                                },
                                                                "item_display_date": {
                                                                    "type": "string",
                                                                    "example": "2024-09-17"
                                                                },
                                                                "details": {
                                                                    "type": "string",
                                                                    "example": "dfvf"
                                                                },
                                                                "type": {
                                                                    "type": "string",
                                                                    "example": "product"
                                                                },
                                                                "item_ref_number": {
                                                                    "type": "string",
                                                                    "example": "4"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Quote not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/quotes/{id}": {
            "get": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Get a specific quote",
                "description": "Retrieve a single quote by its ID",
                "operationId": "481c242adb528b7e1cc69b22ea9f1d15",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the quote to retrieve",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Filter by organization ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "quote": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 9
                                                },
                                                "account": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 25
                                                        },
                                                        "parent_id": {
                                                            "type": "integer",
                                                            "example": null
                                                        },
                                                        "organization_id": {
                                                            "type": "string",
                                                            "example": "0001"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "client 1"
                                                        },
                                                        "account_label": {
                                                            "type": "string",
                                                            "example": "client 1 (USD)"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "account_data": {
                                                            "type": "string",
                                                            "example": "9999"
                                                        },
                                                        "system_account": {
                                                            "type": "string",
                                                            "example": "no"
                                                        },
                                                        "account_type_id": {
                                                            "type": "integer",
                                                            "example": 15
                                                        },
                                                        "account_type": {
                                                            "type": "string",
                                                            "example": "Third Party"
                                                        },
                                                        "number": {
                                                            "type": "string",
                                                            "example": "2"
                                                        },
                                                        "currency_id": {
                                                            "type": "integer",
                                                            "example": 234
                                                        },
                                                        "currency": {
                                                            "type": "string",
                                                            "example": "USD"
                                                        },
                                                        "model_id": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "member_id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "model_name": {
                                                            "type": "string",
                                                            "example": "Company"
                                                        },
                                                        "model_type": {
                                                            "type": "string",
                                                            "example": "client"
                                                        },
                                                        "tax_number": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "additional_id_type": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "additional_id_value": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "address": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "address2": {
                                                            "type": "string",
                                                            "example": ""
                                                        },
                                                        "zip": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "city": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "country_id": {
                                                            "type": "integer",
                                                            "example": null
                                                        },
                                                        "state": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "street_name": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "additional_street_name": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "building_number": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "address_additional_number": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "district_neighborhood": {
                                                            "type": "string",
                                                            "example": null
                                                        },
                                                        "rate_per_hour": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 300
                                                        },
                                                        "advisor_rate_per_hour": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": null
                                                        },
                                                        "related_to_advisor_account": {
                                                            "type": "boolean",
                                                            "example": false
                                                        },
                                                        "company_id": {
                                                            "type": "integer",
                                                            "example": null
                                                        },
                                                        "visible_to_users": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "organization": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "0001"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "My Entity"
                                                                },
                                                                "country": {
                                                                    "type": "string",
                                                                    "example": "US"
                                                                },
                                                                "address_1": {
                                                                    "type": "string",
                                                                    "example": null
                                                                },
                                                                "address_2": {
                                                                    "type": "string",
                                                                    "example": null
                                                                },
                                                                "city": {
                                                                    "type": "string",
                                                                    "example": ""
                                                                },
                                                                "state": {
                                                                    "type": "string",
                                                                    "example": null
                                                                },
                                                                "zip": {
                                                                    "type": "string",
                                                                    "example": null
                                                                },
                                                                "integration_type": {
                                                                    "type": "string",
                                                                    "example": null
                                                                }
                                                            },
                                                            "type": "object"
                                                        },
                                                        "client": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "00000002"
                                                                },
                                                                "term_id": {
                                                                    "type": "integer",
                                                                    "example": null
                                                                },
                                                                "discount_percentage": {
                                                                    "type": "string",
                                                                    "example": "0.000"
                                                                },
                                                                "phone": {
                                                                    "type": "string",
                                                                    "example": null
                                                                },
                                                                "mobile": {
                                                                    "type": "string",
                                                                    "example": null
                                                                },
                                                                "emails": {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "member_label": {
                                                                    "type": "string",
                                                                    "example": "COM00000001"
                                                                },
                                                                "ledes": {
                                                                    "type": "integer",
                                                                    "example": 0
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "organization_id": {
                                                    "type": "string",
                                                    "example": "0001"
                                                },
                                                "quote_number": {
                                                    "type": "string",
                                                    "example": "0000003"
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "reference_number": {
                                                    "type": "string",
                                                    "example": "0000003"
                                                },
                                                "suffix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "purchase_order": {
                                                    "type": "string",
                                                    "example": "2134124"
                                                },
                                                "quote_reference": {
                                                    "type": "string",
                                                    "example": "213"
                                                },
                                                "bill_to": {
                                                    "type": "string",
                                                    "example": "9999"
                                                },
                                                "quote_date": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-17 00:00:00"
                                                },
                                                "due_on": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-10-18 00:00:00"
                                                },
                                                "paid_status": {
                                                    "type": "string",
                                                    "example": "open"
                                                },
                                                "display_tax": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "display_discount": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "display_item_date": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "quote_reminder": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "00000004"
                                                        },
                                                        "user_id": {
                                                            "type": "string",
                                                            "example": "0000000002"
                                                        },
                                                        "summary": {
                                                            "type": "string",
                                                            "example": "The Quote 213 is due on 2024-10-18 00:00 \\n Quote id: 213 \\n Client: client 1"
                                                        },
                                                        "reminder_date": {
                                                            "type": "string",
                                                            "format": "date",
                                                            "example": "2024-09-17"
                                                        },
                                                        "reminder_time": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "reminder_time_type": {
                                                            "type": "string",
                                                            "example": "day"
                                                        },
                                                        "reminder_type": {
                                                            "type": "string",
                                                            "example": "popup"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "term_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "terms": {
                                                    "type": "string",
                                                    "example": "In Advance"
                                                },
                                                "term_days_nb": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "total": {
                                                    "type": "string",
                                                    "example": "1999.990"
                                                },
                                                "notes": {
                                                    "type": "string",
                                                    "example": "Thank you for your business."
                                                },
                                                "exchange_rate": {
                                                    "type": "string",
                                                    "example": "1.0000000000000000"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "sdadfvvssvsfdvc"
                                                },
                                                "quote_details": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 5
                                                            },
                                                            "quote_id": {
                                                                "type": "integer",
                                                                "example": 4
                                                            },
                                                            "line_number": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "test"
                                                            },
                                                            "account_id": {
                                                                "type": "integer",
                                                                "example": 25
                                                            },
                                                            "amount": {
                                                                "type": "string",
                                                                "example": "200.0000"
                                                            },
                                                            "discount_amount": {
                                                                "type": "string",
                                                                "example": "0.0000"
                                                            },
                                                            "tax_amount": {
                                                                "type": "string",
                                                                "example": "0.0000"
                                                            },
                                                            "total": {
                                                                "type": "string",
                                                                "example": "200.0000"
                                                            },
                                                            "quantity": {
                                                                "type": "string",
                                                                "example": "1"
                                                            },
                                                            "currency_id": {
                                                                "type": "integer",
                                                                "example": 234
                                                            },
                                                            "rate": {
                                                                "type": "string",
                                                                "example": "200.0000"
                                                            },
                                                            "account_type": {
                                                                "type": "string",
                                                                "example": "Third Party"
                                                            },
                                                            "item_type": {
                                                                "type": "string",
                                                                "example": "service"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Quote not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Quote not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Delete Quote",
                "description": "Delete a specific quote by ID",
                "operationId": "9e7ea3afca207a2197324f9b597ef18e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Quote ID to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "quote was deleted."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Quote not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "quote not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/quote": {
            "post": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Create Quote",
                "description": "Create a new Quote",
                "operationId": "a241c11c70df9eeb76acb9f3d0b96287",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "client_id",
                                    "organization_id",
                                    "term_id",
                                    "date",
                                    "due_date",
                                    "total",
                                    "paid_status"
                                ],
                                "properties": {
                                    "client_id": {
                                        "description": "Client ID",
                                        "type": "integer",
                                        "example": 25
                                    },
                                    "organization_id": {
                                        "description": "Organization ID",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "term_id": {
                                        "description": "Term ID",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "quote_reference_number": {
                                        "description": "Quote reference number",
                                        "type": "string",
                                        "example": "213",
                                        "nullable": true
                                    },
                                    "bill_to": {
                                        "description": "Bill to address",
                                        "type": "string",
                                        "example": "bill addrerss",
                                        "nullable": true
                                    },
                                    "date": {
                                        "description": "Quote date",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2024-09-17"
                                    },
                                    "due_date": {
                                        "description": "Due date",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2024-10-18"
                                    },
                                    "purchase_order": {
                                        "description": "Purchase order number",
                                        "type": "string",
                                        "example": "2134124",
                                        "nullable": true
                                    },
                                    "total": {
                                        "description": "Total amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 4299.2
                                    },
                                    "description": {
                                        "description": "Description of the quote",
                                        "type": "string",
                                        "example": "Description here",
                                        "nullable": true
                                    },
                                    "note": {
                                        "description": "Quote note",
                                        "type": "string",
                                        "example": "<p>Thank you for your business.</p>",
                                        "nullable": true
                                    },
                                    "display_tax": {
                                        "description": "Display tax",
                                        "type": "boolean",
                                        "example": false,
                                        "nullable": true
                                    },
                                    "display_discount": {
                                        "description": "Discount display type",
                                        "type": "string",
                                        "enum": [
                                            "no",
                                            "item_level",
                                            "invoice_level_after_tax",
                                            "invoice_level_before_tax",
                                            "both_item_after_level",
                                            "both_item_before_level"
                                        ],
                                        "example": "item_level",
                                        "nullable": true
                                    },
                                    "discount_amount": {
                                        "description": "Discount amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 156,
                                        "nullable": true
                                    },
                                    "discount_percentage": {
                                        "description": "Discount percentage",
                                        "type": "number",
                                        "format": "float",
                                        "example": 10,
                                        "nullable": true
                                    },
                                    "discount_type": {
                                        "description": "Discount type",
                                        "type": "string",
                                        "enum": [
                                            "percentage",
                                            "amount"
                                        ],
                                        "nullable": true
                                    },
                                    "discount_id": {
                                        "description": "Discount ID",
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "display_item_date": {
                                        "description": "Display item date",
                                        "type": "boolean",
                                        "example": false,
                                        "nullable": true
                                    },
                                    "paid_status": {
                                        "description": "Paid status of the quote",
                                        "type": "string",
                                        "enum": [
                                            "open",
                                            "draft"
                                        ],
                                        "example": "open"
                                    },
                                    "related_cases": {
                                        "description": "List of related cases",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "nullable": true
                                    },
                                    "related_matters": {
                                        "description": "List of related matters",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "nullable": true
                                    },
                                    "related_contracts": {
                                        "description": "List of related contracts",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "nullable": true
                                    },
                                    "notify_me_before": {
                                        "description": "Reminder settings",
                                        "properties": {
                                            "time": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "time_type": {
                                                "type": "string",
                                                "enum": [
                                                    "day",
                                                    "week",
                                                    "month"
                                                ],
                                                "example": "day"
                                            },
                                            "type": {
                                                "type": "string",
                                                "enum": [
                                                    "popup",
                                                    "popup_email"
                                                ],
                                                "example": "popup"
                                            }
                                        },
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "items": {
                                        "description": "List of items",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "item_id",
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax"
                                            ],
                                            "properties": {
                                                "item_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "matter_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Item Title"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Item Description"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 2000
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "is_fixed_rate": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "item_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-19",
                                                    "nullable": true
                                                },
                                                "discount_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0,
                                                    "nullable": true
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0,
                                                    "nullable": true
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 4000
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 4000
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 400
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "expenses": {
                                        "description": "List of expenses",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "expense_id",
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax"
                                            ],
                                            "properties": {
                                                "expense_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 14
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Expense Title"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Expense Description"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 300
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 900
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 900
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 90
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "nullable": true
                                    },
                                    "time_logs": {
                                        "description": "List of time logs",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax"
                                            ],
                                            "properties": {
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 14
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Time Log Title"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Time Log Description"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 100
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1000
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1000
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 100
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "nullable": true
                                    },
                                    "bills": {
                                        "description": "List of bills",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax",
                                                "item_title"
                                            ],
                                            "properties": {
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 312
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Other Fees"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Other Fees"
                                                },
                                                "tax_id": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "nullable": true
                                                },
                                                "bill_item_id": {
                                                    "type": "integer",
                                                    "example": 12,
                                                    "nullable": true
                                                },
                                                "tax_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 11
                                                },
                                                "item_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-27"
                                                },
                                                "discount_type": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "discount_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 624
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 68.64
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 692.64
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Quote created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "quote has been created."
                                        },
                                        "quote": {
                                            "description": "Quote details",
                                            "properties": {
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 144
                                                },
                                                "displayTax": {
                                                    "type": "boolean",
                                                    "example": 0
                                                },
                                                "displayDiscount": {
                                                    "type": "string",
                                                    "example": "item_level"
                                                },
                                                "display_item_date": {
                                                    "type": "boolean",
                                                    "example": 0
                                                },
                                                "notes": {
                                                    "type": "string",
                                                    "example": "Thank you for your business."
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "sdadfvvssvsfdvc"
                                                },
                                                "paidStatus": {
                                                    "type": "string",
                                                    "example": "open"
                                                },
                                                "account_id": {
                                                    "type": "string",
                                                    "example": "25"
                                                },
                                                "quoteDate": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-17"
                                                },
                                                "billTo": {
                                                    "type": "string",
                                                    "example": "9999"
                                                },
                                                "term_id": {
                                                    "type": "string",
                                                    "example": "1"
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "suffix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "groupTimeLogsByUserInExport": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "dueOn": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-10-18 00:00"
                                                },
                                                "purchaseOrder": {
                                                    "type": "string",
                                                    "example": "2134124"
                                                },
                                                "quoteNumber": {
                                                    "type": "string",
                                                    "example": "213"
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "lines_total_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1301
                                                },
                                                "lines_total_discount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "lines_total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1301
                                                },
                                                "id": {
                                                    "type": "integer",
                                                    "example": 113
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The due date field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/quote/{id}/": {
            "put": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Update Quote",
                "description": "Update a specific Quote",
                "operationId": "247e9efd9dfc483dec848b4708a29d20",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "client_id",
                                    "organization_id",
                                    "term_id",
                                    "date",
                                    "due_date",
                                    "total",
                                    "paid_status"
                                ],
                                "properties": {
                                    "client_id": {
                                        "description": "Client ID",
                                        "type": "integer",
                                        "example": 25
                                    },
                                    "organization_id": {
                                        "description": "Organization ID",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "term_id": {
                                        "description": "Term ID",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "quote_reference_number": {
                                        "description": "Quote reference number",
                                        "type": "string",
                                        "example": "213",
                                        "nullable": true
                                    },
                                    "bill_to": {
                                        "description": "Bill to address",
                                        "type": "string",
                                        "example": "bill addrerss",
                                        "nullable": true
                                    },
                                    "date": {
                                        "description": "Quote date",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2024-09-17"
                                    },
                                    "due_date": {
                                        "description": "Due date",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2024-10-18"
                                    },
                                    "purchase_order": {
                                        "description": "Purchase order number",
                                        "type": "string",
                                        "example": "2134124",
                                        "nullable": true
                                    },
                                    "total": {
                                        "description": "Total amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 4299.2
                                    },
                                    "description": {
                                        "description": "Description of the quote",
                                        "type": "string",
                                        "example": "Description here",
                                        "nullable": true
                                    },
                                    "note": {
                                        "description": "Quote note",
                                        "type": "string",
                                        "example": "<p>Thank you for your business.</p>",
                                        "nullable": true
                                    },
                                    "display_tax": {
                                        "description": "Display tax",
                                        "type": "boolean",
                                        "example": false,
                                        "nullable": true
                                    },
                                    "display_discount": {
                                        "description": "Discount display type",
                                        "type": "string",
                                        "enum": [
                                            "no",
                                            "item_level",
                                            "invoice_level_after_tax",
                                            "invoice_level_before_tax",
                                            "both_item_after_level",
                                            "both_item_before_level"
                                        ],
                                        "example": "item_level",
                                        "nullable": true
                                    },
                                    "discount_amount": {
                                        "description": "Discount amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 156,
                                        "nullable": true
                                    },
                                    "discount_percentage": {
                                        "description": "Discount percentage",
                                        "type": "number",
                                        "format": "float",
                                        "example": 10,
                                        "nullable": true
                                    },
                                    "discount_type": {
                                        "description": "Discount type",
                                        "type": "string",
                                        "enum": [
                                            "percentage",
                                            "amount"
                                        ],
                                        "nullable": true
                                    },
                                    "discount_id": {
                                        "description": "Discount ID",
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "display_item_date": {
                                        "description": "Display item date",
                                        "type": "boolean",
                                        "example": false,
                                        "nullable": true
                                    },
                                    "paid_status": {
                                        "description": "Paid status of the quote",
                                        "type": "string",
                                        "enum": [
                                            "open",
                                            "draft"
                                        ],
                                        "example": "open"
                                    },
                                    "related_cases": {
                                        "description": "List of related cases",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "nullable": true
                                    },
                                    "related_matters": {
                                        "description": "List of related matters",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "nullable": true
                                    },
                                    "related_contracts": {
                                        "description": "List of related contracts",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "nullable": true
                                    },
                                    "notify_me_before": {
                                        "description": "Reminder settings",
                                        "properties": {
                                            "time": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "time_type": {
                                                "type": "string",
                                                "enum": [
                                                    "day",
                                                    "week",
                                                    "month"
                                                ],
                                                "example": "day"
                                            },
                                            "type": {
                                                "type": "string",
                                                "enum": [
                                                    "popup",
                                                    "popup_email"
                                                ],
                                                "example": "popup"
                                            }
                                        },
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "items": {
                                        "description": "List of items",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "item_id",
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax"
                                            ],
                                            "properties": {
                                                "item_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Item Title"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Item Description"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 2000
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "item_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-19",
                                                    "nullable": true
                                                },
                                                "discount_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0,
                                                    "nullable": true
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0,
                                                    "nullable": true
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 4000
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 4000
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 400
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "expenses": {
                                        "description": "List of expenses",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "expense_id",
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax"
                                            ],
                                            "properties": {
                                                "expense_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 14
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Expense Title"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Expense Description"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 300
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 900
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 900
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 90
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "nullable": true
                                    },
                                    "time_logs": {
                                        "description": "List of time logs",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax"
                                            ],
                                            "properties": {
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 14
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Time Log Title"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Time Log Description"
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 100
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1000
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1000
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 100
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "nullable": true
                                    },
                                    "bills": {
                                        "description": "List of bills",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "account_id",
                                                "unit_price",
                                                "quantity",
                                                "total",
                                                "sub_total",
                                                "description",
                                                "total_tax",
                                                "item_title"
                                            ],
                                            "properties": {
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 312
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "item_title": {
                                                    "type": "string",
                                                    "example": "Other Fees"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Other Fees"
                                                },
                                                "tax_id": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "nullable": true
                                                },
                                                "bill_item_id": {
                                                    "type": "integer",
                                                    "example": 12,
                                                    "nullable": true
                                                },
                                                "tax_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 11
                                                },
                                                "is_fixed_rate": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "matter_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "item_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-27"
                                                },
                                                "discount_type": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "discount_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "sub_total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 624
                                                },
                                                "total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 68.64
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 692.64
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Quote created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "quote has been created."
                                        },
                                        "quote": {
                                            "description": "Quote details",
                                            "properties": {
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 144
                                                },
                                                "displayTax": {
                                                    "type": "boolean",
                                                    "example": 0
                                                },
                                                "displayDiscount": {
                                                    "type": "string",
                                                    "example": "item_level"
                                                },
                                                "display_item_date": {
                                                    "type": "boolean",
                                                    "example": 0
                                                },
                                                "notes": {
                                                    "type": "string",
                                                    "example": "Thank you for your business."
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "sdadfvvssvsfdvc"
                                                },
                                                "paidStatus": {
                                                    "type": "string",
                                                    "example": "open"
                                                },
                                                "account_id": {
                                                    "type": "string",
                                                    "example": "25"
                                                },
                                                "quoteDate": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2024-09-17"
                                                },
                                                "billTo": {
                                                    "type": "string",
                                                    "example": "9999"
                                                },
                                                "term_id": {
                                                    "type": "string",
                                                    "example": "1"
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "suffix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "groupTimeLogsByUserInExport": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "dueOn": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-10-18 00:00"
                                                },
                                                "purchaseOrder": {
                                                    "type": "string",
                                                    "example": "2134124"
                                                },
                                                "quoteNumber": {
                                                    "type": "string",
                                                    "example": "213"
                                                },
                                                "discount_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "discount_percentage": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "lines_total_subtotal": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1301
                                                },
                                                "lines_total_discount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "lines_total_tax": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                },
                                                "total": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1301
                                                },
                                                "id": {
                                                    "type": "integer",
                                                    "example": 113
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The due date field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Access Denied. <br> You do not have the necessary permissions to perform the required action. Please contact the administrator for assistance."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/quotes/{id}/update-status/{status}": {
            "patch": {
                "tags": [
                    "Quotes"
                ],
                "summary": "Update Quote Status",
                "description": "Change the status of a specific quote by ID",
                "operationId": "c8ec2f4865195c7bb4c85e3b33d361a2",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Quote ID to update status",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "status",
                        "in": "path",
                        "description": "New status for the quote (approved, open, invoiced, rejected, canceled)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "approved",
                                "open",
                                "invoiced",
                                "rejected",
                                "canceled"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Quote status updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "quote has been updated."
                                        },
                                        "quote": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "voucher_header_id": {
                                                    "type": "integer",
                                                    "example": 9
                                                },
                                                "account_id": {
                                                    "type": "integer",
                                                    "example": 25
                                                },
                                                "billTo": {
                                                    "type": "string",
                                                    "example": "9999"
                                                },
                                                "term_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "prefix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "suffix": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "dueOn": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-10-18 00:00:00"
                                                },
                                                "quoteDate": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-09-17 00:00:00"
                                                },
                                                "paidStatus": {
                                                    "type": "string",
                                                    "example": "approved"
                                                },
                                                "purchaseOrder": {
                                                    "type": "string",
                                                    "example": "2134124"
                                                },
                                                "total": {
                                                    "type": "string",
                                                    "example": "1999.990"
                                                },
                                                "quoteNumber": {
                                                    "type": "string",
                                                    "example": "213"
                                                },
                                                "notes": {
                                                    "type": "string",
                                                    "example": "Thank you asadasdasdfor your business."
                                                },
                                                "displayTax": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "displayDiscount": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "discount_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "discount_type": {
                                                    "type": "string",
                                                    "example": "percentage"
                                                },
                                                "discount_value_type": {
                                                    "type": "string",
                                                    "example": "item_level"
                                                },
                                                "discount_percentage": {
                                                    "type": "string",
                                                    "example": "0.000"
                                                },
                                                "discount_amount": {
                                                    "type": "string",
                                                    "example": "0.000"
                                                },
                                                "groupTimeLogsByUserInExport": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "related_invoice_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "display_item_date": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "sdadfvvssvsfdvc"
                                                },
                                                "lines_total_discount": {
                                                    "type": "string",
                                                    "example": "190.000"
                                                },
                                                "lines_total_subtotal": {
                                                    "type": "string",
                                                    "example": "2064.000"
                                                },
                                                "lines_totals": {
                                                    "type": "string",
                                                    "example": "0.00"
                                                },
                                                "lines_total_tax": {
                                                    "type": "string",
                                                    "example": "126.090"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Quote not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "quote not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid status",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not a valid status"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/reports/analytic-accounts": {
            "get": {
                "tags": [
                    "AnalyticAccountsReport"
                ],
                "summary": "Get analytic accounts values",
                "description": "Get analytic accounts values",
                "operationId": "44a506c8385202cb2f0d6aaf81aab02e",
                "parameters": [
                    {
                        "name": "analytic_accounts_id",
                        "in": "query",
                        "description": "Search by analytic account id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "analytic_name",
                        "in": "query",
                        "description": "Search by analytic account name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Search by date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "local_amount",
                        "in": "query",
                        "description": "Search by amount in local entity currency",
                        "required": true,
                        "schema": {
                            "type": "decimal"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search by organization id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter by the above query parameters. <br />\n              <b>Example:</b> { \"analytic_name[value]\" : \"abc\", \"analytic_name[operator]\" : \"contains\" } which will search for all records that have a name contains \"abc\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort records in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "analytic_accounts_id",
                                "account_name",
                                "analytic_accounts_percentage",
                                "local_amount",
                                "analytic_name",
                                "date",
                                "record_number",
                                "created_on",
                                "modified_on"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort records in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "analytic_accounts_id",
                                "account_name",
                                "analytic_accounts_percentage",
                                "local_amount",
                                "analytic_name",
                                "date",
                                "record_number",
                                "created_on",
                                "modified_on"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/reports/work-in-progress": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Retrieve Work In Progress report data",
                "operationId": "1498d97565e6078c1598acb32a7a6b6e",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "The ID of the organization",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "grouping",
                        "in": "query",
                        "description": "Grouping mode (1: default, 2: by matter, 3: grouped by matter with details)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                1,
                                2,
                                3
                            ]
                        }
                    },
                    {
                        "name": "currency_id",
                        "in": "query",
                        "description": "Currency ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "tax_id",
                        "in": "query",
                        "description": "Use selected tax ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number for pagination",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Filter by date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "client",
                        "in": "query",
                        "description": "Filter by client ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "matter",
                        "in": "query",
                        "description": "Filter by matter ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "activities_types",
                        "in": "query",
                        "description": "Filter by activity types (e.g. time_entries, expenses, bill_items)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "case_type",
                        "in": "query",
                        "description": "Filter by case type IDs (Practice Area IDs)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "provider_group",
                        "in": "query",
                        "description": "Filter by provider group IDs (Assigned Ream IDs)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "requested_by",
                        "in": "query",
                        "description": "Filter by requested by user ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "draft",
                        "in": "query",
                        "description": "Include draft records (1 = true, 0 = false)",
                        "required": false,
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "assignee",
                        "in": "query",
                        "description": "Filter by assignee user ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "workflow_status",
                        "in": "query",
                        "description": "Filter by workflow status IDs",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "referred_by",
                        "in": "query",
                        "description": "Filter by referred by user ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "requested_by",
                        "in": "query",
                        "description": "Filter by user who requested the matter",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "user",
                        "in": "query",
                        "description": "Filter By user ID of the transaction Item",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "billing_method",
                        "in": "query",
                        "description": "Filter by billing method (e.g., fixed_rate, hourly_rate)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_fields",
                        "in": "query",
                        "description": "Filter By Custom Fields value based on the type of the custom field",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort by field in ascending order (e.g. assignee)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort by field in descending order (e.g. assignee)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success response with work in progress data"
                    },
                    "400": {
                        "description": "Missing organization_id or invalid request"
                    }
                }
            }
        },
        "/reports/export-work-in-progress": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Retrieve Work In Progress report data",
                "operationId": "ac3115519232a4c86d2ae5dc028b132d",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "The ID of the organization",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "grouping",
                        "in": "query",
                        "description": "Grouping mode (1: default, 2: by matter, 3: grouped by matter with details)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                1,
                                2,
                                3
                            ]
                        }
                    },
                    {
                        "name": "currency_id",
                        "in": "query",
                        "description": "Currency ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "tax_id",
                        "in": "query",
                        "description": "Use selected tax ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number for pagination",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Filter by date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "client",
                        "in": "query",
                        "description": "Filter by client ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "matter",
                        "in": "query",
                        "description": "Filter by matter ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "activities_types",
                        "in": "query",
                        "description": "Filter by activity types (e.g. time_entries, expenses, bill_items)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "case_type",
                        "in": "query",
                        "description": "Filter by case type IDs (Practice Area IDs)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "provider_group",
                        "in": "query",
                        "description": "Filter by provider group IDs (Assigned Ream IDs)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "requested_by",
                        "in": "query",
                        "description": "Filter by requested by user ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "draft",
                        "in": "query",
                        "description": "Include draft records (1 = true, 0 = false)",
                        "required": false,
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "assignee",
                        "in": "query",
                        "description": "Filter by assignee user ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "workflow_status",
                        "in": "query",
                        "description": "Filter by workflow status IDs",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "referred_by",
                        "in": "query",
                        "description": "Filter by referred by user ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "requested_by",
                        "in": "query",
                        "description": "Filter by user who requested the matter",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "user",
                        "in": "query",
                        "description": "Filter By user ID of the transaction Item",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "billing_method",
                        "in": "query",
                        "description": "Filter by billing method (e.g., fixed_rate, hourly_rate)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_fields",
                        "in": "query",
                        "description": "Filter By Custom Fields value based on the type of the custom field",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort by field in ascending order (e.g. assignee)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort by field in descending order (e.g. assignee)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success response with work in progress data"
                    },
                    "400": {
                        "description": "Missing organization_id or invalid request"
                    }
                }
            }
        },
        "/reports/work-in-progress/prepare-data": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Get initialization data for the Work In Progress screen",
                "operationId": "a1376d16cd3d12b09b5662ee594b5919",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "The ID of the organization",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Initialization data for filters and dropdowns",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "provider_groups": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "workflow_statuses": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "currencies": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "practice_areas": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "custom_fields": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "taxes": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing organization_id"
                    }
                }
            }
        },
        "/supplier-taxes": {
            "get": {
                "tags": [
                    "Taxes"
                ],
                "summary": "List taxes",
                "description": "List all taxes",
                "operationId": "dadd659e3adc3bef7a8e8bdbd7300133",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search taxes by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search taxes by organization Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter taxes by the above query parameters. <br />\n              <b>Example:</b> { \"name[eq]\" : \"VAT\" } which will search for taxes with name = \"VAT\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort taxes in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "percentage"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort taxes in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "percentage"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Taxes"
                ],
                "summary": "Create Tax",
                "description": "Create Tax",
                "operationId": "952b6607589813a0fe9b8eb356a9b354",
                "requestBody": {
                    "$ref": "#/components/requestBodies/CreateTaxRequestBody"
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/supplier-taxes/{id}": {
            "get": {
                "tags": [
                    "Taxes"
                ],
                "summary": "Get tax",
                "description": "Get tax",
                "operationId": "24387667e9d165b4e7f68f06685894e3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/taxes": {
            "get": {
                "tags": [
                    "Taxes"
                ],
                "summary": "List taxes",
                "description": "List all taxes",
                "operationId": "b95cd00d834a6d75bc5dcc5de70e408c",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search taxes by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Search taxes by organization Id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter taxes by the above query parameters. <br />\n              <b>Example:</b> { \"name[eq]\" : \"VAT\" } which will search for taxes with name = \"VAT\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort taxes in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "percentage"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort taxes in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "percentage"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Taxes"
                ],
                "summary": "Create Tax",
                "description": "Create Tax",
                "operationId": "7a12f634bf8e874ad698f75911cd4834",
                "requestBody": {
                    "$ref": "#/components/requestBodies/CreateTaxRequestBody"
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/taxes/{id}": {
            "get": {
                "tags": [
                    "Taxes"
                ],
                "summary": "Get tax",
                "description": "Get tax",
                "operationId": "10d083e17070703f46e66db0072117fd",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/terms": {
            "get": {
                "tags": [
                    "Terms"
                ],
                "summary": "List terms",
                "description": "List all terms",
                "operationId": "17b5fccd98c5606ca6e73e6d624cff07",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search terms by name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filters",
                        "in": "query",
                        "description": "Filter terms by the above query parameters. <br />\n              <b>Example:</b> { \"name[eq]\" : \"15 Days\" } which will search for terms with name = \"15 Days\".",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "object"
                        }
                    },
                    {
                        "name": "sort[asc]",
                        "in": "query",
                        "description": "Sort terms in ascending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "sort[desc]",
                        "in": "query",
                        "description": "Sort terms in descending order",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The particular page to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "The number of items to return per page Default: 50 Limit: 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "terms": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "15 Days"
                                                    },
                                                    "number_of_days": {
                                                        "type": "integer",
                                                        "example": 15
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "15 Days"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "page_context": {
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "next_page_url": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "count": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Terms"
                ],
                "summary": "Create a Term",
                "description": "Create a new Term record",
                "operationId": "9125d7773cdd390b08c898b98081797d",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name",
                                    "number_of_days"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Term Name (must be unique)",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "31 Days"
                                    },
                                    "fl1name": {
                                        "description": "Term Name (first language)",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "31 Jours",
                                        "nullable": true
                                    },
                                    "fl2name": {
                                        "description": "Term Name (second language)",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "31 يوم",
                                        "nullable": true
                                    },
                                    "number_of_days": {
                                        "description": "Number of Days of the Term",
                                        "type": "integer",
                                        "minimum": 0,
                                        "example": 31
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Term has been created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "term has been created."
                                        },
                                        "term": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 11
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "31 Days"
                                                },
                                                "fl1name": {
                                                    "type": "string",
                                                    "example": "31 Jours"
                                                },
                                                "fl2name": {
                                                    "type": "string",
                                                    "example": "31 يوم"
                                                },
                                                "number_of_days": {
                                                    "type": "integer",
                                                    "example": 31
                                                },
                                                "display_name": {
                                                    "type": "string",
                                                    "example": "31 Days"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/terms/{id}": {
            "get": {
                "tags": [
                    "Terms"
                ],
                "summary": "Get term",
                "description": "Get term",
                "operationId": "6ce4290b4cf969dcb73307ae2db1d320",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "term": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "15 Days"
                                                },
                                                "number_of_days": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "15 Days"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Terms"
                ],
                "summary": "Update a Term",
                "description": "Update an existing Term by its ID",
                "operationId": "a5a191f13ae45c7a0aa9493f2b45f47a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the Term to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 11
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name",
                                    "number_of_days"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Term Name (must be unique)",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "11 Days"
                                    },
                                    "fl1name": {
                                        "description": "Term Name (first language)",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "11 Jours",
                                        "nullable": true
                                    },
                                    "fl2name": {
                                        "description": "Term Name (second language)",
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "11 يوم",
                                        "nullable": true
                                    },
                                    "number_of_days": {
                                        "description": "Number of Days of the Term",
                                        "type": "integer",
                                        "minimum": 0,
                                        "example": 11
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Term has been updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "term has been updated."
                                        },
                                        "term": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 11
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "11 Days"
                                                },
                                                "fl1name": {
                                                    "type": "string",
                                                    "example": "11 Jours"
                                                },
                                                "fl2name": {
                                                    "type": "string",
                                                    "example": "11 يوم"
                                                },
                                                "number_of_days": {
                                                    "type": "integer",
                                                    "example": 11
                                                },
                                                "display_name": {
                                                    "type": "string",
                                                    "example": "11 Days"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Term not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Term doesn't exist!"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error occurred."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/play": {
            "post": {
                "tags": [
                    "Timers"
                ],
                "summary": "Play timer",
                "description": "Play Timer",
                "operationId": "314444749e59814cc0653c71c1dc9d7a",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "Resources Has Been Saved Successfully",
                                    "data": {
                                        "id": "79447899",
                                        "status": "active",
                                        "logs": {
                                            "start_date": "1726642324",
                                            "end_date": null
                                        },
                                        "description": null,
                                        "time_type_id": null,
                                        "date_log": "2024-09-18",
                                        "object": []
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/pause/": {
            "put": {
                "tags": [
                    "Timers"
                ],
                "summary": "Pause timer",
                "description": "Pause timer",
                "operationId": "cd521844b0c141039563b0ba146c2d7d",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "Resources Has Been Saved Successfully",
                                    "data": {
                                        "id": "79447899",
                                        "status": "paused",
                                        "logs": {
                                            "start_date": "1726642324",
                                            "end_date": "1726642964"
                                        },
                                        "description": null,
                                        "time_type_id": null,
                                        "date_log": "2024-09-18",
                                        "object": []
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/resume/{id}": {
            "put": {
                "tags": [
                    "Timers"
                ],
                "summary": "Resume timer",
                "description": "Resume timer",
                "operationId": "b02ebae9e414a5814c099cf5db348d78",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Timer Id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "Resources Has Been Saved Successfully",
                                    "data": {
                                        "id": "79447899",
                                        "status": "active",
                                        "logs": {
                                            "start_date": "1726642324",
                                            "end_date": "1726642964"
                                        },
                                        "0": {
                                            "start_date": "1726643202",
                                            "end_date": null
                                        },
                                        "description": null,
                                        "time_type_id": null,
                                        "date_log": "2024-09-18",
                                        "object": []
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/get-elapsed-time/": {
            "get": {
                "tags": [
                    "Timers"
                ],
                "summary": "Get elapsed time",
                "description": "Get elapsed time for active timer",
                "operationId": "4bc392f8c0fcb94af9dbefc7c0bac2ea",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "success.",
                                    "timer": {
                                        "timer_id": "79447899",
                                        "status": "active",
                                        "date_diff": {
                                            "h": 0,
                                            "m": 10,
                                            "s": 40,
                                            "total": 640
                                        },
                                        "start_date": 1726642415
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/{id}": {
            "get": {
                "tags": [
                    "Timers"
                ],
                "summary": "Get a specific timer",
                "description": "Retrieve a single timer by its ID",
                "operationId": "46c53bea6a522dbb8a603d72188089e1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the timer to retrieve",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "success."
                                        },
                                        "timer": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1991117362
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "active"
                                                },
                                                "logs": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "start_date": {
                                                                "type": "integer",
                                                                "example": 1742294862
                                                            },
                                                            "end_date": {
                                                                "type": "integer",
                                                                "example": null,
                                                                "nullable": true
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "time_type_id": {
                                                    "type": "integer",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "date_log": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-03-18"
                                                },
                                                "object": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "break_down": {
                                                    "properties": {
                                                        "h": {
                                                            "type": "integer",
                                                            "example": 0
                                                        },
                                                        "m": {
                                                            "type": "integer",
                                                            "example": 0
                                                        },
                                                        "s": {
                                                            "type": "integer",
                                                            "example": 22
                                                        },
                                                        "total": {
                                                            "type": "integer",
                                                            "example": 22
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "more_than_one_minute_message": {
                                                    "type": "string",
                                                    "example": "The time entry will be saved as 1 minute"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Timer not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Timer not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Timers"
                ],
                "summary": "Delete timer",
                "description": "Delete timer",
                "operationId": "b136f7f0a1e03206b636dd6a20ca808a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Timer Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "timer has been deleted."
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/save/": {
            "put": {
                "tags": [
                    "Timers"
                ],
                "summary": "Save timer",
                "description": "Save timer and pause it",
                "operationId": "51b42d15b12cf70a89f0a6f9ffdfb29b",
                "requestBody": {
                    "description": "Save Timer",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "timer_id": "79447899",
                                "client_id": "2",
                                "client_name": "Vanguard",
                                "date_log": "2024-09-18",
                                "description": "Timer Description Content.",
                                "effort": null,
                                "effort_type_id": "2",
                                "entry_action": "pause_timer",
                                "entry_type": "matter",
                                "non_billable": false,
                                "related_contract": null,
                                "related_matter": 1,
                                "related_task": null,
                                "task_code_id": null
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "timer has been updated.",
                                    "timer": {
                                        "id": "79447899",
                                        "status": "paused",
                                        "logs": {
                                            "start_date": "1726642324",
                                            "end_date": "1726642964"
                                        },
                                        "0": {
                                            "start_date": "1726643202",
                                            "end_date": "1726647841"
                                        },
                                        "description": "Timer Description Content.",
                                        "time_type_id": 16,
                                        "date_log": "2024-09-18",
                                        "non_billable": false,
                                        "object_type": "matter",
                                        "matter": {
                                            "id": 1,
                                            "category": "Matter",
                                            "name": "M1: Vanguard vs ABC",
                                            "full_name": "M1: Vanguard vs ABC",
                                            "client_id": 2
                                        },
                                        "task": null,
                                        "contract": null,
                                        "task_code_id": null,
                                        "client": {
                                            "id": "2",
                                            "name": "Vanguard",
                                            "ledes": 0,
                                            "enable_cap": 0
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/timers/end/": {
            "put": {
                "tags": [
                    "Timers"
                ],
                "summary": "End timer",
                "description": "End timer and create a new time log",
                "operationId": "739d5b2841a2fea919542819d7149b27",
                "requestBody": {
                    "description": "End Timer",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "timer_id": "79447899",
                                "client_id": "2",
                                "client_name": "Vanguard",
                                "date_log": "2024-09-12",
                                "description": "Timer Description Content.",
                                "effort": null,
                                "effort_type_id": "2",
                                "entry_action": "pause_timer",
                                "entry_type": "matter",
                                "non_billable": false,
                                "related_contract": null,
                                "related_matter": 1,
                                "related_task": null,
                                "task_code_id": null
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "message": "time_logs has been created.",
                                    "time_logs": {
                                        "id": "4",
                                        "legal_case": {
                                            "id": 1,
                                            "category": "Matter",
                                            "name": "M1: Vanguard vs ABC",
                                            "full_name": "M1: Vanguard vs ABC",
                                            "client_id": 1
                                        },
                                        "task": null,
                                        "contract": null,
                                        "title": "M1",
                                        "name": "Vanguard vs ABC"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "isAuth": false,
                                    "message": "Unauthenticated"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/users/users-lookup": {
            "get": {
                "tags": [
                    "Look Ups"
                ],
                "summary": "get list option for users lookup",
                "description": "get list option for users lookup",
                "operationId": "a415370e73ddf87ff8c77f9b2402b755",
                "parameters": [
                    {
                        "name": "term",
                        "in": "query",
                        "description": "user to look for",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/vendors": {
            "get": {
                "tags": [
                    "Vendors"
                ],
                "summary": "List Vendors",
                "description": "List all vendors",
                "operationId": "1d5f456f2c5ba1b725c511a8872d1d26",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The page number to return",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page, default 50, max 200",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Create Vendor",
                "description": "Create a vendor account link",
                "operationId": "d684c676b16d9d2af41abd2e6a008fb2",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "organization_id": "1",
                                "currency_id": "234",
                                "contact_type": "company",
                                "contact_name": "Supplier 1",
                                "contact_id": "2",
                                "account_number": "126",
                                "account_description": "New Supplier"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/vendors/{id}": {
            "get": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Get Vendor",
                "description": "Get a single vendor",
                "operationId": "c9e342eef71866b260b9d5a0b764301e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Vendor not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Update Vendor",
                "description": "Update vendor company/contact link",
                "operationId": "9df050a279455c3980ea120bcd676f12",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "company_id": {
                                        "description": "Set to link the vendor to a company (contact_id will be cleared if omitted)",
                                        "type": "integer",
                                        "example": 45,
                                        "nullable": true
                                    },
                                    "contact_id": {
                                        "description": "Set to link the vendor to a contact (company_id will be cleared if omitted)",
                                        "type": "integer",
                                        "example": null,
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Vendor not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Delete Vendor",
                "description": "Delete vendor record",
                "operationId": "02c1464b46bd2b3135f3796795777e51",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Vendor not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/vendors/autocomplete": {
            "get": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Autocomplete Vendors",
                "description": "Autocomplete vendors list by name",
                "operationId": "6c5d14c3f4692ca168d011c5782fd96d",
                "parameters": [
                    {
                        "name": "name[ct]",
                        "in": "query",
                        "description": "Search vendors by name (contains).",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Supplier"
                        }
                    },
                    {
                        "name": "term",
                        "in": "query",
                        "description": "Deprecated: use name[ct] instead.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Supplier"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/vendors/form-data": {
            "get": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Get Vendor Form Data",
                "description": "Get form data needed to create a vendor",
                "operationId": "8f9ebe647c00f82fb04a84e8393eec40",
                "parameters": [
                    {
                        "name": "organization_id",
                        "in": "query",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/vendors/export_to_excel": {
            "post": {
                "tags": [
                    "Vendors"
                ],
                "summary": "Export Vendors",
                "description": "Export vendor list to Excel",
                "operationId": "46e9d2c43aeb4fcf2ea98338df8fbdb8",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "isAuth": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Internal server error."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/voucher-comments": {
            "get": {
                "tags": [
                    "Voucher Comments"
                ],
                "summary": "List Voucher Comments",
                "description": "List all Voucher Comments",
                "operationId": "9c9ed31bf7ba5874266efd5b4eb1bfca",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Voucher Comments"
                ],
                "summary": "Create Voucher Comment",
                "description": "Create Voucher Comment",
                "operationId": "28ad497987781e20b41ed9ef0f59d4ad",
                "requestBody": {
                    "description": "Create Voucher Comment",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "comment": "<p>comment</p>",
                                "voucher_header_id": 1
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/voucher-comments/{id}": {
            "get": {
                "tags": [
                    "Voucher Comments"
                ],
                "summary": "Get Voucher Comment",
                "description": "Get Voucher Comment",
                "operationId": "80631fc3a74f07c0155c703112cee245",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Voucher Comments"
                ],
                "summary": "Update Voucher Comment",
                "description": "Update Voucher Comment",
                "operationId": "6f5919a36cbc0aa3dac2d9ddd4fe5a04",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Voucher Comment Id to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Update Voucher Comment",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": {
                                "comment": "<p>comment</p>",
                                "voucher_header_id": 1
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Voucher Comments"
                ],
                "summary": "Delete Voucher Comment",
                "description": "Delete Voucher Comment",
                "operationId": "2725bf9b02720a0ccebced8b19ab1002",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Voucher Comment Id to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Text Operator": {
                "description": "Allowed operators for Text fields:</br> - ct (contains character(s))</br> - nct (does not contain characters)</br> - eq (exactly equals to)</br> - neq (not equals to)</br> - sw (starts with)</br> - ew (endswith with).",
                "type": "String",
                "example": "one of: {ct, nct, eq, neq, sw, ew}"
            },
            "Number Operator": {
                "description": "Allowed operators for Number fields:</br> - eq (exactly equals to)</br> - neq (not equals to)</br> - lt (less than)</br> - lte (less than or equals to)</br> - gt (greater than)</br> - gte (greater than or equals to)</br> - ct (contains character(s))</br> - sw (starts with)</br> - ew (endswith with).",
                "type": "Number",
                "example": "one of: {eq, neq, lt, lte, gt, gte, ct, sw, ew}"
            },
            "Date Operator": {
                "description": "Allowed operators for Date fields:</br> - eq (exactly equals to)</br> - neq (not equals to)</br> - lt (less than)</br> - lte (less than or equals to)</br> - gt (greater than)</br> - gte (greater than or equals to)</br> - between</br> - yd (yesterday)</br> - tday (today)</br> - tomorrow</br> - lw (last week)</br> - tw (this week)</br> - nw (next week)</br> - lm (last month)</br> - tm (this month)</br> - nm (next month)</br> - tq (this quarter)</br> - lq (last quarter)</br> - ty (this year)</br> - ly (last year).",
                "type": "Date",
                "example": "one of: {eq, neq, lt, lte, gt, gte, between, yd, tday, tomorrow, lw, tw, nw, lm, tm, nm, tq, lq, ty, ly }"
            },
            "Lookup Operator": {
                "description": "Allowed operators for Custom fields of type:</br> - Company (Single/Multi)</br> - Person (Single/Multi)</br> - User (Single/Multi): lookup.",
                "type": "String",
                "example": "one of: {lookup}"
            },
            "List Operator": {
                "description": "Allowed operators for List fields:</br> - eq (exactly equals to)</br> - neq (not equals to).",
                "type": "String",
                "example": "one of: {eq, neq}"
            },
            "AccountResource": {
                "description": "Detailed account resource with related fields.",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 101
                    },
                    "parent_id": {
                        "type": "integer",
                        "example": 10,
                        "nullable": true
                    },
                    "organization_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "name": {
                        "type": "string",
                        "example": "Main Account"
                    },
                    "account_label": {
                        "type": "string",
                        "example": "Main Account (USD)"
                    },
                    "account_full_name": {
                        "type": "string",
                        "example": "Main Account - USD"
                    },
                    "description": {
                        "type": "string",
                        "example": "Primary client account",
                        "nullable": true
                    },
                    "account_data": {
                        "type": "string",
                        "example": "Additional data",
                        "nullable": true
                    },
                    "system_account": {
                        "type": "boolean",
                        "example": false
                    },
                    "account_type_id": {
                        "type": "integer",
                        "example": 2
                    },
                    "account_type": {
                        "type": "string",
                        "example": "client"
                    },
                    "number": {
                        "type": "string",
                        "example": "12345",
                        "nullable": true
                    },
                    "currency_id": {
                        "type": "integer",
                        "example": 840
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "model_id": {
                        "type": "integer",
                        "example": 501,
                        "nullable": true
                    },
                    "member_id": {
                        "type": "integer",
                        "example": 6001,
                        "nullable": true
                    },
                    "model_name": {
                        "type": "string",
                        "example": "Client Model",
                        "nullable": true
                    },
                    "model_type": {
                        "type": "string",
                        "example": "client"
                    },
                    "tax_number": {
                        "type": "string",
                        "example": "123-456-789",
                        "nullable": true
                    },
                    "additional_id_type": {
                        "type": "string",
                        "example": "VAT",
                        "nullable": true
                    },
                    "additional_id_value": {
                        "type": "string",
                        "example": "VAT123456",
                        "nullable": true
                    },
                    "address": {
                        "type": "string",
                        "example": "123 Main St",
                        "nullable": true
                    },
                    "address2": {
                        "type": "string",
                        "example": "Suite 400",
                        "nullable": true
                    },
                    "zip": {
                        "type": "string",
                        "example": "10001",
                        "nullable": true
                    },
                    "city": {
                        "type": "string",
                        "example": "New York",
                        "nullable": true
                    },
                    "country_id": {
                        "type": "integer",
                        "example": 1,
                        "nullable": true
                    },
                    "state": {
                        "type": "string",
                        "example": "NY",
                        "nullable": true
                    },
                    "street_name": {
                        "type": "string",
                        "example": "Main St",
                        "nullable": true
                    },
                    "additional_street_name": {
                        "type": "string",
                        "example": "2nd Ave",
                        "nullable": true
                    },
                    "building_number": {
                        "type": "string",
                        "example": "12B",
                        "nullable": true
                    },
                    "address_additional_number": {
                        "type": "string",
                        "example": "Apt 4",
                        "nullable": true
                    },
                    "district_neighborhood": {
                        "type": "string",
                        "example": "Downtown",
                        "nullable": true
                    },
                    "rate_per_hour": {
                        "type": "number",
                        "format": "float",
                        "example": 150,
                        "nullable": true
                    },
                    "advisor_rate_per_hour": {
                        "type": "number",
                        "format": "float",
                        "example": 200,
                        "nullable": true
                    },
                    "related_to_advisor_account": {
                        "type": "boolean",
                        "example": false,
                        "nullable": true
                    },
                    "company_id": {
                        "type": "integer",
                        "example": 30,
                        "nullable": true
                    },
                    "visible_to_users": {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    "organization": {
                        "properties": {
                            "id": {
                                "type": "integer",
                                "example": 1
                            },
                            "name": {
                                "type": "string",
                                "example": "Acme Corp"
                            },
                            "country": {
                                "type": "string",
                                "example": "US"
                            },
                            "address_1": {
                                "type": "string",
                                "example": "123 Acme St"
                            },
                            "address_2": {
                                "type": "string",
                                "example": "Suite 100",
                                "nullable": true
                            },
                            "city": {
                                "type": "string",
                                "example": "San Francisco"
                            },
                            "state": {
                                "type": "string",
                                "example": "CA"
                            },
                            "zip": {
                                "type": "string",
                                "example": "94105"
                            },
                            "integration_type": {
                                "type": "string",
                                "example": "API"
                            }
                        },
                        "type": "object"
                    },
                    "client": {
                        "properties": {
                            "id": {
                                "type": "integer",
                                "example": 2001
                            },
                            "term_id": {
                                "type": "integer",
                                "example": 3
                            },
                            "discount_percentage": {
                                "type": "number",
                                "format": "float",
                                "example": 5.5
                            },
                            "phone": {
                                "type": "string",
                                "example": "123-456-7890"
                            },
                            "mobile": {
                                "type": "string",
                                "example": "987-654-3210"
                            },
                            "emails": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "example": "client@example.com"
                                }
                            },
                            "member_label": {
                                "type": "string",
                                "example": "CLI123"
                            },
                            "ledes": {
                                "type": "integer",
                                "example": 1
                            }
                        },
                        "type": "object",
                        "nullable": true
                    },
                    "foreign_amount": {
                        "type": "number",
                        "format": "float",
                        "example": 1000,
                        "nullable": true
                    },
                    "local_amount": {
                        "type": "number",
                        "format": "float",
                        "example": 900,
                        "nullable": true
                    },
                    "total_debit": {
                        "type": "number",
                        "format": "float",
                        "example": 500,
                        "nullable": true
                    },
                    "total_credit": {
                        "type": "number",
                        "format": "float",
                        "example": 200,
                        "nullable": true
                    },
                    "total_expenses_waiting_approval": {
                        "type": "number",
                        "format": "float",
                        "example": 300,
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "AddMatterConfigurationResponse": {
                "required": [
                    "message",
                    "cases"
                ],
                "properties": {
                    "message": {
                        "type": "string",
                        "example": "success"
                    },
                    "cases": {
                        "required": [
                            "pages",
                            "field_list",
                            "assignments_rules",
                            "form_data"
                        ],
                        "properties": {
                            "pages": {
                                "type": "object"
                            },
                            "field_list": {
                                "type": "object"
                            },
                            "assignments_rules": {
                                "type": "object"
                            },
                            "form_data": {
                                "properties": {
                                    "assigned_teams": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "organizations": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "matter_stages": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "litigation_stages": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "invoice_items": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "case_types_due_conditions": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "client_positions": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            },
                            "legal_case_custom_fields": {
                                "type": "array",
                                "items": {
                                    "type": "object"
                                }
                            },
                            "preferences": {
                                "type": "object"
                            },
                            "legal_case_container": {
                                "type": "object",
                                "nullable": true
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "CustomFieldCascading": {
                "required": [
                    "id",
                    "name",
                    "type",
                    "data",
                    "custom_integration_id",
                    "child"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 1586
                    },
                    "name": {
                        "type": "string",
                        "example": "Cascding 3 layers 12"
                    },
                    "type": {
                        "type": "string",
                        "example": "three_layer_cascading_list"
                    },
                    "data": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "List A",
                            "List B",
                            "List C"
                        ]
                    },
                    "custom_integration_id": {
                        "nullable": true
                    },
                    "child": {
                        "required": [
                            "id",
                            "type",
                            "name",
                            "items"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer",
                                "example": 1587
                            },
                            "type": {
                                "type": "string",
                                "example": "three_layer_cascading_list"
                            },
                            "name": {
                                "type": "string"
                            },
                            "items": {
                                "type": "array",
                                "items": {
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "parent": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "type": "object"
                    },
                    "grandchild": {
                        "required": [
                            "id",
                            "type",
                            "name",
                            "items"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer",
                                "example": 1588
                            },
                            "type": {
                                "type": "string",
                                "example": "three_layer_cascading_list"
                            },
                            "name": {
                                "type": "string"
                            },
                            "items": {
                                "type": "array",
                                "items": {
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "parent": {
                                            "nullable": true
                                        },
                                        "grandparent": {
                                            "nullable": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "CustomFieldSimple": {
                "required": [
                    "id",
                    "name",
                    "type",
                    "data",
                    "custom_integration_id"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 1589
                    },
                    "name": {
                        "type": "string",
                        "example": "Single text 51"
                    },
                    "type": {
                        "type": "string",
                        "example": "short_text"
                    },
                    "data": {
                        "nullable": true
                    },
                    "custom_integration_id": {
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "CustomFieldStoreResponse": {
                "required": [
                    "message",
                    "data"
                ],
                "properties": {
                    "message": {
                        "type": "string",
                        "example": "Resources Has Been Retrieved Successfully"
                    },
                    "data": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/CustomFieldSimple"
                            },
                            {
                                "$ref": "#/components/schemas/CustomFieldCascading"
                            }
                        ]
                    }
                },
                "type": "object"
            },
            "DraftInvoicedBillableItemResource": {
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date",
                        "example": "2025-05-24"
                    },
                    "category": {
                        "type": "string",
                        "example": "Consulting",
                        "nullable": true
                    },
                    "amount": {
                        "type": "number",
                        "format": "float",
                        "example": 500
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "related_voucher_type": {
                        "type": "string",
                        "example": "Billable"
                    },
                    "related_voucher_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2025-05-20",
                        "nullable": true
                    },
                    "related_voucher_label": {
                        "type": "string",
                        "example": "BILL20250520"
                    },
                    "related_voucher_header_id": {
                        "type": "integer",
                        "example": 45678,
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "DraftInvoicedExpenseResource": {
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date",
                        "example": "2025-05-25"
                    },
                    "category": {
                        "type": "string",
                        "example": "Travel",
                        "nullable": true
                    },
                    "amount": {
                        "type": "number",
                        "format": "float",
                        "example": 250
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "related_voucher_type": {
                        "type": "string",
                        "example": "Expense"
                    },
                    "related_voucher_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2025-05-20",
                        "nullable": true
                    },
                    "related_voucher_label": {
                        "type": "string",
                        "example": "EXP20250520"
                    },
                    "related_voucher_header_id": {
                        "type": "integer",
                        "example": 67890,
                        "nullable": true
                    },
                    "voucher_header_id": {
                        "type": "integer",
                        "example": 11223
                    }
                },
                "type": "object"
            },
            "DraftInvoicedTimeLogResource": {
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date",
                        "example": "2025-05-26"
                    },
                    "effort": {
                        "description": "Effort in hours",
                        "type": "number",
                        "format": "float",
                        "example": 3.5
                    },
                    "rate": {
                        "description": "Hourly rate",
                        "type": "number",
                        "format": "float",
                        "example": 150
                    },
                    "related_voucher_type": {
                        "type": "string",
                        "example": "Invoice"
                    },
                    "related_voucher_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2025-05-20",
                        "nullable": true
                    },
                    "related_voucher_label": {
                        "type": "string",
                        "example": "INV20250520"
                    },
                    "related_voucher_header_id": {
                        "type": "integer",
                        "example": 12345,
                        "nullable": true
                    },
                    "organization_name": {
                        "type": "string",
                        "example": "Acme Corporation",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "InvoiceRelatedBillableItemResource": {
                "properties": {
                    "bill_item_id": {
                        "type": "string",
                        "example": "B456"
                    },
                    "bill_item_id_numeric": {
                        "type": "integer",
                        "example": 456
                    },
                    "billable_bill_item_id": {
                        "type": "string",
                        "example": "BBI789"
                    },
                    "supplier_account_id": {
                        "type": "integer",
                        "example": 20
                    },
                    "supplier_currency_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "supplier_currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "client_account_id": {
                        "type": "integer",
                        "example": 30
                    },
                    "client_currency_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "client_currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "quantity": {
                        "type": "number",
                        "format": "float",
                        "example": 5
                    },
                    "amount": {
                        "type": "number",
                        "format": "float",
                        "example": 500
                    },
                    "unit_price": {
                        "type": "number",
                        "format": "float",
                        "example": 100
                    },
                    "matter_id": {
                        "type": "integer",
                        "example": 303,
                        "nullable": true
                    },
                    "matter_code": {
                        "type": "string",
                        "example": "MC5678",
                        "nullable": true
                    },
                    "matter": {
                        "type": "string",
                        "example": "Case ABC",
                        "nullable": true
                    },
                    "description": {
                        "type": "string",
                        "example": "Translation service"
                    },
                    "account_id": {
                        "type": "integer",
                        "example": 40
                    },
                    "account_name": {
                        "type": "string",
                        "example": "Legal Office"
                    },
                    "fl1_account_name": {
                        "type": "string",
                        "example": "Main Account"
                    },
                    "fl2_account_name": {
                        "type": "string",
                        "example": "Sub Account"
                    },
                    "currency_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "billing_status": {
                        "type": "string",
                        "example": "Invoiced"
                    },
                    "markup_percentage": {
                        "type": "number",
                        "format": "float",
                        "example": 10
                    },
                    "tax_percentage": {
                        "type": "number",
                        "format": "float",
                        "example": 5
                    },
                    "date": {
                        "type": "string",
                        "format": "date",
                        "example": "2024-05-26"
                    },
                    "utbms_expense_code_id": {
                        "type": "integer",
                        "example": 9
                    }
                },
                "type": "object"
            },
            "InvoiceRelatedExpenseResource": {
                "properties": {
                    "expense_id": {
                        "type": "string",
                        "example": "E123"
                    },
                    "expense_id_numeric": {
                        "type": "integer",
                        "example": 123
                    },
                    "paid_on": {
                        "type": "string",
                        "format": "date",
                        "example": "2024-05-26"
                    },
                    "case_category": {
                        "type": "string",
                        "example": "Consultation"
                    },
                    "tax_id": {
                        "type": "integer",
                        "example": 1,
                        "nullable": true
                    },
                    "tax_percentage": {
                        "type": "number",
                        "format": "float",
                        "example": 15,
                        "nullable": true
                    },
                    "amount_including_tax": {
                        "type": "number",
                        "format": "float",
                        "example": 1200.5
                    },
                    "amount_excluding_tax": {
                        "type": "number",
                        "format": "float",
                        "example": 1043.91
                    },
                    "paid_through": {
                        "type": "string",
                        "example": "Bank ABC"
                    },
                    "fl1_paid_through": {
                        "type": "string",
                        "example": "Main Account"
                    },
                    "fl2_paid_through": {
                        "type": "string",
                        "example": "Sub Account"
                    },
                    "billing_status": {
                        "type": "string",
                        "example": "Pending"
                    },
                    "account_id": {
                        "type": "integer",
                        "example": 10
                    },
                    "matter_id": {
                        "type": "integer",
                        "example": 202,
                        "nullable": true
                    },
                    "matter_code": {
                        "type": "string",
                        "example": "MC1234",
                        "nullable": true
                    },
                    "matter": {
                        "type": "string",
                        "example": "Case XYZ",
                        "nullable": true
                    },
                    "comments": {
                        "type": "string",
                        "example": "Legal consultation"
                    },
                    "category": {
                        "type": "string",
                        "example": "Travel"
                    },
                    "fl1_category": {
                        "type": "string",
                        "example": "Domestic"
                    },
                    "fl2_category": {
                        "type": "string",
                        "example": "Airfare"
                    },
                    "currency_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "task_code_id": {
                        "type": "integer",
                        "example": 12
                    },
                    "expense_category_id": {
                        "type": "integer",
                        "example": 5
                    }
                },
                "type": "object"
            },
            "InvoiceRelatedFixedRateResource": {
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "FR789"
                    },
                    "matter_id": {
                        "type": "integer",
                        "example": 404
                    },
                    "price": {
                        "type": "number",
                        "format": "float",
                        "example": 750
                    },
                    "account_id": {
                        "type": "integer",
                        "example": 50
                    },
                    "tax_id": {
                        "type": "integer",
                        "example": 3,
                        "nullable": true
                    },
                    "name": {
                        "type": "string",
                        "example": "Hourly Rate"
                    },
                    "fl1_name": {
                        "type": "string",
                        "example": "Rate Level 1"
                    },
                    "fl2_name": {
                        "type": "string",
                        "example": "Rate Level 2"
                    },
                    "currency_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "exchange_rate": {
                        "type": "number",
                        "format": "float",
                        "example": 1
                    },
                    "description": {
                        "type": "string",
                        "example": "Fixed rate for legal consultation"
                    },
                    "label": {
                        "type": "string",
                        "example": "Hourly"
                    }
                },
                "type": "object"
            },
            "InvoiceRelatedMatterResource": {
                "title": "Invoice Related Matter Resource",
                "description": "Details of a legal matter related to invoicing",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 123
                    },
                    "matter_id": {
                        "type": "integer",
                        "example": 123
                    },
                    "numeric_id": {
                        "type": "integer",
                        "example": 123
                    },
                    "client_id": {
                        "type": "integer",
                        "example": 456
                    },
                    "subject": {
                        "type": "string",
                        "example": "Case Subject"
                    },
                    "matter_code": {
                        "type": "string",
                        "example": "CASE-2023-001"
                    },
                    "description": {
                        "type": "string",
                        "example": "Description of the case"
                    },
                    "case_category": {
                        "type": "string",
                        "example": "Litigation"
                    },
                    "case_type": {
                        "type": "string",
                        "example": "Civil"
                    },
                    "case_type_id": {
                        "type": "integer",
                        "example": 3
                    },
                    "assigned_user": {
                        "type": "string",
                        "example": "John Doe"
                    },
                    "related_expenses_count": {
                        "type": "integer",
                        "example": 5
                    },
                    "related_time_logs_count": {
                        "type": "integer",
                        "example": 8
                    },
                    "related_bill_items_count": {
                        "type": "integer",
                        "example": 4
                    },
                    "partner_shares": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LegalCasePartnerShareResource"
                        }
                    },
                    "container_id": {
                        "type": "integer",
                        "example": 10,
                        "nullable": true
                    },
                    "container_subject": {
                        "type": "string",
                        "example": "Container A",
                        "nullable": true
                    },
                    "case_status_id": {
                        "type": "integer",
                        "example": 2
                    },
                    "billing_method": {
                        "type": "string",
                        "example": "hourly"
                    },
                    "fixed_rate_amount": {
                        "type": "number",
                        "format": "float",
                        "example": 1500.5
                    },
                    "is_fixed_rate_invoiced": {
                        "type": "boolean",
                        "example": false
                    },
                    "fixed_rate_same_entity": {
                        "type": "boolean",
                        "example": true
                    },
                    "billing_status": {
                        "type": "string",
                        "example": "to-invoice"
                    }
                },
                "type": "object"
            },
            "LegalCasePartnerShareResource": {
                "description": "Partner Share Details",
                "properties": {
                    "partner_account_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "partner_name": {
                        "type": "string",
                        "example": "Partner Account Name"
                    },
                    "partner_commission": {
                        "type": "number",
                        "format": "float",
                        "example": 10
                    },
                    "partner_account_currency": {
                        "type": "string",
                        "example": "USD"
                    }
                },
                "type": "object"
            }
        },
        "requestBodies": {
            "CreateAnalyticAccountsRequestBody": {
                "description": "Create new analytic accounts",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "name": "department",
                            "items": [
                                {
                                    "name": "Accounting"
                                },
                                {
                                    "name": "Sales"
                                },
                                {
                                    "name": "Marketing"
                                }
                            ]
                        }
                    }
                }
            },
            "UpdateAnalyticAccountsRequestBody": {
                "description": "Update exist analytic accounts",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "name": "Region",
                            "items": [
                                {
                                    "id": 5,
                                    "name": "Middle East"
                                },
                                {
                                    "id": 6,
                                    "name": "America"
                                },
                                {
                                    "id": null,
                                    "name": "Africa"
                                }
                            ]
                        }
                    }
                }
            },
            "CreateAnalyticAccountTemplateRequestBody": {
                "description": "Create new analytic accounts template",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "template_name": "exp. template",
                            "module_type": "EXP",
                            "organization_ids": [
                                "10001",
                                "0002"
                            ],
                            "is_default": 1,
                            "details": [
                                {
                                    "analytic_id": 8,
                                    "percentage": 40
                                },
                                {
                                    "analytic_id": 3,
                                    "percentage": 60
                                }
                            ]
                        }
                    }
                }
            },
            "UpdateAnalyticAccountTemplateRequestBody": {
                "description": "Update exist analytic accounts template",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "template_name": "exp. template",
                            "module_type": "EXP",
                            "organization_ids": [],
                            "is_default": 1,
                            "details": [
                                {
                                    "id": 3,
                                    "analytic_id": 8,
                                    "percentage": 40
                                },
                                {
                                    "id": null,
                                    "analytic_id": 3,
                                    "percentage": 60
                                }
                            ]
                        }
                    }
                }
            },
            "CreateBankReconciliationRequestBody": {
                "description": "Create bank reconciliation",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "account_id": "1",
                            "to_date": "2022-09-09",
                            "balance": 2200,
                            "status": "in_progress",
                            "description": "",
                            "voucher_detail_ids": [
                                128,
                                951,
                                125,
                                672
                            ],
                            "uploaded_file": "...attached file..."
                        }
                    }
                }
            },
            "UpdateBankReconciliationRequestBody": {
                "description": "Update bank reconciliation",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "account_id": "1",
                            "to_date": "2022-09-09",
                            "balance": 2200,
                            "status": "completed",
                            "description": "any text",
                            "voucher_detail_ids": [
                                128,
                                951,
                                125,
                                672
                            ]
                        }
                    }
                }
            },
            "CreateBillCustomFieldRequestBody": {
                "description": "Create bill custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "type": "short_text",
                            "organization_ids": [
                                1,
                                2
                            ],
                            "list_options": [],
                            "languages": {
                                "1": "Custom Bill Field 1",
                                "2": "حقل الفاتورة للدفع المخصصة 1",
                                "3": "Champ de facture fournisseur personnalisé 1"
                            }
                        }
                    }
                }
            },
            "UpdateBillCustomFieldRequestBody": {
                "description": "Update bill custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "type": "list",
                            "organization_ids": [],
                            "list_options": [
                                "test first option",
                                "test second option"
                            ],
                            "languages": {
                                "1": "Custom Bill Field 1",
                                "2": "حقل الفاتورة للدفع المخصصة 1",
                                "3": "Champ de facture fournisseur personnalisé 1"
                            }
                        }
                    }
                }
            },
            "ReorderBillCustomFieldRequestBody": {
                "description": "reorder bill custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "orderIds": [
                                4,
                                1,
                                5,
                                3,
                                2
                            ]
                        }
                    }
                }
            },
            "CreateExpenseCustomFieldRequestBody": {
                "description": "Create expense custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "type": "short_text",
                            "organization_ids": [
                                1,
                                2
                            ],
                            "list_options": [],
                            "languages": {
                                "1": "Custom Expense Field 1",
                                "2": "حقل الفاتورة المخصصة 1",
                                "3": "Champ de facture personnalisé 1"
                            }
                        }
                    }
                }
            },
            "UpdateExpenseCustomFieldRequestBody": {
                "description": "Update expense custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "type": "list",
                            "organization_ids": [],
                            "list_options": [
                                "test first option",
                                "test second option"
                            ],
                            "languages": {
                                "1": "Custom Expense Field 1",
                                "2": "حقل الفاتورة المخصصة 1",
                                "3": "Champ de facture personnalisé 1"
                            }
                        }
                    }
                }
            },
            "ReorderExpenseCustomFieldRequestBody": {
                "description": "reorder expense custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "orderIds": [
                                4,
                                1,
                                5,
                                3,
                                2
                            ]
                        }
                    }
                }
            },
            "CreateInvoiceCustomFieldRequestBody": {
                "description": "Create invoice custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "type": "short_text",
                            "organization_ids": [
                                1,
                                2
                            ],
                            "list_options": [],
                            "languages": {
                                "1": "Custom Invoice Field 1",
                                "2": "حقل الفاتورة المخصصة 1",
                                "3": "Champ de facture personnalisé 1"
                            }
                        }
                    }
                }
            },
            "UpdateInvoiceCustomFieldRequestBody": {
                "description": "Update invoice custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "type": "list",
                            "organization_ids": [],
                            "list_options": [
                                "test first option",
                                "test second option"
                            ],
                            "languages": {
                                "1": "Custom Invoice Field 1",
                                "2": "حقل الفاتورة المخصصة 1",
                                "3": "Champ de facture personnalisé 1"
                            }
                        }
                    }
                }
            },
            "ReorderInvoiceCustomFieldRequestBody": {
                "description": "reorder invoice custom field",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {},
                        "example": {
                            "orderIds": [
                                4,
                                1,
                                5,
                                3,
                                2
                            ]
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "passport": {
                "type": "oauth2",
                "description": "Laravel passport oauth2 security.",
                "in": "header",
                "scheme": "https",
                "flows": {
                    "password": {
                        "authorizationUrl": "http://localhost/app4legal/api/oauth/authorize",
                        "tokenUrl": "http://localhost/app4legal/api/v2/core/login",
                        "refreshUrl": "http://localhost/app4legal/api/token/refresh",
                        "scopes": []
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "Accounts",
            "description": "Accounts"
        },
        {
            "name": "accounts",
            "description": "accounts"
        },
        {
            "name": "AnalyticAccounts",
            "description": "AnalyticAccounts"
        },
        {
            "name": "AnalyticAccountTemplates",
            "description": "AnalyticAccountTemplates"
        },
        {
            "name": "BankReconciliations",
            "description": "BankReconciliations"
        },
        {
            "name": "AdvisorAudits",
            "description": "AdvisorAudits"
        },
        {
            "name": "Approval Center",
            "description": "Approval Center"
        },
        {
            "name": "Bill",
            "description": "Bill"
        },
        {
            "name": "BillCustomFields",
            "description": "BillCustomFields"
        },
        {
            "name": "Bill Payments",
            "description": "Bill Payments"
        },
        {
            "name": "clients",
            "description": "clients"
        },
        {
            "name": "CreditNotes",
            "description": "CreditNotes"
        },
        {
            "name": "Credit Notes",
            "description": "Credit Notes"
        },
        {
            "name": "CreditNoteRefunds",
            "description": "CreditNoteRefunds"
        },
        {
            "name": "Deposits",
            "description": "Deposits"
        },
        {
            "name": "Trust Fund",
            "description": "Trust Fund"
        },
        {
            "name": "Discounts",
            "description": "Discounts"
        },
        {
            "name": "Exchange Rates",
            "description": "Exchange Rates"
        },
        {
            "name": "Expense Categories",
            "description": "Expense Categories"
        },
        {
            "name": "Expenses",
            "description": "Expenses"
        },
        {
            "name": "Expenses Analytic Account",
            "description": "Expenses Analytic Account"
        },
        {
            "name": "expenses",
            "description": "expenses"
        },
        {
            "name": "ExpenseCustomFields",
            "description": "ExpenseCustomFields"
        },
        {
            "name": "Expense Notes",
            "description": "Expense Notes"
        },
        {
            "name": "InvoiceCustomFields",
            "description": "InvoiceCustomFields"
        },
        {
            "name": "Invoices",
            "description": "Invoices"
        },
        {
            "name": "Invoice Notes",
            "description": "Invoice Notes"
        },
        {
            "name": "Invoice Payments",
            "description": "Invoice Payments"
        },
        {
            "name": "Invoicing",
            "description": "Invoicing"
        },
        {
            "name": "Items",
            "description": "Items"
        },
        {
            "name": "Journals",
            "description": "Journals"
        },
        {
            "name": "Organizations",
            "description": "Organizations"
        },
        {
            "name": "Partners",
            "description": "Partners"
        },
        {
            "name": "Invoice Number Prefix",
            "description": "Invoice Number Prefix"
        },
        {
            "name": "Credit Note Number Prefix",
            "description": "Credit Note Number Prefix"
        },
        {
            "name": "Debit Note Number Prefix",
            "description": "Debit Note Number Prefix"
        },
        {
            "name": "Quotes",
            "description": "Quotes"
        },
        {
            "name": "AnalyticAccountsReport",
            "description": "AnalyticAccountsReport"
        },
        {
            "name": "Reports",
            "description": "Reports"
        },
        {
            "name": "Taxes",
            "description": "Taxes"
        },
        {
            "name": "Terms",
            "description": "Terms"
        },
        {
            "name": "Timers",
            "description": "Timers"
        },
        {
            "name": "Look Ups",
            "description": "Look Ups"
        },
        {
            "name": "Vendors",
            "description": "Vendors"
        },
        {
            "name": "Voucher Comments",
            "description": "Voucher Comments"
        }
    ]
}