{
  "openapi": "3.0.0",
  "paths": {
    "/auth/user-exist": {
      "post": {
        "operationId": "Auth_checkUserExist",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserExistRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Check if a user exists (and send OTP if so)",
        "tags": [
          "Auth"
        ],
        "description": "`Auth` · Check if a user exists (and send OTP if so)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/auth/user-exist \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"msisdn\":\"8801712345678\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/auth/user-exist';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/auth/user-exist', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/auth/user-exist\"\n\npayload = {\"msisdn\": \"8801712345678\"}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/auth/user-exist\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"msisdn\\\":\\\"8801712345678\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/auth/user-exist\"\n\n\tpayload := strings.NewReader(\"{\\\"msisdn\\\":\\\"8801712345678\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/auth/user-exist\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"msisdn\\\":\\\"8801712345678\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/auth/sign-in": {
      "post": {
        "operationId": "Auth_login",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Sign in with phone + password",
        "tags": [
          "Auth"
        ],
        "description": "`Auth` · Sign in with phone + password",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/auth/sign-in \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"msisdn\":\"8801712345678\",\"password\":\"••••••••\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/auth/sign-in';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"password\":\"••••••••\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"password\":\"••••••••\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/auth/sign-in', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/auth/sign-in\"\n\npayload = {\n    \"msisdn\": \"8801712345678\",\n    \"password\": \"••••••••\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/auth/sign-in\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"password\\\":\\\"••••••••\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/auth/sign-in\"\n\n\tpayload := strings.NewReader(\"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"password\\\":\\\"••••••••\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/auth/sign-in\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"password\\\":\\\"••••••••\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/auth/send-otp": {
      "post": {
        "operationId": "Auth_senOtp",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/forgotPasswordBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Send a login OTP to a phone number",
        "tags": [
          "Auth"
        ],
        "description": "`Auth` · Send a login OTP to a phone number",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/auth/send-otp \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"msisdn\":\"8801712345678\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/auth/send-otp';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/auth/send-otp', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/auth/send-otp\"\n\npayload = {\"msisdn\": \"8801712345678\"}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/auth/send-otp\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"msisdn\\\":\\\"8801712345678\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/auth/send-otp\"\n\n\tpayload := strings.NewReader(\"{\\\"msisdn\\\":\\\"8801712345678\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/auth/send-otp\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"msisdn\\\":\\\"8801712345678\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/auth/verify-otp": {
      "post": {
        "operationId": "Auth_verifyOtpEndpoint",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyOtpBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Verify an OTP code",
        "tags": [
          "Auth"
        ],
        "description": "`Auth` · Verify an OTP code",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/auth/verify-otp \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"msisdn\":\"8801712345678\",\"otpCode\":\"1234\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/auth/verify-otp';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"otpCode\":\"1234\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"otpCode\":\"1234\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/auth/verify-otp', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/auth/verify-otp\"\n\npayload = {\n    \"msisdn\": \"8801712345678\",\n    \"otpCode\": \"1234\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/auth/verify-otp\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"otpCode\\\":\\\"1234\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/auth/verify-otp\"\n\n\tpayload := strings.NewReader(\"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"otpCode\\\":\\\"1234\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/auth/verify-otp\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"otpCode\\\":\\\"1234\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/auth/refresh-token": {
      "post": {
        "operationId": "Auth_refreshToken",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Refresh the access token",
        "tags": [
          "Auth"
        ],
        "description": "`Auth` · Refresh the access token",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/auth/refresh-token \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/auth/refresh-token';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/auth/refresh-token', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/auth/refresh-token\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/auth/refresh-token\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/auth/refresh-token\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/auth/refresh-token\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/user/register": {
      "post": {
        "operationId": "User_register",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Register a new user",
        "tags": [
          "User"
        ],
        "description": "`User` · Register a new user",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/user/register \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"msisdn\":\"8801712345678\",\"otp_code\":\"1234\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/user/register';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"otp_code\":\"1234\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"otp_code\":\"1234\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/user/register', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/user/register\"\n\npayload = {\n    \"msisdn\": \"8801712345678\",\n    \"otp_code\": \"1234\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/user/register\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"otp_code\\\":\\\"1234\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/user/register\"\n\n\tpayload := strings.NewReader(\"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"otp_code\\\":\\\"1234\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/user/register\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"otp_code\\\":\\\"1234\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/user/profile": {
      "get": {
        "operationId": "User_getProfile",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get the signed-in user’s profile",
        "tags": [
          "User"
        ],
        "description": "`User` · Get the signed-in user’s profile",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/user/profile \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/user/profile';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/user/profile', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/user/profile\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/user/profile\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/user/profile\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/user/profile\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "put": {
        "operationId": "User_profile",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Update the signed-in user’s profile",
        "tags": [
          "User"
        ],
        "description": "`User` · Update the signed-in user’s profile",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request PUT \\\n  --url https://api.bdvoucher.com/api/v1/user/profile \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"John Doe\",\"email\":\"john@example.com\",\"password\":\"••••••••\",\"image\":\"https://cdn.example.com/avatar.jpg\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/user/profile';\n\nlet options = {\n  method: 'PUT',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"name\":\"John Doe\",\"email\":\"john@example.com\",\"password\":\"••••••••\",\"image\":\"https://cdn.example.com/avatar.jpg\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'PUT',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"name\":\"John Doe\",\"email\":\"john@example.com\",\"password\":\"••••••••\",\"image\":\"https://cdn.example.com/avatar.jpg\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/user/profile', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/user/profile\"\n\npayload = {\n    \"name\": \"John Doe\",\n    \"email\": \"john@example.com\",\n    \"password\": \"••••••••\",\n    \"image\": \"https://cdn.example.com/avatar.jpg\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/user/profile\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"name\\\":\\\"John Doe\\\",\\\"email\\\":\\\"john@example.com\\\",\\\"password\\\":\\\"••••••••\\\",\\\"image\\\":\\\"https://cdn.example.com/avatar.jpg\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/user/profile\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"John Doe\\\",\\\"email\\\":\\\"john@example.com\\\",\\\"password\\\":\\\"••••••••\\\",\\\"image\\\":\\\"https://cdn.example.com/avatar.jpg\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/user/profile\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"John Doe\\\",\\\"email\\\":\\\"john@example.com\\\",\\\"password\\\":\\\"••••••••\\\",\\\"image\\\":\\\"https://cdn.example.com/avatar.jpg\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/user/change-password": {
      "put": {
        "operationId": "User_changePassword",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Change the signed-in user’s password",
        "tags": [
          "User"
        ],
        "description": "`User` · Change the signed-in user’s password",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request PUT \\\n  --url https://api.bdvoucher.com/api/v1/user/change-password \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"msisdn\":\"8801712345678\",\"old_password\":\"••••••••\",\"new_password\":\"••••••••••\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/user/change-password';\n\nlet options = {\n  method: 'PUT',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"old_password\":\"••••••••\",\"new_password\":\"••••••••••\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'PUT',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"msisdn\":\"8801712345678\",\"old_password\":\"••••••••\",\"new_password\":\"••••••••••\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/user/change-password', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/user/change-password\"\n\npayload = {\n    \"msisdn\": \"8801712345678\",\n    \"old_password\": \"••••••••\",\n    \"new_password\": \"••••••••••\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/user/change-password\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"old_password\\\":\\\"••••••••\\\",\\\"new_password\\\":\\\"••••••••••\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/user/change-password\"\n\n\tpayload := strings.NewReader(\"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"old_password\\\":\\\"••••••••\\\",\\\"new_password\\\":\\\"••••••••••\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/user/change-password\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"msisdn\\\":\\\"8801712345678\\\",\\\"old_password\\\":\\\"••••••••\\\",\\\"new_password\\\":\\\"••••••••••\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/user/reset-password": {
      "put": {
        "operationId": "User_resetPassword",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Reset the signed-in user’s password",
        "tags": [
          "User"
        ],
        "description": "`User` · Reset the signed-in user’s password",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request PUT \\\n  --url https://api.bdvoucher.com/api/v1/user/reset-password \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"reset\",\"password\":\"••••••••\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/user/reset-password';\n\nlet options = {\n  method: 'PUT',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"type\":\"reset\",\"password\":\"••••••••\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'PUT',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"type\":\"reset\",\"password\":\"••••••••\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/user/reset-password', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/user/reset-password\"\n\npayload = {\n    \"type\": \"reset\",\n    \"password\": \"••••••••\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/user/reset-password\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"type\\\":\\\"reset\\\",\\\"password\\\":\\\"••••••••\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/user/reset-password\"\n\n\tpayload := strings.NewReader(\"{\\\"type\\\":\\\"reset\\\",\\\"password\\\":\\\"••••••••\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/user/reset-password\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"type\\\":\\\"reset\\\",\\\"password\\\":\\\"••••••••\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/catalog/categories": {
      "get": {
        "description": "Returns **active** categories only (`status = true`). Default order is admin-curated: `sort_order ASC, id ASC`. Override via `?sort=name.asc|name.desc|id.asc|id.desc|sort_order.asc|sort_order.desc`.",
        "operationId": "Catalog_listCategories",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent_id",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "description": "Field + direction. Supported fields: `sort_order` (default), `name`, `id`.",
            "schema": {
              "example": "sort_order.asc",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List categories",
        "tags": [
          "Catalog"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/catalog/categories?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&parent_id=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/catalog/categories?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&parent_id=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/catalog/categories?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&parent_id=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/catalog/categories\"\n\nquerystring = {\"page\":\"SOME_NUMBER_VALUE\",\"limit\":\"SOME_NUMBER_VALUE\",\"search\":\"SOME_STRING_VALUE\",\"parent_id\":\"SOME_NUMBER_VALUE\",\"status\":\"SOME_BOOLEAN_VALUE\",\"sort\":\"sort_order.asc\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/catalog/categories?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&parent_id=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/catalog/categories?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&parent_id=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/catalog/categories?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&parent_id=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/catalog/brands": {
      "get": {
        "description": "Returns **active** brands only (`status = true`). Default order: `sort_order ASC, id ASC` (admin-curated via `PATCH /admin/brands/reorder`). Override via `?sort=`.",
        "operationId": "Catalog_listBrands",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "description": "Supported fields: `sort_order` (default), `name`, `id`.",
            "schema": {
              "example": "sort_order.asc",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List brands",
        "tags": [
          "Catalog"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/catalog/brands?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/catalog/brands?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/catalog/brands?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/catalog/brands\"\n\nquerystring = {\"page\":\"SOME_NUMBER_VALUE\",\"limit\":\"SOME_NUMBER_VALUE\",\"search\":\"SOME_STRING_VALUE\",\"status\":\"SOME_BOOLEAN_VALUE\",\"sort\":\"sort_order.asc\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/catalog/brands?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/catalog/brands?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/catalog/brands?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/catalog/tags": {
      "get": {
        "description": "Returns **active** tags only (`status = true`). Default order: `sort_order ASC, id ASC` (admin-curated via `PATCH /admin/tags/reorder`). Override via `?sort=`.",
        "operationId": "Catalog_listTags",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "description": "Supported fields: `sort_order` (default), `name`, `id`.",
            "schema": {
              "example": "sort_order.asc",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List tags",
        "tags": [
          "Catalog"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/catalog/tags?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/catalog/tags?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/catalog/tags?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/catalog/tags\"\n\nquerystring = {\"search\":\"SOME_STRING_VALUE\",\"page\":\"SOME_NUMBER_VALUE\",\"limit\":\"SOME_NUMBER_VALUE\",\"status\":\"SOME_BOOLEAN_VALUE\",\"sort\":\"sort_order.asc\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/catalog/tags?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/catalog/tags?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/catalog/tags?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_BOOLEAN_VALUE&sort=sort_order.asc\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/products/types": {
      "get": {
        "description": "Returns **active** product types only (`status = true`), in admin-curated `sort_order ASC, id ASC` order. Inactive types are hidden from customers.",
        "operationId": "Products_getProductTypes",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List product types",
        "tags": [
          "Products"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/products/types \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/products/types';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/products/types', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/products/types\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/products/types\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/products/types\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/products/types\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/products/{id}": {
      "get": {
        "description": "Returns **404** if the product is inactive, or if its brand / product_type has been deactivated. Only active variants / categories / payment methods / tags are embedded; tags are additionally ordered by admin `sort_order`.",
        "operationId": "Products_getProductDetails",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "variant_sort",
            "required": false,
            "in": "query",
            "description": "Variant ordering inside `variants[]`. `price` (default) = cheapest first, `sort` = admin-curated order, `name` = alphabetical.",
            "schema": {
              "enum": [
                "price",
                "sort",
                "name"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "description": "Product, brand, or type inactive / not found"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get product details",
        "tags": [
          "Products"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/products/%7Bid%7D?variant_sort=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/products/%7Bid%7D?variant_sort=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/products/%7Bid%7D?variant_sort=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/products/%7Bid%7D\"\n\nquerystring = {\"variant_sort\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/products/%7Bid%7D?variant_sort=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/products/%7Bid%7D?variant_sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/products/%7Bid%7D?variant_sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/products": {
      "get": {
        "description": "Customer-facing catalogue. Products are surfaced only when:\n  - `status = active`\n  - related **brand** is active (or unset)\n  - related **product_type** is active (or unset)\n\nDefault order: `sort_order ASC, id ASC` (admin-curated).\nExplicit sort via `?sort=field.dir` — supported fields: `sort_order`, `name`, `price`, `newest`.\n\nEmbedded collections on each item are also filtered to active rows only: variants (`is_active=true`), categories/payment-methods (status=true), tags (status=true).\n\nVariant ordering inside each product is configurable via `?variant_sort=`: `price` (default, cheapest first), `sort` (admin-curated), or `name`.",
        "operationId": "Products_list",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "brandId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          {
            "name": "categoryId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          {
            "name": "categoryIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          {
            "name": "brandIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          {
            "name": "types",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "minPrice",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "name": "featured",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "trending",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          {
            "name": "variant_sort",
            "required": false,
            "in": "query",
            "description": "Variant ordering inside each product's `variants[]` array.\n - `price` (default): cheapest first.\n - `sort`           : admin-curated order from the admin reorder API.\n - `name`           : alphabetical by variant name.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          {
            "name": "tags",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tagIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List products (paginated, filterable)",
        "tags": [
          "Products"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/products?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&brandId=SOME_OBJECT_VALUE&categoryId=SOME_OBJECT_VALUE&categoryIds=SOME_ARRAY_VALUE&brandIds=SOME_ARRAY_VALUE&types=SOME_ARRAY_VALUE&minPrice=SOME_NUMBER_VALUE&maxPrice=SOME_NUMBER_VALUE&featured=SOME_BOOLEAN_VALUE&trending=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE&sortBy=SOME_OBJECT_VALUE&sortOrder=SOME_OBJECT_VALUE&variant_sort=SOME_OBJECT_VALUE&tags=SOME_ARRAY_VALUE&tagIds=SOME_ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/products?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&brandId=SOME_OBJECT_VALUE&categoryId=SOME_OBJECT_VALUE&categoryIds=SOME_ARRAY_VALUE&brandIds=SOME_ARRAY_VALUE&types=SOME_ARRAY_VALUE&minPrice=SOME_NUMBER_VALUE&maxPrice=SOME_NUMBER_VALUE&featured=SOME_BOOLEAN_VALUE&trending=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE&sortBy=SOME_OBJECT_VALUE&sortOrder=SOME_OBJECT_VALUE&variant_sort=SOME_OBJECT_VALUE&tags=SOME_ARRAY_VALUE&tagIds=SOME_ARRAY_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/products?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&brandId=SOME_OBJECT_VALUE&categoryId=SOME_OBJECT_VALUE&categoryIds=SOME_ARRAY_VALUE&brandIds=SOME_ARRAY_VALUE&types=SOME_ARRAY_VALUE&minPrice=SOME_NUMBER_VALUE&maxPrice=SOME_NUMBER_VALUE&featured=SOME_BOOLEAN_VALUE&trending=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE&sortBy=SOME_OBJECT_VALUE&sortOrder=SOME_OBJECT_VALUE&variant_sort=SOME_OBJECT_VALUE&tags=SOME_ARRAY_VALUE&tagIds=SOME_ARRAY_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/products\"\n\nquerystring = {\"search\":\"SOME_STRING_VALUE\",\"page\":\"SOME_NUMBER_VALUE\",\"limit\":\"SOME_NUMBER_VALUE\",\"brandId\":\"SOME_OBJECT_VALUE\",\"categoryId\":\"SOME_OBJECT_VALUE\",\"categoryIds\":\"SOME_ARRAY_VALUE\",\"brandIds\":\"SOME_ARRAY_VALUE\",\"types\":\"SOME_ARRAY_VALUE\",\"minPrice\":\"SOME_NUMBER_VALUE\",\"maxPrice\":\"SOME_NUMBER_VALUE\",\"featured\":\"SOME_BOOLEAN_VALUE\",\"trending\":\"SOME_BOOLEAN_VALUE\",\"sort\":\"SOME_STRING_VALUE\",\"sortBy\":\"SOME_OBJECT_VALUE\",\"sortOrder\":\"SOME_OBJECT_VALUE\",\"variant_sort\":\"SOME_OBJECT_VALUE\",\"tags\":\"SOME_ARRAY_VALUE\",\"tagIds\":\"SOME_ARRAY_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/products?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&brandId=SOME_OBJECT_VALUE&categoryId=SOME_OBJECT_VALUE&categoryIds=SOME_ARRAY_VALUE&brandIds=SOME_ARRAY_VALUE&types=SOME_ARRAY_VALUE&minPrice=SOME_NUMBER_VALUE&maxPrice=SOME_NUMBER_VALUE&featured=SOME_BOOLEAN_VALUE&trending=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE&sortBy=SOME_OBJECT_VALUE&sortOrder=SOME_OBJECT_VALUE&variant_sort=SOME_OBJECT_VALUE&tags=SOME_ARRAY_VALUE&tagIds=SOME_ARRAY_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/products?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&brandId=SOME_OBJECT_VALUE&categoryId=SOME_OBJECT_VALUE&categoryIds=SOME_ARRAY_VALUE&brandIds=SOME_ARRAY_VALUE&types=SOME_ARRAY_VALUE&minPrice=SOME_NUMBER_VALUE&maxPrice=SOME_NUMBER_VALUE&featured=SOME_BOOLEAN_VALUE&trending=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE&sortBy=SOME_OBJECT_VALUE&sortOrder=SOME_OBJECT_VALUE&variant_sort=SOME_OBJECT_VALUE&tags=SOME_ARRAY_VALUE&tagIds=SOME_ARRAY_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/products?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&brandId=SOME_OBJECT_VALUE&categoryId=SOME_OBJECT_VALUE&categoryIds=SOME_ARRAY_VALUE&brandIds=SOME_ARRAY_VALUE&types=SOME_ARRAY_VALUE&minPrice=SOME_NUMBER_VALUE&maxPrice=SOME_NUMBER_VALUE&featured=SOME_BOOLEAN_VALUE&trending=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE&sortBy=SOME_OBJECT_VALUE&sortOrder=SOME_OBJECT_VALUE&variant_sort=SOME_OBJECT_VALUE&tags=SOME_ARRAY_VALUE&tagIds=SOME_ARRAY_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/orders": {
      "post": {
        "description": "\nPlaces a new order for one or more product variants.\n\n### fulfillment_input — per-item checkout data\n\nEach item can carry a `fulfillment_input` object whose keys exactly match the\n`name` fields returned by `GET /orders/fulfillment-fields/:variantId`.\nValues are always strings; numbers are silently coerced (`\"uid\": 1234` → `\"uid\": \"1234\"`).\n\n**Game top-up** (player_id + zone_id required):\n```json\n{ \"variant_id\": 12, \"quantity\": 1, \"fulfillment_input\": { \"player_id\": \"123456789\", \"zone_id\": \"301\" } }\n```\n\n**Gift card** (email required):\n```json\n{ \"variant_id\": 17, \"quantity\": 1, \"fulfillment_input\": { \"email\": \"buyer@example.com\" } }\n```\nOr use the top-level shorthand (API copies it down automatically):\n```json\n{ \"items\": [{ \"variant_id\": 17, \"quantity\": 1 }], \"recipient_email\": \"buyer@example.com\", ... }\n```\n\n**Rules**:\n- Each product accepts exactly **one** identifier key (`email | player_id | account_id | uid`).\n- Supplying two identifier keys in the same item returns **400**.\n- Sending the wrong identifier for the product returns **400**.\n- Missing a required field returns **400** — call `GET /orders/fulfillment-fields/:variantId`\n  first to discover which fields are required.\n    ",
        "operationId": "Orders_createOrder",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Create an order",
        "tags": [
          "Orders"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/orders \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"variantId\":22406,\"quantity\":1,\"items\":[{\"variant_id\":22406,\"quantity\":1,\"fulfillment_input\":{\"email\":\"buyer@example.com\"}}],\"campaign_tag\":\"PROMO2026\",\"discount_code\":\"SAVE20\",\"payment_method\":\"bkash\",\"init_payment\":true,\"recipient_email\":\"buyer@example.com\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/orders';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"variantId\":22406,\"quantity\":1,\"items\":[{\"variant_id\":22406,\"quantity\":1,\"fulfillment_input\":{\"email\":\"buyer@example.com\"}}],\"campaign_tag\":\"PROMO2026\",\"discount_code\":\"SAVE20\",\"payment_method\":\"bkash\",\"init_payment\":true,\"recipient_email\":\"buyer@example.com\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"variantId\":22406,\"quantity\":1,\"items\":[{\"variant_id\":22406,\"quantity\":1,\"fulfillment_input\":{\"email\":\"buyer@example.com\"}}],\"campaign_tag\":\"PROMO2026\",\"discount_code\":\"SAVE20\",\"payment_method\":\"bkash\",\"init_payment\":true,\"recipient_email\":\"buyer@example.com\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/orders', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/orders\"\n\npayload = {\n    \"variantId\": 22406,\n    \"quantity\": 1,\n    \"items\": [\n        {\n            \"variant_id\": 22406,\n            \"quantity\": 1,\n            \"fulfillment_input\": {\"email\": \"buyer@example.com\"}\n        }\n    ],\n    \"campaign_tag\": \"PROMO2026\",\n    \"discount_code\": \"SAVE20\",\n    \"payment_method\": \"bkash\",\n    \"init_payment\": True,\n    \"recipient_email\": \"buyer@example.com\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/orders\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"variantId\\\":22406,\\\"quantity\\\":1,\\\"items\\\":[{\\\"variant_id\\\":22406,\\\"quantity\\\":1,\\\"fulfillment_input\\\":{\\\"email\\\":\\\"buyer@example.com\\\"}}],\\\"campaign_tag\\\":\\\"PROMO2026\\\",\\\"discount_code\\\":\\\"SAVE20\\\",\\\"payment_method\\\":\\\"bkash\\\",\\\"init_payment\\\":true,\\\"recipient_email\\\":\\\"buyer@example.com\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/orders\"\n\n\tpayload := strings.NewReader(\"{\\\"variantId\\\":22406,\\\"quantity\\\":1,\\\"items\\\":[{\\\"variant_id\\\":22406,\\\"quantity\\\":1,\\\"fulfillment_input\\\":{\\\"email\\\":\\\"buyer@example.com\\\"}}],\\\"campaign_tag\\\":\\\"PROMO2026\\\",\\\"discount_code\\\":\\\"SAVE20\\\",\\\"payment_method\\\":\\\"bkash\\\",\\\"init_payment\\\":true,\\\"recipient_email\\\":\\\"buyer@example.com\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/orders\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"variantId\\\":22406,\\\"quantity\\\":1,\\\"items\\\":[{\\\"variant_id\\\":22406,\\\"quantity\\\":1,\\\"fulfillment_input\\\":{\\\"email\\\":\\\"buyer@example.com\\\"}}],\\\"campaign_tag\\\":\\\"PROMO2026\\\",\\\"discount_code\\\":\\\"SAVE20\\\",\\\"payment_method\\\":\\\"bkash\\\",\\\"init_payment\\\":true,\\\"recipient_email\\\":\\\"buyer@example.com\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "get": {
        "operationId": "Orders_getMyOrders",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {}
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get Logged-in User Orders (Paginated)",
        "tags": [
          "Orders"
        ],
        "description": "`Orders` · Get Logged-in User Orders (Paginated)"
      }
    },
    "/orders/fulfillment-fields/{variantId}": {
      "get": {
        "description": "\nReturns the exact set of checkout inputs the buyer must (or may) supply in\n`fulfillment_input` for this variant. **Call this before rendering the checkout\nform** so you know which inputs to show and which are mandatory.\n\nEach entry in `fields[]` has:\n- `name` — the key to use in `fulfillment_input` (e.g. `player_id`, `zone_id`, `email`)\n- `label` — human label for the form field\n- `type` — HTML input type hint (`text`, `email`, `number`, `phone`, etc.)\n- `required` — whether the buyer must fill it\n\nThe `partner_fields[]` array shows the raw fields declared by each active\npartner source (e.g. Zendit's `requiredFields`) — these are already merged\ninto `fields[]` as required entries so you normally only need `fields[]`.\n    ",
        "operationId": "Orders_getFulfillmentFields",
        "parameters": [
          {
            "name": "variantId",
            "required": true,
            "in": "path",
            "schema": {
              "example": 22406,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get required fulfillment fields for a variant",
        "tags": [
          "Orders"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/orders/fulfillment-fields/22406\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/orders/{id}": {
      "get": {
        "operationId": "Orders_getOrderById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get Single Order by ID or order_number (Must belong to user)\nAccepts numeric ID (e.g. 42) or 8-digit order_number (e.g. 83719264)",
        "tags": [
          "Orders"
        ],
        "description": "`Orders` · Get Single Order by ID or order_number (Must belong to user)\nAccepts numeric ID (e.g. 42) or 8-digit order_number (e.g. 83719264)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/orders/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/orders/%7Bid%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/orders/%7Bid%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/orders/{id}/status": {
      "patch": {
        "operationId": "Orders_updateOrderStatus",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrderStatusDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Update Order Status (Admin / Payment webhook later)",
        "tags": [
          "Orders"
        ],
        "description": "`Orders` · Update Order Status (Admin / Payment webhook later)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request PATCH \\\n  --url https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"SUCCEEDED\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status';\n\nlet options = {\n  method: 'PATCH',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"status\":\"SUCCEEDED\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'PATCH',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"status\":\"SUCCEEDED\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status\"\n\npayload = {\"status\": \"SUCCEEDED\"}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"PATCH\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PATCH\",\n  CURLOPT_POSTFIELDS => \"{\\\"status\\\":\\\"SUCCEEDED\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status\"\n\n\tpayload := strings.NewReader(\"{\\\"status\\\":\\\"SUCCEEDED\\\"}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/orders/%7Bid%7D/status\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"status\\\":\\\"SUCCEEDED\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/initiate/{orderId}": {
      "post": {
        "description": "Creates a payment session with the chosen gateway (sslcommerz / bkash / paystation) and returns a `paymentGatewayUrl` to redirect the customer to. The order must be in `INITIATED`, `PENDING`, `FAILED`, or `CANCELLED` status.",
        "operationId": "Payments_initiatePayment",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "Order ID",
            "schema": {
              "example": 12345,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePaymentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns gateway URL the customer should be redirected to."
          },
          "400": {
            "description": "Unsupported method, order not found, or order in wrong status."
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "description": "Gateway initialization failed."
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Initiate a payment for an order",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/payments/initiate/12345 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"orderId\":12345,\"amount\":500,\"currency\":\"BDT\",\"method\":\"bkash\",\"description\":\"Order #12345\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/initiate/12345';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"orderId\":12345,\"amount\":500,\"currency\":\"BDT\",\"method\":\"bkash\",\"description\":\"Order #12345\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"orderId\":12345,\"amount\":500,\"currency\":\"BDT\",\"method\":\"bkash\",\"description\":\"Order #12345\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/initiate/12345', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/initiate/12345\"\n\npayload = {\n    \"orderId\": 12345,\n    \"amount\": 500,\n    \"currency\": \"BDT\",\n    \"method\": \"bkash\",\n    \"description\": \"Order #12345\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/initiate/12345\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"orderId\\\":12345,\\\"amount\\\":500,\\\"currency\\\":\\\"BDT\\\",\\\"method\\\":\\\"bkash\\\",\\\"description\\\":\\\"Order #12345\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/initiate/12345\"\n\n\tpayload := strings.NewReader(\"{\\\"orderId\\\":12345,\\\"amount\\\":500,\\\"currency\\\":\\\"BDT\\\",\\\"method\\\":\\\"bkash\\\",\\\"description\\\":\\\"Order #12345\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/initiate/12345\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"orderId\\\":12345,\\\"amount\\\":500,\\\"currency\\\":\\\"BDT\\\",\\\"method\\\":\\\"bkash\\\",\\\"description\\\":\\\"Order #12345\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/initiate": {
      "post": {
        "description": "Same as `/initiate/:orderId` but expects `orderId` in the request body.",
        "operationId": "Payments_initiatePaymentFromBody",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePaymentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Initiate a payment (orderId in body)",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/payments/initiate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"orderId\":12345,\"amount\":500,\"currency\":\"BDT\",\"method\":\"bkash\",\"description\":\"Order #12345\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/initiate';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"orderId\":12345,\"amount\":500,\"currency\":\"BDT\",\"method\":\"bkash\",\"description\":\"Order #12345\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"orderId\":12345,\"amount\":500,\"currency\":\"BDT\",\"method\":\"bkash\",\"description\":\"Order #12345\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/initiate', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/initiate\"\n\npayload = {\n    \"orderId\": 12345,\n    \"amount\": 500,\n    \"currency\": \"BDT\",\n    \"method\": \"bkash\",\n    \"description\": \"Order #12345\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/initiate\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"orderId\\\":12345,\\\"amount\\\":500,\\\"currency\\\":\\\"BDT\\\",\\\"method\\\":\\\"bkash\\\",\\\"description\\\":\\\"Order #12345\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/initiate\"\n\n\tpayload := strings.NewReader(\"{\\\"orderId\\\":12345,\\\"amount\\\":500,\\\"currency\\\":\\\"BDT\\\",\\\"method\\\":\\\"bkash\\\",\\\"description\\\":\\\"Order #12345\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/initiate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"orderId\\\":12345,\\\"amount\\\":500,\\\"currency\\\":\\\"BDT\\\",\\\"method\\\":\\\"bkash\\\",\\\"description\\\":\\\"Order #12345\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/status/{transactionId}": {
      "get": {
        "description": "Returns the current payment status (PENDING / SUCCEEDED / FAILED / CANCELLED) plus the linked order status with display copy. Use this for client-side polling after the gateway redirect.",
        "operationId": "Payments_getPaymentStatus",
        "parameters": [
          {
            "name": "transactionId",
            "required": true,
            "in": "path",
            "description": "Internal transactionId returned from /initiate",
            "schema": {
              "example": "BDV-12345-1730000000000-abcdef12",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get payment + order status by transactionId",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/status/BDV-12345-1730000000000-abcdef12\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/callback": {
      "post": {
        "operationId": "Payments_handleCallback",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSLCommerzCallbackDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "SSLCommerz generic payment callback",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · SSLCommerz generic payment callback",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/payments/callback \\\n  --header 'content-type: application/json' \\\n  --data '{\"tran_id\":\"BDV-12345-1730000000000-abcdef12\",\"status\":\"VALID\",\"val_id\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"card_type\":\"string\",\"bank_tran_id\":\"string\",\"sessionkey\":\"string\",\"verify_sign\":\"string\",\"verify_sign_sha2\":\"string\",\"verify_key\":\"string\",\"tran_date\":\"string\",\"store_amount\":\"string\",\"card_no\":\"string\",\"card_issuer\":\"string\",\"card_brand\":\"string\",\"card_issuer_country\":\"string\",\"card_issuer_country_code\":\"string\",\"currency_type\":\"string\",\"currency_amount\":\"string\",\"currency_rate\":\"string\",\"base_fair\":\"string\",\"value_a\":\"string\",\"value_b\":\"string\",\"value_c\":\"string\",\"value_d\":\"string\",\"risk_level\":\"string\",\"risk_title\":\"string\",\"error\":\"string\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/callback';\n\nlet options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"tran_id\":\"BDV-12345-1730000000000-abcdef12\",\"status\":\"VALID\",\"val_id\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"card_type\":\"string\",\"bank_tran_id\":\"string\",\"sessionkey\":\"string\",\"verify_sign\":\"string\",\"verify_sign_sha2\":\"string\",\"verify_key\":\"string\",\"tran_date\":\"string\",\"store_amount\":\"string\",\"card_no\":\"string\",\"card_issuer\":\"string\",\"card_brand\":\"string\",\"card_issuer_country\":\"string\",\"card_issuer_country_code\":\"string\",\"currency_type\":\"string\",\"currency_amount\":\"string\",\"currency_rate\":\"string\",\"base_fair\":\"string\",\"value_a\":\"string\",\"value_b\":\"string\",\"value_c\":\"string\",\"value_d\":\"string\",\"risk_level\":\"string\",\"risk_title\":\"string\",\"error\":\"string\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"tran_id\":\"BDV-12345-1730000000000-abcdef12\",\"status\":\"VALID\",\"val_id\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"card_type\":\"string\",\"bank_tran_id\":\"string\",\"sessionkey\":\"string\",\"verify_sign\":\"string\",\"verify_sign_sha2\":\"string\",\"verify_key\":\"string\",\"tran_date\":\"string\",\"store_amount\":\"string\",\"card_no\":\"string\",\"card_issuer\":\"string\",\"card_brand\":\"string\",\"card_issuer_country\":\"string\",\"card_issuer_country_code\":\"string\",\"currency_type\":\"string\",\"currency_amount\":\"string\",\"currency_rate\":\"string\",\"base_fair\":\"string\",\"value_a\":\"string\",\"value_b\":\"string\",\"value_c\":\"string\",\"value_d\":\"string\",\"risk_level\":\"string\",\"risk_title\":\"string\",\"error\":\"string\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/callback', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/callback\"\n\npayload = {\n    \"tran_id\": \"BDV-12345-1730000000000-abcdef12\",\n    \"status\": \"VALID\",\n    \"val_id\": \"string\",\n    \"amount\": \"string\",\n    \"currency\": \"string\",\n    \"card_type\": \"string\",\n    \"bank_tran_id\": \"string\",\n    \"sessionkey\": \"string\",\n    \"verify_sign\": \"string\",\n    \"verify_sign_sha2\": \"string\",\n    \"verify_key\": \"string\",\n    \"tran_date\": \"string\",\n    \"store_amount\": \"string\",\n    \"card_no\": \"string\",\n    \"card_issuer\": \"string\",\n    \"card_brand\": \"string\",\n    \"card_issuer_country\": \"string\",\n    \"card_issuer_country_code\": \"string\",\n    \"currency_type\": \"string\",\n    \"currency_amount\": \"string\",\n    \"currency_rate\": \"string\",\n    \"base_fair\": \"string\",\n    \"value_a\": \"string\",\n    \"value_b\": \"string\",\n    \"value_c\": \"string\",\n    \"value_d\": \"string\",\n    \"risk_level\": \"string\",\n    \"risk_title\": \"string\",\n    \"error\": \"string\"\n}\nheaders = {\"content-type\": \"application/json\"}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/callback\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"tran_id\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"status\\\":\\\"VALID\\\",\\\"val_id\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"card_type\\\":\\\"string\\\",\\\"bank_tran_id\\\":\\\"string\\\",\\\"sessionkey\\\":\\\"string\\\",\\\"verify_sign\\\":\\\"string\\\",\\\"verify_sign_sha2\\\":\\\"string\\\",\\\"verify_key\\\":\\\"string\\\",\\\"tran_date\\\":\\\"string\\\",\\\"store_amount\\\":\\\"string\\\",\\\"card_no\\\":\\\"string\\\",\\\"card_issuer\\\":\\\"string\\\",\\\"card_brand\\\":\\\"string\\\",\\\"card_issuer_country\\\":\\\"string\\\",\\\"card_issuer_country_code\\\":\\\"string\\\",\\\"currency_type\\\":\\\"string\\\",\\\"currency_amount\\\":\\\"string\\\",\\\"currency_rate\\\":\\\"string\\\",\\\"base_fair\\\":\\\"string\\\",\\\"value_a\\\":\\\"string\\\",\\\"value_b\\\":\\\"string\\\",\\\"value_c\\\":\\\"string\\\",\\\"value_d\\\":\\\"string\\\",\\\"risk_level\\\":\\\"string\\\",\\\"risk_title\\\":\\\"string\\\",\\\"error\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/callback\"\n\n\tpayload := strings.NewReader(\"{\\\"tran_id\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"status\\\":\\\"VALID\\\",\\\"val_id\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"card_type\\\":\\\"string\\\",\\\"bank_tran_id\\\":\\\"string\\\",\\\"sessionkey\\\":\\\"string\\\",\\\"verify_sign\\\":\\\"string\\\",\\\"verify_sign_sha2\\\":\\\"string\\\",\\\"verify_key\\\":\\\"string\\\",\\\"tran_date\\\":\\\"string\\\",\\\"store_amount\\\":\\\"string\\\",\\\"card_no\\\":\\\"string\\\",\\\"card_issuer\\\":\\\"string\\\",\\\"card_brand\\\":\\\"string\\\",\\\"card_issuer_country\\\":\\\"string\\\",\\\"card_issuer_country_code\\\":\\\"string\\\",\\\"currency_type\\\":\\\"string\\\",\\\"currency_amount\\\":\\\"string\\\",\\\"currency_rate\\\":\\\"string\\\",\\\"base_fair\\\":\\\"string\\\",\\\"value_a\\\":\\\"string\\\",\\\"value_b\\\":\\\"string\\\",\\\"value_c\\\":\\\"string\\\",\\\"value_d\\\":\\\"string\\\",\\\"risk_level\\\":\\\"string\\\",\\\"risk_title\\\":\\\"string\\\",\\\"error\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/callback\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"tran_id\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"status\\\":\\\"VALID\\\",\\\"val_id\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"card_type\\\":\\\"string\\\",\\\"bank_tran_id\\\":\\\"string\\\",\\\"sessionkey\\\":\\\"string\\\",\\\"verify_sign\\\":\\\"string\\\",\\\"verify_sign_sha2\\\":\\\"string\\\",\\\"verify_key\\\":\\\"string\\\",\\\"tran_date\\\":\\\"string\\\",\\\"store_amount\\\":\\\"string\\\",\\\"card_no\\\":\\\"string\\\",\\\"card_issuer\\\":\\\"string\\\",\\\"card_brand\\\":\\\"string\\\",\\\"card_issuer_country\\\":\\\"string\\\",\\\"card_issuer_country_code\\\":\\\"string\\\",\\\"currency_type\\\":\\\"string\\\",\\\"currency_amount\\\":\\\"string\\\",\\\"currency_rate\\\":\\\"string\\\",\\\"base_fair\\\":\\\"string\\\",\\\"value_a\\\":\\\"string\\\",\\\"value_b\\\":\\\"string\\\",\\\"value_c\\\":\\\"string\\\",\\\"value_d\\\":\\\"string\\\",\\\"risk_level\\\":\\\"string\\\",\\\"risk_title\\\":\\\"string\\\",\\\"error\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/sslcommerz/callback": {
      "post": {
        "description": "Server-to-server callback from SSLCommerz. We always re-verify the transaction via the validation API before marking the payment SUCCEEDED.",
        "operationId": "Payments_handleSSLCommerzCallback",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSLCommerzCallbackDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "SSLCommerz IPN callback",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback \\\n  --header 'content-type: application/json' \\\n  --data '{\"tran_id\":\"BDV-12345-1730000000000-abcdef12\",\"status\":\"VALID\",\"val_id\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"card_type\":\"string\",\"bank_tran_id\":\"string\",\"sessionkey\":\"string\",\"verify_sign\":\"string\",\"verify_sign_sha2\":\"string\",\"verify_key\":\"string\",\"tran_date\":\"string\",\"store_amount\":\"string\",\"card_no\":\"string\",\"card_issuer\":\"string\",\"card_brand\":\"string\",\"card_issuer_country\":\"string\",\"card_issuer_country_code\":\"string\",\"currency_type\":\"string\",\"currency_amount\":\"string\",\"currency_rate\":\"string\",\"base_fair\":\"string\",\"value_a\":\"string\",\"value_b\":\"string\",\"value_c\":\"string\",\"value_d\":\"string\",\"risk_level\":\"string\",\"risk_title\":\"string\",\"error\":\"string\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback';\n\nlet options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"tran_id\":\"BDV-12345-1730000000000-abcdef12\",\"status\":\"VALID\",\"val_id\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"card_type\":\"string\",\"bank_tran_id\":\"string\",\"sessionkey\":\"string\",\"verify_sign\":\"string\",\"verify_sign_sha2\":\"string\",\"verify_key\":\"string\",\"tran_date\":\"string\",\"store_amount\":\"string\",\"card_no\":\"string\",\"card_issuer\":\"string\",\"card_brand\":\"string\",\"card_issuer_country\":\"string\",\"card_issuer_country_code\":\"string\",\"currency_type\":\"string\",\"currency_amount\":\"string\",\"currency_rate\":\"string\",\"base_fair\":\"string\",\"value_a\":\"string\",\"value_b\":\"string\",\"value_c\":\"string\",\"value_d\":\"string\",\"risk_level\":\"string\",\"risk_title\":\"string\",\"error\":\"string\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"tran_id\":\"BDV-12345-1730000000000-abcdef12\",\"status\":\"VALID\",\"val_id\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"card_type\":\"string\",\"bank_tran_id\":\"string\",\"sessionkey\":\"string\",\"verify_sign\":\"string\",\"verify_sign_sha2\":\"string\",\"verify_key\":\"string\",\"tran_date\":\"string\",\"store_amount\":\"string\",\"card_no\":\"string\",\"card_issuer\":\"string\",\"card_brand\":\"string\",\"card_issuer_country\":\"string\",\"card_issuer_country_code\":\"string\",\"currency_type\":\"string\",\"currency_amount\":\"string\",\"currency_rate\":\"string\",\"base_fair\":\"string\",\"value_a\":\"string\",\"value_b\":\"string\",\"value_c\":\"string\",\"value_d\":\"string\",\"risk_level\":\"string\",\"risk_title\":\"string\",\"error\":\"string\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback\"\n\npayload = {\n    \"tran_id\": \"BDV-12345-1730000000000-abcdef12\",\n    \"status\": \"VALID\",\n    \"val_id\": \"string\",\n    \"amount\": \"string\",\n    \"currency\": \"string\",\n    \"card_type\": \"string\",\n    \"bank_tran_id\": \"string\",\n    \"sessionkey\": \"string\",\n    \"verify_sign\": \"string\",\n    \"verify_sign_sha2\": \"string\",\n    \"verify_key\": \"string\",\n    \"tran_date\": \"string\",\n    \"store_amount\": \"string\",\n    \"card_no\": \"string\",\n    \"card_issuer\": \"string\",\n    \"card_brand\": \"string\",\n    \"card_issuer_country\": \"string\",\n    \"card_issuer_country_code\": \"string\",\n    \"currency_type\": \"string\",\n    \"currency_amount\": \"string\",\n    \"currency_rate\": \"string\",\n    \"base_fair\": \"string\",\n    \"value_a\": \"string\",\n    \"value_b\": \"string\",\n    \"value_c\": \"string\",\n    \"value_d\": \"string\",\n    \"risk_level\": \"string\",\n    \"risk_title\": \"string\",\n    \"error\": \"string\"\n}\nheaders = {\"content-type\": \"application/json\"}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"tran_id\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"status\\\":\\\"VALID\\\",\\\"val_id\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"card_type\\\":\\\"string\\\",\\\"bank_tran_id\\\":\\\"string\\\",\\\"sessionkey\\\":\\\"string\\\",\\\"verify_sign\\\":\\\"string\\\",\\\"verify_sign_sha2\\\":\\\"string\\\",\\\"verify_key\\\":\\\"string\\\",\\\"tran_date\\\":\\\"string\\\",\\\"store_amount\\\":\\\"string\\\",\\\"card_no\\\":\\\"string\\\",\\\"card_issuer\\\":\\\"string\\\",\\\"card_brand\\\":\\\"string\\\",\\\"card_issuer_country\\\":\\\"string\\\",\\\"card_issuer_country_code\\\":\\\"string\\\",\\\"currency_type\\\":\\\"string\\\",\\\"currency_amount\\\":\\\"string\\\",\\\"currency_rate\\\":\\\"string\\\",\\\"base_fair\\\":\\\"string\\\",\\\"value_a\\\":\\\"string\\\",\\\"value_b\\\":\\\"string\\\",\\\"value_c\\\":\\\"string\\\",\\\"value_d\\\":\\\"string\\\",\\\"risk_level\\\":\\\"string\\\",\\\"risk_title\\\":\\\"string\\\",\\\"error\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback\"\n\n\tpayload := strings.NewReader(\"{\\\"tran_id\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"status\\\":\\\"VALID\\\",\\\"val_id\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"card_type\\\":\\\"string\\\",\\\"bank_tran_id\\\":\\\"string\\\",\\\"sessionkey\\\":\\\"string\\\",\\\"verify_sign\\\":\\\"string\\\",\\\"verify_sign_sha2\\\":\\\"string\\\",\\\"verify_key\\\":\\\"string\\\",\\\"tran_date\\\":\\\"string\\\",\\\"store_amount\\\":\\\"string\\\",\\\"card_no\\\":\\\"string\\\",\\\"card_issuer\\\":\\\"string\\\",\\\"card_brand\\\":\\\"string\\\",\\\"card_issuer_country\\\":\\\"string\\\",\\\"card_issuer_country_code\\\":\\\"string\\\",\\\"currency_type\\\":\\\"string\\\",\\\"currency_amount\\\":\\\"string\\\",\\\"currency_rate\\\":\\\"string\\\",\\\"base_fair\\\":\\\"string\\\",\\\"value_a\\\":\\\"string\\\",\\\"value_b\\\":\\\"string\\\",\\\"value_c\\\":\\\"string\\\",\\\"value_d\\\":\\\"string\\\",\\\"risk_level\\\":\\\"string\\\",\\\"risk_title\\\":\\\"string\\\",\\\"error\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/sslcommerz/callback\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"tran_id\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"status\\\":\\\"VALID\\\",\\\"val_id\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"card_type\\\":\\\"string\\\",\\\"bank_tran_id\\\":\\\"string\\\",\\\"sessionkey\\\":\\\"string\\\",\\\"verify_sign\\\":\\\"string\\\",\\\"verify_sign_sha2\\\":\\\"string\\\",\\\"verify_key\\\":\\\"string\\\",\\\"tran_date\\\":\\\"string\\\",\\\"store_amount\\\":\\\"string\\\",\\\"card_no\\\":\\\"string\\\",\\\"card_issuer\\\":\\\"string\\\",\\\"card_brand\\\":\\\"string\\\",\\\"card_issuer_country\\\":\\\"string\\\",\\\"card_issuer_country_code\\\":\\\"string\\\",\\\"currency_type\\\":\\\"string\\\",\\\"currency_amount\\\":\\\"string\\\",\\\"currency_rate\\\":\\\"string\\\",\\\"base_fair\\\":\\\"string\\\",\\\"value_a\\\":\\\"string\\\",\\\"value_b\\\":\\\"string\\\",\\\"value_c\\\":\\\"string\\\",\\\"value_d\\\":\\\"string\\\",\\\"risk_level\\\":\\\"string\\\",\\\"risk_title\\\":\\\"string\\\",\\\"error\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/success": {
      "get": {
        "operationId": "Payments_paymentSuccess",
        "parameters": [
          {
            "name": "tran_id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Payment success redirect (gateway → storefront)",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · Payment success redirect (gateway → storefront)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/success\"\n\nquerystring = {\"tran_id\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"GET\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "post": {
        "operationId": "Payments_paymentSuccessPost",
        "parameters": [
          {
            "name": "tran_id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Payment success callback (gateway form-POST)",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · Payment success callback (gateway form-POST)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE';\n\nlet options = {method: 'POST'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/success\"\n\nquerystring = {\"tran_id\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"POST\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/success?tran_id=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/failed": {
      "get": {
        "operationId": "Payments_paymentFailed",
        "parameters": [
          {
            "name": "tran_id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Payment failed redirect",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · Payment failed redirect",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/failed\"\n\nquerystring = {\"tran_id\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"GET\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "post": {
        "operationId": "Payments_paymentFailedPost",
        "parameters": [
          {
            "name": "tran_id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Payment failed callback (gateway form-POST)",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · Payment failed callback (gateway form-POST)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE';\n\nlet options = {method: 'POST'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/failed\"\n\nquerystring = {\"tran_id\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"POST\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/failed?tran_id=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/cancel": {
      "get": {
        "operationId": "Payments_paymentCancel",
        "parameters": [
          {
            "name": "tran_id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Payment cancelled redirect",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · Payment cancelled redirect",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/cancel\"\n\nquerystring = {\"tran_id\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"GET\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "post": {
        "operationId": "Payments_paymentCancelPost",
        "parameters": [
          {
            "name": "tran_id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Payment cancelled callback (gateway form-POST)",
        "tags": [
          "Payments"
        ],
        "description": "`Payments` · Payment cancelled callback (gateway form-POST)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE';\n\nlet options = {method: 'POST'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/cancel\"\n\nquerystring = {\"tran_id\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"POST\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/cancel?tran_id=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/paystation/callback": {
      "post": {
        "description": "PayStation POSTs form-data here after payment. We always re-verify via PayStation's /transaction-status before marking SUCCEEDED.",
        "operationId": "Payments_handlePayStationCallback",
        "parameters": [
          {
            "name": "invoice_number",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayStationCallbackDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "PayStation callback (POST)",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/paystation/callback?invoice_number=SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"invoice_number\":\"BDV-12345-1730000000000-abcdef12\",\"trx_id\":\"string\",\"trx_status\":\"processing\",\"status\":\"string\",\"tran_id\":\"string\",\"invoice_no\":\"string\",\"payment_amount\":\"string\",\"request_amount\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"payer_mobile_no\":\"string\",\"payment_method\":\"string\",\"opt_a\":\"string\",\"opt_b\":\"string\",\"opt_c\":\"string\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/paystation/callback?invoice_number=SOME_STRING_VALUE';\n\nlet options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"invoice_number\":\"BDV-12345-1730000000000-abcdef12\",\"trx_id\":\"string\",\"trx_status\":\"processing\",\"status\":\"string\",\"tran_id\":\"string\",\"invoice_no\":\"string\",\"payment_amount\":\"string\",\"request_amount\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"payer_mobile_no\":\"string\",\"payment_method\":\"string\",\"opt_a\":\"string\",\"opt_b\":\"string\",\"opt_c\":\"string\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"invoice_number\":\"BDV-12345-1730000000000-abcdef12\",\"trx_id\":\"string\",\"trx_status\":\"processing\",\"status\":\"string\",\"tran_id\":\"string\",\"invoice_no\":\"string\",\"payment_amount\":\"string\",\"request_amount\":\"string\",\"amount\":\"string\",\"currency\":\"string\",\"payer_mobile_no\":\"string\",\"payment_method\":\"string\",\"opt_a\":\"string\",\"opt_b\":\"string\",\"opt_c\":\"string\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/paystation/callback?invoice_number=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/paystation/callback\"\n\nquerystring = {\"invoice_number\":\"SOME_STRING_VALUE\"}\n\npayload = {\n    \"invoice_number\": \"BDV-12345-1730000000000-abcdef12\",\n    \"trx_id\": \"string\",\n    \"trx_status\": \"processing\",\n    \"status\": \"string\",\n    \"tran_id\": \"string\",\n    \"invoice_no\": \"string\",\n    \"payment_amount\": \"string\",\n    \"request_amount\": \"string\",\n    \"amount\": \"string\",\n    \"currency\": \"string\",\n    \"payer_mobile_no\": \"string\",\n    \"payment_method\": \"string\",\n    \"opt_a\": \"string\",\n    \"opt_b\": \"string\",\n    \"opt_c\": \"string\"\n}\nheaders = {\"content-type\": \"application/json\"}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/paystation/callback?invoice_number=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"invoice_number\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"trx_id\\\":\\\"string\\\",\\\"trx_status\\\":\\\"processing\\\",\\\"status\\\":\\\"string\\\",\\\"tran_id\\\":\\\"string\\\",\\\"invoice_no\\\":\\\"string\\\",\\\"payment_amount\\\":\\\"string\\\",\\\"request_amount\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"payer_mobile_no\\\":\\\"string\\\",\\\"payment_method\\\":\\\"string\\\",\\\"opt_a\\\":\\\"string\\\",\\\"opt_b\\\":\\\"string\\\",\\\"opt_c\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/paystation/callback?invoice_number=SOME_STRING_VALUE\"\n\n\tpayload := strings.NewReader(\"{\\\"invoice_number\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"trx_id\\\":\\\"string\\\",\\\"trx_status\\\":\\\"processing\\\",\\\"status\\\":\\\"string\\\",\\\"tran_id\\\":\\\"string\\\",\\\"invoice_no\\\":\\\"string\\\",\\\"payment_amount\\\":\\\"string\\\",\\\"request_amount\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"payer_mobile_no\\\":\\\"string\\\",\\\"payment_method\\\":\\\"string\\\",\\\"opt_a\\\":\\\"string\\\",\\\"opt_b\\\":\\\"string\\\",\\\"opt_c\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/paystation/callback?invoice_number=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"invoice_number\\\":\\\"BDV-12345-1730000000000-abcdef12\\\",\\\"trx_id\\\":\\\"string\\\",\\\"trx_status\\\":\\\"processing\\\",\\\"status\\\":\\\"string\\\",\\\"tran_id\\\":\\\"string\\\",\\\"invoice_no\\\":\\\"string\\\",\\\"payment_amount\\\":\\\"string\\\",\\\"request_amount\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\",\\\"payer_mobile_no\\\":\\\"string\\\",\\\"payment_method\\\":\\\"string\\\",\\\"opt_a\\\":\\\"string\\\",\\\"opt_b\\\":\\\"string\\\",\\\"opt_c\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "get": {
        "description": "Browser-redirect variant of the PayStation callback. Same verification logic.",
        "operationId": "Payments_handlePayStationCallbackGet",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "PayStation callback (GET redirect)",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/payments/paystation/callback"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/paystation/callback';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/paystation/callback', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/paystation/callback\"\n\nresponse = requests.request(\"GET\", url)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/paystation/callback\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/paystation/callback\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/paystation/callback\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/paystation/confirm/{invoiceNumber}": {
      "get": {
        "description": "Forces a fresh server-side verification against PayStation /transaction-status, applies business rules, and returns normalized payment+order status.",
        "operationId": "Payments_confirmPayStationStatus",
        "parameters": [
          {
            "name": "invoiceNumber",
            "required": true,
            "in": "path",
            "description": "PayStation invoice number (same as internal transactionId)",
            "schema": {
              "example": "BDV-12345-1730000000000-abcdef12",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Confirm PayStation payment status by invoice number",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12\"\n\nresponse = requests.request(\"GET\", url)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/paystation/confirm/BDV-12345-1730000000000-abcdef12\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payments/bkash/callback": {
      "get": {
        "description": "bKash redirects users back here with `?status=success&paymentID=xxx`. We call /executePayment server-side and verify `transactionStatus === \"Completed\"`.",
        "operationId": "Payments_handleBkashCallback",
        "parameters": [
          {
            "name": "status",
            "required": true,
            "in": "query",
            "schema": {
              "enum": [
                "success",
                "cancel",
                "failure"
              ],
              "type": "string"
            }
          },
          {
            "name": "paymentID",
            "required": true,
            "in": "query",
            "description": "bKash paymentID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "bKash callback (GET redirect)",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/payments/bkash/callback?status=SOME_STRING_VALUE&paymentID=SOME_STRING_VALUE'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/bkash/callback?status=SOME_STRING_VALUE&paymentID=SOME_STRING_VALUE';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/bkash/callback?status=SOME_STRING_VALUE&paymentID=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/bkash/callback\"\n\nquerystring = {\"status\":\"SOME_STRING_VALUE\",\"paymentID\":\"SOME_STRING_VALUE\"}\n\nresponse = requests.request(\"GET\", url, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/bkash/callback?status=SOME_STRING_VALUE&paymentID=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/bkash/callback?status=SOME_STRING_VALUE&paymentID=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/bkash/callback?status=SOME_STRING_VALUE&paymentID=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "post": {
        "description": "Server-to-server IPN endpoint for bKash. Same execute + verify flow as the GET callback.",
        "operationId": "Payments_handleBkashCallbackPost",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BkashCallbackDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "bKash IPN callback (POST)",
        "tags": [
          "Payments"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/payments/bkash/callback \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"success\",\"paymentID\":\"TR0011aBcDeF12345\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payments/bkash/callback';\n\nlet options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"status\":\"success\",\"paymentID\":\"TR0011aBcDeF12345\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"status\":\"success\",\"paymentID\":\"TR0011aBcDeF12345\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/payments/bkash/callback', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payments/bkash/callback\"\n\npayload = {\n    \"status\": \"success\",\n    \"paymentID\": \"TR0011aBcDeF12345\"\n}\nheaders = {\"content-type\": \"application/json\"}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payments/bkash/callback\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"status\\\":\\\"success\\\",\\\"paymentID\\\":\\\"TR0011aBcDeF12345\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payments/bkash/callback\"\n\n\tpayload := strings.NewReader(\"{\\\"status\\\":\\\"success\\\",\\\"paymentID\\\":\\\"TR0011aBcDeF12345\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payments/bkash/callback\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"status\\\":\\\"success\\\",\\\"paymentID\\\":\\\"TR0011aBcDeF12345\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/vouchers": {
      "get": {
        "operationId": "Vouchers_getVoucherList",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "categoryId",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "brandId",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "partnerId",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "paymentChannelId",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List the user’s vouchers",
        "tags": [
          "Vouchers"
        ],
        "description": "`Vouchers` · List the user’s vouchers",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/vouchers?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&categoryId=SOME_NUMBER_VALUE&brandId=SOME_NUMBER_VALUE&partnerId=SOME_NUMBER_VALUE&paymentChannelId=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/vouchers?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&categoryId=SOME_NUMBER_VALUE&brandId=SOME_NUMBER_VALUE&partnerId=SOME_NUMBER_VALUE&paymentChannelId=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/vouchers?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&categoryId=SOME_NUMBER_VALUE&brandId=SOME_NUMBER_VALUE&partnerId=SOME_NUMBER_VALUE&paymentChannelId=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/vouchers\"\n\nquerystring = {\"search\":\"SOME_STRING_VALUE\",\"page\":\"SOME_NUMBER_VALUE\",\"limit\":\"SOME_NUMBER_VALUE\",\"categoryId\":\"SOME_NUMBER_VALUE\",\"brandId\":\"SOME_NUMBER_VALUE\",\"partnerId\":\"SOME_NUMBER_VALUE\",\"paymentChannelId\":\"SOME_NUMBER_VALUE\",\"sort\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/vouchers?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&categoryId=SOME_NUMBER_VALUE&brandId=SOME_NUMBER_VALUE&partnerId=SOME_NUMBER_VALUE&paymentChannelId=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/vouchers?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&categoryId=SOME_NUMBER_VALUE&brandId=SOME_NUMBER_VALUE&partnerId=SOME_NUMBER_VALUE&paymentChannelId=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/vouchers?search=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&categoryId=SOME_NUMBER_VALUE&brandId=SOME_NUMBER_VALUE&partnerId=SOME_NUMBER_VALUE&paymentChannelId=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/partners": {
      "get": {
        "operationId": "Partners_listPartners",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "default": "name.asc",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List partners",
        "tags": [
          "Partners"
        ],
        "description": "`Partners` · List partners",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/partners?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/partners?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/partners?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/partners\"\n\nquerystring = {\"page\":\"SOME_NUMBER_VALUE\",\"limit\":\"SOME_NUMBER_VALUE\",\"search\":\"SOME_STRING_VALUE\",\"status\":\"SOME_BOOLEAN_VALUE\",\"sort\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/partners?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/partners?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/partners?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&status=SOME_BOOLEAN_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/upload/single/{category}": {
      "post": {
        "operationId": "Upload_uploadSingle",
        "parameters": [
          {
            "name": "category",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Upload single file\nPOST /api/v1/upload/single/:category\n\nCategories: products, brands, users, documents\nAllowed types: jpg, jpeg, png, gif, pdf, doc, docx",
        "tags": [
          "Upload"
        ],
        "description": "`Upload` · Upload single file\nPOST /api/v1/upload/single/:category\n\nCategories: products, brands, users, documents\nAllowed types: jpg, jpeg, png, gif, pdf, doc, docx",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\",\"tags\":\"string\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\",\"tags\":\"string\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\",\"tags\":\"string\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D\"\n\npayload = {\n    \"category\": \"string\",\n    \"entityId\": \"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\n    \"description\": \"string\",\n    \"tags\": \"string\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\",\\\"tags\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D\"\n\n\tpayload := strings.NewReader(\"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\",\\\"tags\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/upload/single/%7Bcategory%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\",\\\"tags\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/upload/multiple/{category}": {
      "post": {
        "operationId": "Upload_uploadMultiple",
        "parameters": [
          {
            "name": "category",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUploadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Upload multiple files\nPOST /api/v1/upload/multiple/:category",
        "tags": [
          "Upload"
        ],
        "description": "`Upload` · Upload multiple files\nPOST /api/v1/upload/multiple/:category",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D\"\n\npayload = {\n    \"category\": \"string\",\n    \"entityId\": \"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\n    \"description\": \"string\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D\"\n\n\tpayload := strings.NewReader(\"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/upload/multiple/%7Bcategory%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/upload/info/{fileId}": {
      "get": {
        "operationId": "Upload_getFileInfo",
        "parameters": [
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get file info\nGET /api/v1/upload/info/:fileId",
        "tags": [
          "Upload"
        ],
        "description": "`Upload` · Get file info\nGET /api/v1/upload/info/:fileId",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/upload/info/%7BfileId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/upload/delete/{fileId}": {
      "post": {
        "operationId": "Upload_deleteFile",
        "parameters": [
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Delete file\nDELETE /api/v1/upload/:fileId",
        "tags": [
          "Upload"
        ],
        "description": "`Upload` · Delete file\nDELETE /api/v1/upload/:fileId",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/upload/delete/%7BfileId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/files/{category}/{subfolder}/list": {
      "get": {
        "operationId": "FileServing_listFolderFiles",
        "parameters": [
          {
            "name": "category",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfolder",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List files from a folder path (paginated)\nGET /api/v1/files/:category/:subfolder/list?page=1&limit=20&search=abc",
        "tags": [
          "File Serving"
        ],
        "description": "`File Serving` · List files from a folder path (paginated)\nGET /api/v1/files/:category/:subfolder/list?page=1&limit=20&search=abc",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&search=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&search=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&search=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list\"\n\nquerystring = {\"page\":\"SOME_STRING_VALUE\",\"limit\":\"SOME_STRING_VALUE\",\"search\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&search=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&search=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bsubfolder%7D/list?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&search=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/files/{category}/{entityId}/{filename}": {
      "get": {
        "operationId": "FileServing_serveFile",
        "parameters": [
          {
            "name": "category",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filename",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Serve uploaded files\nGET /api/v1/files/:category/:entityId/:filename",
        "tags": [
          "File Serving"
        ],
        "description": "`File Serving` · Serve uploaded files\nGET /api/v1/files/:category/:entityId/:filename",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7BentityId%7D/%7Bfilename%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/files/{category}/{filename}": {
      "get": {
        "operationId": "FileServing_serveFileSimple",
        "parameters": [
          {
            "name": "category",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filename",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Serve uploaded files without entity ID (direct category path)\nGET /api/v1/files/:category/:filename",
        "tags": [
          "File Serving"
        ],
        "description": "`File Serving` · Serve uploaded files without entity ID (direct category path)\nGET /api/v1/files/:category/:filename",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/files/%7Bcategory%7D/%7Bfilename%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/files/{filePath}": {
      "get": {
        "operationId": "FileServing_serveFileAlt",
        "parameters": [
          {
            "name": "filePath",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Serve files with alternative path structure\nGET /api/v1/files/*filePath",
        "tags": [
          "File Serving"
        ],
        "description": "`File Serving` · Serve files with alternative path structure\nGET /api/v1/files/*filePath",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/files/%7BfilePath%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/files/upload": {
      "post": {
        "operationId": "FilesUpload_uploadViaFilesRoute",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Compatibility endpoint for clients posting to /api/v1/files/upload\nAccepts file in memory, processes it directly.",
        "tags": [
          "Upload"
        ],
        "description": "`Files Upload` · Compatibility endpoint for clients posting to /api/v1/files/upload\nAccepts file in memory, processes it directly.",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/files/upload \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\",\"tags\":\"string\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/files/upload';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\",\"tags\":\"string\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"category\":\"string\",\"entityId\":\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\"description\":\"string\",\"tags\":\"string\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/files/upload', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/files/upload\"\n\npayload = {\n    \"category\": \"string\",\n    \"entityId\": \"156e622c-6cdf-4c27-9bc9-2f2db69919f5\",\n    \"description\": \"string\",\n    \"tags\": \"string\"\n}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/files/upload\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\",\\\"tags\\\":\\\"string\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/files/upload\"\n\n\tpayload := strings.NewReader(\"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\",\\\"tags\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/files/upload\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"category\\\":\\\"string\\\",\\\"entityId\\\":\\\"156e622c-6cdf-4c27-9bc9-2f2db69919f5\\\",\\\"description\\\":\\\"string\\\",\\\"tags\\\":\\\"string\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/faqs": {
      "get": {
        "operationId": "Faq_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "tags": [
          "Faq"
        ],
        "summary": "List",
        "description": "`Faq` · List",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/faqs \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/faqs';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/faqs', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/faqs\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/faqs\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/faqs\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/faqs\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/pages": {
      "get": {
        "operationId": "Pages_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "tags": [
          "Pages"
        ],
        "summary": "List",
        "description": "`Pages` · List",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/pages \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/pages';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/pages', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/pages\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/pages\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/pages\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/pages\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/pages/{slug}": {
      "get": {
        "operationId": "Pages_getBySlug",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "tags": [
          "Pages"
        ],
        "summary": "Get By Slug",
        "description": "`Pages` · Get By Slug",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/pages/%7Bslug%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/blogs": {
      "get": {
        "operationId": "Blog_list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "tags": [
          "Blog"
        ],
        "summary": "List",
        "description": "`Blog` · List",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/blogs?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/blogs?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/blogs?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/blogs\"\n\nquerystring = {\"page\":\"SOME_STRING_VALUE\",\"limit\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/blogs?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/blogs?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/blogs?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/blogs/{slug}": {
      "get": {
        "operationId": "Blog_getBySlug",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "tags": [
          "Blog"
        ],
        "summary": "Get By Slug",
        "description": "`Blog` · Get By Slug",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/blogs/%7Bslug%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/wishlist": {
      "post": {
        "operationId": "Wishlist_add",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddWishlistDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Add a product to the wishlist",
        "tags": [
          "Wishlist"
        ],
        "description": "`Wishlist` · Add a product to the wishlist",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/wishlist \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"product_id\":0}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/wishlist';\n\nlet options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"product_id\":0}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: '{\"product_id\":0}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/wishlist', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/wishlist\"\n\npayload = {\"product_id\": 0}\nheaders = {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/wishlist\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"product_id\\\":0}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/wishlist\"\n\n\tpayload := strings.NewReader(\"{\\\"product_id\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/wishlist\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"product_id\\\":0}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      },
      "get": {
        "operationId": "Wishlist_list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List wishlist items",
        "tags": [
          "Wishlist"
        ],
        "description": "`Wishlist` · List wishlist items",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/wishlist?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/wishlist?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/wishlist?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/wishlist\"\n\nquerystring = {\"page\":\"SOME_STRING_VALUE\",\"limit\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/wishlist?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/wishlist?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/wishlist?page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/wishlist/{productId}": {
      "delete": {
        "operationId": "Wishlist_remove",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Remove a product from the wishlist",
        "tags": [
          "Wishlist"
        ],
        "description": "`Wishlist` · Remove a product from the wishlist",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request DELETE \\\n  --url https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D';\n\nlet options = {method: 'DELETE', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'DELETE', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/wishlist/%7BproductId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/wishlist/check/{productId}": {
      "get": {
        "operationId": "Wishlist_check",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Check whether a product is in the wishlist",
        "tags": [
          "Wishlist"
        ],
        "description": "`Wishlist` · Check whether a product is in the wishlist",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/wishlist/check/%7BproductId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/balance": {
      "get": {
        "operationId": "Zendit_getBalance",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get Zendit account balance",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get Zendit account balance",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/balance \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/balance';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/balance', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/balance\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/balance\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/balance\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/balance\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/brands": {
      "get": {
        "operationId": "Zendit_getBrands",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List Zendit brands",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · List Zendit brands",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/zendit/brands?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&country=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/brands?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&country=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/brands?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&country=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/brands\"\n\nquerystring = {\"limit\":\"SOME_STRING_VALUE\",\"offset\":\"SOME_STRING_VALUE\",\"country\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/brands?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&country=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/brands?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&country=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/brands?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&country=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/vouchers/offers": {
      "get": {
        "operationId": "Zendit_getVoucherOffers",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regions",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List Zendit voucher offers",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · List Zendit voucher offers",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/zendit/vouchers/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/vouchers/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/vouchers/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers\"\n\nquerystring = {\"limit\":\"SOME_STRING_VALUE\",\"offset\":\"SOME_STRING_VALUE\",\"brand\":\"SOME_STRING_VALUE\",\"country\":\"SOME_STRING_VALUE\",\"subType\":\"SOME_STRING_VALUE\",\"regions\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/vouchers/offers/{offerId}": {
      "get": {
        "operationId": "Zendit_getVoucherOffer",
        "parameters": [
          {
            "name": "offerId",
            "required": true,
            "in": "path",
            "schema": {
              "example": "NETFLIX_US_20_WHS",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a single Zendit voucher offer (with requiredFields)",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a single Zendit voucher offer (with requiredFields)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/vouchers/offers/NETFLIX_US_20_WHS\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/vouchers/purchases": {
      "get": {
        "operationId": "Zendit_listVoucherPurchases",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdAt",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List Zendit voucher purchases",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · List Zendit voucher purchases",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases\"\n\nquerystring = {\"limit\":\"SOME_STRING_VALUE\",\"offset\":\"SOME_STRING_VALUE\",\"status\":\"SOME_STRING_VALUE\",\"createdAt\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/vouchers/purchases/{transactionId}": {
      "get": {
        "operationId": "Zendit_getVoucherPurchase",
        "parameters": [
          {
            "name": "transactionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a Zendit voucher purchase by transactionId",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a Zendit voucher purchase by transactionId",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/vouchers/purchases/%7BtransactionId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/topups/offers": {
      "get": {
        "operationId": "Zendit_getTopupOffers",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regions",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List Zendit topup offers",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · List Zendit topup offers",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/zendit/topups/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/topups/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/topups/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/topups/offers\"\n\nquerystring = {\"limit\":\"SOME_STRING_VALUE\",\"offset\":\"SOME_STRING_VALUE\",\"brand\":\"SOME_STRING_VALUE\",\"country\":\"SOME_STRING_VALUE\",\"subType\":\"SOME_STRING_VALUE\",\"regions\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/topups/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/topups/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/topups/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/topups/offers/{offerId}": {
      "get": {
        "operationId": "Zendit_getTopupOffer",
        "parameters": [
          {
            "name": "offerId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a single Zendit topup offer",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a single Zendit topup offer",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/topups/offers/%7BofferId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/topups/purchases/{transactionId}": {
      "get": {
        "operationId": "Zendit_getTopupPurchase",
        "parameters": [
          {
            "name": "transactionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a Zendit topup purchase by transactionId",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a Zendit topup purchase by transactionId",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/topups/purchases/%7BtransactionId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/esim/offers": {
      "get": {
        "operationId": "Zendit_getEsimOffers",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regions",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List Zendit eSIM offers",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · List Zendit eSIM offers",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/zendit/esim/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/esim/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/esim/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/esim/offers\"\n\nquerystring = {\"limit\":\"SOME_STRING_VALUE\",\"offset\":\"SOME_STRING_VALUE\",\"brand\":\"SOME_STRING_VALUE\",\"country\":\"SOME_STRING_VALUE\",\"subType\":\"SOME_STRING_VALUE\",\"regions\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/esim/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/esim/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/esim/offers?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&brand=SOME_STRING_VALUE&country=SOME_STRING_VALUE&subType=SOME_STRING_VALUE&regions=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/esim/offers/{offerId}": {
      "get": {
        "operationId": "Zendit_getEsimOffer",
        "parameters": [
          {
            "name": "offerId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a single Zendit eSIM offer",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a single Zendit eSIM offer",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/esim/offers/%7BofferId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/esim/purchases/{transactionId}": {
      "get": {
        "operationId": "Zendit_getEsimPurchase",
        "parameters": [
          {
            "name": "transactionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a Zendit eSIM purchase by transactionId",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a Zendit eSIM purchase by transactionId",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/esim/purchases/%7BtransactionId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/transactions": {
      "get": {
        "operationId": "Zendit_getTransactions",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdAt",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List all Zendit transactions",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · List all Zendit transactions",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/zendit/transactions?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&productType=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/transactions?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&productType=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/transactions?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&productType=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/transactions\"\n\nquerystring = {\"limit\":\"SOME_STRING_VALUE\",\"offset\":\"SOME_STRING_VALUE\",\"status\":\"SOME_STRING_VALUE\",\"productType\":\"SOME_STRING_VALUE\",\"createdAt\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/transactions?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&productType=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/transactions?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&productType=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/transactions?limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE&status=SOME_STRING_VALUE&productType=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/transactions/{transactionId}": {
      "get": {
        "operationId": "Zendit_getTransaction",
        "parameters": [
          {
            "name": "transactionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a single Zendit transaction",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Get a single Zendit transaction",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/transactions/%7BtransactionId%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/import/vouchers": {
      "post": {
        "operationId": "Zendit_importVoucherOffers",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Import voucher offers from Zendit",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Import voucher offers from Zendit",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/import/vouchers \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/import/vouchers';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/import/vouchers', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/import/vouchers\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/import/vouchers\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/import/vouchers\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/import/vouchers\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/import/topups": {
      "post": {
        "operationId": "Zendit_importTopupOffers",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Import topup offers from Zendit",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Import topup offers from Zendit",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/import/topups \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/import/topups';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/import/topups', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/import/topups\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/import/topups\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/import/topups\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/import/topups\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/import/esim": {
      "post": {
        "operationId": "Zendit_importEsimOffers",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Import eSIM offers from Zendit",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Import eSIM offers from Zendit",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/import/esim \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/import/esim';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/import/esim', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/import/esim\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/import/esim\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/import/esim\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/import/esim\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/import/all": {
      "post": {
        "operationId": "Zendit_importAllOffers",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Import all Zendit offers (vouchers + topups + eSIM)",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Import all Zendit offers (vouchers + topups + eSIM)",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/import/all \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/import/all';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/import/all', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/import/all\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/import/all\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/import/all\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/import/all\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/sync/prices": {
      "post": {
        "operationId": "Zendit_syncPrices",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Resync product prices from Zendit",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Resync product prices from Zendit",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/sync/prices \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/sync/prices';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/sync/prices', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/sync/prices\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/sync/prices\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/sync/prices\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/sync/prices\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/import/from-csv": {
      "post": {
        "operationId": "Zendit_importFromCsv",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Import Zendit offers from a CSV catalog",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Import Zendit offers from a CSV catalog",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/import/from-csv \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/import/from-csv';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/import/from-csv', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/import/from-csv\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/import/from-csv\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/import/from-csv\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/import/from-csv\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/zendit/import/filtered-vouchers": {
      "post": {
        "operationId": "Zendit_importFilteredVouchers",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Import Zendit voucher offers matching filters",
        "tags": [
          "Zendit"
        ],
        "description": "`Zendit` · Import Zendit voucher offers matching filters",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers';\n\nlet options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'POST', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"POST\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/zendit/import/filtered-vouchers\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/homepage": {
      "get": {
        "operationId": "Homepage_getHomepageLayout",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get the complete homepage layout\nThis is the main endpoint for the frontend to fetch all homepage data",
        "tags": [
          "Homepage"
        ],
        "description": "`Homepage` · Get the complete homepage layout\nThis is the main endpoint for the frontend to fetch all homepage data",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/homepage \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/homepage';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/homepage', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/homepage\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/homepage\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/homepage\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/homepage\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/homepage/banners": {
      "get": {
        "operationId": "Homepage_getBanners",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get only banners",
        "tags": [
          "Homepage"
        ],
        "description": "`Homepage` · Get only banners",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/homepage/banners \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/homepage/banners';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/homepage/banners', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/homepage/banners\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/homepage/banners\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/homepage/banners\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/homepage/banners\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/homepage/sections/{id}": {
      "get": {
        "operationId": "Homepage_getSection",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get a specific section by ID",
        "tags": [
          "Homepage"
        ],
        "description": "`Homepage` · Get a specific section by ID",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/homepage/sections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/homepage/settings": {
      "get": {
        "operationId": "Homepage_getSettings",
        "parameters": [
          {
            "name": "group",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get site settings",
        "tags": [
          "Homepage"
        ],
        "description": "`Homepage` · Get site settings",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/homepage/settings?group=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/homepage/settings?group=SOME_STRING_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/homepage/settings?group=SOME_STRING_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/homepage/settings\"\n\nquerystring = {\"group\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/homepage/settings?group=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/homepage/settings?group=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/homepage/settings?group=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/payment-methods": {
      "get": {
        "description": "Public list of payment gateways. Returns **active** methods only (`status = true`) unless `?includeInactive=true` is passed. Default order is admin-curated: `sort_order ASC, id ASC` (drag-reorder via `PATCH /admin/payment-methods/reorder`).",
        "operationId": "PaymentMethods_list",
        "parameters": [
          {
            "name": "includeInactive",
            "required": false,
            "in": "query",
            "description": "When `true`, also returns disabled methods (`status = false`). Defaults to `false`.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "List payment methods",
        "tags": [
          "Payment Methods"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url 'https://api.bdvoucher.com/api/v1/payment-methods?includeInactive=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/payment-methods?includeInactive=SOME_BOOLEAN_VALUE';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/payment-methods?includeInactive=SOME_BOOLEAN_VALUE', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/payment-methods\"\n\nquerystring = {\"includeInactive\":\"SOME_BOOLEAN_VALUE\"}\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/payment-methods?includeInactive=SOME_BOOLEAN_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/payment-methods?includeInactive=SOME_BOOLEAN_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/payment-methods?includeInactive=SOME_BOOLEAN_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/inventory/variants/{id}/stock": {
      "get": {
        "description": "Returns the current stock envelope — in_stock, status (in_stock|low_stock|out_of_stock|unlimited|untracked), level, and the low-stock threshold. Safe to poll.",
        "operationId": "InventoryPublic_variantStock",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "example": 42,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stock envelope",
            "content": {
              "application/json": {
                "schema": {
                  "example": {
                    "success": true,
                    "message": "OK",
                    "data": {
                      "variant_id": 42,
                      "in_stock": true,
                      "status": "low_stock",
                      "level": 3,
                      "low_stock": true,
                      "low_stock_threshold": 5,
                      "source": "preloaded"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Get live stock status for a variant",
        "tags": [
          "Stock"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/inventory/variants/42/stock \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/inventory/variants/42/stock';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/inventory/variants/42/stock', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/inventory/variants/42/stock\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/inventory/variants/42/stock\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/inventory/variants/42/stock\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/inventory/variants/42/stock\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/redemption/lookup/{code}": {
      "get": {
        "description": "Returns campaign info + required fields without consuming the code. Used by the storefront `/redeem/:code` landing page on mount.\n\nResponse `data` shape (status `available`):\n- `campaign`: `{ id, name, slug, headline, description, cta_text, product }`\n- `brand`: `{ id, name, slug, thumbnail }` or `null` — the platform this voucher is for (e.g. Netflix, Spotify). Resolved as code-level brand override → campaign default brand → null.\n- `requires`: `{ phone: true, email: false }` (the redeem endpoint always requires phone, email is always optional).",
        "operationId": "Redemption_lookup",
        "parameters": [
          {
            "name": "code",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Look up a redemption code",
        "tags": [
          "Redemption"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D';\n\nlet options = {method: 'GET'};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET'};\n\nfetch('https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D\"\n\nresponse = requests.request(\"GET\", url)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/redemption/lookup/%7Bcode%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/redemption/redeem": {
      "post": {
        "description": "Atomic. Marks the code as redeemed and returns the actual voucher code + redemption instructions. Subsequent attempts get HTTP 410.\n\nResponse `data` shape (status `redeemed`):\n- `campaign`: same shape as the lookup response\n- `brand`: `{ id, name, slug, thumbnail }` or `null` — the platform this voucher is for\n- `voucher_code`: the real voucher string the customer should redeem on the platform\n- `instructions`: per-code override or the campaign default instruction template",
        "operationId": "Redemption_redeem",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "summary": "Consume a redemption code and reveal the voucher",
        "tags": [
          "Redemption"
        ],
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  --url https://api.bdvoucher.com/api/v1/redemption/redeem \\\n  --header 'content-type: application/json' \\\n  --data '{\"code\":\"AJHSXJAHS\",\"phone\":\"+8801712345678\",\"email\":\"user@example.com\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/redemption/redeem';\n\nlet options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"code\":\"AJHSXJAHS\",\"phone\":\"+8801712345678\",\"email\":\"user@example.com\"}'\n};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {\n  method: 'POST',\n  headers: {'content-type': 'application/json'},\n  body: '{\"code\":\"AJHSXJAHS\",\"phone\":\"+8801712345678\",\"email\":\"user@example.com\"}'\n};\n\nfetch('https://api.bdvoucher.com/api/v1/redemption/redeem', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/redemption/redeem\"\n\npayload = {\n    \"code\": \"AJHSXJAHS\",\n    \"phone\": \"+8801712345678\",\n    \"email\": \"user@example.com\"\n}\nheaders = {\"content-type\": \"application/json\"}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/redemption/redeem\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"code\\\":\\\"AJHSXJAHS\\\",\\\"phone\\\":\\\"+8801712345678\\\",\\\"email\\\":\\\"user@example.com\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/redemption/redeem\"\n\n\tpayload := strings.NewReader(\"{\\\"code\\\":\\\"AJHSXJAHS\\\",\\\"phone\\\":\\\"+8801712345678\\\",\\\"email\\\":\\\"user@example.com\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/redemption/redeem\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"code\\\":\\\"AJHSXJAHS\\\",\\\"phone\\\":\\\"+8801712345678\\\",\\\"email\\\":\\\"user@example.com\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/discounts/validate": {
      "get": {
        "description": "Returns the computed discount amount for a given code + subtotal. Does NOT consume the code — `used_count` is only incremented when an order is created with the code.",
        "operationId": "Discounts_validate",
        "parameters": [
          {
            "name": "code",
            "required": true,
            "in": "query",
            "schema": {
              "example": "SAVE20",
              "type": "string"
            }
          },
          {
            "name": "subtotal",
            "required": true,
            "in": "query",
            "description": "Cart subtotal in BDT (before discount).",
            "schema": {
              "example": 500,
              "type": "number"
            }
          },
          {
            "name": "variant_ids",
            "required": false,
            "in": "query",
            "description": "Comma-separated `product_variants.id` values the customer is buying. When supplied alongside a brand/category-restricted code, the endpoint enforces eligibility (at least one item must match an allowed brand or category) so the storefront can show the mismatch before checkout.",
            "schema": {
              "example": "12,15",
              "type": "string"
            }
          },
          {
            "name": "payment_method",
            "required": false,
            "in": "query",
            "description": "Payment gateway the customer plans to use. When supplied, the endpoint enforces `allowed_payment_methods` so the customer sees the gateway mismatch error before checkout instead of at order-create time.",
            "schema": {
              "example": "bkash",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Discount is valid — returns the computed discount amount.",
            "content": {
              "application/json": {
                "schema": {
                  "example": {
                    "success": true,
                    "data": {
                      "code": "SAVE20",
                      "discount_type": "percentage",
                      "discount_value": 20,
                      "discount_amount": 100,
                      "final_total": 400,
                      "description": "20% off your order",
                      "allowed_payment_methods": [
                        "bkash",
                        "sslcommerz"
                      ],
                      "per_user_limit": 3,
                      "user_used_count": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid, expired, limit-reached, channel-restricted, or per-user-cap-reached code."
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Validate a discount code",
        "tags": [
          "Discounts"
        ]
      }
    },
    "/health": {
      "get": {
        "operationId": "Health_getHealth",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Basic health check - just confirms the service is running\nUse for: Load balancer health checks, basic uptime monitoring",
        "tags": [
          "Health"
        ],
        "description": "`Health` · Basic health check - just confirms the service is running\nUse for: Load balancer health checks, basic uptime monitoring",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/health \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/health';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/health', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/health\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/health\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/health\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/health\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/health/ready": {
      "get": {
        "operationId": "Health_getReadiness",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Readiness check - confirms all dependencies are ready\nUse for: Kubernetes readiness probe, deployment verification",
        "tags": [
          "Health"
        ],
        "description": "`Health` · Readiness check - confirms all dependencies are ready\nUse for: Kubernetes readiness probe, deployment verification",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/health/ready \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/health/ready';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/health/ready', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/health/ready\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/health/ready\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/health/ready\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/health/ready\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/health/live": {
      "get": {
        "operationId": "Health_getLiveness",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Liveness check - confirms the service is alive and not deadlocked\nUse for: Kubernetes liveness probe",
        "tags": [
          "Health"
        ],
        "description": "`Health` · Liveness check - confirms the service is alive and not deadlocked\nUse for: Kubernetes liveness probe",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/health/live \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/health/live';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/health/live', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/health/live\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/health/live\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/health/live\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/health/live\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/health/verify": {
      "get": {
        "operationId": "Health_verifyDeployment",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Comprehensive deployment verification - full system check with stats\nUse for: DevOps deployment verification, CI/CD pipeline checks",
        "tags": [
          "Health"
        ],
        "description": "`Health` · Comprehensive deployment verification - full system check with stats\nUse for: DevOps deployment verification, CI/CD pipeline checks",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/health/verify \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/health/verify';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/health/verify', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/health/verify\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/health/verify\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/health/verify\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/health/verify\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    },
    "/health/startup": {
      "get": {
        "operationId": "Health_getStartup",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "bearer-client": []
          }
        ],
        "summary": "Startup check - checks if the service has completed startup\nUse for: Kubernetes startup probe",
        "tags": [
          "Health"
        ],
        "description": "`Health` · Startup check - checks if the service has completed startup\nUse for: Kubernetes startup probe",
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  --url https://api.bdvoucher.com/api/v1/health/startup \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "javascript",
            "label": "Node.js (fetch)",
            "source": "const fetch = require('node-fetch');\n\nlet url = 'https://api.bdvoucher.com/api/v1/health/startup';\n\nlet options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));"
          },
          {
            "lang": "javascript",
            "label": "Browser (fetch)",
            "source": "const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};\n\nfetch('https://api.bdvoucher.com/api/v1/health/startup', options)\n  .then(response => response.json())\n  .then(response => console.log(response))\n  .catch(err => console.error(err));"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import requests\n\nurl = \"https://api.bdvoucher.com/api/v1/health/startup\"\n\nheaders = {\"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"
          },
          {
            "lang": "php",
            "label": "PHP (cURL)",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.bdvoucher.com/api/v1/health/startup\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "go",
            "label": "Go",
            "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.bdvoucher.com/api/v1/health/startup\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.bdvoucher.com/api/v1/health/startup\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    }
  },
  "info": {
    "title": "BD Voucher Client API",
    "description": "# BD Voucher — **Client API**\n\nPublic and authenticated endpoints exposed to the storefront and mobile apps.\n\nWelcome to the **BD Voucher API** — a production-grade voucher & gift-card commerce platform.\n\n## 🔐 Authentication\nAll protected endpoints use **Bearer JWT**. Obtain a token, then click the 🔒 **Authorize** button on this page, or send it yourself:\n```\nAuthorization: Bearer <token>\n```\n\n| Surface | Login endpoint | Scheme |\n|---|---|---|\n| Client (end users) | `POST /auth/sign-in` | `bearer-client` |\n| Admin panel | `POST /admin/auth/login` | `bearer-admin` |\n\n## 📦 Response envelope\nAll JSON responses share this shape:\n```json\n{\n  \"success\": true,\n  \"message\": \"…\",\n  \"data\": { },\n  \"errorCode\": null,\n  \"meta\": { \"pagination\": { \"total\": 0, \"page\": 1, \"limit\": 20 } }\n}\n```\n\n## ⚡ Versioning\nThe API is served under the `/api/v1` prefix. Legacy `/api/v2/…` URLs are transparently rewritten to v1.\n\n## 📄 Related documents\n- Postman collection: `postman/BD-Voucher-API.postman_collection.json`\n- API testing & CI: `docs/API_TESTING_CI.md`\n\n---",
    "version": "0.0.1",
    "contact": {
      "name": "BD Voucher Ltd.",
      "url": "https://bdvoucher.com",
      "email": "developers@bdvoucher.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://bdvoucher.com/terms"
    },
    "termsOfService": "https://bdvoucher.com/terms",
    "x-logo": {
      "url": "https://bdvoucher.com/static/brand/logo-redoc.png",
      "altText": "BD Voucher Logo",
      "backgroundColor": "#0b1020"
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "Auth endpoints",
      "x-displayName": "Auth"
    },
    {
      "name": "Blog",
      "description": "Blog endpoints",
      "x-displayName": "Blog"
    },
    {
      "name": "Catalog",
      "description": "Catalog endpoints",
      "x-displayName": "Catalog"
    },
    {
      "name": "Discounts",
      "description": "Discounts endpoints",
      "x-displayName": "Discounts"
    },
    {
      "name": "Faq",
      "description": "Faq endpoints",
      "x-displayName": "Faq"
    },
    {
      "name": "File Serving",
      "description": "File Serving endpoints",
      "x-displayName": "File Serving"
    },
    {
      "name": "Health",
      "description": "Health endpoints",
      "x-displayName": "Health"
    },
    {
      "name": "Homepage",
      "description": "Homepage endpoints",
      "x-displayName": "Homepage"
    },
    {
      "name": "Orders",
      "description": "Orders endpoints",
      "x-displayName": "Orders"
    },
    {
      "name": "Pages",
      "description": "Pages endpoints",
      "x-displayName": "Pages"
    },
    {
      "name": "Partners",
      "description": "Partners endpoints",
      "x-displayName": "Partners"
    },
    {
      "name": "Payment Methods",
      "description": "Payment Methods endpoints",
      "x-displayName": "Payment Methods"
    },
    {
      "name": "Payments",
      "description": "Payments endpoints",
      "x-displayName": "Payments"
    },
    {
      "name": "Products",
      "description": "Products endpoints",
      "x-displayName": "Products"
    },
    {
      "name": "Redemption",
      "description": "Redemption endpoints",
      "x-displayName": "Redemption"
    },
    {
      "name": "Stock",
      "description": "Stock endpoints",
      "x-displayName": "Stock"
    },
    {
      "name": "Upload",
      "description": "Upload endpoints",
      "x-displayName": "Upload"
    },
    {
      "name": "User",
      "description": "User endpoints",
      "x-displayName": "User"
    },
    {
      "name": "Vouchers",
      "description": "Vouchers endpoints",
      "x-displayName": "Vouchers"
    },
    {
      "name": "Wishlist",
      "description": "Wishlist endpoints",
      "x-displayName": "Wishlist"
    },
    {
      "name": "Zendit",
      "description": "Zendit endpoints",
      "x-displayName": "Zendit"
    }
  ],
  "servers": [
    {
      "url": "https://api.bdvoucher.com/api/v1",
      "description": "Local"
    },
    {
      "url": "http://localhost:3000/api/v1",
      "description": "Local"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer-client": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http",
        "in": "header",
        "description": "Client JWT obtained from `POST /auth/sign-in`."
      }
    },
    "schemas": {
      "UserExistRequestDto": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "minLength": 10,
            "maxLength": 16,
            "example": "8801712345678",
            "description": "Bangladeshi mobile number. Accepted formats: 01XXXXXXXXX, 8801XXXXXXXXX, +8801XXXXXXXXX."
          }
        },
        "required": [
          "msisdn"
        ]
      },
      "LoginBodyDto": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "minLength": 10,
            "maxLength": 16,
            "example": "8801712345678",
            "description": "Bangladeshi mobile number. Accepted formats: 01XXXXXXXXX, 8801XXXXXXXXX, +8801XXXXXXXXX."
          },
          "password": {
            "type": "string",
            "example": "••••••••",
            "description": "Account password."
          }
        },
        "required": [
          "msisdn",
          "password"
        ]
      },
      "forgotPasswordBodyDto": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "minLength": 10,
            "maxLength": 16,
            "example": "8801712345678",
            "description": "Bangladeshi mobile number. Accepted formats: 01XXXXXXXXX, 8801XXXXXXXXX, +8801XXXXXXXXX."
          }
        },
        "required": [
          "msisdn"
        ]
      },
      "VerifyOtpBodyDto": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "minLength": 10,
            "maxLength": 16,
            "example": "8801712345678",
            "description": "Bangladeshi mobile number. Accepted formats: 01XXXXXXXXX, 8801XXXXXXXXX, +8801XXXXXXXXX."
          },
          "otpCode": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4,
            "pattern": "^\\d{4}$",
            "example": "1234",
            "description": "The 4-digit OTP code sent to the mobile number."
          }
        },
        "required": [
          "msisdn",
          "otpCode"
        ]
      },
      "RegisterUserDto": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "pattern": "^(8801|01)[0-9]{9}$",
            "example": "8801712345678",
            "description": "Bangladeshi mobile number. Accepted formats: 01XXXXXXXXX or 8801XXXXXXXXX."
          },
          "otp_code": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4,
            "pattern": "^\\d{4}$",
            "example": "1234",
            "description": "4-digit OTP code received via SMS."
          }
        },
        "required": [
          "msisdn",
          "otp_code"
        ]
      },
      "UpdateUserDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "John Doe",
            "description": "Full display name."
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "john@example.com",
            "description": "Optional email address."
          },
          "password": {
            "type": "string",
            "minLength": 4,
            "example": "••••••••",
            "description": "New password (minimum 4 characters). Omit to leave unchanged."
          },
          "image": {
            "type": "string",
            "example": "https://cdn.example.com/avatar.jpg",
            "description": "Profile image URL."
          }
        },
        "required": [
          "name"
        ]
      },
      "ChangePasswordDto": {
        "type": "object",
        "properties": {
          "msisdn": {
            "type": "string",
            "minLength": 10,
            "maxLength": 16,
            "example": "8801712345678",
            "description": "Optional Bangladeshi mobile number for additional verification."
          },
          "old_password": {
            "type": "string",
            "example": "••••••••",
            "description": "Current (old) password."
          },
          "new_password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128,
            "example": "••••••••••",
            "description": "New password. Minimum 8 characters."
          }
        },
        "required": [
          "old_password",
          "new_password"
        ]
      },
      "ResetPasswordDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "reset"
            ],
            "example": "reset",
            "description": "Must be the literal string `reset`."
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128,
            "example": "••••••••",
            "description": "New password. Minimum 8 characters."
          }
        },
        "required": [
          "type",
          "password"
        ]
      },
      "Object": {
        "type": "object",
        "properties": {}
      },
      "OrderItemDto": {
        "type": "object",
        "properties": {
          "variant_id": {
            "type": "number",
            "minimum": 1,
            "example": 22406,
            "description": "Product variant ID."
          },
          "quantity": {
            "type": "number",
            "minimum": 1,
            "example": 1
          },
          "voucher_id": {
            "type": "number",
            "example": 77
          },
          "fulfillment_input": {
            "type": "object",
            "description": "Flat key-value map of checkout inputs required by this product. Keys come from `GET /orders/fulfillment-fields/:variantId` (or from `fulfillment_input.fields[]` on the product response). Values are always strings; numbers are silently coerced (e.g. `\"uid\": 1234` → `\"uid\": \"1234\"`). Each product accepts exactly **one** recipient identifier (`email` | `player_id` | `account_id` | `uid`) plus any number of supporting fields (`zone_id`, `region`, `phone`, …). Sending two identifier keys at once (e.g. both `email` and `uid`) returns **400**. When the product's identifier is `email` you may omit this field entirely and set the top-level `recipient_email` instead.",
            "example": {
              "player_id": "123456789",
              "zone_id": "301"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "variant_id",
          "quantity"
        ]
      },
      "CreateOrderDto": {
        "type": "object",
        "properties": {
          "variantId": {
            "type": "number",
            "minimum": 1,
            "description": "Shorthand: single-item order. Equivalent to `items[0].variant_id`.",
            "example": 22406
          },
          "quantity": {
            "type": "number",
            "minimum": 1,
            "description": "Shorthand: quantity for single-item shorthand.",
            "example": 1
          },
          "items": {
            "description": "Order line items. Each item must carry the `fulfillment_input` fields required by its product (see `GET /orders/fulfillment-fields/:variantId`).",
            "example": [
              {
                "variant_id": 22406,
                "quantity": 1,
                "fulfillment_input": {
                  "email": "buyer@example.com"
                }
              }
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemDto"
            }
          },
          "campaign_tag": {
            "type": "string",
            "example": "PROMO2026"
          },
          "discount_code": {
            "type": "string",
            "example": "SAVE20",
            "description": "Optional discount code to apply to this order. Validated against the `discounts` table at checkout time. The discount amount (computed from discount_type + discount_value) is deducted from the subtotal and stored on the order for reporting. Returns 400 if the code is inactive, expired, past its usage limit, or if the subtotal is below min_purchase."
          },
          "payment_method": {
            "type": "string",
            "enum": [
              "dcb",
              "bkash",
              "sslcommerz",
              "nagad",
              "paystation"
            ],
            "example": "bkash",
            "description": "Payment gateway. One of: dcb, bkash, sslcommerz, nagad, paystation."
          },
          "init_payment": {
            "type": "boolean",
            "default": true
          },
          "recipient_email": {
            "type": "string",
            "format": "email",
            "example": "buyer@example.com",
            "description": "Convenience shorthand for email-type products. When the requested variant's identifier field is `email`, the API copies this value into `items[n].fulfillment_input.email` automatically, so you can omit `fulfillment_input` entirely for email products."
          }
        },
        "required": [
          "items",
          "payment_method"
        ]
      },
      "UpdateOrderStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "New order status.",
            "enum": [
              "INITIATED",
              "PENDING",
              "CARRIER_AUTHORIZED",
              "SUCCEEDED",
              "FAILED",
              "CANCELLED",
              "NEEDS_ATTENTION"
            ],
            "example": "SUCCEEDED"
          }
        },
        "required": [
          "status"
        ]
      },
      "InitiatePaymentDto": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "number",
            "minimum": 1,
            "description": "Order ID (required when not passed in URL path)",
            "example": 12345
          },
          "amount": {
            "type": "number",
            "minimum": 1,
            "description": "Amount to charge",
            "example": 500
          },
          "currency": {
            "type": "string",
            "default": "BDT",
            "description": "ISO currency code",
            "example": "BDT"
          },
          "method": {
            "type": "string",
            "enum": [
              "sslcommerz",
              "bkash",
              "paystation",
              "dcb",
              "nagad"
            ],
            "description": "Payment method to use. One of: `sslcommerz` (cards/banks/MFS), `bkash` (Tokenized Checkout), `paystation` (multi-MFS gateway), `dcb` (direct carrier billing), `nagad`.",
            "example": "bkash"
          },
          "description": {
            "type": "string",
            "description": "Free-form product/order description",
            "example": "Order #12345"
          }
        },
        "required": [
          "amount",
          "method"
        ]
      },
      "SSLCommerzCallbackDto": {
        "type": "object",
        "properties": {
          "tran_id": {
            "type": "string",
            "description": "Internal transaction id originally passed as tran_id",
            "example": "BDV-12345-1730000000000-abcdef12"
          },
          "status": {
            "type": "string",
            "description": "Gateway status. Common values: VALID, VALIDATED, FAILED, CANCELLED",
            "example": "VALID"
          },
          "val_id": {
            "type": "string",
            "description": "Validation id used to fetch the validated transaction"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "card_type": {
            "type": "string"
          },
          "bank_tran_id": {
            "type": "string"
          },
          "sessionkey": {
            "type": "string"
          },
          "verify_sign": {
            "type": "string"
          },
          "verify_sign_sha2": {
            "type": "string"
          },
          "verify_key": {
            "type": "string"
          },
          "tran_date": {
            "type": "string"
          },
          "store_amount": {
            "type": "string"
          },
          "card_no": {
            "type": "string"
          },
          "card_issuer": {
            "type": "string"
          },
          "card_brand": {
            "type": "string"
          },
          "card_issuer_country": {
            "type": "string"
          },
          "card_issuer_country_code": {
            "type": "string"
          },
          "currency_type": {
            "type": "string"
          },
          "currency_amount": {
            "type": "string"
          },
          "currency_rate": {
            "type": "string"
          },
          "base_fair": {
            "type": "string"
          },
          "value_a": {
            "type": "string"
          },
          "value_b": {
            "type": "string"
          },
          "value_c": {
            "type": "string"
          },
          "value_d": {
            "type": "string"
          },
          "risk_level": {
            "type": "string"
          },
          "risk_title": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "tran_id",
          "status"
        ]
      },
      "PayStationCallbackDto": {
        "type": "object",
        "properties": {
          "invoice_number": {
            "type": "string",
            "description": "Internal invoice number originally passed to /initiate-payment",
            "example": "BDV-12345-1730000000000-abcdef12"
          },
          "trx_id": {
            "type": "string",
            "description": "PayStation's own transaction reference"
          },
          "trx_status": {
            "type": "string",
            "description": "PayStation gateway-level status",
            "enum": [
              "processing",
              "successful",
              "failed",
              "cancelled"
            ]
          },
          "status": {
            "type": "string"
          },
          "tran_id": {
            "type": "string"
          },
          "invoice_no": {
            "type": "string"
          },
          "payment_amount": {
            "type": "string"
          },
          "request_amount": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "payer_mobile_no": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "opt_a": {
            "type": "string"
          },
          "opt_b": {
            "type": "string"
          },
          "opt_c": {
            "type": "string"
          }
        }
      },
      "BkashCallbackDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "bKash callback status. `success` triggers executePayment; `cancel` / `failure` mark the payment FAILED.",
            "enum": [
              "success",
              "cancel",
              "failure"
            ],
            "example": "success"
          },
          "paymentID": {
            "type": "string",
            "description": "bKash paymentID returned by /createPayment. Required to execute or query the payment.",
            "example": "TR0011aBcDeF12345"
          }
        },
        "required": [
          "status",
          "paymentID"
        ]
      },
      "UploadDto": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "entityId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "string"
          }
        }
      },
      "BulkUploadDto": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "entityId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "AddWishlistDto": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "number"
          }
        },
        "required": [
          "product_id"
        ]
      },
      "RedeemDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 64,
            "example": "AJHSXJAHS",
            "description": "The redemption token from the QR / URL (case-insensitive)."
          },
          "phone": {
            "type": "string",
            "maxLength": 50,
            "example": "+8801712345678",
            "description": "Recipient phone number (msisdn). Always required so we can reach the customer if there is an issue with the voucher. Accepted as either `phone` or the alias `msisdn`."
          },
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "example": "user@example.com",
            "description": "Optional email address. When provided, we email the revealed voucher code and redemption instructions to this address after a successful redemption."
          }
        },
        "required": [
          "code",
          "phone"
        ]
      },
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "message": {
            "type": "string",
            "example": "Something went wrong"
          },
          "data": {
            "type": "object",
            "nullable": true,
            "example": null
          },
          "errorCode": {
            "type": "string",
            "nullable": true,
            "example": "ERROR_CODE"
          },
          "errors": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "Error400": {
        "description": "Bad Request — validation failed or malformed payload.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Validation failed",
              "data": null,
              "errorCode": "VALIDATION_ERROR",
              "errors": [
                {
                  "field": "email",
                  "message": "email must be a valid email"
                }
              ]
            }
          }
        }
      },
      "Error401": {
        "description": "Unauthorized — missing or invalid bearer token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Unauthorized",
              "data": null,
              "errorCode": "UNAUTHORIZED"
            }
          }
        }
      },
      "Error403": {
        "description": "Forbidden — authenticated user lacks required permission.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Forbidden resource",
              "data": null,
              "errorCode": "FORBIDDEN"
            }
          }
        }
      },
      "Error404": {
        "description": "Not Found — resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Resource not found",
              "data": null,
              "errorCode": "NOT_FOUND"
            }
          }
        }
      },
      "Error409": {
        "description": "Conflict — state conflict (e.g. duplicate email).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Resource already exists",
              "data": null,
              "errorCode": "CONFLICT"
            }
          }
        }
      },
      "Error422": {
        "description": "Unprocessable Entity — semantic validation error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Unprocessable entity",
              "data": null,
              "errorCode": "UNPROCESSABLE_ENTITY"
            }
          }
        }
      },
      "Error429": {
        "description": "Too Many Requests — rate limit exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Too many requests, please try again later",
              "data": null,
              "errorCode": "RATE_LIMITED"
            }
          }
        }
      },
      "Error500": {
        "description": "Internal Server Error — unexpected failure.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "success": false,
              "message": "Internal server error",
              "data": null,
              "errorCode": "INTERNAL_ERROR"
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "BD Voucher",
    "url": "https://bdvoucher.com"
  },
  "x-tagGroups": [
    {
      "name": "Auth",
      "tags": [
        "Auth",
        "User"
      ]
    },
    {
      "name": "Catalog",
      "tags": [
        "Catalog",
        "Partners",
        "Payment Methods",
        "Products"
      ]
    },
    {
      "name": "Commerce",
      "tags": [
        "Discounts",
        "Orders",
        "Payments",
        "Vouchers",
        "Wishlist"
      ]
    },
    {
      "name": "Content",
      "tags": [
        "Blog",
        "Faq",
        "Homepage",
        "Pages"
      ]
    },
    {
      "name": "System",
      "tags": [
        "File Serving",
        "Health",
        "Upload",
        "Zendit"
      ]
    },
    {
      "name": "Other",
      "tags": [
        "Redemption",
        "Stock"
      ]
    }
  ]
}