{
    "openapi": "3.0.0",
    "info": {
        "title": "IBANAPI OpenApi Documentation",
        "description": "IBANAPI OpenApi documentation",
        "contact": {
            "email": "hello@ibanapi.com"
        },
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://ibanapi.com/v1",
            "description": "IBANAPI Server"
        }
    ],
    "paths": {
        "/validate": {
            "get": {
                "tags": [
                    "IBANAPI"
                ],
                "summary": "Validate IBAN",
                "description": "Returns the validation results",
                "operationId": "validateIBAN",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/iban"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Valid IBAN response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/IBANResult"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "API key is missing",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/422"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Package expired or account was blocked",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/401"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid API Key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/403"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Your balance is exhausted or bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/400"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "api_key_security": []
                    }
                ]
            }
        },
        "/validate-basic": {
            "get": {
                "tags": [
                    "IBANAPI"
                ],
                "summary": "Validate IBAN Basic",
                "description": "Returns the basic validation results",
                "operationId": "validateIBANBasic",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/iban"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Valid IBAN response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/IBANResultBasic"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "API key is missing",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/422"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Package expired or account was blocked",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/401"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid API Key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/403"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Your balance is exhausted or bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/400"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "api_key_security": []
                    }
                ]
            }
        },
        "/balance": {
            "get": {
                "tags": [
                    "IBANAPI"
                ],
                "summary": "Get Account Balance",
                "description": "Returns the account balance and expiry",
                "operationId": "getBalance",
                "responses": {
                    "200": {
                        "description": "SUCCESS",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BalanceResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "API key is missing",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/422"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Package expired or account was blocked",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/401"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid API Key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/403"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Your balance is exhausted or bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/400"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "api_key_security": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "422": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "422"
                    },
                    "message": {
                        "type": "string",
                        "example": "API key is missing"
                    },
                    "data": {
                        "type": "object",
                        "example": "{}"
                    }
                },
                "type": "object"
            },
            "401": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "401"
                    },
                    "message": {
                        "type": "string",
                        "example": "Your package has expired"
                    },
                    "data": {
                        "type": "object",
                        "example": "{}"
                    }
                },
                "type": "object"
            },
            "403": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "403"
                    },
                    "message": {
                        "type": "string",
                        "example": "Invalid API Key"
                    },
                    "data": {
                        "type": "object",
                        "example": "{}"
                    }
                },
                "type": "object"
            },
            "400": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "400"
                    },
                    "message": {
                        "type": "string",
                        "example": "Your balance is exhausted"
                    },
                    "data": {
                        "type": "object",
                        "example": "{}"
                    }
                },
                "type": "object"
            },
            "BalanceResponse": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "200"
                    },
                    "message": {
                        "type": "string",
                        "example": "SUCCESS"
                    },
                    "data": {
                        "type": "object",
                        "example": {
                            "basic_balance": 2000,
                            "bank_balance": 100,
                            "expiry_date": "2021-05-16"
                        }
                    }
                },
                "type": "object"
            },
            "IBANResult": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "200"
                    },
                    "message": {
                        "type": "string",
                        "example": "Valid IBAN Number"
                    },
                    "validations": {
                        "type": "array",
                        "items": {},
                        "example": [
                            {
                                "result": 200,
                                "message": "Valid IBAN length"
                            },
                            {
                                "result": 200,
                                "message": "Valid IBAN Checksum"
                            }
                        ]
                    },
                    "expremental": {
                        "type": "integer",
                        "example": "0"
                    },
                    "data": {
                        "type": "object",
                        "example": {
                            "country_code": "EE",
                            "iso_alpha3": "EST",
                            "country_name": "Estonia",
                            "currency_code": "EUR",
                            "sepa_member": "Yes",
                            "sepa": {
                                "sepa_credit_transfer": "Yes",
                                "sepa_direct_debit": "No",
                                "sepa_sdd_core": "No",
                                "sepa_b2b": "No",
                                "sepa_card_clearing": "No"
                            },
                            "bban": "1000001020145685",
                            "bank_account": "00102014568",
                            "bank": {
                                "bank_name": "AS SEB PANK",
                                "phone": "",
                                "address": "TORNIMAE 2 FLOOR 10",
                                "bic": "EEUHEE2X",
                                "city": "TALLINN",
                                "state": "",
                                "zip": "15010"
                            }
                        }
                    }
                },
                "type": "object"
            },
            "IBANResultBasic": {
                "properties": {
                    "result": {
                        "type": "integer",
                        "example": "200"
                    },
                    "message": {
                        "type": "string",
                        "example": "Valid IBAN Number"
                    },
                    "validations": {
                        "type": "array",
                        "items": {},
                        "example": [
                            {
                                "result": 200,
                                "message": "Valid IBAN length"
                            },
                            {
                                "result": 200,
                                "message": "Valid IBAN Checksum"
                            }
                        ]
                    },
                    "expremental": {
                        "type": "integer",
                        "example": "0"
                    },
                    "data": {
                        "type": "object",
                        "example": {
                            "country_code": "EE",
                            "iso_alpha3": "EST",
                            "country_name": "Estonia",
                            "currency_code": "EUR",
                            "sepa_member": "Yes",
                            "sepa": [],
                            "bban": "1000001020145685"
                        }
                    }
                },
                "type": "object"
            }
        },
        "parameters": {
            "iban": {
                "name": "iban",
                "in": "query",
                "description": "The IBAN",
                "required": true,
                "schema": {
                    "type": "string"
                }
            }
        },
        "securitySchemes": {
            "api_key_security": {
                "type": "apiKey",
                "description": "Your API Key, you can get it from https://ibanapi.com",
                "name": "api_key",
                "in": "query"
            }
        }
    },
    "tags": [
        {
            "name": "IBANAPI",
            "description": "API Endpoints of IBANAPI"
        }
    ]
}