{
  "info": {
    "_postman_id": "b3d5319e-c876-454e-97ad-9fa747839ed1",
    "name": "BankAccountChecker V1",
    "description": "## BankAccountChecker\n\nThis collection wraps the BankAccountChecker API, which validates UK bank details and related contact information. It is intended for pre‑validating customer payment details before processing transactions in production systems.\n\n### What this collection does\n\nCurrent requests include:\n\n- **UK Sort Code and Bank Account validation using GET**  \n    Validates a UK sort code and bank account number via HTTP GET to confirm structure and bank routing correctness.\n    \n\nAdditional related validation endpoints (opened in other tabs and typically part of the same API) may include:\n\n- IBAN validation (GET/POST)\n    \n- Phone validation (GET/POST)\n    \n- Email validation (GET/POST)\n    \n\nOnce added to this collection, they will provide a unified set of checks for customer financial/contact data.\n\n### Authentication & required variables\n\nThe collection uses collection‑level variables to parameterize requests:\n\n- `api_key` – Your BankAccountChecker API key\n    \n- `api_password` – API password / secret\n    \n- `type` – Validation type (e.g. `ukbank`, `iban`, `phone`, `email` depending on the endpoint)\n    \n- `output` – Desired output format (e.g. `json`, `xml`)\n    \n- `sortcode` – UK sort code to validate\n    \n- `bankaccount` – UK bank account number to validate\n    \n- `iban` – IBAN to validate (for IBAN endpoints)\n    \n- `phone` – Phone number to validate (for phone endpoints)\n    \n- `country` – Country code for phone validation (e.g. `GB`)\n    \n- `email` – Email address to validate\n    \n\nSet these at the collection level, or via an environment if you use multiple keys or contexts.\n\n### How to use\n\n1. **Configure variables**\n    \n    - Open the collection variables and set `api_key`, `api_password`, and default `output` (e.g. `json`).\n        \n    - For testing, fill in example values for `sortcode`, `bankaccount`, `iban`, `phone`, `country`, and `email`.\n        \n2. **Run a single validation**\n    \n    - Open **UK Sort Code and Bank Account validation using GET**\n        \n    - Ensure the query parameters are correctly bound to the collection variables.\n        \n    - Send the request and inspect the response for validation status and error codes.\n        \n3. **Use with environments / CI**\n    \n    - Store credentials in an environment (e.g. “Test”, “Live”) and keep only non‑sensitive defaults in collection variables.\n        \n    - Use the Collection Runner or Postman CLI to run bulk validations, driven by CSV/JSON input.\n        \n\n### Typical use cases\n\n- Pre‑validating customer bank details during onboarding or checkout\n    \n- Cleaning or auditing existing bank details in back‑office systems\n    \n- Validating IBAN, phone, and email data before sending mandates, notifications, or payouts (once those requests are added to the collection)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "784480",
    "_collection_link": "https://go.postman.co/collection/784480-b3d5319e-c876-454e-97ad-9fa747839ed1?source=collection_link"
  },
  "item": [
    {
      "name": "UK Bank Accounts",
      "item": [
        {
          "name": "UK Sort Code and Bank Account validation using GET",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&sortcode={{sortcode}}&bankaccount={{bankaccount}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "uk or uk_bankaccount"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                },
                {
                  "key": "sortcode",
                  "value": "{{sortcode}}",
                  "description": "Sort code is a 6 numerical characters long code representing your bank Branch. Should be padded with leading zeroes"
                },
                {
                  "key": "bankaccount",
                  "value": "{{bankaccount}}",
                  "description": "Bank Account Number is a 8 numerical characters long code. Should be padded with leading zeroes"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "UK Sort Code validation using GET",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&sortcode={{sortcode}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "uk_sortcode"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                },
                {
                  "key": "sortcode",
                  "value": "{{sortcode}}",
                  "description": "Sort code is a 6 numerical characters long code representing your bank Branch. Should be padded with leading zeroes"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "UK Sort Code and Bank Account validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&sortcode={{sortcode}}&bankaccount={{bankaccount}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "UK Sort Code and Bank Account validation using POST with Json payload",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {}
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\",\r\n    \"sortcode\" : \"{{sortcode}}\",\r\n    \"bankaccount\" : \"{{bankaccount}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "UK Sort Code validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&sortcode={{sortcode}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "UK Sort Code validation using POST with Json payload",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {}
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\",\r\n    \"sortcode\" : \"{{sortcode}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "IBAN",
      "item": [
        {
          "name": "IBAN validation using GET",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&bankaccount={{iban}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "iban"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                },
                {
                  "key": "bankaccount",
                  "value": "{{iban}}"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "IBAN validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&bankaccount={{iban}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "IBAN validation using POST with Json payload",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {}
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\",\r\n    \"bankaccount\" : \"{{iban}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Phone",
      "item": [
        {
          "name": "Phone validation using GET",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&phone={{phone}}&country={{country}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "phone"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                },
                {
                  "key": "phone",
                  "value": "{{phone}}"
                },
                {
                  "key": "country",
                  "value": "{{country}}",
                  "type": "text"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Phone validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&phone={{phone}}&country={{country}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Phone validation using POST with Json payload",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {}
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "\r\n{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\",\r\n    \"phone\" : \"{{phone}}\",\r\n    \"country\" : \"{{country}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Country list for phone validation using GET",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "countries"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Country list for phone validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Country list for phone validation using POST with Json payload",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {}
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Email",
      "item": [
        {
          "name": "Email validation using GET",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&email={{email}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "email"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                },
                {
                  "key": "email",
                  "value": "{{email}}"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Email validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&email={{email}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Email validation using POST with Json payload",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\",\r\n    \"email\" : \"{{email}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Country",
      "item": [
        {
          "name": "Country validation using GET",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php?key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&country={{country}}",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{api_key}}"
                },
                {
                  "key": "password",
                  "value": "{{api_password}}"
                },
                {
                  "key": "type",
                  "value": "{{type}}",
                  "description": "email"
                },
                {
                  "key": "output",
                  "value": "{{output}}",
                  "description": "Optional output format. Default is json. Valid values are json and xml"
                },
                {
                  "key": "country",
                  "value": "{{country}}"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Country validation using POST",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "key={{api_key}}&password={{api_password}}&type={{type}}&output={{output}}&country={{country}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Country validation using POST with Json payload",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"key\" : \"{{api_key}}\",\r\n    \"password\" : \"{{api_password}}\",\r\n    \"type\" : \"{{type}}\",\r\n    \"output\" : \"{{output}}\",\r\n    \"country\" : \"{{country}}\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/listener.php",
              "protocol": "https",
              "host": [
                "{{base_url_host}}"
              ],
              "path": [
                "listener.php"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "pm.test(\"Return code is correct for scenario\", function () {",
                  "    var jsonData;",
                  "    try {",
                  "        jsonData = pm.response.json();",
                  "    } catch(e) {",
                  "        pm.expect.fail(\"Response payload was not structurally valid JSON\");",
                  "    }",
                  "    ",
                  "    // Fallback to valid if no iteration context is present",
                  "    var expectedStatus = pm.iterationData.get(\"expected_status\") || \"valid\";",
                  "    ",
                  "    if (expectedStatus === \"valid\") {",
                  "        pm.expect(String(jsonData.return_code)).to.eql(\"01\", \"Expected return_code '01' for valid scenario\");",
                  "    } else {",
                  "        pm.expect(String(jsonData.return_code)).to.not.eql(\"01\", \"Expected return_code NOT '01' for invalid scenario\");",
                  "    }",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ]
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "api_key",
      "value": ""
    },
    {
      "key": "api_password",
      "value": ""
    },
    {
      "key": "type",
      "value": "",
      "disabled": true,
      "description": "The type of validation to perform:\n- uk or uk_bankaccount to validate sort code / bank account number pair\n- uk_sortcode to validate the sort code only\n- iban to validate an iban bank account number\n- phone to validate a telephone number\n- email to validate an email address\n- countries to retrieve a list of countries supported for phone validation\n- country to validate country iso3166 2"
    },
    {
      "key": "output",
      "value": "",
      "description": "Optional output format. Default is json. Valid values are json and xml"
    },
    {
      "key": "sortcode",
      "value": "",
      "description": "Sort code is a 6 numerical characters long code representing your bank Branch. Should be padded with leading zeroes"
    },
    {
      "key": "bankaccount",
      "value": "",
      "description": "Bank Account Number is a 8 numerical characters long code. Should be padded with leading zeroes"
    },
    {
      "key": "iban",
      "value": "",
      "description": "Iban bank account. Different patterns depending on the country of origin"
    },
    {
      "key": "phone",
      "value": ""
    },
    {
      "key": "country",
      "value": "",
      "description": "iso3166 2 characters code representing the country associated with the telephone number validation"
    },
    {
      "key": "email",
      "value": ""
    }
  ]
}