{
    "openapi": "3.1.0",
    "info": {
        "title": "Central Ledger API Documentation",
        "version": "1.0"
    },
    "tags": [],
    "paths": {
        "/enums": {
            "get": {
                "operationId": "getEnums",
                "tags": [
                    "enums"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/health": {
            "get": {
                "operationId": "getHealth",
                "tags": [
                    "health"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/metrics": {
            "get": {
                "summary": "Prometheus metrics endpoint",
                "operationId": "getMetrics",
                "tags": [
                    "metrics"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants": {
            "get": {
                "operationId": "getParticipants",
                "tags": [
                    "participants"
                ],
                "parameters": [
                    {
                        "description": "Filter by if participant is a proxy",
                        "name": "isProxy",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "enum": [
                                false,
                                "0",
                                "false",
                                "",
                                true,
                                "1",
                                "true",
                                null
                            ]
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "postParticipants",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostParticipantsRequest"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/limits": {
            "get": {
                "summary": "View limits for all participants",
                "operationId": "getParticipantsLimits",
                "parameters": [
                    {
                        "description": "Currency code",
                        "name": "currency",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "AED",
                                "AFA",
                                "AFN",
                                "ALL",
                                "AMD",
                                "ANG",
                                "AOA",
                                "AOR",
                                "ARS",
                                "AUD",
                                "AWG",
                                "AZN",
                                "BAM",
                                "BBD",
                                "BDT",
                                "BGN",
                                "BHD",
                                "BIF",
                                "BMD",
                                "BND",
                                "BOB",
                                "BRL",
                                "BSD",
                                "BTN",
                                "BWP",
                                "BYN",
                                "BZD",
                                "CAD",
                                "CDF",
                                "CHF",
                                "CLP",
                                "CNY",
                                "COP",
                                "CRC",
                                "CUC",
                                "CUP",
                                "CVE",
                                "CZK",
                                "DJF",
                                "DKK",
                                "DOP",
                                "DZD",
                                "EEK",
                                "EGP",
                                "ERN",
                                "ETB",
                                "EUR",
                                "FJD",
                                "FKP",
                                "GBP",
                                "GEL",
                                "GGP",
                                "GHS",
                                "GIP",
                                "GMD",
                                "GNF",
                                "GTQ",
                                "GYD",
                                "HKD",
                                "HNL",
                                "HRK",
                                "HTG",
                                "HUF",
                                "IDR",
                                "ILS",
                                "IMP",
                                "INR",
                                "IQD",
                                "IRR",
                                "ISK",
                                "JEP",
                                "JMD",
                                "JOD",
                                "JPY",
                                "KES",
                                "KGS",
                                "KHR",
                                "KMF",
                                "KPW",
                                "KRW",
                                "KWD",
                                "KYD",
                                "KZT",
                                "LAK",
                                "LBP",
                                "LKR",
                                "LRD",
                                "LSL",
                                "LTL",
                                "LVL",
                                "LYD",
                                "MAD",
                                "MDL",
                                "MGA",
                                "MKD",
                                "MMK",
                                "MNT",
                                "MOP",
                                "MRO",
                                "MUR",
                                "MVR",
                                "MWK",
                                "MXN",
                                "MYR",
                                "MZN",
                                "NAD",
                                "NGN",
                                "NIO",
                                "NOK",
                                "NPR",
                                "NZD",
                                "OMR",
                                "PAB",
                                "PEN",
                                "PGK",
                                "PHP",
                                "PKR",
                                "PLN",
                                "PYG",
                                "QAR",
                                "RON",
                                "RSD",
                                "RUB",
                                "RWF",
                                "SAR",
                                "SBD",
                                "SCR",
                                "SDG",
                                "SEK",
                                "SGD",
                                "SHP",
                                "SLL",
                                "SOS",
                                "SPL",
                                "SRD",
                                "STD",
                                "SVC",
                                "SYP",
                                "SZL",
                                "THB",
                                "TJS",
                                "TMT",
                                "TND",
                                "TOP",
                                "TRY",
                                "TTD",
                                "TVD",
                                "TWD",
                                "TZS",
                                "UAH",
                                "UGX",
                                "USD",
                                "UYU",
                                "UZS",
                                "VEF",
                                "VND",
                                "VUV",
                                "WST",
                                "XAF",
                                "XAG",
                                "XAU",
                                "XCD",
                                "XDR",
                                "XFO",
                                "XFU",
                                "XOF",
                                "XPD",
                                "XPF",
                                "XPT",
                                "YER",
                                "ZAR",
                                "ZMK",
                                "ZMW",
                                "ZWD",
                                "ZWL",
                                "ZWN",
                                "ZWR"
                            ]
                        }
                    },
                    {
                        "description": "Limit Type",
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}": {
            "get": {
                "operationId": "getParticipantsName",
                "parameters": [
                    {
                        "description": "Participant name",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "putParticipantsName",
                "parameters": [
                    {
                        "description": "Participant name",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ParticipantIsActive"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/endpoints": {
            "get": {
                "summary": "View participant endpoints",
                "operationId": "getParticipantsNameEndpoints",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    }
                ],
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Add/Update participant endpoints",
                "operationId": "postParticipantsNameEndpoints",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostParticipantsNameEndpointsRequest"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/limits": {
            "get": {
                "summary": "View participant limits",
                "operationId": "getParticipantsNameLimits",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    },
                    {
                        "description": "Currency code",
                        "name": "currency",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "AED",
                                "AFA",
                                "AFN",
                                "ALL",
                                "AMD",
                                "ANG",
                                "AOA",
                                "AOR",
                                "ARS",
                                "AUD",
                                "AWG",
                                "AZN",
                                "BAM",
                                "BBD",
                                "BDT",
                                "BGN",
                                "BHD",
                                "BIF",
                                "BMD",
                                "BND",
                                "BOB",
                                "BRL",
                                "BSD",
                                "BTN",
                                "BWP",
                                "BYN",
                                "BZD",
                                "CAD",
                                "CDF",
                                "CHF",
                                "CLP",
                                "CNY",
                                "COP",
                                "CRC",
                                "CUC",
                                "CUP",
                                "CVE",
                                "CZK",
                                "DJF",
                                "DKK",
                                "DOP",
                                "DZD",
                                "EEK",
                                "EGP",
                                "ERN",
                                "ETB",
                                "EUR",
                                "FJD",
                                "FKP",
                                "GBP",
                                "GEL",
                                "GGP",
                                "GHS",
                                "GIP",
                                "GMD",
                                "GNF",
                                "GTQ",
                                "GYD",
                                "HKD",
                                "HNL",
                                "HRK",
                                "HTG",
                                "HUF",
                                "IDR",
                                "ILS",
                                "IMP",
                                "INR",
                                "IQD",
                                "IRR",
                                "ISK",
                                "JEP",
                                "JMD",
                                "JOD",
                                "JPY",
                                "KES",
                                "KGS",
                                "KHR",
                                "KMF",
                                "KPW",
                                "KRW",
                                "KWD",
                                "KYD",
                                "KZT",
                                "LAK",
                                "LBP",
                                "LKR",
                                "LRD",
                                "LSL",
                                "LTL",
                                "LVL",
                                "LYD",
                                "MAD",
                                "MDL",
                                "MGA",
                                "MKD",
                                "MMK",
                                "MNT",
                                "MOP",
                                "MRO",
                                "MUR",
                                "MVR",
                                "MWK",
                                "MXN",
                                "MYR",
                                "MZN",
                                "NAD",
                                "NGN",
                                "NIO",
                                "NOK",
                                "NPR",
                                "NZD",
                                "OMR",
                                "PAB",
                                "PEN",
                                "PGK",
                                "PHP",
                                "PKR",
                                "PLN",
                                "PYG",
                                "QAR",
                                "RON",
                                "RSD",
                                "RUB",
                                "RWF",
                                "SAR",
                                "SBD",
                                "SCR",
                                "SDG",
                                "SEK",
                                "SGD",
                                "SHP",
                                "SLL",
                                "SOS",
                                "SPL",
                                "SRD",
                                "STD",
                                "SVC",
                                "SYP",
                                "SZL",
                                "THB",
                                "TJS",
                                "TMT",
                                "TND",
                                "TOP",
                                "TRY",
                                "TTD",
                                "TVD",
                                "TWD",
                                "TZS",
                                "UAH",
                                "UGX",
                                "USD",
                                "UYU",
                                "UZS",
                                "VEF",
                                "VND",
                                "VUV",
                                "WST",
                                "XAF",
                                "XAG",
                                "XAU",
                                "XCD",
                                "XDR",
                                "XFO",
                                "XFU",
                                "XOF",
                                "XPD",
                                "XPF",
                                "XPT",
                                "YER",
                                "ZAR",
                                "ZMK",
                                "ZMW",
                                "ZWD",
                                "ZWL",
                                "ZWN",
                                "ZWR"
                            ]
                        }
                    },
                    {
                        "description": "Limit Type",
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "summary": "Adjust participant limits",
                "operationId": "putParticipantsNameLimits",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PutParticipantsNameLimitsRequest"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/positions": {
            "get": {
                "summary": "View participant positions",
                "operationId": "getParticipantsNamePositions",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    },
                    {
                        "description": "Currency code",
                        "name": "currency",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "AED",
                                "AFA",
                                "AFN",
                                "ALL",
                                "AMD",
                                "ANG",
                                "AOA",
                                "AOR",
                                "ARS",
                                "AUD",
                                "AWG",
                                "AZN",
                                "BAM",
                                "BBD",
                                "BDT",
                                "BGN",
                                "BHD",
                                "BIF",
                                "BMD",
                                "BND",
                                "BOB",
                                "BRL",
                                "BSD",
                                "BTN",
                                "BWP",
                                "BYN",
                                "BZD",
                                "CAD",
                                "CDF",
                                "CHF",
                                "CLP",
                                "CNY",
                                "COP",
                                "CRC",
                                "CUC",
                                "CUP",
                                "CVE",
                                "CZK",
                                "DJF",
                                "DKK",
                                "DOP",
                                "DZD",
                                "EEK",
                                "EGP",
                                "ERN",
                                "ETB",
                                "EUR",
                                "FJD",
                                "FKP",
                                "GBP",
                                "GEL",
                                "GGP",
                                "GHS",
                                "GIP",
                                "GMD",
                                "GNF",
                                "GTQ",
                                "GYD",
                                "HKD",
                                "HNL",
                                "HRK",
                                "HTG",
                                "HUF",
                                "IDR",
                                "ILS",
                                "IMP",
                                "INR",
                                "IQD",
                                "IRR",
                                "ISK",
                                "JEP",
                                "JMD",
                                "JOD",
                                "JPY",
                                "KES",
                                "KGS",
                                "KHR",
                                "KMF",
                                "KPW",
                                "KRW",
                                "KWD",
                                "KYD",
                                "KZT",
                                "LAK",
                                "LBP",
                                "LKR",
                                "LRD",
                                "LSL",
                                "LTL",
                                "LVL",
                                "LYD",
                                "MAD",
                                "MDL",
                                "MGA",
                                "MKD",
                                "MMK",
                                "MNT",
                                "MOP",
                                "MRO",
                                "MUR",
                                "MVR",
                                "MWK",
                                "MXN",
                                "MYR",
                                "MZN",
                                "NAD",
                                "NGN",
                                "NIO",
                                "NOK",
                                "NPR",
                                "NZD",
                                "OMR",
                                "PAB",
                                "PEN",
                                "PGK",
                                "PHP",
                                "PKR",
                                "PLN",
                                "PYG",
                                "QAR",
                                "RON",
                                "RSD",
                                "RUB",
                                "RWF",
                                "SAR",
                                "SBD",
                                "SCR",
                                "SDG",
                                "SEK",
                                "SGD",
                                "SHP",
                                "SLL",
                                "SOS",
                                "SPL",
                                "SRD",
                                "STD",
                                "SVC",
                                "SYP",
                                "SZL",
                                "THB",
                                "TJS",
                                "TMT",
                                "TND",
                                "TOP",
                                "TRY",
                                "TTD",
                                "TVD",
                                "TWD",
                                "TZS",
                                "UAH",
                                "UGX",
                                "USD",
                                "UYU",
                                "UZS",
                                "VEF",
                                "VND",
                                "VUV",
                                "WST",
                                "XAF",
                                "XAG",
                                "XAU",
                                "XCD",
                                "XDR",
                                "XFO",
                                "XFU",
                                "XOF",
                                "XPD",
                                "XPF",
                                "XPT",
                                "YER",
                                "ZAR",
                                "ZMK",
                                "ZMW",
                                "ZWD",
                                "ZWL",
                                "ZWN",
                                "ZWR"
                            ]
                        }
                    }
                ],
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/accounts": {
            "get": {
                "summary": "View participant accounts and balances",
                "operationId": "getParticipantsNameAccounts",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    }
                ],
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create hub accounts",
                "operationId": "postParticipantsNameAccounts",
                "parameters": [
                    {
                        "description": "Participant name",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostParticipantsNameAccountsRequest"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/initialPositionAndLimits": {
            "post": {
                "summary": "Add initial participant limits and position",
                "operationId": "postParticipantsNameInitialpositionandlimits",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostInitialPositionAndLimitsRequest"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/accounts/{id}": {
            "post": {
                "summary": "Record Funds In or Out of participant account",
                "operationId": "postParticipantsNameAccountsId",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    },
                    {
                        "x-constraint": {
                            "positive": true
                        },
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Participants"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "summary": "Update participant accounts",
                "operationId": "putParticipantsNameAccountsId",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    },
                    {
                        "x-constraint": {
                            "positive": true
                        },
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CurrencyIsActive"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/participants/{name}/accounts/{id}/transfers/{transferId}": {
            "put": {
                "summary": "Record Funds In or Out of participant account",
                "operationId": "putParticipantsNameAccountsIdTransfersTransferid",
                "parameters": [
                    {
                        "description": "Name of the participant",
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 30
                        }
                    },
                    {
                        "x-constraint": {
                            "positive": true
                        },
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "x-format": {
                            "guid": true
                        },
                        "name": "transferId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RecordFundsOut"
                            }
                        }
                    }
                },
                "tags": [
                    "participants"
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/ledgerAccountTypes": {
            "get": {
                "summary": "View all ledger account types",
                "tags": [
                    "ledgerAccountTypes"
                ],
                "operationId": "getLedgerAccountTypes",
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/LedgerAccountType"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create a ledgerAccount type",
                "tags": [
                    "ledgerAccountType"
                ],
                "operationId": "postLedgerAccountType",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LedgerAccountType"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/settlementModels": {
            "get": {
                "summary": "View all settlement models",
                "tags": [
                    "settlementModels"
                ],
                "operationId": "getSettlementmodels",
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create a settlement model. This will create  any associated ledgerAccountTypes for every participant that matches the settlementModel's currency",
                "tags": [
                    "settlementModels"
                ],
                "operationId": "postSettlementmodels",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SettlementModel"
                            }
                        }
                    }
                },
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/settlementModels/{name}": {
            "get": {
                "summary": "View settlement model by name",
                "tags": [
                    "settlementModels"
                ],
                "operationId": "getSettlementmodelsName",
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "description": "SettlementModel name",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "summary": "Update a settlement model",
                "tags": [
                    "settlementModels"
                ],
                "operationId": "putSettlementmodelsName",
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "description": "settlementModel name",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SettlementModelIsActive"
                            }
                        }
                    }
                },
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/transactions/{id}": {
            "get": {
                "summary": "Retrieve transaction details by a transferId",
                "tags": [
                    "transaction"
                ],
                "operationId": "getTransfer",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Transfer Id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Successful",
                        "content": {
                            "*/*": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTransactionResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "servers": [
        {
            "url": "http://127.0.0.1:3001"
        }
    ],
    "components": {
        "schemas": {
            "PostParticipantsRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Name of the participant",
                        "minLength": 2,
                        "maxLength": 30,
                        "x-format": {
                            "alphanum": true
                        }
                    },
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    },
                    "isProxy": {
                        "type": "boolean",
                        "description": "Is the participant a proxy"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "PostParticipantsNameEndpointsRequest": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Endpoint Type"
                    },
                    "value": {
                        "type": "string",
                        "description": "Endpoint Value"
                    }
                },
                "required": [
                    "type",
                    "value"
                ]
            },
            "Limit": {
                "type": "object",
                "description": "Participant Limit",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Limit Type"
                    },
                    "value": {
                        "type": "number",
                        "description": "Limit Value",
                        "enum": [
                            0
                        ],
                        "x-constraint": {
                            "positive": true
                        }
                    }
                },
                "required": [
                    "type",
                    "value"
                ]
            },
            "PostInitialPositionAndLimitsRequest": {
                "type": "object",
                "properties": {
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    },
                    "limit": {
                        "$ref": "#/components/schemas/Limit"
                    },
                    "initialPosition": {
                        "type": "number",
                        "description": "Initial Position Value"
                    }
                },
                "required": [
                    "limit"
                ]
            },
            "PostParticipantsNameAccountsRequest": {
                "type": "object",
                "properties": {
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    },
                    "type": {
                        "type": "string",
                        "description": "Account type"
                    }
                },
                "required": [
                    "type"
                ]
            },
            "NoAmountProvided": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number",
                        "x-constraint": {
                            "precision": 4,
                            "positive": true
                        }
                    },
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    }
                },
                "required": [
                    "amount"
                ]
            },
            "Participants": {
                "type": "object",
                "properties": {
                    "transferId": {
                        "type": "string",
                        "x-format": {
                            "guid": true
                        }
                    },
                    "externalReference": {
                        "type": "string"
                    },
                    "action": {
                        "type": "string",
                        "enum": [
                            "recordFundsIn",
                            "recordFundsOutPrepareReserve"
                        ]
                    },
                    "reason": {
                        "type": "string"
                    },
                    "amount": {
                        "$ref": "#/components/schemas/NoAmountProvided"
                    },
                    "extensionList": {
                        "$ref": "#/components/schemas/ExtensionList"
                    }
                },
                "required": [
                    "transferId",
                    "externalReference",
                    "action",
                    "reason",
                    "amount"
                ]
            },
            "ParticipantIsActive": {
                "type": "object",
                "properties": {
                    "isActive": {
                        "type": "boolean",
                        "description": "Participant isActive boolean"
                    }
                },
                "required": [
                    "isActive"
                ]
            },
            "ParticipantLimit": {
                "type": "object",
                "description": "Participant Limit",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Limit Type"
                    },
                    "value": {
                        "type": "number",
                        "description": "Limit Value"
                    },
                    "alarmPercentage": {
                        "type": "number",
                        "description": "limit threshold alarm percentage value"
                    }
                },
                "required": [
                    "type",
                    "value",
                    "alarmPercentage"
                ]
            },
            "PutParticipantsNameLimitsRequest": {
                "type": "object",
                "properties": {
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    },
                    "limit": {
                        "$ref": "#/components/schemas/ParticipantLimit"
                    }
                },
                "required": [
                    "limit"
                ]
            },
            "CurrencyIsActive": {
                "type": "object",
                "properties": {
                    "isActive": {
                        "type": "boolean",
                        "description": "Participant currency isActive boolean"
                    }
                },
                "required": [
                    "isActive"
                ]
            },
            "RecordFundsOut": {
                "type": "object",
                "properties": {
                    "action": {
                        "type": "string",
                        "enum": [
                            "recordFundsOutCommit",
                            "recordFundsOutAbort"
                        ]
                    },
                    "reason": {
                        "type": "string"
                    }
                },
                "required": [
                    "reason"
                ]
            },
            "LedgerAccountType": {
                "type": "object",
                "required": [
                    "name",
                    "description",
                    "isActive",
                    "isSettleable"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Name of the ledger account type",
                        "minLength": 2,
                        "maxLength": 30,
                        "pattern": "^\\w+$"
                    },
                    "description": {
                        "type": "string",
                        "description": "Description of the ledger account type"
                    },
                    "isActive": {
                        "type": "boolean",
                        "description": "Determines whether the ledger account is active"
                    },
                    "isSettleable": {
                        "type": "boolean",
                        "description": "Determines whether the ledger account is settleable"
                    }
                }
            },
            "SettlementModel": {
                "type": "object",
                "required": [
                    "autoPositionReset",
                    "ledgerAccountType",
                    "settlementAccountType",
                    "name",
                    "requireLiquidityCheck",
                    "settlementDelay",
                    "settlementGranularity",
                    "settlementInterchange",
                    "currency"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Name of the settlement model",
                        "minLength": 2,
                        "maxLength": 30,
                        "x-format": {
                            "alphanum": true
                        }
                    },
                    "settlementGranularity": {
                        "type": "string",
                        "description": "Granularity type for the settlement model GROSS or NET",
                        "enum": [
                            "GROSS",
                            "NET"
                        ]
                    },
                    "settlementInterchange": {
                        "type": "string",
                        "description": "Interchange type for the settlement model BILATERAL or MULTILATERAL",
                        "enum": [
                            "BILATERAL",
                            "MULTILATERAL"
                        ]
                    },
                    "settlementDelay": {
                        "type": "string",
                        "description": "Delay type for the settlement model IMMEDIATE or DEFERRED",
                        "enum": [
                            "DEFERRED",
                            "IMMEDIATE"
                        ]
                    },
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    },
                    "requireLiquidityCheck": {
                        "type": "boolean",
                        "description": "Liquidity Check boolean"
                    },
                    "ledgerAccountType": {
                        "type": "string",
                        "description": "Account type for the settlement model",
                        "enum": [
                            "INTERCHANGE_FEE",
                            "POSITION"
                        ]
                    },
                    "settlementAccountType": {
                        "type": "string",
                        "description": "Account type into which the settlement should be settled into :  POSITION, SETTLEMENT or INTERCHANGE_FEE_SETTLEMENT"
                    },
                    "autoPositionReset": {
                        "type": "boolean",
                        "description": "Automatic position reset setting, which determines whether to execute the settlement transfer or not"
                    }
                }
            },
            "SettlementModelIsActive": {
                "type": "object",
                "required": [
                    "isActive"
                ],
                "properties": {
                    "isActive": {
                        "type": "boolean",
                        "description": "settlementModel isActive boolean"
                    }
                }
            },
            "GetTransactionResponse": {
                "title": "GetTransactionResponse",
                "type": "object",
                "description": "GET /transaction/{id} response object",
                "properties": {
                    "quoteId": {
                        "$ref": "#/components/schemas/QuoteId"
                    },
                    "transactionId": {
                        "$ref": "#/components/schemas/TransactionId"
                    },
                    "transactionRequestId": {
                        "type": "string",
                        "description": "Identifies an optional previously-sent transaction request."
                    },
                    "payee": {
                        "$ref": "#/components/schemas/Party"
                    },
                    "payer": {
                        "$ref": "#/components/schemas/Party"
                    },
                    "amount": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "transactionType": {
                        "$ref": "#/components/schemas/TransactionType"
                    },
                    "note": {
                        "type": "string",
                        "description": "A memo that will be attached to the transaction."
                    },
                    "extensionList": {
                        "$ref": "#/components/schemas/ExtensionList"
                    }
                }
            },
            "QuoteId": {
                "title": "QuoteId",
                "type": "string",
                "minLength": 1,
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                "description": "Quote Identifier. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to RFC 4122, that is restricted by a regular expression for interoperability reasons. An UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). A minLength of 1 has been specified due to the regex not being validated on empty strings, this should be removed once the enjoi module has been fixed."
            },
            "TransactionId": {
                "title": "TransactionId",
                "type": "string",
                "minLength": 1,
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                "description": "Transaction Identifier. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to RFC 4122, that is restricted by a regular expression for interoperability reasons. An UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). A minLength of 1 has been specified due to the regex not being validated on empty strings, this should be removed once the enjoi module has been fixed."
            },
            "Party": {
                "title": "Party",
                "type": "object",
                "description": "Data model for the complex type Party.",
                "properties": {
                    "partyIdInfo": {
                        "$ref": "#/components/schemas/PartyIdInfo"
                    },
                    "merchantClassificationCode": {
                        "type": "string",
                        "description": "Used in the context of Payee Information, where the Payee happens to be a merchant accepting merchant payments."
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name of the Party, could be a real name or a nick name."
                    },
                    "personalInfo": {
                        "$ref": "#/components/schemas/PartyPersonalInfo"
                    }
                },
                "required": [
                    "partyIdInfo"
                ]
            },
            "PartyIdInfo": {
                "title": "PartyIdInfo",
                "type": "object",
                "description": "Data model for the complex type PartyIdInfo.",
                "properties": {
                    "partyIdType": {
                        "$ref": "#/components/schemas/PartyIdType"
                    },
                    "partyIdentifier": {
                        "$ref": "#/components/schemas/PartyIdentifier"
                    },
                    "partySubIdOrType": {
                        "type": "string",
                        "description": "A sub-identifier or sub-type for the Party."
                    },
                    "fspId": {
                        "type": "string",
                        "description": "FSP id (if known)"
                    },
                    "extensionList": {
                        "$ref": "#/components/schemas/ExtensionList"
                    }
                },
                "required": [
                    "partyIdType",
                    "partyIdentifier"
                ]
            },
            "PartyIdType": {
                "title": "PartyIdTypeEnum",
                "type": "string",
                "enum": [
                    "MSISDN",
                    "EMAIL",
                    "PERSONAL_ID",
                    "BUSINESS",
                    "DEVICE",
                    "ACCOUNT_ID",
                    "IBAN",
                    "ALIAS"
                ],
                "description": "Below are the allowed values for the enumeration - MSISDN An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the ITU-T E.164 standard. Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix. - EMAIL An email is used as reference to a participant. The format of the email should be according to the informational RFC 3696. - PERSONAL_ID A personal identifier is used as reference to a participant. Examples of personal identification are passport number, birth certificate number, and national registration number. The identifier number is added in the PartyIdentifier element. The personal identifier type is added in the PartySubIdOrType element. - BUSINESS A specific Business (for example, an organization or a company) is used as reference to a participant. The BUSINESS identifier can be in any format. To make a transaction connected to a specific username or bill number in a Business, the PartySubIdOrType element should be used. - DEVICE A specific device (for example, a POS or ATM) id connected to a specific business or organization is used as reference to a Party. For referencing a specific device under a specific business or organization, use the PartySubIdOrType element. - ACCOUNT_ID A bank account number or FSP account id should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP. - IBAN A bank account number or FSP account id is used as reference to a participant. The IBAN identifier can consist of up to 34 alphanumeric characters and should be entered without whitespace. - ALIAS An alias is used as reference to a participant. The alias should be created in the FSP as an alternative reference to an account owner. Another example of an alias is a username in the FSP system. The ALIAS identifier can be in any format. It is also possible to use the PartySubIdOrType element for identifying an account under an Alias defined by the PartyIdentifier."
            },
            "PartyIdentifier": {
                "title": "PartyIdentifier",
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Identifier of the Party."
            },
            "ExtensionList": {
                "title": "ExtensionList",
                "type": "object",
                "description": "Data model for the complex type ExtensionList",
                "properties": {
                    "extension": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Extension"
                        },
                        "minItems": 1,
                        "maxItems": 16,
                        "description": "Number of Extension elements"
                    }
                },
                "required": [
                    "extension"
                ]
            },
            "Extension": {
                "title": "Extension",
                "type": "object",
                "description": "Data model for the complex type Extension",
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "Extension key."
                    },
                    "value": {
                        "type": "string",
                        "description": "Extension value."
                    }
                },
                "required": [
                    "key",
                    "value"
                ]
            },
            "PartyPersonalInfo": {
                "title": "PartyPersonalInfo",
                "type": "object",
                "description": "Data model for the complex type PartyPersonalInfo.",
                "properties": {
                    "complexName": {
                        "$ref": "#/components/schemas/PartyComplexName"
                    },
                    "dateOfBirth": {
                        "type": "string",
                        "description": "Date of birth for the Party."
                    }
                }
            },
            "PartyComplexName": {
                "title": "PartyComplexName",
                "type": "object",
                "description": "Data model for the complex type PartyComplexName.",
                "properties": {
                    "firstName": {
                        "type": "string",
                        "description": "Party’s first name."
                    },
                    "middleName": {
                        "type": "string",
                        "description": "Party’s middle name."
                    },
                    "lastName": {
                        "type": "string",
                        "description": "Party’s last name."
                    }
                }
            },
            "TransactionType": {
                "title": "TransactionType",
                "type": "object",
                "description": "Data model for the complex type TransactionType.",
                "properties": {
                    "scenario": {
                        "type": "string",
                        "description": "Deposit, withdrawal, refund, …"
                    },
                    "subScenario": {
                        "type": "string",
                        "description": "Possible sub-scenario, defined locally within the scheme."
                    },
                    "initiator": {
                        "type": "string",
                        "description": "Who is initiating the transaction - Payer or Payee"
                    },
                    "initiatorType": {
                        "type": "string",
                        "description": "Consumer, agent, business, …"
                    },
                    "refundInfo": {
                        "$ref": "#/components/schemas/Refund"
                    },
                    "balanceOfPayments": {
                        "type": "string",
                        "description": "Balance of Payments code."
                    }
                },
                "required": [
                    "scenario",
                    "initiator",
                    "initiatorType"
                ]
            },
            "Refund": {
                "title": "Refund",
                "type": "object",
                "description": "Data model for the complex type Refund.",
                "properties": {
                    "originalTransactionId": {
                        "type": "string",
                        "description": "Reference to the original transaction id that is requested to be refunded."
                    },
                    "refundReason": {
                        "type": "string",
                        "description": "Free text indicating the reason for the refund."
                    }
                },
                "required": [
                    "originalTransactionId"
                ]
            },
            "Money": {
                "title": "Money",
                "type": "object",
                "description": "Data model for the complex type Money.",
                "properties": {
                    "currency": {
                        "$ref": "#/components/schemas/Currency"
                    },
                    "amount": {
                        "$ref": "#/components/schemas/Amount"
                    }
                },
                "required": [
                    "currency",
                    "amount"
                ]
            },
            "Currency": {
                "title": "CurrencyEnum",
                "description": "The currency codes defined in ISO 4217 as three-letter alphabetic codes are used as the standard naming representation for currencies.",
                "type": "string",
                "minLength": 3,
                "maxLength": 3,
                "enum": [
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "ANG",
                    "AOA",
                    "ARS",
                    "AUD",
                    "AWG",
                    "AZN",
                    "BAM",
                    "BBD",
                    "BDT",
                    "BGN",
                    "BHD",
                    "BIF",
                    "BMD",
                    "BND",
                    "BOB",
                    "BRL",
                    "BSD",
                    "BTN",
                    "BWP",
                    "BYN",
                    "BZD",
                    "CAD",
                    "CDF",
                    "CHF",
                    "CLP",
                    "CNY",
                    "COP",
                    "CRC",
                    "CUC",
                    "CUP",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EGP",
                    "ERN",
                    "ETB",
                    "EUR",
                    "FJD",
                    "FKP",
                    "GBP",
                    "GEL",
                    "GGP",
                    "GHS",
                    "GIP",
                    "GMD",
                    "GNF",
                    "GTQ",
                    "GYD",
                    "HKD",
                    "HNL",
                    "HRK",
                    "HTG",
                    "HUF",
                    "IDR",
                    "ILS",
                    "IMP",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JEP",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KGS",
                    "KHR",
                    "KMF",
                    "KPW",
                    "KRW",
                    "KWD",
                    "KYD",
                    "KZT",
                    "LAK",
                    "LBP",
                    "LKR",
                    "LRD",
                    "LSL",
                    "LYD",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MNT",
                    "MOP",
                    "MRO",
                    "MUR",
                    "MVR",
                    "MWK",
                    "MXN",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PGK",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SBD",
                    "SCR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SHP",
                    "SLL",
                    "SOS",
                    "SPL",
                    "SRD",
                    "STD",
                    "SVC",
                    "SYP",
                    "SZL",
                    "THB",
                    "TJS",
                    "TMT",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TVD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "USD",
                    "UYU",
                    "UZS",
                    "VEF",
                    "VND",
                    "VUV",
                    "WST",
                    "XAF",
                    "XCD",
                    "XDR",
                    "XOF",
                    "XPF",
                    "YER",
                    "ZAR",
                    "ZMW",
                    "ZWD"
                ]
            },
            "Amount": {
                "title": "Amount",
                "type": "string",
                "pattern": "^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$",
                "description": "The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed."
            }
        }
    }
}
