{
 "openapi": "3.1.0",
 "info": {
  "title": "APIBox",
  "version": "1.0.0",
  "summary": "394 small developer APIs (web, data, text, images, files, security, Vietnamese business rules) behind one API key.",
  "description": "APIBox is a set of independent REST endpoints that share one base URL, one API key, one monthly quota and one error format. Get a free key (1,000 requests per month) at https://apibox.io.vn/dashboard/#signup and send it as `Authorization: Bearer <key>` or `X-API-Key: <key>`. Human docs: https://apibox.io.vn/docs/ · Markdown docs for LLMs: https://apibox.io.vn/llms.txt · Postman collection: https://apibox.io.vn/postman/apibox.postman_collection.json",
  "termsOfService": "https://apibox.io.vn/terms/",
  "license": {
   "name": "Proprietary – see the APIBox terms of service",
   "url": "https://apibox.io.vn/terms/"
  },
  "contact": {
   "name": "APIBox support",
   "url": "https://apibox.io.vn/contact/",
   "email": "support@apibox.io.vn"
  }
 },
 "externalDocs": {
  "description": "APIBox documentation",
  "url": "https://apibox.io.vn/docs/"
 },
 "servers": [
  {
   "url": "https://apibox.io.vn",
   "description": "Production"
  }
 ],
 "security": [
  {
   "bearerAuth": []
  },
  {
   "apiKeyHeader": []
  },
  {
   "apiKeyQuery": []
  }
 ],
 "tags": [
  {
   "name": "Content & HTML",
   "description": "Content & HTML (Nội dung & HTML)",
   "x-category": "content"
  },
  {
   "name": "Web & SEO",
   "description": "Web & SEO (Web & SEO)",
   "x-category": "web"
  },
  {
   "name": "Data & JSON",
   "description": "Data & JSON (Dữ liệu & JSON)",
   "x-category": "data"
  },
  {
   "name": "Text",
   "description": "Text (Văn bản)",
   "x-category": "text"
  },
  {
   "name": "Images & Codes",
   "description": "Images & Codes (Ảnh & Mã)",
   "x-category": "image"
  },
  {
   "name": "Files",
   "description": "Files (Tệp tin)",
   "x-category": "files"
  },
  {
   "name": "Network & Validation",
   "description": "Network & Validation (Mạng & Kiểm tra)",
   "x-category": "network"
  },
  {
   "name": "Security & Crypto",
   "description": "Security & Crypto (Bảo mật & Mã hoá)",
   "x-category": "security"
  },
  {
   "name": "Developer utilities",
   "description": "Developer utilities (Tiện ích lập trình)",
   "x-category": "dev"
  },
  {
   "name": "Testing",
   "description": "Testing (Kiểm thử)",
   "x-category": "testing"
  }
 ],
 "paths": {
  "/v1/html-to-markdown": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML to Markdown",
    "description": "Send an HTML string (JSON or form field `html`, or a raw `text/html` body) or a public `url`, and get clean Markdown back together with the page title and word and character counts. Scripts, styles, iframes, SVG and canvas elements are dropped, and GitHub-flavored extensions such as tables, strikethrough and task lists are converted.\n\nSet `readability=true` to keep only the main article of a page (Mozilla Readability, the engine behind Firefox Reader View): navigation, footers and sidebars are removed and an `excerpt` is returned. Relative links and image sources are made absolute using the fetched URL or `base_url`. Output style is configurable: `heading_style` (atx or setext), `bullet` (-, * or +), `code_block_style` (fenced or indented), `link_style` (inlined or referenced), and `keep_links` / `keep_images` to strip links or images.\n\nLimits: HTML up to 5 MB (request body up to 6 MB); pages fetched from a URL are read up to 5 MB, with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/html-to-markdown/",
    "operationId": "htmlToMarkdownGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-to-markdown/"
    },
    "parameters": [
     {
      "name": "html",
      "in": "query",
      "required": false,
      "description": "HTML to convert (max 5 MB). Can also be sent as a raw text/html body. Required unless `url` is given.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public http/https URL of a page to fetch and convert (takes precedence over `html`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "base_url",
      "in": "query",
      "required": false,
      "description": "Base URL used to make relative links and image sources absolute when sending `html`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "readability",
      "in": "query",
      "required": false,
      "description": "Extract only the main article (Readability) and return an `excerpt`. Alias: `article`.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "keep_links",
      "in": "query",
      "required": false,
      "description": "Keep links; when false only the link text is kept.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "keep_images",
      "in": "query",
      "required": false,
      "description": "Keep images; when false img, picture and figure elements are removed.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "heading_style",
      "in": "query",
      "required": false,
      "description": "Heading style: `atx` (# Title) or `setext` (underlined).",
      "schema": {
       "type": "string",
       "default": "atx"
      }
     },
     {
      "name": "bullet",
      "in": "query",
      "required": false,
      "description": "Bullet list marker: `-`, `*` or `+`.",
      "schema": {
       "type": "string",
       "default": "-"
      }
     },
     {
      "name": "code_block_style",
      "in": "query",
      "required": false,
      "description": "Code blocks: `fenced` (```) or `indented`.",
      "schema": {
       "type": "string",
       "default": "fenced"
      }
     },
     {
      "name": "link_style",
      "in": "query",
      "required": false,
      "description": "Links: `inlined` [text](url) or `referenced` [text][1].",
      "schema": {
       "type": "string",
       "default": "inlined"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "title": {
           "type": "string"
          },
          "markdown": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          },
          "words": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML to Markdown",
    "description": "Send an HTML string (JSON or form field `html`, or a raw `text/html` body) or a public `url`, and get clean Markdown back together with the page title and word and character counts. Scripts, styles, iframes, SVG and canvas elements are dropped, and GitHub-flavored extensions such as tables, strikethrough and task lists are converted.\n\nSet `readability=true` to keep only the main article of a page (Mozilla Readability, the engine behind Firefox Reader View): navigation, footers and sidebars are removed and an `excerpt` is returned. Relative links and image sources are made absolute using the fetched URL or `base_url`. Output style is configurable: `heading_style` (atx or setext), `bullet` (-, * or +), `code_block_style` (fenced or indented), `link_style` (inlined or referenced), and `keep_links` / `keep_images` to strip links or images.\n\nLimits: HTML up to 5 MB (request body up to 6 MB); pages fetched from a URL are read up to 5 MB, with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/html-to-markdown/",
    "operationId": "htmlToMarkdownPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-to-markdown/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "HTML to convert (max 5 MB). Can also be sent as a raw text/html body. Required unless `url` is given."
         },
         "url": {
          "type": "string",
          "description": "Public http/https URL of a page to fetch and convert (takes precedence over `html`)."
         },
         "base_url": {
          "type": "string",
          "description": "Base URL used to make relative links and image sources absolute when sending `html`."
         },
         "readability": {
          "type": "boolean",
          "default": false,
          "description": "Extract only the main article (Readability) and return an `excerpt`. Alias: `article`."
         },
         "keep_links": {
          "type": "boolean",
          "default": true,
          "description": "Keep links; when false only the link text is kept."
         },
         "keep_images": {
          "type": "boolean",
          "default": true,
          "description": "Keep images; when false img, picture and figure elements are removed."
         },
         "heading_style": {
          "type": "string",
          "default": "atx",
          "description": "Heading style: `atx` (# Title) or `setext` (underlined)."
         },
         "bullet": {
          "type": "string",
          "default": "-",
          "description": "Bullet list marker: `-`, `*` or `+`."
         },
         "code_block_style": {
          "type": "string",
          "default": "fenced",
          "description": "Code blocks: `fenced` (```) or `indented`."
         },
         "link_style": {
          "type": "string",
          "default": "inlined",
          "description": "Links: `inlined` [text](url) or `referenced` [text][1]."
         }
        }
       },
       "example": {
        "html": "<h1>Getting started</h1><p>APIBox turns <strong>HTML</strong> into clean <a href=\"/docs\">Markdown</a>.</p><ul><li>Fast</li><li>Simple</li></ul><table><tr><th>Plan</th><th>Requests</th></tr><tr><td>Free</td><td>1,000</td></tr></table>",
        "base_url": "https://example.com"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "title": {
           "type": "string"
          },
          "markdown": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          },
          "words": {
           "type": "number"
          }
         }
        },
        "example": {
         "title": "",
         "markdown": "# Getting started\n\nAPIBox turns **HTML** into clean [Markdown](https://example.com/docs).\n\n-   Fast\n-   Simple\n\n| Plan | Requests |\n| --- | --- |\n| Free | 1,000 |",
         "characters": 162,
         "words": 28
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/markdown-to-html": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "Markdown to HTML",
    "description": "Send Markdown in the `markdown` field (JSON, form or query string) or as a raw text body and receive the rendered HTML in `html`. Rendering uses the marked parser with GitHub-flavored Markdown enabled: tables, strikethrough, autolinks and fenced code blocks are supported. Set `breaks=true` to turn single line breaks into `<br>`.\n\nBecause Markdown can contain raw HTML, the output is sanitized by default: script, style, iframe, object, embed, form and similar elements are removed, as well as `on*` event handlers, `style` attributes and `javascript:` / `vbscript:` / `data:text` URLs. Pass `sanitize=false` only when the Markdown comes from a trusted source.\n\nThe request body is limited to 1 MB and the `markdown` field to 2,000,000 characters.\n\nDocs: https://apibox.io.vn/docs/markdown-to-html/",
    "operationId": "markdownToHtmlGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/markdown-to-html/"
    },
    "parameters": [
     {
      "name": "markdown",
      "in": "query",
      "required": true,
      "description": "Markdown source (max 2,000,000 characters). Can also be sent as a raw text body.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "breaks",
      "in": "query",
      "required": false,
      "description": "Convert single line breaks to `<br>`.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "sanitize",
      "in": "query",
      "required": false,
      "description": "Remove scripts, event handlers, style attributes and dangerous URLs from the output.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "html": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "Markdown to HTML",
    "description": "Send Markdown in the `markdown` field (JSON, form or query string) or as a raw text body and receive the rendered HTML in `html`. Rendering uses the marked parser with GitHub-flavored Markdown enabled: tables, strikethrough, autolinks and fenced code blocks are supported. Set `breaks=true` to turn single line breaks into `<br>`.\n\nBecause Markdown can contain raw HTML, the output is sanitized by default: script, style, iframe, object, embed, form and similar elements are removed, as well as `on*` event handlers, `style` attributes and `javascript:` / `vbscript:` / `data:text` URLs. Pass `sanitize=false` only when the Markdown comes from a trusted source.\n\nThe request body is limited to 1 MB and the `markdown` field to 2,000,000 characters.\n\nDocs: https://apibox.io.vn/docs/markdown-to-html/",
    "operationId": "markdownToHtmlPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/markdown-to-html/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "markdown": {
          "type": "string",
          "description": "Markdown source (max 2,000,000 characters). Can also be sent as a raw text body."
         },
         "breaks": {
          "type": "boolean",
          "default": false,
          "description": "Convert single line breaks to `<br>`."
         },
         "sanitize": {
          "type": "boolean",
          "default": true,
          "description": "Remove scripts, event handlers, style attributes and dangerous URLs from the output."
         }
        },
        "required": [
         "markdown"
        ]
       },
       "example": {
        "markdown": "# Release notes\n\nVersion **2.0** adds [dark mode](https://example.com/dark).\n\n- Faster builds\n- ~~Old API~~ removed\n\n| Plan | Price |\n| --- | --- |\n| Free | $0 |"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "html": {
           "type": "string"
          }
         }
        },
        "example": {
         "html": "<h1>Release notes</h1>\n<p>Version <strong>2.0</strong> adds <a href=\"https://example.com/dark\">dark mode</a>.</p>\n<ul>\n<li>Faster builds</li>\n<li><del>Old API</del> removed</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Plan</th>\n<th>Price</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Free</td>\n<td>$0</td>\n</tr>\n</tbody></table>\n"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/html-sanitize": {
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML Sanitizer",
    "description": "Send untrusted HTML in the `html` field (JSON or form) or as a raw `text/html` body and get a cleaned version back in `html`. The sanitizer parses the markup and removes dangerous elements entirely: script, style, iframe, object, embed, form, input, button, link, meta, base, frame and frameset.\n\nOn the remaining elements it removes every `on*` event handler (onclick, onerror...), every `style` attribute, and `href`, `src`, `xlink:href` or `action` values that start with `javascript:`, `vbscript:` or `data:text`. Regular formatting, links, images and tables are kept. This is the same sanitizer used by the Markdown to HTML endpoint.\n\nThe request body is limited to 1 MB and `html` to 2,000,000 characters. The sanitizer works on a block list, so for highly sensitive contexts combine it with a Content Security Policy.\n\nDocs: https://apibox.io.vn/docs/html-sanitize/",
    "operationId": "htmlSanitizePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-sanitize/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "HTML to sanitize (max 2,000,000 characters). Can also be sent as a raw text/html body."
         }
        },
        "required": [
         "html"
        ]
       },
       "example": {
        "html": "<p onclick=\"alert(1)\" style=\"color:red\">Hi <a href=\"javascript:alert(1)\">click</a></p><script>alert(2)</script><img src=\"x\" onerror=\"alert(3)\">"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "html": {
           "type": "string"
          }
         }
        },
        "example": {
         "html": "<p>Hi <a>click</a></p><img src=\"x\">"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/html-to-text": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML to Text",
    "description": "Send HTML in the `html` field (JSON, form or query string), as a raw `text/html` body, or give a public `url` to fetch. The API removes script, style, noscript, template and head content, turns `<br>` and block elements (paragraphs, headings, list items, table rows, divs...) into line breaks, collapses repeated spaces and returns the text with its `characters` and `words` counts.\n\nUnlike HTML to Markdown, no formatting is kept: the result is plain text suitable for search indexing, previews, SMS or text-only emails.\n\nLimits: HTML up to 5 MB (request body up to 6 MB); URLs are fetched up to 5 MB with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/html-to-text/",
    "operationId": "htmlToTextGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-to-text/"
    },
    "parameters": [
     {
      "name": "html",
      "in": "query",
      "required": false,
      "description": "HTML to convert (max 5 MB). Can also be sent as a raw text/html body. Required unless `url` is given.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public http/https URL of a page to fetch (takes precedence over `html`).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "text": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          },
          "words": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML to Text",
    "description": "Send HTML in the `html` field (JSON, form or query string), as a raw `text/html` body, or give a public `url` to fetch. The API removes script, style, noscript, template and head content, turns `<br>` and block elements (paragraphs, headings, list items, table rows, divs...) into line breaks, collapses repeated spaces and returns the text with its `characters` and `words` counts.\n\nUnlike HTML to Markdown, no formatting is kept: the result is plain text suitable for search indexing, previews, SMS or text-only emails.\n\nLimits: HTML up to 5 MB (request body up to 6 MB); URLs are fetched up to 5 MB with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/html-to-text/",
    "operationId": "htmlToTextPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-to-text/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "HTML to convert (max 5 MB). Can also be sent as a raw text/html body. Required unless `url` is given."
         },
         "url": {
          "type": "string",
          "description": "Public http/https URL of a page to fetch (takes precedence over `html`)."
         }
        }
       },
       "example": {
        "html": "<h1>Order confirmed</h1><p>Thanks for your order, <b>Alice</b>.<br>It ships tomorrow.</p><ul><li>1 x Keyboard</li><li>2 x Mouse</li></ul><style>p{color:red}</style>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "text": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          },
          "words": {
           "type": "number"
          }
         }
        },
        "example": {
         "text": "Order confirmed\nThanks for your order, Alice.\nIt ships tomorrow.\n1 x Keyboard\n2 x Mouse",
         "characters": 87,
         "words": 16
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/url-metadata": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "URL Metadata",
    "description": "Give a public `url` and the API fetches the page (following redirects) and parses its `<head>`: title, description, preview image and alt text, site name, type, locale, language, canonical URL, author, keywords, published time, theme color and robots directive. Values fall back from Open Graph to Twitter Card to standard meta tags, and image and icon URLs are made absolute.\n\nThe response also includes all `open_graph`, `twitter_card` and other `meta` tags, the list of `icons` (with the first one as `favicon`, or /favicon.ico), RSS/Atom `feeds`, `alternates` (hreflang links), up to 5 parsed `json_ld` blocks, plus the final URL, HTTP status, content type, redirect chain and response time. For non-HTML URLs only the basic fields are returned.\n\nResults are cached for 1 hour per URL; add `fresh=true` to bypass the cache. The page is read up to 1.5 MB, with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/url-metadata/",
    "operationId": "urlMetadataGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/url-metadata/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Public http/https URL of the page (max 4096 characters).",
      "schema": {
       "type": "string"
      },
      "example": "https://github.com"
     },
     {
      "name": "fresh",
      "in": "query",
      "required": false,
      "description": "Bypass the 1-hour cache and fetch the page again.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "content_type": {
           "type": "string"
          },
          "redirects": {
           "type": "array"
          },
          "response_ms": {
           "type": "number"
          },
          "title": {
           "type": "string"
          },
          "description": {
           "type": "string"
          },
          "image": {
           "type": "string"
          },
          "image_alt": {
           "type": "string"
          },
          "site_name": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "locale": {},
          "lang": {
           "type": "string"
          },
          "canonical": {
           "type": "string"
          },
          "author": {},
          "keywords": {
           "type": "array"
          },
          "published_time": {},
          "theme_color": {
           "type": "string"
          },
          "robots": {},
          "favicon": {
           "type": "string"
          },
          "icons": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "href": {
              "type": "string"
             },
             "rel": {
              "type": "string"
             },
             "type": {
              "type": "string"
             }
            }
           }
          },
          "feeds": {
           "type": "array"
          },
          "alternates": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "open_graph": {
           "type": "object",
           "properties": {
            "image": {
             "type": "string"
            },
            "site_name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "title": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "description": {
             "type": "string"
            }
           }
          },
          "twitter_card": {
           "type": "object",
           "properties": {
            "site": {
             "type": "string"
            },
            "card": {
             "type": "string"
            },
            "title": {
             "type": "string"
            }
           }
          },
          "meta": {
           "type": "object",
           "properties": {
            "viewport": {
             "type": "string"
            },
            "description": {
             "type": "string"
            }
           }
          },
          "json_ld": {
           "type": "array"
          }
         }
        },
        "example": {
         "url": "https://github.com/",
         "final_url": "https://github.com/",
         "status": 200,
         "content_type": "text/html; charset=utf-8",
         "redirects": [],
         "response_ms": 461,
         "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
         "description": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
         "image": "https://images.ctfassets.net/8aevphvgewt8/76epZKB2wF998m4e4bLLXn/c505f20b00ec70b88b1be5aec42c4be4/OG_image.jpg",
         "image_alt": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
         "site_name": "GitHub",
         "type": "object",
         "locale": null,
         "lang": "en",
         "canonical": "https://github.com/",
         "author": null,
         "keywords": [],
         "published_time": null,
         "theme_color": "#1e2327",
         "robots": null,
         "favicon": "https://github.githubassets.com/favicons/favicon.png",
         "icons": [
          {
           "href": "https://github.githubassets.com/favicons/favicon.png",
           "rel": "alternate icon",
           "type": "image/png"
          },
          {
           "href": "https://github.githubassets.com/favicons/favicon.svg",
           "rel": "icon",
           "type": "image/svg+xml"
          }
         ],
         "feeds": [],
         "alternates": [
          "https://github.com/",
          "https://github.com/?locale=pt-br",
          "https://github.com/?locale=ja"
         ],
         "open_graph": {
          "image": "https://images.ctfassets.net/8aevphvgewt8/76epZKB2wF998m4e4bLLXn/c505f20b00ec70b88b1be5aec42c4be4/OG_image.jpg",
          "site_name": "GitHub",
          "type": "object",
          "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
          "url": "https://github.com/",
          "description": "Join the world's most widely adopted, AI-powered developer platform..."
         },
         "twitter_card": {
          "site": "@github",
          "card": "summary_large_image",
          "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub"
         },
         "meta": {
          "viewport": "width=device-width",
          "description": "Join the world's most widely adopted, AI-powered developer platform..."
         },
         "json_ld": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "URL Metadata",
    "description": "Give a public `url` and the API fetches the page (following redirects) and parses its `<head>`: title, description, preview image and alt text, site name, type, locale, language, canonical URL, author, keywords, published time, theme color and robots directive. Values fall back from Open Graph to Twitter Card to standard meta tags, and image and icon URLs are made absolute.\n\nThe response also includes all `open_graph`, `twitter_card` and other `meta` tags, the list of `icons` (with the first one as `favicon`, or /favicon.ico), RSS/Atom `feeds`, `alternates` (hreflang links), up to 5 parsed `json_ld` blocks, plus the final URL, HTTP status, content type, redirect chain and response time. For non-HTML URLs only the basic fields are returned.\n\nResults are cached for 1 hour per URL; add `fresh=true` to bypass the cache. The page is read up to 1.5 MB, with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/url-metadata/",
    "operationId": "urlMetadataPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/url-metadata/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public http/https URL of the page (max 4096 characters)."
         },
         "fresh": {
          "type": "boolean",
          "default": false,
          "description": "Bypass the 1-hour cache and fetch the page again."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "content_type": {
           "type": "string"
          },
          "redirects": {
           "type": "array"
          },
          "response_ms": {
           "type": "number"
          },
          "title": {
           "type": "string"
          },
          "description": {
           "type": "string"
          },
          "image": {
           "type": "string"
          },
          "image_alt": {
           "type": "string"
          },
          "site_name": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "locale": {},
          "lang": {
           "type": "string"
          },
          "canonical": {
           "type": "string"
          },
          "author": {},
          "keywords": {
           "type": "array"
          },
          "published_time": {},
          "theme_color": {
           "type": "string"
          },
          "robots": {},
          "favicon": {
           "type": "string"
          },
          "icons": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "href": {
              "type": "string"
             },
             "rel": {
              "type": "string"
             },
             "type": {
              "type": "string"
             }
            }
           }
          },
          "feeds": {
           "type": "array"
          },
          "alternates": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "open_graph": {
           "type": "object",
           "properties": {
            "image": {
             "type": "string"
            },
            "site_name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "title": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "description": {
             "type": "string"
            }
           }
          },
          "twitter_card": {
           "type": "object",
           "properties": {
            "site": {
             "type": "string"
            },
            "card": {
             "type": "string"
            },
            "title": {
             "type": "string"
            }
           }
          },
          "meta": {
           "type": "object",
           "properties": {
            "viewport": {
             "type": "string"
            },
            "description": {
             "type": "string"
            }
           }
          },
          "json_ld": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/http-headers": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "HTTP Headers",
    "description": "Give a public `url` and the API requests it (GET by default, or `method=HEAD`), follows redirects and returns the final URL, HTTP status, redirect chain, response time and all response `headers` as a lowercase key/value object. Only the headers are read; the body is not downloaded.\n\nA `security_headers` object shows the value of strict-transport-security, content-security-policy, x-frame-options, x-content-type-options, referrer-policy and permissions-policy, or `null` when a header is missing, which makes it easy to audit a site security setup.\n\nRequests use a 10 second timeout and at most 8 redirects; only public http/https hosts on ports 80, 443, 8080 and 8443 are allowed.\n\nDocs: https://apibox.io.vn/docs/http-headers/",
    "operationId": "httpHeadersGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/http-headers/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Public http/https URL to check (max 4096 characters).",
      "schema": {
       "type": "string"
      },
      "example": "https://example.com"
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "HTTP method used for the check: `GET` or `HEAD`.",
      "schema": {
       "type": "string",
       "default": "GET"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "redirects": {
           "type": "array"
          },
          "response_ms": {
           "type": "number"
          },
          "headers": {
           "type": "object",
           "properties": {
            "accept-ranges": {
             "type": "string"
            },
            "age": {
             "type": "string"
            },
            "allow": {
             "type": "string"
            },
            "cf-cache-status": {
             "type": "string"
            },
            "connection": {
             "type": "string"
            },
            "content-type": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "last-modified": {
             "type": "string"
            },
            "server": {
             "type": "string"
            },
            "transfer-encoding": {
             "type": "string"
            }
           }
          },
          "security_headers": {
           "type": "object",
           "properties": {
            "strict-transport-security": {},
            "content-security-policy": {},
            "x-frame-options": {},
            "x-content-type-options": {},
            "referrer-policy": {},
            "permissions-policy": {}
           }
          }
         }
        },
        "example": {
         "url": "https://example.com",
         "final_url": "https://example.com/",
         "status": 200,
         "redirects": [],
         "response_ms": 172,
         "headers": {
          "accept-ranges": "bytes",
          "age": "8",
          "allow": "GET, HEAD",
          "cf-cache-status": "HIT",
          "connection": "keep-alive",
          "content-type": "text/html; charset=utf-8",
          "date": "Tue, 10 Nov 2026 05:08:29 GMT",
          "last-modified": "Sun, 08 Nov 2026 18:05:34 GMT",
          "server": "cloudflare",
          "transfer-encoding": "chunked"
         },
         "security_headers": {
          "strict-transport-security": null,
          "content-security-policy": null,
          "x-frame-options": null,
          "x-content-type-options": null,
          "referrer-policy": null,
          "permissions-policy": null
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "HTTP Headers",
    "description": "Give a public `url` and the API requests it (GET by default, or `method=HEAD`), follows redirects and returns the final URL, HTTP status, redirect chain, response time and all response `headers` as a lowercase key/value object. Only the headers are read; the body is not downloaded.\n\nA `security_headers` object shows the value of strict-transport-security, content-security-policy, x-frame-options, x-content-type-options, referrer-policy and permissions-policy, or `null` when a header is missing, which makes it easy to audit a site security setup.\n\nRequests use a 10 second timeout and at most 8 redirects; only public http/https hosts on ports 80, 443, 8080 and 8443 are allowed.\n\nDocs: https://apibox.io.vn/docs/http-headers/",
    "operationId": "httpHeadersPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/http-headers/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public http/https URL to check (max 4096 characters)."
         },
         "method": {
          "type": "string",
          "default": "GET",
          "description": "HTTP method used for the check: `GET` or `HEAD`."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "redirects": {
           "type": "array"
          },
          "response_ms": {
           "type": "number"
          },
          "headers": {
           "type": "object",
           "properties": {
            "accept-ranges": {
             "type": "string"
            },
            "age": {
             "type": "string"
            },
            "allow": {
             "type": "string"
            },
            "cf-cache-status": {
             "type": "string"
            },
            "connection": {
             "type": "string"
            },
            "content-type": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "last-modified": {
             "type": "string"
            },
            "server": {
             "type": "string"
            },
            "transfer-encoding": {
             "type": "string"
            }
           }
          },
          "security_headers": {
           "type": "object",
           "properties": {
            "strict-transport-security": {},
            "content-security-policy": {},
            "x-frame-options": {},
            "x-content-type-options": {},
            "referrer-policy": {},
            "permissions-policy": {}
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/redirect-check": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Redirect Checker",
    "description": "Give a public `url` and the API follows its redirects one by one, recording each intermediate URL with its HTTP status code. The response contains the `chain` (every hop plus the final response), the `final_url`, `final_status`, the number of `hops` and the total `response_ms`.\n\nUse it to verify HTTP to HTTPS and www to non-www redirects, to detect redirect loops or long chains that hurt SEO, and to resolve short links. Each redirect target is checked again, so redirects to private or internal hosts are refused.\n\nAt most 8 redirects are followed (more returns a `too_many_redirects` error), with a 10 second timeout overall. Only public http/https hosts on ports 80, 443, 8080 and 8443 are allowed.\n\nDocs: https://apibox.io.vn/docs/redirect-check/",
    "operationId": "redirectCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/redirect-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Public http/https URL to trace (max 4096 characters).",
      "schema": {
       "type": "string"
      },
      "example": "http://github.com"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "final_status": {
           "type": "number"
          },
          "hops": {
           "type": "number"
          },
          "chain": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "status": {
              "type": "number"
             }
            }
           }
          },
          "response_ms": {
           "type": "number"
          }
         }
        },
        "example": {
         "url": "http://github.com",
         "final_url": "https://github.com/",
         "final_status": 200,
         "hops": 1,
         "chain": [
          {
           "url": "http://github.com/",
           "status": 301
          },
          {
           "url": "https://github.com/",
           "status": 200
          }
         ],
         "response_ms": 320
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Redirect Checker",
    "description": "Give a public `url` and the API follows its redirects one by one, recording each intermediate URL with its HTTP status code. The response contains the `chain` (every hop plus the final response), the `final_url`, `final_status`, the number of `hops` and the total `response_ms`.\n\nUse it to verify HTTP to HTTPS and www to non-www redirects, to detect redirect loops or long chains that hurt SEO, and to resolve short links. Each redirect target is checked again, so redirects to private or internal hosts are refused.\n\nAt most 8 redirects are followed (more returns a `too_many_redirects` error), with a 10 second timeout overall. Only public http/https hosts on ports 80, 443, 8080 and 8443 are allowed.\n\nDocs: https://apibox.io.vn/docs/redirect-check/",
    "operationId": "redirectCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/redirect-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public http/https URL to trace (max 4096 characters)."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "final_status": {
           "type": "number"
          },
          "hops": {
           "type": "number"
          },
          "chain": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "status": {
              "type": "number"
             }
            }
           }
          },
          "response_ms": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/robots-txt": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "robots.txt Parser",
    "description": "Give any URL of a site in `url`; the API fetches `/robots.txt` from its origin and parses it into `groups` (user agents with their `allow`, `disallow` and `crawl_delay` rules) and the list of `sitemaps`. The response also tells whether the file `exists`, its HTTP status and the raw text (first 20,000 characters).\n\nAdd a `path` (for example `/search`) and optionally a `user_agent` (default `*`) to test whether that path may be crawled: the API picks the group matching the user agent (or `*`), applies the longest matching rule with `*` wildcards and `$` end anchors, and returns `allowed: true` or `false`.\n\nAdd `ai=true` to audit AI crawlers: `ai_bots` checks about 200 known AI user agents from the ai.robots.txt list (MIT) against the rules (the group naming the bot, else `*`) and reports each as `blocked`, `mostly_blocked`, `partial` or `allowed`, with its operator, category (`training`, `search`, `assistant`, `agent`, `data`, `other`) and whether it is known to respect robots.txt, plus a summary per category (well-known bots and bots named in the file are listed; `ai_bots=all` lists every one). `llms_txt` fetches `/llms.txt` (llmstxt.org proposal) and returns its title, summary, sections, link count and issues, and whether `/llms-full.txt` exists.\n\nWith `generate` (e.g. `training,data` or `all`) the response includes `generated.robots_txt`, a ready block of `User-agent` lines with `Disallow: /` for those categories; `url` is optional in that case.\n\nThe robots.txt file is read up to 512 KB with a 10 second timeout. With ai=true, /llms.txt (512 KB) and /llms-full.txt are fetched too. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/robots-txt/",
    "operationId": "robotsTxtGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/robots-txt/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Any URL of the site; robots.txt is read from its origin (max 4096 characters). Required unless only `generate` is used.",
      "schema": {
       "type": "string"
      },
      "example": "https://github.com"
     },
     {
      "name": "path",
      "in": "query",
      "required": false,
      "description": "Path to test, e.g. `/search`. When given, the response includes `allowed`.",
      "schema": {
       "type": "string"
      },
      "example": "/search"
     },
     {
      "name": "user_agent",
      "in": "query",
      "required": false,
      "description": "User agent used for the `path` test, e.g. `Googlebot`.",
      "schema": {
       "type": "string",
       "default": "*"
      },
      "example": "Googlebot"
     },
     {
      "name": "ai",
      "in": "query",
      "required": false,
      "description": "Add `ai_bots` (AI crawler rules) and `llms_txt` (llms.txt check) to the response.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "ai_bots",
      "in": "query",
      "required": false,
      "description": "`all` lists every known AI bot instead of the well-known ones and those named in the file.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "generate",
      "in": "query",
      "required": false,
      "description": "AI bot categories to block in a generated robots.txt block: `training`, `search`, `assistant`, `agent`, `data`, `other` (comma list) or `all`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "robots_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "exists": {
           "type": "boolean"
          },
          "groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "user_agents": {
              "type": "array"
             },
             "allow": {
              "type": "array"
             },
             "disallow": {
              "type": "array"
             },
             "crawl_delay": {
              "type": "number"
             }
            }
           }
          },
          "sitemaps": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "path": {
           "type": "string"
          },
          "user_agent": {
           "type": "string"
          },
          "allowed": {
           "type": "boolean"
          },
          "raw": {
           "type": "string"
          }
         }
        },
        "example": {
         "robots_url": "https://github.com/robots.txt",
         "status": 200,
         "exists": true,
         "groups": [
          {
           "user_agents": [
            "GPTBot",
            "OAI-SearchBot",
            "ChatGPT-User",
            "ClaudeBot"
           ],
           "allow": [
            "/*?tab=achievements&achievement=*",
            "..."
           ],
           "disallow": [
            "/account-login",
            "/copilot/",
            "/gist/",
            "/search$",
            "..."
           ],
           "crawl_delay": 1
          },
          {
           "user_agents": [
            "Bytespider"
           ],
           "allow": [],
           "disallow": [
            "/"
           ]
          },
          {
           "user_agents": [
            "*"
           ],
           "allow": [
            "/*?tab=achievements&achievement=*",
            "..."
           ],
           "disallow": [
            "/account-login",
            "/copilot/",
            "/gist/",
            "/search$",
            "..."
           ]
          }
         ],
         "sitemaps": [
          "https://github.com/sitemap_marketing.xml"
         ],
         "path": "/search",
         "user_agent": "Googlebot",
         "allowed": false,
         "raw": "# If you would like to crawl GitHub contact us via https://support.github.com?tags=dotcom-robots\n# We also provide an extensive API: https://docs.github.com\nSitemap: https://github.com/sitemap_marketing.xml\n\nUser-agent: GPTBot\n..."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "robots.txt Parser",
    "description": "Give any URL of a site in `url`; the API fetches `/robots.txt` from its origin and parses it into `groups` (user agents with their `allow`, `disallow` and `crawl_delay` rules) and the list of `sitemaps`. The response also tells whether the file `exists`, its HTTP status and the raw text (first 20,000 characters).\n\nAdd a `path` (for example `/search`) and optionally a `user_agent` (default `*`) to test whether that path may be crawled: the API picks the group matching the user agent (or `*`), applies the longest matching rule with `*` wildcards and `$` end anchors, and returns `allowed: true` or `false`.\n\nAdd `ai=true` to audit AI crawlers: `ai_bots` checks about 200 known AI user agents from the ai.robots.txt list (MIT) against the rules (the group naming the bot, else `*`) and reports each as `blocked`, `mostly_blocked`, `partial` or `allowed`, with its operator, category (`training`, `search`, `assistant`, `agent`, `data`, `other`) and whether it is known to respect robots.txt, plus a summary per category (well-known bots and bots named in the file are listed; `ai_bots=all` lists every one). `llms_txt` fetches `/llms.txt` (llmstxt.org proposal) and returns its title, summary, sections, link count and issues, and whether `/llms-full.txt` exists.\n\nWith `generate` (e.g. `training,data` or `all`) the response includes `generated.robots_txt`, a ready block of `User-agent` lines with `Disallow: /` for those categories; `url` is optional in that case.\n\nThe robots.txt file is read up to 512 KB with a 10 second timeout. With ai=true, /llms.txt (512 KB) and /llms-full.txt are fetched too. Only public http/https hosts are allowed.\n\nDocs: https://apibox.io.vn/docs/robots-txt/",
    "operationId": "robotsTxtPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/robots-txt/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Any URL of the site; robots.txt is read from its origin (max 4096 characters). Required unless only `generate` is used."
         },
         "path": {
          "type": "string",
          "description": "Path to test, e.g. `/search`. When given, the response includes `allowed`."
         },
         "user_agent": {
          "type": "string",
          "default": "*",
          "description": "User agent used for the `path` test, e.g. `Googlebot`."
         },
         "ai": {
          "type": "boolean",
          "default": false,
          "description": "Add `ai_bots` (AI crawler rules) and `llms_txt` (llms.txt check) to the response."
         },
         "ai_bots": {
          "type": "string",
          "description": "`all` lists every known AI bot instead of the well-known ones and those named in the file."
         },
         "generate": {
          "type": "string",
          "description": "AI bot categories to block in a generated robots.txt block: `training`, `search`, `assistant`, `agent`, `data`, `other` (comma list) or `all`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "robots_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "exists": {
           "type": "boolean"
          },
          "groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "user_agents": {
              "type": "array"
             },
             "allow": {
              "type": "array"
             },
             "disallow": {
              "type": "array"
             },
             "crawl_delay": {
              "type": "number"
             }
            }
           }
          },
          "sitemaps": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "path": {
           "type": "string"
          },
          "user_agent": {
           "type": "string"
          },
          "allowed": {
           "type": "boolean"
          },
          "raw": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-validator": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Validator",
    "description": "Send the document to check in `json`, either as a JSON string (so syntax errors can be reported) or as an already-parsed value. If it is not valid JSON, the response has `valid_json: false` and a `parse_error` with the message, character position, line and column. A raw `text/plain` body is also accepted as `json`.\n\nAdd a `schema` (object or JSON string) to validate the data against a JSON Schema. The default dialect is 2020-12; set `draft` to `4`, `7` or `2019-09` for older schemas. Each error has the instance `path` (e.g. `/age`), the failing `keyword`, the `schema_path` and a readable `message`; up to 200 errors are returned. Without a schema, only the syntax is checked.\n\nThe request body is limited to 5 MB. An invalid schema returns a 400 error with code `invalid_schema`.\n\nDocs: https://apibox.io.vn/docs/json-validator/",
    "operationId": "jsonValidatorPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-validator/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "json": {
          "type": "string",
          "description": "The JSON document to check: a JSON string, or any JSON value. A raw text/plain body is also accepted."
         },
         "schema": {
          "type": "object",
          "description": "JSON Schema (object or JSON string). Without it only the syntax is checked."
         },
         "draft": {
          "type": "string",
          "default": "2020-12",
          "description": "Schema dialect: `4`, `7`, `2019-09` or `2020-12`."
         }
        },
        "required": [
         "json"
        ]
       },
       "example": {
        "json": "{\"name\":\"Alice\",\"age\":-3}",
        "schema": {
         "type": "object",
         "required": [
          "name",
          "email"
         ],
         "properties": {
          "name": {
           "type": "string"
          },
          "age": {
           "type": "integer",
           "minimum": 0
          }
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "valid_json": {
           "type": "boolean"
          },
          "draft": {
           "type": "string"
          },
          "error_count": {
           "type": "number"
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "keyword": {
              "type": "string"
             },
             "schema_path": {
              "type": "string"
             },
             "message": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "valid": false,
         "valid_json": true,
         "draft": "2020-12",
         "error_count": 2,
         "errors": [
          {
           "path": "/",
           "keyword": "required",
           "schema_path": "#/required",
           "message": "Instance does not have required property \"email\"."
          },
          {
           "path": "/age",
           "keyword": "minimum",
           "schema_path": "#/properties/age/minimum",
           "message": "-3 is less than 0."
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-format": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Formatter",
    "description": "Send a JSON document in `json` (preferably as a string) or as a raw `text/plain` body, and get the formatted text back in `result` with its length in `characters`. By default the output is indented with 2 spaces; set `indent` to a number from 0 to 8 or to `tab`, or use `minify=true` to remove all whitespace.\n\nWith `sort_keys=true` the keys of every object are sorted alphabetically at all depths, which makes diffs and hashes of JSON stable. Arrays keep their order.\n\nIf the input is not valid JSON the response is `valid: false` with a `parse_error` (message, position, line and column when available) instead of an HTTP error. The request body is limited to 5 MB.\n\nDocs: https://apibox.io.vn/docs/json-format/",
    "operationId": "jsonFormatPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-format/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "json": {
          "type": "string",
          "description": "JSON to format, as a string (or any JSON value). A raw text/plain body is also accepted."
         },
         "indent": {
          "type": "number",
          "default": 2,
          "description": "Spaces per level (0-8), or `tab`."
         },
         "minify": {
          "type": "boolean",
          "default": false,
          "description": "Output compact JSON without whitespace."
         },
         "sort_keys": {
          "type": "boolean",
          "default": false,
          "description": "Sort object keys alphabetically at every depth."
         }
        },
        "required": [
         "json"
        ]
       },
       "example": {
        "json": "{\"b\":2,\"a\":{\"d\":[1,2],\"c\":true}}",
        "sort_keys": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "result": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          }
         }
        },
        "example": {
         "valid": true,
         "result": "{\n  \"a\": {\n    \"c\": true,\n    \"d\": [\n      1,\n      2\n    ]\n  },\n  \"b\": 2\n}",
         "characters": 75
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/csv-to-json": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "CSV to JSON",
    "description": "Send CSV text in the `csv` field or as a raw `text/csv` / `text/plain` body. By default the first row is used as header and each following row becomes an object (`rows`), with `fields` listing the column names. Set `header=false` to get arrays of values instead.\n\nThe delimiter (comma, semicolon, tab, pipe...) is detected automatically, or forced with `delimiter`. Numbers and booleans are converted to JSON types (`dynamic_typing`, on by default); set `dynamic_typing=false` to keep every value as a string. Quoted fields with commas and line breaks are handled, and empty lines are skipped.\n\nThe response also includes `row_count`, the `delimiter` used and up to 50 parse `errors` (row, message, code), such as rows with too few fields. The request body is limited to 5 MB.\n\nDocs: https://apibox.io.vn/docs/csv-to-json/",
    "operationId": "csvToJsonPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/csv-to-json/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "csv": {
          "type": "string",
          "description": "CSV text. Can also be sent as a raw text/csv or text/plain body."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "Use the first row as column names and return objects."
         },
         "delimiter": {
          "type": "string",
          "description": "Field delimiter; auto-detected when empty."
         },
         "dynamic_typing": {
          "type": "boolean",
          "default": true,
          "description": "Convert numbers and booleans to JSON types."
         }
        },
        "required": [
         "csv"
        ]
       },
       "example": {
        "csv": "name,age,city\nAlice,30,Hanoi\nBob,25,\"Ho Chi Minh City\""
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "age": {
              "type": "number"
             },
             "city": {
              "type": "string"
             }
            }
           }
          },
          "row_count": {
           "type": "number"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "delimiter": {
           "type": "string"
          },
          "errors": {
           "type": "array"
          }
         }
        },
        "example": {
         "rows": [
          {
           "name": "Alice",
           "age": 30,
           "city": "Hanoi"
          },
          {
           "name": "Bob",
           "age": 25,
           "city": "Ho Chi Minh City"
          }
         ],
         "row_count": 2,
         "fields": [
          "name",
          "age",
          "city"
         ],
         "delimiter": ",",
         "errors": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-to-csv": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON to CSV",
    "description": "Send a JSON array in `json`, either as a value or as a JSON string (a raw `text/plain` body also works). Each object becomes a row and its keys become the header; arrays of arrays are written as plain rows. Nested objects and arrays are serialized as JSON text inside the cell, and values with commas, quotes or line breaks are quoted correctly.\n\nColumns are the union of the keys of all objects, in the order they first appear; missing values become empty cells. Use `delimiter` for a separator other than a comma (for example `;` for European Excel) and `header=false` to omit the header row.\n\nBy default the response is JSON with `csv` and `row_count`; with `format=csv` the API answers with the raw CSV as `text/csv`, ready to save as a file. The request body is limited to 5 MB.\n\nDocs: https://apibox.io.vn/docs/json-to-csv/",
    "operationId": "jsonToCsvPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-to-csv/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "json": {
          "type": "array",
          "items": {},
          "description": "Array of objects or arrays, as a JSON value or JSON string. A raw text/plain body is also accepted."
         },
         "delimiter": {
          "type": "string",
          "default": ",",
          "description": "Field delimiter, e.g. `;` or a tab."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "Write the header row with column names."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "Set to `csv` to receive the raw CSV (text/csv) instead of JSON."
         }
        },
        "required": [
         "json"
        ]
       },
       "example": {
        "json": [
         {
          "name": "Alice",
          "age": 30,
          "tags": [
           "admin",
           "dev"
          ]
         },
         {
          "name": "Bob",
          "age": 25,
          "tags": []
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "csv": {
           "type": "string"
          },
          "row_count": {
           "type": "number"
          }
         }
        },
        "example": {
         "csv": "name,age,tags\nAlice,30,\"[\"\"admin\"\",\"\"dev\"\"]\"\nBob,25,[]",
         "row_count": 2
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/yaml": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "YAML ⇄ JSON",
    "description": "Send `yaml` to get JSON, or `json` to get YAML; the direction is picked automatically and can be forced with `to=json` or `to=yaml`. YAML can also be posted as a raw text body (for example `text/yaml`) with `to=json`.\n\nYAML to JSON returns `valid`, the parsed value in `json` and the number of `documents`; files with several documents separated by `---` return an array. Invalid YAML returns `valid: false` with an `error` message, `line` and `column` instead of an HTTP error.\n\nJSON to YAML accepts a JSON value or JSON string in `json` and returns the YAML text in `yaml`; `indent` sets the indentation (1 to 8, default 2). The request body is limited to 5 MB.\n\nDocs: https://apibox.io.vn/docs/yaml/",
    "operationId": "yamlPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/yaml/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "yaml": {
          "type": "string",
          "description": "YAML text to convert to JSON. Can also be sent as a raw text body with `to=json`."
         },
         "json": {
          "type": "object",
          "description": "JSON value or JSON string to convert to YAML."
         },
         "to": {
          "type": "string",
          "description": "Target format: `json` or `yaml`. Default: `json` when `yaml` is sent, otherwise `yaml`."
         },
         "indent": {
          "type": "number",
          "default": 2,
          "description": "YAML indentation (1-8) when converting to YAML."
         }
        }
       },
       "example": {
        "yaml": "name: APIBox\nversion: 1\nfeatures:\n  - html\n  - json\nenabled: true"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "json": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "number"
            },
            "features": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "enabled": {
             "type": "boolean"
            }
           }
          },
          "documents": {
           "type": "number"
          }
         }
        },
        "example": {
         "valid": true,
         "json": {
          "name": "APIBox",
          "version": 1,
          "features": [
           "html",
           "json"
          ],
          "enabled": true
         },
         "documents": 1
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/text-diff": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Text Diff",
    "description": "Send the original text in `a` (or `old`) and the new text in `b` (or `new`). The API returns the list of `changes` (each one `added`, `removed` or `unchanged` with its value), `stats` with added, removed and unchanged counts, a `similarity` percentage and `identical` when nothing changed.\n\nChoose the granularity with `mode`: `lines` (default, counts lines and also returns a `unified` diff like git diff), `words`, `chars`, `sentences`, or `json` which compares two JSON documents structurally after pretty printing. `ignore_case` and `ignore_whitespace` relax the comparison. For other modes, `unified=true` adds the patch; `a_name`, `b_name` and `context` (0-50 lines, default 3) control its header and context.\n\nBoth texts together may contain up to 2,000,000 characters (request body up to 4 MB).\n\nDocs: https://apibox.io.vn/docs/text-diff/",
    "operationId": "textDiffPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/text-diff/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "a": {
          "type": "string",
          "description": "Original text. Alias: `old`."
         },
         "b": {
          "type": "string",
          "description": "New text. Alias: `new`."
         },
         "mode": {
          "type": "string",
          "default": "lines",
          "description": "Comparison unit: `lines`, `words`, `chars`, `sentences` or `json`."
         },
         "ignore_case": {
          "type": "boolean",
          "default": false,
          "description": "Ignore upper/lower case differences (lines, words, chars)."
         },
         "ignore_whitespace": {
          "type": "boolean",
          "default": false,
          "description": "Ignore leading/trailing whitespace in lines mode, and whitespace changes in words mode."
         },
         "unified": {
          "type": "boolean",
          "default": false,
          "description": "Also return a unified diff for modes other than lines (always included in lines mode)."
         },
         "context": {
          "type": "number",
          "default": 3,
          "description": "Context lines in the unified diff (0-50)."
         },
         "a_name": {
          "type": "string",
          "default": "a",
          "description": "File name of the original in the unified diff header."
         },
         "b_name": {
          "type": "string",
          "default": "b",
          "description": "File name of the new text in the unified diff header."
         }
        },
        "required": [
         "a",
         "b"
        ]
       },
       "example": {
        "a": "one\ntwo\nthree",
        "b": "one\n2\nthree\nfour"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "identical": {
           "type": "boolean"
          },
          "similarity": {
           "type": "number"
          },
          "stats": {
           "type": "object",
           "properties": {
            "added": {
             "type": "number"
            },
            "removed": {
             "type": "number"
            },
            "unchanged": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            }
           }
          },
          "changes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "value": {
              "type": "string"
             },
             "count": {
              "type": "number"
             }
            }
           }
          },
          "unified": {
           "type": "string"
          }
         }
        },
        "example": {
         "mode": "lines",
         "identical": false,
         "similarity": 50,
         "stats": {
          "added": 2,
          "removed": 1,
          "unchanged": 2,
          "unit": "lines"
         },
         "changes": [
          {
           "type": "unchanged",
           "value": "one\n",
           "count": 1
          },
          {
           "type": "removed",
           "value": "two\n",
           "count": 1
          },
          {
           "type": "added",
           "value": "2\n",
           "count": 1
          },
          {
           "type": "unchanged",
           "value": "three\n",
           "count": 1
          },
          {
           "type": "added",
           "value": "four\n",
           "count": 1
          }
         ],
         "unified": "===================================================================\n--- a\n+++ b\n@@ -1,3 +1,4 @@\n one\n-two\n+2\n three\n+four\n"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/slugify": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Slugify",
    "description": "Send a `text` (query string, JSON or form field, or raw text body) and get a URL-safe `slug`. Accents and diacritics are removed (Việt Nam becomes viet-nam, đ becomes d), special letters such as ß, æ, ø and ł are transliterated, apostrophes and quotes are dropped and every other run of non-alphanumeric characters becomes a single separator.\n\nOptions: `separator` can be `-` (default), `_`, `.` or an empty string; `lowercase=false` keeps the original case; `max_length` (1-1000) cuts the slug and removes a trailing separator.\n\nThe input text is limited to 10,000 characters.\n\nDocs: https://apibox.io.vn/docs/slugify/",
    "operationId": "slugifyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/slugify/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text to slugify (max 10,000 characters). Can also be sent as a raw text body.",
      "schema": {
       "type": "string"
      },
      "example": "Xin chào Việt Nam! Đây là APIBox"
     },
     {
      "name": "separator",
      "in": "query",
      "required": false,
      "description": "Separator: `-`, `_`, `.` or empty. Other values fall back to `-`.",
      "schema": {
       "type": "string",
       "default": "-"
      }
     },
     {
      "name": "lowercase",
      "in": "query",
      "required": false,
      "description": "Convert to lower case; `false` keeps the original case.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "max_length",
      "in": "query",
      "required": false,
      "description": "Maximum slug length (1-1000). No limit when omitted.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "slug": {
           "type": "string"
          }
         }
        },
        "example": {
         "slug": "xin-chao-viet-nam-day-la-apibox"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Slugify",
    "description": "Send a `text` (query string, JSON or form field, or raw text body) and get a URL-safe `slug`. Accents and diacritics are removed (Việt Nam becomes viet-nam, đ becomes d), special letters such as ß, æ, ø and ł are transliterated, apostrophes and quotes are dropped and every other run of non-alphanumeric characters becomes a single separator.\n\nOptions: `separator` can be `-` (default), `_`, `.` or an empty string; `lowercase=false` keeps the original case; `max_length` (1-1000) cuts the slug and removes a trailing separator.\n\nThe input text is limited to 10,000 characters.\n\nDocs: https://apibox.io.vn/docs/slugify/",
    "operationId": "slugifyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/slugify/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to slugify (max 10,000 characters). Can also be sent as a raw text body."
         },
         "separator": {
          "type": "string",
          "default": "-",
          "description": "Separator: `-`, `_`, `.` or empty. Other values fall back to `-`."
         },
         "lowercase": {
          "type": "boolean",
          "default": true,
          "description": "Convert to lower case; `false` keeps the original case."
         },
         "max_length": {
          "type": "number",
          "description": "Maximum slug length (1-1000). No limit when omitted."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "slug": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/text-stats": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Text Statistics",
    "description": "Send a `text` (JSON or form field, or raw text body) and get its statistics: `characters` (Unicode code points), `characters_no_spaces`, `bytes_utf8`, `words`, `unique_words`, `sentences`, `paragraphs`, `lines` and `average_word_length`. Words are counted with Unicode letters and digits, so Vietnamese and other non-English texts are handled correctly.\n\n`reading_time_seconds` is based on `wpm` words per minute (default 230, range 50-1000) and `speaking_time_seconds` on 150 words per minute. `top_words` lists the most frequent words longer than 2 characters (case-insensitive); set `top` from 0 to 100 (default 10).\n\nThe text may contain up to 2,000,000 characters (request body up to 5 MB).\n\nDocs: https://apibox.io.vn/docs/text-stats/",
    "operationId": "textStatsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/text-stats/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to analyze (max 2,000,000 characters). Can also be sent as a raw text body."
         },
         "wpm": {
          "type": "number",
          "default": 230,
          "description": "Reading speed in words per minute (50-1000)."
         },
         "top": {
          "type": "number",
          "default": 10,
          "description": "Number of most frequent words to return (0-100)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "APIBox offers small developer APIs. They run on Cloudflare Workers!\n\nEach API is fast and simple. APIs are easy to use.",
        "top": 5
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "characters": {
           "type": "number"
          },
          "characters_no_spaces": {
           "type": "number"
          },
          "bytes_utf8": {
           "type": "number"
          },
          "words": {
           "type": "number"
          },
          "unique_words": {
           "type": "number"
          },
          "sentences": {
           "type": "number"
          },
          "paragraphs": {
           "type": "number"
          },
          "lines": {
           "type": "number"
          },
          "reading_time_seconds": {
           "type": "number"
          },
          "speaking_time_seconds": {
           "type": "number"
          },
          "average_word_length": {
           "type": "number"
          },
          "top_words": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "word": {
              "type": "string"
             },
             "count": {
              "type": "number"
             }
            }
           }
          }
         }
        },
        "example": {
         "characters": 119,
         "characters_no_spaces": 98,
         "bytes_utf8": 119,
         "words": 21,
         "unique_words": 20,
         "sentences": 4,
         "paragraphs": 2,
         "lines": 3,
         "reading_time_seconds": 6,
         "speaking_time_seconds": 9,
         "average_word_length": 4.48,
         "top_words": [
          {
           "word": "apis",
           "count": 2
          },
          {
           "word": "apibox",
           "count": 1
          },
          {
           "word": "offers",
           "count": 1
          },
          {
           "word": "small",
           "count": 1
          },
          {
           "word": "developer",
           "count": 1
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/case-convert": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Case Converter",
    "description": "Send a `text` (query string, JSON or form field, or raw text body) and get it in ten cases at once: `lower`, `upper`, `title`, `sentence`, `camel`, `pascal`, `snake`, `kebab`, `constant` and `dot`. Add `to` with one of these names to receive only that variant in `result`.\n\nFor the programming cases (camel, pascal, snake, kebab, constant, dot) the text is split into words on any non-letter, non-digit character and on lowercase-to-uppercase boundaries, so `userId`, `user_id` and `user id` all give the same parts. Title and sentence case work on the lowercased text and keep spacing and punctuation. Unicode letters, including Vietnamese, are supported.\n\nThe input text is limited to 100,000 characters. An unknown `to` value returns a 400 error listing the valid names.\n\nDocs: https://apibox.io.vn/docs/case-convert/",
    "operationId": "caseConvertGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/case-convert/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text to convert (max 100,000 characters). Can also be sent as a raw text body.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Return only one case: lower, upper, title, sentence, camel, pascal, snake, kebab, constant or dot.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "lower": {
           "type": "string"
          },
          "upper": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "sentence": {
           "type": "string"
          },
          "camel": {
           "type": "string"
          },
          "pascal": {
           "type": "string"
          },
          "snake": {
           "type": "string"
          },
          "kebab": {
           "type": "string"
          },
          "constant": {
           "type": "string"
          },
          "dot": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Case Converter",
    "description": "Send a `text` (query string, JSON or form field, or raw text body) and get it in ten cases at once: `lower`, `upper`, `title`, `sentence`, `camel`, `pascal`, `snake`, `kebab`, `constant` and `dot`. Add `to` with one of these names to receive only that variant in `result`.\n\nFor the programming cases (camel, pascal, snake, kebab, constant, dot) the text is split into words on any non-letter, non-digit character and on lowercase-to-uppercase boundaries, so `userId`, `user_id` and `user id` all give the same parts. Title and sentence case work on the lowercased text and keep spacing and punctuation. Unicode letters, including Vietnamese, are supported.\n\nThe input text is limited to 100,000 characters. An unknown `to` value returns a 400 error listing the valid names.\n\nDocs: https://apibox.io.vn/docs/case-convert/",
    "operationId": "caseConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/case-convert/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to convert (max 100,000 characters). Can also be sent as a raw text body."
         },
         "to": {
          "type": "string",
          "description": "Return only one case: lower, upper, title, sentence, camel, pascal, snake, kebab, constant or dot."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "user profile settings"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "lower": {
           "type": "string"
          },
          "upper": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "sentence": {
           "type": "string"
          },
          "camel": {
           "type": "string"
          },
          "pascal": {
           "type": "string"
          },
          "snake": {
           "type": "string"
          },
          "kebab": {
           "type": "string"
          },
          "constant": {
           "type": "string"
          },
          "dot": {
           "type": "string"
          }
         }
        },
        "example": {
         "lower": "user profile settings",
         "upper": "USER PROFILE SETTINGS",
         "title": "User Profile Settings",
         "sentence": "User profile settings",
         "camel": "userProfileSettings",
         "pascal": "UserProfileSettings",
         "snake": "user_profile_settings",
         "kebab": "user-profile-settings",
         "constant": "USER_PROFILE_SETTINGS",
         "dot": "user.profile.settings"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/lorem-ipsum": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Lorem Ipsum Generator",
    "description": "Call `GET /v1/lorem-ipsum` to get random Latin placeholder text. Choose the unit with `type` (`paragraphs`, `sentences` or `words`) and the amount with `count` (1-100). The default count is 3 paragraphs, 5 sentences or 50 words.\n\nSentences have 6 to 15 random words and paragraphs 4 to 7 sentences. By default the text starts with the classic \"Lorem ipsum dolor sit amet,\", which is added in front of the generated words; set `start_with_lorem=false` to skip it.\n\nThe response contains `text` (paragraphs joined by blank lines, sentences and words by spaces) and `items`, the same content as an array, which is handy for filling lists or multiple fields.\n\nDocs: https://apibox.io.vn/docs/lorem-ipsum/",
    "operationId": "loremIpsumGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/lorem-ipsum/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Unit to generate: `paragraphs`, `sentences` or `words`.",
      "schema": {
       "type": "string",
       "default": "paragraphs"
      },
      "example": "sentences"
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "How many units (1-100). Default 3 paragraphs, 5 sentences or 50 words.",
      "schema": {
       "type": "number",
       "default": 3
      },
      "example": 2
     },
     {
      "name": "start_with_lorem",
      "in": "query",
      "required": false,
      "description": "Start the text with \"Lorem ipsum dolor sit amet,\".",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "text": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "type": "sentences",
         "count": 2,
         "text": "Lorem ipsum dolor sit amet, dolor sit ea dolore qui sint voluptate. Ad exercitation id nisi do excepteur excepteur laborum voluptate.",
         "items": [
          "Lorem ipsum dolor sit amet, dolor sit ea dolore qui sint voluptate.",
          "Ad exercitation id nisi do excepteur excepteur laborum voluptate."
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/qr": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "QR Code Generator",
    "description": "The QR Code API turns any text or URL into a QR code image. Call `GET /v1/qr?text=...` and you get a PNG back (or an SVG with `format=svg`), ready to use directly in an `<img>` tag, an e-mail or a print template. With `format=json` you get the encoded data, the QR version, the module count, the SVG markup and a base64 PNG in one JSON response.\n\nBesides plain text, the `type` parameter builds the standard payloads that phone cameras understand: `wifi` (ssid, password, encryption, hidden), `vcard` (first_name, last_name, org, title, phone, email, website, address), `email` (to, subject, body), `sms` (phone, message), `tel` (phone) and `geo` (lat, lng). You no longer have to remember the `WIFI:T:WPA;S:...;;` syntax or escape special characters yourself.\n\nYou control the size (64–2000 px, default 300), the quiet-zone margin (0–20 modules, default 4), the foreground and background colours (hex such as `1e90ff` or a basic colour name) and the error-correction level `ecc` (L, M, Q, H; default M). PNG output uses whole pixels per module, so the image can be a few pixels smaller than the requested size to stay perfectly sharp. The encoded data is limited to about 2,900 characters.\n\nBadge on the Free plan. For Free accounts created since the badge was introduced (November 2026), PNG and SVG images carry a small grey \"Powered by APIBox\" line in a strip under the code (in the SVG it links to apibox.io.vn). The strip is outside the quiet zone, so the code scans exactly as before; it is 16 px high (32 px from 600 px wide, 48 px from 900 px), so the image is that much taller than wide (e.g. 297×313 px at the default size). Starter and Pro images have no badge (add `badge=1` if you want it), and Free accounts created before it keep their images unchanged. `format=json` and the free online tool never add it. The response header `X-APIBox-Badge` is `1` or `0`.\n\nDocs: https://apibox.io.vn/docs/qr/",
    "operationId": "qrGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/qr/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text or URL to encode (aliases: `data`, `url`). Required when `type` is `text` (default). Max ~2,900 characters.",
      "schema": {
       "type": "string"
      },
      "example": "https://apibox.io.vn"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Payload type: `text`, `wifi`, `vcard`, `email`, `sms`, `tel` or `geo`.",
      "schema": {
       "type": "string",
       "default": "text"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`png` (image), `svg` (image) or `json` (data, version, modules, ecc, svg, png_base64).",
      "schema": {
       "type": "string",
       "default": "png"
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "description": "Image width/height in pixels, 64–2000.",
      "schema": {
       "type": "number",
       "default": 300
      },
      "example": 300
     },
     {
      "name": "margin",
      "in": "query",
      "required": false,
      "description": "Quiet zone around the code, in modules (0–20).",
      "schema": {
       "type": "number",
       "default": 4
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Foreground colour: hex (`1e90ff`, `#333`) or black, white, red, green, blue, gray.",
      "schema": {
       "type": "string",
       "default": "000000"
      },
      "example": "1e3a8a"
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour (same formats as `color`).",
      "schema": {
       "type": "string",
       "default": "ffffff"
      }
     },
     {
      "name": "ecc",
      "in": "query",
      "required": false,
      "description": "Error correction level: L, M, Q or H.",
      "schema": {
       "type": "string",
       "default": "M"
      }
     },
     {
      "name": "badge",
      "in": "query",
      "required": false,
      "description": "`1` adds the \"Powered by APIBox\" strip under PNG / SVG images on any plan. Free accounts created since Nov 2026 always have it; Starter / Pro do not unless asked.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ssid",
      "in": "query",
      "required": false,
      "description": "type=wifi: network name. Also `password`, `encryption` (WPA, WEP, nopass; default WPA) and `hidden` (true/false).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "first_name",
      "in": "query",
      "required": false,
      "description": "type=vcard: contact fields `first_name`, `last_name`, `org`, `title`, `phone`, `email`, `website`, `address`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "type=email: recipient, with optional `subject` and `body`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "phone",
      "in": "query",
      "required": false,
      "description": "type=tel or sms: phone number (sms also takes `message`); also used by vcard.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "type=geo: latitude, with `lng` for the longitude.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/png": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/png"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "QR Code Generator",
    "description": "The QR Code API turns any text or URL into a QR code image. Call `GET /v1/qr?text=...` and you get a PNG back (or an SVG with `format=svg`), ready to use directly in an `<img>` tag, an e-mail or a print template. With `format=json` you get the encoded data, the QR version, the module count, the SVG markup and a base64 PNG in one JSON response.\n\nBesides plain text, the `type` parameter builds the standard payloads that phone cameras understand: `wifi` (ssid, password, encryption, hidden), `vcard` (first_name, last_name, org, title, phone, email, website, address), `email` (to, subject, body), `sms` (phone, message), `tel` (phone) and `geo` (lat, lng). You no longer have to remember the `WIFI:T:WPA;S:...;;` syntax or escape special characters yourself.\n\nYou control the size (64–2000 px, default 300), the quiet-zone margin (0–20 modules, default 4), the foreground and background colours (hex such as `1e90ff` or a basic colour name) and the error-correction level `ecc` (L, M, Q, H; default M). PNG output uses whole pixels per module, so the image can be a few pixels smaller than the requested size to stay perfectly sharp. The encoded data is limited to about 2,900 characters.\n\nBadge on the Free plan. For Free accounts created since the badge was introduced (November 2026), PNG and SVG images carry a small grey \"Powered by APIBox\" line in a strip under the code (in the SVG it links to apibox.io.vn). The strip is outside the quiet zone, so the code scans exactly as before; it is 16 px high (32 px from 600 px wide, 48 px from 900 px), so the image is that much taller than wide (e.g. 297×313 px at the default size). Starter and Pro images have no badge (add `badge=1` if you want it), and Free accounts created before it keep their images unchanged. `format=json` and the free online tool never add it. The response header `X-APIBox-Badge` is `1` or `0`.\n\nDocs: https://apibox.io.vn/docs/qr/",
    "operationId": "qrPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/qr/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text or URL to encode (aliases: `data`, `url`). Required when `type` is `text` (default). Max ~2,900 characters."
         },
         "type": {
          "type": "string",
          "default": "text",
          "description": "Payload type: `text`, `wifi`, `vcard`, `email`, `sms`, `tel` or `geo`."
         },
         "format": {
          "type": "string",
          "default": "png",
          "description": "`png` (image), `svg` (image) or `json` (data, version, modules, ecc, svg, png_base64)."
         },
         "size": {
          "type": "number",
          "default": 300,
          "description": "Image width/height in pixels, 64–2000."
         },
         "margin": {
          "type": "number",
          "default": 4,
          "description": "Quiet zone around the code, in modules (0–20)."
         },
         "color": {
          "type": "string",
          "default": "000000",
          "description": "Foreground colour: hex (`1e90ff`, `#333`) or black, white, red, green, blue, gray."
         },
         "background": {
          "type": "string",
          "default": "ffffff",
          "description": "Background colour (same formats as `color`)."
         },
         "ecc": {
          "type": "string",
          "default": "M",
          "description": "Error correction level: L, M, Q or H."
         },
         "badge": {
          "type": "string",
          "description": "`1` adds the \"Powered by APIBox\" strip under PNG / SVG images on any plan. Free accounts created since Nov 2026 always have it; Starter / Pro do not unless asked."
         },
         "ssid": {
          "type": "string",
          "description": "type=wifi: network name. Also `password`, `encryption` (WPA, WEP, nopass; default WPA) and `hidden` (true/false)."
         },
         "first_name": {
          "type": "string",
          "description": "type=vcard: contact fields `first_name`, `last_name`, `org`, `title`, `phone`, `email`, `website`, `address`."
         },
         "to": {
          "type": "string",
          "description": "type=email: recipient, with optional `subject` and `body`."
         },
         "phone": {
          "type": "string",
          "description": "type=tel or sms: phone number (sms also takes `message`); also used by vcard."
         },
         "lat": {
          "type": "number",
          "description": "type=geo: latitude, with `lng` for the longitude."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/png": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/png"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/barcode": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Barcode Generator",
    "description": "The Barcode API generates Code 128 barcodes, the most widely used linear barcode for shipping labels, warehouse SKUs, invoices and internal asset tags. Send `GET /v1/barcode?text=ABC-12345` and receive a crisp SVG image; add `format=png` for a bitmap.\n\nThe encoder automatically switches between Code 128 set B (all printable ASCII characters) and set C (pairs of digits) so long numeric runs produce a compact barcode, and it calculates the check digit for you. The text can be up to 80 printable ASCII characters; accented or non-Latin characters are rejected with a clear error.\n\nOptions: `height` of the bars (20–600 px, default 80), `module_width` (1–10 px per narrow bar, default 2), foreground `color` and `background`, and `show_text=false` to hide the human-readable line printed under the SVG barcode (PNG output contains the bars only).\n\nDocs: https://apibox.io.vn/docs/barcode/",
    "operationId": "barcodeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/barcode/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Content to encode: printable ASCII, max 80 characters.",
      "schema": {
       "type": "string"
      },
      "example": "ABC-12345"
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`svg` or `png`.",
      "schema": {
       "type": "string",
       "default": "svg"
      }
     },
     {
      "name": "height",
      "in": "query",
      "required": false,
      "description": "Bar height in pixels (20–600).",
      "schema": {
       "type": "number",
       "default": 80
      },
      "example": 80
     },
     {
      "name": "module_width",
      "in": "query",
      "required": false,
      "description": "Width of the narrowest bar in pixels (1–10).",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Bar colour (hex or basic colour name).",
      "schema": {
       "type": "string",
       "default": "000000"
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour.",
      "schema": {
       "type": "string",
       "default": "ffffff"
      }
     },
     {
      "name": "show_text",
      "in": "query",
      "required": false,
      "description": "Print the text under the barcode (SVG only).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/svg+xml": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/svg+xml"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Barcode Generator",
    "description": "The Barcode API generates Code 128 barcodes, the most widely used linear barcode for shipping labels, warehouse SKUs, invoices and internal asset tags. Send `GET /v1/barcode?text=ABC-12345` and receive a crisp SVG image; add `format=png` for a bitmap.\n\nThe encoder automatically switches between Code 128 set B (all printable ASCII characters) and set C (pairs of digits) so long numeric runs produce a compact barcode, and it calculates the check digit for you. The text can be up to 80 printable ASCII characters; accented or non-Latin characters are rejected with a clear error.\n\nOptions: `height` of the bars (20–600 px, default 80), `module_width` (1–10 px per narrow bar, default 2), foreground `color` and `background`, and `show_text=false` to hide the human-readable line printed under the SVG barcode (PNG output contains the bars only).\n\nDocs: https://apibox.io.vn/docs/barcode/",
    "operationId": "barcodePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/barcode/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Content to encode: printable ASCII, max 80 characters."
         },
         "format": {
          "type": "string",
          "default": "svg",
          "description": "`svg` or `png`."
         },
         "height": {
          "type": "number",
          "default": 80,
          "description": "Bar height in pixels (20–600)."
         },
         "module_width": {
          "type": "number",
          "default": 2,
          "description": "Width of the narrowest bar in pixels (1–10)."
         },
         "color": {
          "type": "string",
          "default": "000000",
          "description": "Bar colour (hex or basic colour name)."
         },
         "background": {
          "type": "string",
          "default": "ffffff",
          "description": "Background colour."
         },
         "show_text": {
          "type": "boolean",
          "default": true,
          "description": "Print the text under the barcode (SVG only)."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/svg+xml": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/svg+xml"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/placeholder": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Placeholder Image",
    "description": "The Placeholder Image API returns dummy images of exactly the size you need for wireframes, UI prototypes, seed data and automated tests. Put the size in the path – `/v1/placeholder/600x400`, `/v1/placeholder/600x400.png` or just `/v1/placeholder/300` for a square – or use the `width` and `height` query parameters (default 600×400).\n\nThe default SVG output shows a centred label (the dimensions, or your own `text` up to 60 characters) on a neutral grey background; `background` (or `bg`) and `color` accept hex colours. SVG files are tiny and scale perfectly. With `.png` or `format=png` you get a solid-colour PNG of the requested size, without text, which is handy when a real raster file is required (upload tests, image pipelines).\n\nWidth and height go from 1 to 4000 pixels; PNG placeholders are limited to 4 megapixels. Responses are cacheable for 7 days.\n\nPath segments: `size`: Optional path segment `WIDTHxHEIGHT[.png|.svg]`, e.g. `/v1/placeholder/600x400.png`; a single number gives a square.\n\nDocs: https://apibox.io.vn/docs/placeholder/",
    "operationId": "placeholderGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/placeholder/"
    },
    "parameters": [
     {
      "name": "width",
      "in": "query",
      "required": false,
      "description": "Width in pixels (1–4000), when not given in the path.",
      "schema": {
       "type": "number",
       "default": 600
      }
     },
     {
      "name": "height",
      "in": "query",
      "required": false,
      "description": "Height in pixels (1–4000).",
      "schema": {
       "type": "number",
       "default": 400
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`svg` or `png` (PNG is a solid colour, max 4 megapixels).",
      "schema": {
       "type": "string",
       "default": "svg"
      }
     },
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Label shown in the SVG (max 60 characters).",
      "schema": {
       "type": "string",
       "default": "WIDTH×HEIGHT"
      },
      "example": "Hello"
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour, hex (alias `bg`).",
      "schema": {
       "type": "string",
       "default": "dde1e7"
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Text colour, hex.",
      "schema": {
       "type": "string",
       "default": "5a6270"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/svg+xml": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/svg+xml"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/hash": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Hash Generator",
    "description": "The Hash API computes checksums and cryptographic digests of a string or a file. By default it returns all supported algorithms at once – MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 – or only the ones you list in `algorithm` (comma separated, e.g. `sha256,md5`).\n\nSend the input as `text` (query or JSON), as a raw text body, or hash binary data: upload a file in the multipart field `file`, post the raw bytes, or pass base64 in `file_base64`. Files can be as large as your plan allows (Free 5 MB, Starter 20 MB, Pro 50 MB). The response also reports the number of bytes hashed.\n\nSet `hmac_key` to get HMAC signatures instead of plain digests (HMAC-SHA256 is what most webhook providers use), and `encoding=base64` for base64 output instead of hex. CRC32 is always returned as 8 hex characters.\n\nDocs: https://apibox.io.vn/docs/hash/",
    "operationId": "hashGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/hash/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text to hash (UTF-8). Not needed when a file or a raw text body is sent.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "algorithm",
      "in": "query",
      "required": false,
      "description": "`all` or a comma-separated list of md5, sha1, sha256, sha384, sha512, crc32 (alias `algorithms`).",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "encoding",
      "in": "query",
      "required": false,
      "description": "`hex` or `base64` (CRC32 is always hex).",
      "schema": {
       "type": "string",
       "default": "hex"
      }
     },
     {
      "name": "hmac_key",
      "in": "query",
      "required": false,
      "description": "Secret key: returns HMAC signatures instead of plain hashes.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "encoding": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          },
          "hashes": {
           "type": "object",
           "properties": {
            "md5": {
             "type": "string"
            },
            "sha1": {
             "type": "string"
            },
            "sha256": {
             "type": "string"
            },
            "sha384": {
             "type": "string"
            },
            "sha512": {
             "type": "string"
            },
            "crc32": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Hash Generator",
    "description": "The Hash API computes checksums and cryptographic digests of a string or a file. By default it returns all supported algorithms at once – MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 – or only the ones you list in `algorithm` (comma separated, e.g. `sha256,md5`).\n\nSend the input as `text` (query or JSON), as a raw text body, or hash binary data: upload a file in the multipart field `file`, post the raw bytes, or pass base64 in `file_base64`. Files can be as large as your plan allows (Free 5 MB, Starter 20 MB, Pro 50 MB). The response also reports the number of bytes hashed.\n\nSet `hmac_key` to get HMAC signatures instead of plain digests (HMAC-SHA256 is what most webhook providers use), and `encoding=base64` for base64 output instead of hex. CRC32 is always returned as 8 hex characters.\n\nDocs: https://apibox.io.vn/docs/hash/",
    "operationId": "hashPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/hash/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to hash (UTF-8). Not needed when a file or a raw text body is sent."
         },
         "algorithm": {
          "type": "string",
          "default": "all",
          "description": "`all` or a comma-separated list of md5, sha1, sha256, sha384, sha512, crc32 (alias `algorithms`)."
         },
         "encoding": {
          "type": "string",
          "default": "hex",
          "description": "`hex` or `base64` (CRC32 is always hex)."
         },
         "hmac_key": {
          "type": "string",
          "description": "Secret key: returns HMAC signatures instead of plain hashes."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "hello world"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to hash (UTF-8). Not needed when a file or a raw text body is sent."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "File to hash: multipart field `file`, raw binary body, or base64 in `file_base64`. Max 5/20/50 MB by plan."
         },
         "algorithm": {
          "type": "string",
          "default": "all",
          "description": "`all` or a comma-separated list of md5, sha1, sha256, sha384, sha512, crc32 (alias `algorithms`)."
         },
         "encoding": {
          "type": "string",
          "default": "hex",
          "description": "`hex` or `base64` (CRC32 is always hex)."
         },
         "hmac_key": {
          "type": "string",
          "description": "Secret key: returns HMAC signatures instead of plain hashes."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "encoding": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          },
          "hashes": {
           "type": "object",
           "properties": {
            "md5": {
             "type": "string"
            },
            "sha1": {
             "type": "string"
            },
            "sha256": {
             "type": "string"
            },
            "sha384": {
             "type": "string"
            },
            "sha512": {
             "type": "string"
            },
            "crc32": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "encoding": "hex",
         "bytes": 11,
         "hashes": {
          "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3",
          "sha1": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
          "sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
          "sha384": "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd",
          "sha512": "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f",
          "crc32": "0d4a1185"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/encode": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Encode / Decode",
    "description": "The Encode API converts text to and from the encodings developers deal with every day. Choose a `scheme` – `base64`, `base64url`, `hex`, `url`, `html`, `unicode`, `rot13` or `binary` – and an `action` (`encode`, the default, or `decode`). Everything is UTF-8 aware, so Vietnamese, emoji and other non-ASCII text survive a round trip through Base64 or hex.\n\nDetails per scheme: `base64url` encodes without padding (JWT style); `hex` decoding ignores spaces and a `0x` prefix; `url` uses percent-encoding (and turns `+` into spaces when decoding); `html` escapes `& < > \" '` and decodes named and numeric entities; `unicode` turns non-ASCII characters into `\\uXXXX` escapes; `binary` outputs 8-bit groups separated by spaces.\n\nSend `text` in the query string or a JSON body, or post the text as a raw `text/plain` body. The result comes back in a small JSON object together with the scheme and action used. Invalid input for a decode (for example broken Base64) returns a clear decode_error.\n\nDocs: https://apibox.io.vn/docs/encode/",
    "operationId": "encodeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/encode/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text to encode or decode (or send it as a raw text/plain body).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scheme",
      "in": "query",
      "required": false,
      "description": "base64, base64url, hex, url, html, unicode, rot13 or binary.",
      "schema": {
       "type": "string",
       "default": "base64"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`encode` or `decode`.",
      "schema": {
       "type": "string",
       "default": "encode"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "scheme": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "result": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Encode / Decode",
    "description": "The Encode API converts text to and from the encodings developers deal with every day. Choose a `scheme` – `base64`, `base64url`, `hex`, `url`, `html`, `unicode`, `rot13` or `binary` – and an `action` (`encode`, the default, or `decode`). Everything is UTF-8 aware, so Vietnamese, emoji and other non-ASCII text survive a round trip through Base64 or hex.\n\nDetails per scheme: `base64url` encodes without padding (JWT style); `hex` decoding ignores spaces and a `0x` prefix; `url` uses percent-encoding (and turns `+` into spaces when decoding); `html` escapes `& < > \" '` and decodes named and numeric entities; `unicode` turns non-ASCII characters into `\\uXXXX` escapes; `binary` outputs 8-bit groups separated by spaces.\n\nSend `text` in the query string or a JSON body, or post the text as a raw `text/plain` body. The result comes back in a small JSON object together with the scheme and action used. Invalid input for a decode (for example broken Base64) returns a clear decode_error.\n\nDocs: https://apibox.io.vn/docs/encode/",
    "operationId": "encodePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/encode/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to encode or decode (or send it as a raw text/plain body)."
         },
         "scheme": {
          "type": "string",
          "default": "base64",
          "description": "base64, base64url, hex, url, html, unicode, rot13 or binary."
         },
         "action": {
          "type": "string",
          "default": "encode",
          "description": "`encode` or `decode`."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Xin chào APIBox",
        "scheme": "base64"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "scheme": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "result": {
           "type": "string"
          }
         }
        },
        "example": {
         "scheme": "base64",
         "action": "encode",
         "result": "WGluIGNow6BvIEFQSUJveA=="
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/password": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Password Generator",
    "description": "The Password API does two jobs. Without a `password` parameter it generates random passwords using the platform’s cryptographically secure random generator: choose the `length` (4–256, default 16), how many to create with `count` (1–100), and which character sets to include – `lowercase`, `uppercase`, `numbers`, `symbols` (all on by default; set one to `false` to drop it). `exclude_ambiguous=true` removes look-alike characters such as O, 0, I, l and 1.\n\nWith `password=...` it checks the strength of an existing password instead: you get a score from 0 to 4 with a label (very weak … very strong), the entropy in bits, an estimated offline crack time at 10 billion guesses per second, and a list of issues such as \"shorter than 8 characters\", \"a very common password\", repeated characters, common sequences or missing character classes.\n\nGenerated passwords are also returned with the strength report of the first one. Nothing is stored or logged by the endpoint. For checking sensitive passwords prefer POST so the value does not end up in URLs.\n\nDocs: https://apibox.io.vn/docs/password/",
    "operationId": "passwordGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/password/"
    },
    "parameters": [
     {
      "name": "length",
      "in": "query",
      "required": false,
      "description": "Password length, 4–256.",
      "schema": {
       "type": "number",
       "default": 16
      },
      "example": 20
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of passwords, 1–100.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 2
     },
     {
      "name": "lowercase",
      "in": "query",
      "required": false,
      "description": "Include a–z.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "uppercase",
      "in": "query",
      "required": false,
      "description": "Include A–Z.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "numbers",
      "in": "query",
      "required": false,
      "description": "Include 0–9.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "symbols",
      "in": "query",
      "required": false,
      "description": "Include symbols !@#$%^&*()-_=+[]{};:,.?/~",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "exclude_ambiguous",
      "in": "query",
      "required": false,
      "description": "Remove look-alike characters (O 0 I l 1).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "password",
      "in": "query",
      "required": false,
      "description": "Check this password’s strength instead of generating new ones.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "length": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "passwords": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "strength": {
           "type": "object",
           "properties": {
            "score": {
             "type": "number"
            },
            "label": {
             "type": "string"
            },
            "entropy_bits": {
             "type": "number"
            },
            "crack_time_offline": {
             "type": "string"
            },
            "issues": {
             "type": "array"
            }
           }
          }
         }
        },
        "example": {
         "length": 20,
         "count": 2,
         "passwords": [
          "6y4#_r8i[}rNJFuHb=e4",
          "%@:$yMsZyAa^veIM6K@h"
         ],
         "strength": {
          "score": 4,
          "label": "very strong",
          "entropy_bits": 131.4,
          "crack_time_offline": "centuries",
          "issues": []
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Password Generator",
    "description": "The Password API does two jobs. Without a `password` parameter it generates random passwords using the platform’s cryptographically secure random generator: choose the `length` (4–256, default 16), how many to create with `count` (1–100), and which character sets to include – `lowercase`, `uppercase`, `numbers`, `symbols` (all on by default; set one to `false` to drop it). `exclude_ambiguous=true` removes look-alike characters such as O, 0, I, l and 1.\n\nWith `password=...` it checks the strength of an existing password instead: you get a score from 0 to 4 with a label (very weak … very strong), the entropy in bits, an estimated offline crack time at 10 billion guesses per second, and a list of issues such as \"shorter than 8 characters\", \"a very common password\", repeated characters, common sequences or missing character classes.\n\nGenerated passwords are also returned with the strength report of the first one. Nothing is stored or logged by the endpoint. For checking sensitive passwords prefer POST so the value does not end up in URLs.\n\nDocs: https://apibox.io.vn/docs/password/",
    "operationId": "passwordPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/password/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "length": {
          "type": "number",
          "default": 16,
          "description": "Password length, 4–256."
         },
         "count": {
          "type": "number",
          "default": 1,
          "description": "Number of passwords, 1–100."
         },
         "lowercase": {
          "type": "boolean",
          "default": true,
          "description": "Include a–z."
         },
         "uppercase": {
          "type": "boolean",
          "default": true,
          "description": "Include A–Z."
         },
         "numbers": {
          "type": "boolean",
          "default": true,
          "description": "Include 0–9."
         },
         "symbols": {
          "type": "boolean",
          "default": true,
          "description": "Include symbols !@#$%^&*()-_=+[]{};:,.?/~"
         },
         "exclude_ambiguous": {
          "type": "boolean",
          "default": false,
          "description": "Remove look-alike characters (O 0 I l 1)."
         },
         "password": {
          "type": "string",
          "description": "Check this password’s strength instead of generating new ones."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "length": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "passwords": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "strength": {
           "type": "object",
           "properties": {
            "score": {
             "type": "number"
            },
            "label": {
             "type": "string"
            },
            "entropy_bits": {
             "type": "number"
            },
            "crack_time_offline": {
             "type": "string"
            },
            "issues": {
             "type": "array"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/jwt": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "JWT Decode & Sign",
    "description": "The JWT API decodes, verifies and creates JSON Web Tokens. In `decode` mode (the default) you send a `token` – a leading `Bearer ` is stripped – and get its header and payload as JSON, plus human-readable claims: `issued_at`, `expires_at` and `not_before` as ISO dates, and whether the token is `expired` or `not_yet_valid`.\n\nAdd a `secret` (HMAC shared secret, or an RSA/EC public key as PEM `PUBLIC KEY` or JWK) and the signature is verified too: `signature_valid` tells you if the signature matches and `valid` is true only when the signature is correct and the token is within its validity window. Supported algorithms: HS256/384/512, RS256/384/512, PS256/384/512 and ES256/384/512.\n\nIn `sign` mode (`action=sign`, or simply send a `payload`) the API builds a signed token from your JSON `payload` with the chosen `algorithm` (default HS256) and `secret` (an HMAC secret, or a PKCS#8 `PRIVATE KEY` PEM / private JWK for asymmetric algorithms). `expires_in` (seconds) adds `iat` and `exp` claims for you. The endpoint is POST-only so tokens and keys never appear in URLs.\n\nDocs: https://apibox.io.vn/docs/jwt/",
    "operationId": "jwtPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/jwt/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "decode",
          "description": "`decode` or `sign`. Defaults to `sign` when a `payload` is sent."
         },
         "token": {
          "type": "string",
          "description": "decode: the JWT to decode (a `Bearer ` prefix is accepted)."
         },
         "secret": {
          "type": "string",
          "description": "HMAC secret, or a PEM / JWK key (public key to verify, PKCS#8 private key to sign). Alias `key` for decode. Required for sign."
         },
         "payload": {
          "type": "object",
          "description": "sign: JSON object of claims (or a JSON string)."
         },
         "algorithm": {
          "type": "string",
          "default": "HS256",
          "description": "sign: HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512."
         },
         "expires_in": {
          "type": "number",
          "description": "sign: lifetime in seconds; adds `iat` and `exp` claims."
         }
        }
       },
       "example": {
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3OTQyODczMTQsImV4cCI6MTc5NDI5MDkxNCwic3ViIjoidXNlcl8xMjMiLCJyb2xlIjoiYWRtaW4ifQ.Dle3BtqLL449n-RirNMbP23azwGNJ57klSgX2-x1rH4",
        "secret": "my-secret"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "header": {
           "type": "object",
           "properties": {
            "alg": {
             "type": "string"
            },
            "typ": {
             "type": "string"
            }
           }
          },
          "payload": {
           "type": "object",
           "properties": {
            "iat": {
             "type": "number"
            },
            "exp": {
             "type": "number"
            },
            "sub": {
             "type": "string"
            },
            "role": {
             "type": "string"
            }
           }
          },
          "claims": {
           "type": "object",
           "properties": {
            "issued_at": {
             "type": "string"
            },
            "expires_at": {
             "type": "string"
            },
            "not_before": {},
            "expired": {
             "type": "boolean"
            },
            "not_yet_valid": {
             "type": "boolean"
            }
           }
          },
          "signature_valid": {
           "type": "boolean"
          },
          "valid": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "header": {
          "alg": "HS256",
          "typ": "JWT"
         },
         "payload": {
          "iat": 1794287314,
          "exp": 1794290914,
          "sub": "user_123",
          "role": "admin"
         },
         "claims": {
          "issued_at": "2026-11-10T05:08:34.000Z",
          "expires_at": "2026-11-10T06:08:34.000Z",
          "not_before": null,
          "expired": false,
          "not_yet_valid": false
         },
         "signature_valid": true,
         "valid": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/uuid": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "UUID Generator",
    "description": "The UUID API generates unique identifiers in the formats modern applications use. `type=v4` (default) returns random RFC 4122 UUIDs, `v7` returns time-ordered UUIDs whose first 48 bits are a millisecond timestamp (great as database primary keys because they sort by creation time), `ulid` returns 26-character Crockford base32 ULIDs, `nanoid` returns URL-safe Nano IDs and `hex` returns random hexadecimal strings.\n\nUse `count` to get from 1 to 1,000 IDs in one call, `size` (4–64, default 21) to choose the length of Nano ID and hex IDs, and `uppercase=true` for upper-case output. All values come from a cryptographically secure random generator.\n\nThe response is a small JSON object with the type, the count and the `ids` array – easy to use from scripts, seeders and CI jobs that need fresh identifiers.\n\nDocs: https://apibox.io.vn/docs/uuid/",
    "operationId": "uuidGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/uuid/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`v4`, `v7`, `ulid`, `nanoid` or `hex`.",
      "schema": {
       "type": "string",
       "default": "v4"
      },
      "example": "v7"
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of IDs, 1–1000.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 2
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "description": "Length of `nanoid` and `hex` IDs, 4–64.",
      "schema": {
       "type": "number",
       "default": 21
      }
     },
     {
      "name": "uppercase",
      "in": "query",
      "required": false,
      "description": "Return upper-case IDs.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "ids": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "type": "v7",
         "count": 2,
         "ids": [
          "01a1c3db-75cb-79dc-9577-3e0e9b396b1c",
          "01a1c3db-75cb-7239-a4a1-a944d53b7c02"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cron": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Cron Expression Parser",
    "description": "The Cron API validates a cron `expression` and calculates when it will fire next. You get up to 100 upcoming runs (`count`, default 5), each as a UTC ISO timestamp and as local time in the `timezone` you choose (any IANA name such as `Asia/Ho_Chi_Minh`; default UTC), so daylight-saving changes are handled correctly.\n\nStandard 5-field expressions (minute hour day month weekday) are supported, as well as 6 and 7-field variants with seconds and year, ranges, steps (`*/15`), lists and names. For 5-field expressions the response includes a short description such as \"at 09:00, on weekdays\". Use `from` (an ISO date) to compute runs after a given moment instead of now.\n\nInvalid expressions do not raise an HTTP error: the API answers `valid: false` with the parser’s error message, which makes it easy to validate user input in a scheduling form.\n\nDocs: https://apibox.io.vn/docs/cron/",
    "operationId": "cronGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cron/"
    },
    "parameters": [
     {
      "name": "expression",
      "in": "query",
      "required": true,
      "description": "Cron expression (5, 6 or 7 fields), max 200 characters.",
      "schema": {
       "type": "string"
      },
      "example": "0 9 * * 1-5"
     },
     {
      "name": "timezone",
      "in": "query",
      "required": false,
      "description": "IANA timezone used to evaluate the schedule.",
      "schema": {
       "type": "string",
       "default": "UTC"
      },
      "example": "Asia/Ho_Chi_Minh"
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of next runs, 1–100.",
      "schema": {
       "type": "number",
       "default": 5
      },
      "example": 3
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "ISO date to start from (default: now).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "expression": {
           "type": "string"
          },
          "timezone": {
           "type": "string"
          },
          "next_runs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "utc": {
              "type": "string"
             },
             "local": {
              "type": "string"
             }
            }
           }
          },
          "description": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": true,
         "expression": "0 9 * * 1-5",
         "timezone": "Asia/Ho_Chi_Minh",
         "next_runs": [
          {
           "utc": "2026-11-11T02:00:00.000Z",
           "local": "2026-11-11, 09:00:00"
          },
          {
           "utc": "2026-11-12T02:00:00.000Z",
           "local": "2026-11-12, 09:00:00"
          },
          {
           "utc": "2026-11-13T02:00:00.000Z",
           "local": "2026-11-13, 09:00:00"
          }
         ],
         "description": "at 09:00, on weekdays"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Cron Expression Parser",
    "description": "The Cron API validates a cron `expression` and calculates when it will fire next. You get up to 100 upcoming runs (`count`, default 5), each as a UTC ISO timestamp and as local time in the `timezone` you choose (any IANA name such as `Asia/Ho_Chi_Minh`; default UTC), so daylight-saving changes are handled correctly.\n\nStandard 5-field expressions (minute hour day month weekday) are supported, as well as 6 and 7-field variants with seconds and year, ranges, steps (`*/15`), lists and names. For 5-field expressions the response includes a short description such as \"at 09:00, on weekdays\". Use `from` (an ISO date) to compute runs after a given moment instead of now.\n\nInvalid expressions do not raise an HTTP error: the API answers `valid: false` with the parser’s error message, which makes it easy to validate user input in a scheduling form.\n\nDocs: https://apibox.io.vn/docs/cron/",
    "operationId": "cronPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cron/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "expression": {
          "type": "string",
          "description": "Cron expression (5, 6 or 7 fields), max 200 characters."
         },
         "timezone": {
          "type": "string",
          "default": "UTC",
          "description": "IANA timezone used to evaluate the schedule."
         },
         "count": {
          "type": "number",
          "default": 5,
          "description": "Number of next runs, 1–100."
         },
         "from": {
          "type": "string",
          "description": "ISO date to start from (default: now)."
         }
        },
        "required": [
         "expression"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "expression": {
           "type": "string"
          },
          "timezone": {
           "type": "string"
          },
          "next_runs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "utc": {
              "type": "string"
             },
             "local": {
              "type": "string"
             }
            }
           }
          },
          "description": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/time": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Time & Timezone Converter",
    "description": "The Time API returns the current time – or any `time` you give it – in UTC, as Unix seconds and milliseconds, and as local time in up to 30 IANA timezones at once (`timezones=UTC,Asia/Ho_Chi_Minh,America/New_York`). Each zone comes with its UTC offset (DST aware) and weekday. Without a timezone, the caller’s timezone detected by Cloudflare is used, falling back to UTC.\n\n`time` accepts an ISO 8601 date with an offset or `Z`, Unix seconds (10 digits) or milliseconds (13 digits), or a local date-time without offset such as `2026-11-10 09:00`, which is interpreted in `from_timezone` (default UTC). That makes it a quick timezone converter: \"09:00 in Hanoi is what time in New York?\"\n\nUnknown timezone names do not fail the request; that zone just returns an error field. Add `list=true` to get the full list of supported IANA timezone names.\n\nDocs: https://apibox.io.vn/docs/time/",
    "operationId": "timeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/time/"
    },
    "parameters": [
     {
      "name": "time",
      "in": "query",
      "required": false,
      "description": "ISO 8601 date, Unix seconds or milliseconds, or a local date-time without offset (default: now).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-10T09:00:00"
     },
     {
      "name": "timezones",
      "in": "query",
      "required": false,
      "description": "Comma-separated IANA timezones (max 30; alias `timezone`). Default: caller’s timezone, else UTC.",
      "schema": {
       "type": "string"
      },
      "example": "UTC,Asia/Ho_Chi_Minh,America/New_York"
     },
     {
      "name": "from_timezone",
      "in": "query",
      "required": false,
      "description": "Timezone of `time` when it has no offset.",
      "schema": {
       "type": "string",
       "default": "UTC"
      },
      "example": "Asia/Ho_Chi_Minh"
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "Also return all supported timezone names.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "utc": {
           "type": "string"
          },
          "unix": {
           "type": "number"
          },
          "unix_ms": {
           "type": "number"
          },
          "zones": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "timezone": {
              "type": "string"
             },
             "local": {
              "type": "string"
             },
             "offset": {
              "type": "string"
             },
             "weekday": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "utc": "2026-11-10T02:00:00.000Z",
         "unix": 1794276000,
         "unix_ms": 1794276000000,
         "zones": [
          {
           "timezone": "UTC",
           "local": "2026-11-10T02:00:00+00:00",
           "offset": "+00:00",
           "weekday": "Tuesday"
          },
          {
           "timezone": "Asia/Ho_Chi_Minh",
           "local": "2026-11-10T09:00:00+07:00",
           "offset": "+07:00",
           "weekday": "Tuesday"
          },
          {
           "timezone": "America/New_York",
           "local": "2026-11-09T21:00:00-05:00",
           "offset": "-05:00",
           "weekday": "Monday"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/color": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Color Converter",
    "description": "The Color API takes a colour as hex (`#1e90ff`, `1e90ff`, `#39f`), `rgb(30,144,255)` or `hsl(210,100%,56%)` and returns it in every common format: hex, RGB, HSL, CMYK and ready-to-paste CSS strings. It also reports the relative luminance, whether the colour is dark, and its contrast ratio against white and black with the best text colour to use on top of it.\n\nFor palette work the response includes the complementary colour, two triadic and two analogous colours and eight shades from dark to light (lightness −40 to +40), all as hex values.\n\nPass a second colour in `compare` to get the contrast ratio between the two and the WCAG 2.x results: AA for normal text (≥ 4.5), AA for large text (≥ 3) and AAA for normal text (≥ 7). Ideal for accessibility checks of brand colours and UI themes.\n\nDocs: https://apibox.io.vn/docs/color/",
    "operationId": "colorGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/color/"
    },
    "parameters": [
     {
      "name": "color",
      "in": "query",
      "required": true,
      "description": "Colour as hex, rgb() or hsl() (URL-encode # as %23).",
      "schema": {
       "type": "string"
      },
      "example": "#1e90ff"
     },
     {
      "name": "compare",
      "in": "query",
      "required": false,
      "description": "Second colour: returns contrast ratio and WCAG AA/AAA results.",
      "schema": {
       "type": "string"
      },
      "example": "#ffffff"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "hex": {
           "type": "string"
          },
          "rgb": {
           "type": "object",
           "properties": {
            "r": {
             "type": "number"
            },
            "g": {
             "type": "number"
            },
            "b": {
             "type": "number"
            }
           }
          },
          "hsl": {
           "type": "object",
           "properties": {
            "h": {
             "type": "number"
            },
            "s": {
             "type": "number"
            },
            "l": {
             "type": "number"
            }
           }
          },
          "cmyk": {
           "type": "object",
           "properties": {
            "c": {
             "type": "number"
            },
            "m": {
             "type": "number"
            },
            "y": {
             "type": "number"
            },
            "k": {
             "type": "number"
            }
           }
          },
          "css": {
           "type": "object",
           "properties": {
            "rgb": {
             "type": "string"
            },
            "hsl": {
             "type": "string"
            }
           }
          },
          "luminance": {
           "type": "number"
          },
          "is_dark": {
           "type": "boolean"
          },
          "contrast": {
           "type": "object",
           "properties": {
            "white": {
             "type": "number"
            },
            "black": {
             "type": "number"
            },
            "best_text": {
             "type": "string"
            }
           }
          },
          "complementary": {
           "type": "string"
          },
          "triadic": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "analogous": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "shades": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "compare": {
           "type": "object",
           "properties": {
            "color": {
             "type": "string"
            },
            "ratio": {
             "type": "number"
            },
            "wcag_aa_normal": {
             "type": "boolean"
            },
            "wcag_aa_large": {
             "type": "boolean"
            },
            "wcag_aaa_normal": {
             "type": "boolean"
            }
           }
          }
         }
        },
        "example": {
         "hex": "#1e90ff",
         "rgb": {
          "r": 30,
          "g": 144,
          "b": 255
         },
         "hsl": {
          "h": 210,
          "s": 100,
          "l": 56
         },
         "cmyk": {
          "c": 88,
          "m": 44,
          "y": 0,
          "k": 0
         },
         "css": {
          "rgb": "rgb(30, 144, 255)",
          "hsl": "hsl(210, 100%, 56%)"
         },
         "luminance": 0.274,
         "is_dark": false,
         "contrast": {
          "white": 3.24,
          "black": 6.49,
          "best_text": "#000000"
         },
         "complementary": "#ff8f1f",
         "triadic": [
          "#ff1f8f",
          "#8fff1f"
         ],
         "analogous": [
          "#1fffff",
          "#1f1fff"
         ],
         "shades": [
          "#002952",
          "#004285",
          "#005cb8",
          "#0075eb",
          "#52a8ff",
          "#85c2ff",
          "#b8dbff",
          "#ebf5ff"
         ],
         "compare": {
          "color": "#ffffff",
          "ratio": 3.24,
          "wcag_aa_normal": false,
          "wcag_aa_large": true,
          "wcag_aaa_normal": false
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/user-agent": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "User Agent Parser",
    "description": "The User Agent API turns a raw `User-Agent` header into structured data: browser name, version and major version, rendering engine, operating system and version, device type, vendor and model, and CPU architecture when present. Simple booleans – `is_mobile`, `is_tablet`, `is_desktop` and `is_bot` – make it easy to branch in your code.\n\nPass the string in `ua` (or `user_agent`) via query or JSON. If you omit it, the API parses the User-Agent of the request itself, which is handy for a quick “what is my browser” check from a browser or a script.\n\nBot detection matches common crawlers, link-preview fetchers and HTTP clients (Googlebot, Bingbot, facebookexternalhit, Slack, Discord, Telegram and WhatsApp previews, curl, wget, python-requests, axios, headless browsers, Lighthouse, uptime monitors). Parsing is based on the open-source ua-parser-js library.\n\nDocs: https://apibox.io.vn/docs/user-agent/",
    "operationId": "userAgentGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/user-agent/"
    },
    "parameters": [
     {
      "name": "ua",
      "in": "query",
      "required": false,
      "description": "User-Agent string to parse (alias `user_agent`). Default: the request’s own User-Agent header.",
      "schema": {
       "type": "string"
      },
      "example": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ua": {
           "type": "string"
          },
          "browser": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "major": {
             "type": "string"
            }
           }
          },
          "engine": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            }
           }
          },
          "os": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            }
           }
          },
          "device": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "vendor": {
             "type": "string"
            },
            "model": {
             "type": "string"
            }
           }
          },
          "cpu": {},
          "is_bot": {
           "type": "boolean"
          },
          "is_mobile": {
           "type": "boolean"
          },
          "is_tablet": {
           "type": "boolean"
          },
          "is_desktop": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
         "browser": {
          "name": "Mobile Safari",
          "version": "17.5",
          "major": "17"
         },
         "engine": {
          "name": "WebKit",
          "version": "605.1.15"
         },
         "os": {
          "name": "iOS",
          "version": "17.5"
         },
         "device": {
          "type": "mobile",
          "vendor": "Apple",
          "model": "iPhone"
         },
         "cpu": null,
         "is_bot": false,
         "is_mobile": true,
         "is_tablet": false,
         "is_desktop": false
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "User Agent Parser",
    "description": "The User Agent API turns a raw `User-Agent` header into structured data: browser name, version and major version, rendering engine, operating system and version, device type, vendor and model, and CPU architecture when present. Simple booleans – `is_mobile`, `is_tablet`, `is_desktop` and `is_bot` – make it easy to branch in your code.\n\nPass the string in `ua` (or `user_agent`) via query or JSON. If you omit it, the API parses the User-Agent of the request itself, which is handy for a quick “what is my browser” check from a browser or a script.\n\nBot detection matches common crawlers, link-preview fetchers and HTTP clients (Googlebot, Bingbot, facebookexternalhit, Slack, Discord, Telegram and WhatsApp previews, curl, wget, python-requests, axios, headless browsers, Lighthouse, uptime monitors). Parsing is based on the open-source ua-parser-js library.\n\nDocs: https://apibox.io.vn/docs/user-agent/",
    "operationId": "userAgentPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/user-agent/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ua": {
          "type": "string",
          "description": "User-Agent string to parse (alias `user_agent`). Default: the request’s own User-Agent header."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ua": {
           "type": "string"
          },
          "browser": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "major": {
             "type": "string"
            }
           }
          },
          "engine": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            }
           }
          },
          "os": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            }
           }
          },
          "device": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "vendor": {
             "type": "string"
            },
            "model": {
             "type": "string"
            }
           }
          },
          "cpu": {},
          "is_bot": {
           "type": "boolean"
          },
          "is_mobile": {
           "type": "boolean"
          },
          "is_tablet": {
           "type": "boolean"
          },
          "is_desktop": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ip/{ip}": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "IP Geolocation",
    "description": "The IP Geolocation API returns location and network data for an IPv4 or IPv6 address: country code and name, flag emoji, EU membership, international calling code, continent, region, city, latitude/longitude, autonomous system number (ASN) and organisation (ISP or hosting company). Call `/v1/ip/8.8.8.8` or `/v1/ip?ip=8.8.8.8`.\n\nWithout an IP the API describes the caller’s own address using Cloudflare’s edge data, which adds postal code and timezone – perfect for a “what is my IP” feature or to pre-fill a country selector. Private, loopback, link-local and other reserved addresses are recognised and returned with `reserved: true` and the range name instead of a location.\n\nArbitrary IPs are looked up in the DB-IP Lite database (licensed CC BY 4.0: each answer carries `attribution` \"IP Geolocation by DB-IP\" and `attribution_url`, show them as a link where you display the data), city-level precision, refreshed monthly; results are cached for 24 hours. As with every IP database, city-level results are approximate, while country and ASN are highly accurate.\n\nDocs: https://apibox.io.vn/docs/ip/",
    "operationId": "ipGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ip/"
    },
    "parameters": [
     {
      "name": "ip",
      "in": "path",
      "required": true,
      "description": "IPv4 or IPv6 address, in the path (`/v1/ip/8.8.8.8`) or as `?ip=`. Omit it to look up your own IP.",
      "schema": {
       "type": "string"
      },
      "example": "8.8.8.8"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ip": {
           "type": "string"
          },
          "version": {
           "type": "number"
          },
          "country_code": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "flag": {
           "type": "string"
          },
          "is_eu": {
           "type": "boolean"
          },
          "calling_code": {
           "type": "string"
          },
          "continent": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "city": {
           "type": "string"
          },
          "latitude": {
           "type": "number"
          },
          "longitude": {
           "type": "number"
          },
          "asn": {
           "type": "number"
          },
          "organization": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "database_version": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "attribution_url": {
           "type": "string"
          }
         }
        },
        "example": {
         "ip": "8.8.8.8",
         "version": 4,
         "country_code": "US",
         "country": "United States",
         "flag": "🇺🇸",
         "is_eu": false,
         "calling_code": "+1",
         "continent": "North America",
         "region": "California",
         "city": "Mountain View",
         "latitude": 37.4223,
         "longitude": -122.085,
         "asn": 15169,
         "organization": "Google LLC",
         "source": "db-ip.com lite",
         "database_version": "2026-11",
         "attribution": "IP Geolocation by DB-IP",
         "attribution_url": "https://db-ip.com"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/dns": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "DNS Lookup",
    "description": "The DNS Lookup API resolves the records of a domain and returns them as tidy JSON. By default it queries A, AAAA, MX, TXT, NS and CNAME in parallel; choose your own set with `type` (comma separated) from A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, NAPTR, DS, DNSKEY, HTTPS and CAA.\n\nRecords are normalised for you: MX records come as `{priority, exchange}`, TXT strings are unquoted and joined, trailing dots are removed, and every record carries its TTL. The overall response `status` is the DNS RCODE (NOERROR, NXDOMAIN, SERVFAIL…), so you can tell a missing record from a domain that does not exist. You can pass a bare domain or a URL – the scheme and path are stripped.\n\nFor reverse DNS, pass an IP address as `domain` with `type=PTR`: the API builds the `in-addr.arpa` / `ip6.arpa` name. Queries go through Cloudflare’s 1.1.1.1 DNS over HTTPS resolver and are cached for 5 minutes.\n\nDocs: https://apibox.io.vn/docs/dns/",
    "operationId": "dnsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dns/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "description": "Domain name or URL (or an IP for `type=PTR`).",
      "schema": {
       "type": "string"
      },
      "example": "github.com"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Comma-separated record types: A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, NAPTR, DS, DNSKEY, HTTPS, CAA.",
      "schema": {
       "type": "string",
       "default": "A,AAAA,MX,TXT,NS,CNAME"
      },
      "example": "A,MX"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "domain": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "records": {
           "type": "object",
           "properties": {
            "A": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "MX": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          }
         }
        },
        "example": {
         "domain": "github.com",
         "status": "NOERROR",
         "records": {
          "A": [
           {
            "value": "20.205.243.166",
            "ttl": 23
           }
          ],
          "MX": [
           {
            "priority": 0,
            "exchange": "github-com.mail.protection.outlook.com",
            "ttl": 300
           }
          ]
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/email-validator": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Email Validator",
    "description": "The Email Validation API tells you whether an address is worth accepting. It checks the syntax (length limits, dots, allowed characters, domain labels), then looks up the domain’s MX records – falling back to an A record, and detecting “null MX” domains that refuse mail – using DNS over HTTPS. It also flags disposable / temporary inbox domains from a list of about 120,000, role accounts such as info@, support@ or noreply@, and free providers like Gmail, Yahoo and Outlook.\n\nCommon domain typos are caught with a `did_you_mean` suggestion (john@gmial.com → john@gmail.com). Each address gets a verdict – `deliverable`, `risky`, `undeliverable` or `invalid` – a score from 0 to 100, and a `canonical` form (lower-cased, `+tag` removed, dots removed for Gmail) that helps detect duplicate sign-ups.\n\nHonest limitation: the API does not probe the mailbox over SMTP, because outgoing port 25 is not available on Cloudflare Workers. “Deliverable” therefore means the address is well formed and its domain accepts e-mail, not that the specific mailbox exists. Validate one `email`, or up to 50 at once by POSTing an `emails` array; `dns=false` skips the DNS lookups for a pure offline check.\n\nDocs: https://apibox.io.vn/docs/email-validator/",
    "operationId": "emailValidatorGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-validator/"
    },
    "parameters": [
     {
      "name": "email",
      "in": "query",
      "required": true,
      "description": "E-mail address to validate (max 320 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "dns",
      "in": "query",
      "required": false,
      "description": "Set to false to skip MX/A lookups.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "email": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "local_part": {
           "type": "string"
          },
          "domain": {
           "type": "string"
          },
          "syntax_valid": {
           "type": "boolean"
          },
          "syntax_error": {},
          "canonical": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "disposable": {
           "type": "boolean"
          },
          "role_account": {
           "type": "boolean"
          },
          "free_provider": {
           "type": "boolean"
          },
          "did_you_mean": {
           "type": "string"
          },
          "dns_checked": {
           "type": "boolean"
          },
          "domain_exists": {
           "type": "boolean"
          },
          "mx_found": {
           "type": "boolean"
          },
          "null_mx": {
           "type": "boolean"
          },
          "a_record_fallback": {
           "type": "boolean"
          },
          "mx_records": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Email Validator",
    "description": "The Email Validation API tells you whether an address is worth accepting. It checks the syntax (length limits, dots, allowed characters, domain labels), then looks up the domain’s MX records – falling back to an A record, and detecting “null MX” domains that refuse mail – using DNS over HTTPS. It also flags disposable / temporary inbox domains from a list of about 120,000, role accounts such as info@, support@ or noreply@, and free providers like Gmail, Yahoo and Outlook.\n\nCommon domain typos are caught with a `did_you_mean` suggestion (john@gmial.com → john@gmail.com). Each address gets a verdict – `deliverable`, `risky`, `undeliverable` or `invalid` – a score from 0 to 100, and a `canonical` form (lower-cased, `+tag` removed, dots removed for Gmail) that helps detect duplicate sign-ups.\n\nHonest limitation: the API does not probe the mailbox over SMTP, because outgoing port 25 is not available on Cloudflare Workers. “Deliverable” therefore means the address is well formed and its domain accepts e-mail, not that the specific mailbox exists. Validate one `email`, or up to 50 at once by POSTing an `emails` array; `dns=false` skips the DNS lookups for a pure offline check.\n\nDocs: https://apibox.io.vn/docs/email-validator/",
    "operationId": "emailValidatorPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-validator/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "email": {
          "type": "string",
          "description": "E-mail address to validate (max 320 characters)."
         },
         "emails": {
          "type": "array",
          "items": {},
          "description": "Array of up to 50 addresses (JSON body) instead of `email`."
         },
         "dns": {
          "type": "boolean",
          "default": true,
          "description": "Set to false to skip MX/A lookups."
         }
        },
        "required": [
         "email"
        ]
       },
       "example": {
        "email": "john.doe@gmial.com"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "email": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "local_part": {
           "type": "string"
          },
          "domain": {
           "type": "string"
          },
          "syntax_valid": {
           "type": "boolean"
          },
          "syntax_error": {},
          "canonical": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "disposable": {
           "type": "boolean"
          },
          "role_account": {
           "type": "boolean"
          },
          "free_provider": {
           "type": "boolean"
          },
          "did_you_mean": {
           "type": "string"
          },
          "dns_checked": {
           "type": "boolean"
          },
          "domain_exists": {
           "type": "boolean"
          },
          "mx_found": {
           "type": "boolean"
          },
          "null_mx": {
           "type": "boolean"
          },
          "a_record_fallback": {
           "type": "boolean"
          },
          "mx_records": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "email": "john.doe@gmial.com",
         "normalized": "john.doe@gmial.com",
         "local_part": "john.doe",
         "domain": "gmial.com",
         "syntax_valid": true,
         "syntax_error": null,
         "canonical": "john.doe@gmial.com",
         "result": "risky",
         "score": 70,
         "disposable": false,
         "role_account": false,
         "free_provider": false,
         "did_you_mean": "john.doe@gmail.com",
         "dns_checked": true,
         "domain_exists": true,
         "mx_found": false,
         "null_mx": false,
         "a_record_fallback": true,
         "mx_records": [],
         "note": "SMTP mailbox probing is not performed (port 25 is not available on Cloudflare); \"deliverable\" means the address is well formed and its domain accepts e-mail."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/phone": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Phone Number Validator",
    "description": "The Phone API parses a phone number written in any common way – with spaces, dashes, brackets, a leading 0 or a +country code – and tells you whether it is valid and possible for its country. It returns the detected country and name, the calling code, the national number and the number in four formats: E.164 (`+84912345678`), international, national and an RFC 3966 `tel:` URI.\n\nIt also detects the line type when the numbering plan allows it: MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE, PREMIUM_RATE, VOIP, SHARED_COST, PERSONAL_NUMBER, PAGER, UAN or VOICEMAIL. Validation uses the full metadata of Google’s libphonenumber (via libphonenumber-js), covering more than 240 countries and territories.\n\nFor numbers without a +country prefix, pass the ISO country code in `country` (e.g. `VN`, `US`); otherwise the caller’s country detected by Cloudflare is used, falling back to US. Unparseable input returns `valid: false` with a reason instead of an HTTP error.\n\nDocs: https://apibox.io.vn/docs/phone/",
    "operationId": "phoneGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/phone/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "query",
      "required": true,
      "description": "Phone number in any common format (max 64 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "ISO 3166 country code for numbers without +prefix. Default: caller’s country, else US.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "possible": {
           "type": "boolean"
          },
          "type": {
           "type": "string"
          },
          "country_code": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "calling_code": {
           "type": "string"
          },
          "national_number": {
           "type": "string"
          },
          "formats": {
           "type": "object",
           "properties": {
            "e164": {
             "type": "string"
            },
            "international": {
             "type": "string"
            },
            "national": {
             "type": "string"
            },
            "rfc3966": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Phone Number Validator",
    "description": "The Phone API parses a phone number written in any common way – with spaces, dashes, brackets, a leading 0 or a +country code – and tells you whether it is valid and possible for its country. It returns the detected country and name, the calling code, the national number and the number in four formats: E.164 (`+84912345678`), international, national and an RFC 3966 `tel:` URI.\n\nIt also detects the line type when the numbering plan allows it: MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE, PREMIUM_RATE, VOIP, SHARED_COST, PERSONAL_NUMBER, PAGER, UAN or VOICEMAIL. Validation uses the full metadata of Google’s libphonenumber (via libphonenumber-js), covering more than 240 countries and territories.\n\nFor numbers without a +country prefix, pass the ISO country code in `country` (e.g. `VN`, `US`); otherwise the caller’s country detected by Cloudflare is used, falling back to US. Unparseable input returns `valid: false` with a reason instead of an HTTP error.\n\nDocs: https://apibox.io.vn/docs/phone/",
    "operationId": "phonePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/phone/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "number": {
          "type": "string",
          "description": "Phone number in any common format (max 64 characters)."
         },
         "country": {
          "type": "string",
          "description": "ISO 3166 country code for numbers without +prefix. Default: caller’s country, else US."
         }
        },
        "required": [
         "number"
        ]
       },
       "example": {
        "number": "0912 345 678",
        "country": "VN"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "possible": {
           "type": "boolean"
          },
          "type": {
           "type": "string"
          },
          "country_code": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "calling_code": {
           "type": "string"
          },
          "national_number": {
           "type": "string"
          },
          "formats": {
           "type": "object",
           "properties": {
            "e164": {
             "type": "string"
            },
            "international": {
             "type": "string"
            },
            "national": {
             "type": "string"
            },
            "rfc3966": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "input": "0912 345 678",
         "valid": true,
         "possible": true,
         "type": "MOBILE",
         "country_code": "VN",
         "country": "Vietnam",
         "calling_code": "+84",
         "national_number": "912345678",
         "formats": {
          "e164": "+84912345678",
          "international": "+84 912 345 678",
          "national": "0912 345 678",
          "rfc3966": "tel:+84912345678"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/image-metadata": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "Image Metadata & EXIF",
    "description": "The Image Metadata API inspects an image and returns everything useful about it: detected format and MIME type (from the file’s bytes, not its extension), width, height, megapixels and aspect ratio, file size and SHA-256, plus format details such as bit depth, colour type, interlacing, progressive JPEG or animation (PNG, GIF, WebP).\n\nFor JPEG, HEIC, AVIF, TIFF, PNG and WebP it parses EXIF, XMP and IPTC: camera make and model, lens, software, orientation, the capture date and settings (exposure time, f-number, ISO, focal length, flash, white balance) and GPS coordinates. `has_exif`, `has_gps` and `has_xmp` let you quickly decide whether to strip metadata before publishing a photo. Add `raw=true` for the full parsed EXIF tree.\n\nSupported formats: JPEG, PNG, GIF, WebP, AVIF, HEIC, TIFF, BMP, ICO and SVG. Send the image as multipart field `file`, as the raw request body, as base64 in `file_base64`, or give a public `url` to fetch. Maximum file size depends on your plan: Free 5 MB, Starter 20 MB, Pro 50 MB.\n\nDocs: https://apibox.io.vn/docs/image-metadata/",
    "operationId": "imageMetadataGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-metadata/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the image to fetch, instead of uploading.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "raw",
      "in": "query",
      "required": false,
      "description": "Include the full parsed EXIF/XMP/IPTC tree in `exif`.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "file_name": {
           "type": "string"
          },
          "size_bytes": {
           "type": "number"
          },
          "sha256": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "mime_type": {
           "type": "string"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "megapixels": {
           "type": "number"
          },
          "aspect_ratio": {
           "type": "string"
          },
          "orientation": {
           "type": "string"
          },
          "bit_depth": {
           "type": "number"
          },
          "components": {
           "type": "number"
          },
          "progressive": {
           "type": "boolean"
          },
          "camera": {
           "type": "object",
           "properties": {
            "make": {
             "type": "string"
            },
            "model": {
             "type": "string"
            },
            "lens": {},
            "software": {
             "type": "string"
            }
           }
          },
          "capture": {
           "type": "object",
           "properties": {
            "date_time": {
             "type": "string"
            },
            "exposure_time": {
             "type": "number"
            },
            "f_number": {
             "type": "number"
            },
            "iso": {
             "type": "number"
            },
            "focal_length": {
             "type": "number"
            },
            "flash": {
             "type": "string"
            },
            "white_balance": {
             "type": "string"
            }
           }
          },
          "gps": {
           "type": "object",
           "properties": {
            "latitude": {
             "type": "number"
            },
            "longitude": {
             "type": "number"
            },
            "altitude": {}
           }
          },
          "has_exif": {
           "type": "boolean"
          },
          "has_gps": {
           "type": "boolean"
          },
          "has_xmp": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Image Metadata & EXIF",
    "description": "The Image Metadata API inspects an image and returns everything useful about it: detected format and MIME type (from the file’s bytes, not its extension), width, height, megapixels and aspect ratio, file size and SHA-256, plus format details such as bit depth, colour type, interlacing, progressive JPEG or animation (PNG, GIF, WebP).\n\nFor JPEG, HEIC, AVIF, TIFF, PNG and WebP it parses EXIF, XMP and IPTC: camera make and model, lens, software, orientation, the capture date and settings (exposure time, f-number, ISO, focal length, flash, white balance) and GPS coordinates. `has_exif`, `has_gps` and `has_xmp` let you quickly decide whether to strip metadata before publishing a photo. Add `raw=true` for the full parsed EXIF tree.\n\nSupported formats: JPEG, PNG, GIF, WebP, AVIF, HEIC, TIFF, BMP, ICO and SVG. Send the image as multipart field `file`, as the raw request body, as base64 in `file_base64`, or give a public `url` to fetch. Maximum file size depends on your plan: Free 5 MB, Starter 20 MB, Pro 50 MB.\n\nDocs: https://apibox.io.vn/docs/image-metadata/",
    "operationId": "imageMetadataPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-metadata/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the image to fetch, instead of uploading."
         },
         "raw": {
          "type": "boolean",
          "default": false,
          "description": "Include the full parsed EXIF/XMP/IPTC tree in `exif`."
         }
        }
       },
       "example": {
        "url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The image: multipart field `file`, raw binary body, or base64 in `file_base64`. Max 5/20/50 MB (Free/Starter/Pro)."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the image to fetch, instead of uploading."
         },
         "raw": {
          "type": "boolean",
          "default": false,
          "description": "Include the full parsed EXIF/XMP/IPTC tree in `exif`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "file_name": {
           "type": "string"
          },
          "size_bytes": {
           "type": "number"
          },
          "sha256": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "mime_type": {
           "type": "string"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "megapixels": {
           "type": "number"
          },
          "aspect_ratio": {
           "type": "string"
          },
          "orientation": {
           "type": "string"
          },
          "bit_depth": {
           "type": "number"
          },
          "components": {
           "type": "number"
          },
          "progressive": {
           "type": "boolean"
          },
          "camera": {
           "type": "object",
           "properties": {
            "make": {
             "type": "string"
            },
            "model": {
             "type": "string"
            },
            "lens": {},
            "software": {
             "type": "string"
            }
           }
          },
          "capture": {
           "type": "object",
           "properties": {
            "date_time": {
             "type": "string"
            },
            "exposure_time": {
             "type": "number"
            },
            "f_number": {
             "type": "number"
            },
            "iso": {
             "type": "number"
            },
            "focal_length": {
             "type": "number"
            },
            "flash": {
             "type": "string"
            },
            "white_balance": {
             "type": "string"
            }
           }
          },
          "gps": {
           "type": "object",
           "properties": {
            "latitude": {
             "type": "number"
            },
            "longitude": {
             "type": "number"
            },
            "altitude": {}
           }
          },
          "has_exif": {
           "type": "boolean"
          },
          "has_gps": {
           "type": "boolean"
          },
          "has_xmp": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "source": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg",
         "file_name": "DSCN0010.jpg",
         "size_bytes": 161713,
         "sha256": "17307b1207eb6487d7908e9d154890b46e3d2e0192369cfd3f4c33d5a5af4035",
         "format": "jpeg",
         "mime_type": "image/jpeg",
         "width": 640,
         "height": 480,
         "megapixels": 0.31,
         "aspect_ratio": "4:3",
         "orientation": "Horizontal (normal)",
         "bit_depth": 8,
         "components": 3,
         "progressive": false,
         "camera": {
          "make": "NIKON",
          "model": "COOLPIX P6000",
          "lens": null,
          "software": "Nikon Transfer 1.1 W"
         },
         "capture": {
          "date_time": "2008-10-22T16:28:39.000Z",
          "exposure_time": 0.013333333333333334,
          "f_number": 5.9,
          "iso": 64,
          "focal_length": 24,
          "flash": "Flash did not fire, compulsory flash mode",
          "white_balance": "Auto"
         },
         "gps": {
          "latitude": 43.46744833333334,
          "longitude": 11.885126666663888,
          "altitude": null
         },
         "has_exif": true,
         "has_gps": true,
         "has_xmp": false
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pdf-metadata": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "PDF Metadata",
    "description": "The PDF Metadata API reads a PDF document and returns its properties without rendering it: PDF version, page count, whether it is encrypted or linearized (“fast web view”), the document information fields – title, author, subject, keywords, creator application, producer, creation and modification dates – the document language, the number of form fields and whether XMP metadata is present.\n\nEach page (up to `pages_limit`, default 50) is listed with its width and height in points and millimetres and its rotation, and the first page size is matched to a paper name such as A4, A5, Letter, Legal or Tabloid, including landscape. The raw Info dictionary is returned as well, and `xmp=true` adds the XMP packet (up to 20,000 characters).\n\nUpload the PDF as multipart field `file`, as the raw request body, as base64 in `file_base64`, or pass a public `url`. Maximum file size depends on your plan: Free 5 MB, Starter 20 MB, Pro 50 MB. Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/pdf-metadata/",
    "operationId": "pdfMetadataGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-metadata/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the PDF to fetch, instead of uploading.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pages_limit",
      "in": "query",
      "required": false,
      "description": "Maximum number of pages listed in `pages`.",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "xmp",
      "in": "query",
      "required": false,
      "description": "Include the XMP metadata packet (max 20,000 characters).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "file_name": {
           "type": "string"
          },
          "size_bytes": {
           "type": "number"
          },
          "sha256": {
           "type": "string"
          },
          "pdf_version": {
           "type": "string"
          },
          "page_count": {
           "type": "number"
          },
          "encrypted": {
           "type": "boolean"
          },
          "linearized": {
           "type": "boolean"
          },
          "title": {
           "type": "string"
          },
          "author": {
           "type": "string"
          },
          "subject": {
           "type": "string"
          },
          "keywords": {
           "type": "string"
          },
          "creator": {
           "type": "string"
          },
          "producer": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "modified_at": {
           "type": "string"
          },
          "language": {},
          "page_size": {
           "type": "object",
           "properties": {
            "width_pt": {
             "type": "number"
            },
            "height_pt": {
             "type": "number"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "form_fields": {
           "type": "number"
          },
          "has_xmp": {
           "type": "boolean"
          },
          "info": {
           "type": "object",
           "properties": {
            "Producer": {
             "type": "string"
            },
            "ModDate": {
             "type": "string"
            },
            "Creator": {
             "type": "string"
            },
            "CreationDate": {
             "type": "string"
            },
            "Title": {
             "type": "string"
            },
            "Author": {
             "type": "string"
            },
            "Subject": {
             "type": "string"
            },
            "Keywords": {
             "type": "string"
            }
           }
          },
          "pages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "page": {
              "type": "number"
             },
             "width_pt": {
              "type": "number"
             },
             "height_pt": {
              "type": "number"
             },
             "width_mm": {
              "type": "number"
             },
             "height_mm": {
              "type": "number"
             },
             "rotation": {
              "type": "number"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "PDF Metadata",
    "description": "The PDF Metadata API reads a PDF document and returns its properties without rendering it: PDF version, page count, whether it is encrypted or linearized (“fast web view”), the document information fields – title, author, subject, keywords, creator application, producer, creation and modification dates – the document language, the number of form fields and whether XMP metadata is present.\n\nEach page (up to `pages_limit`, default 50) is listed with its width and height in points and millimetres and its rotation, and the first page size is matched to a paper name such as A4, A5, Letter, Legal or Tabloid, including landscape. The raw Info dictionary is returned as well, and `xmp=true` adds the XMP packet (up to 20,000 characters).\n\nUpload the PDF as multipart field `file`, as the raw request body, as base64 in `file_base64`, or pass a public `url`. Maximum file size depends on your plan: Free 5 MB, Starter 20 MB, Pro 50 MB. Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/pdf-metadata/",
    "operationId": "pdfMetadataPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-metadata/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the PDF to fetch, instead of uploading."
         },
         "pages_limit": {
          "type": "number",
          "default": 50,
          "description": "Maximum number of pages listed in `pages`."
         },
         "xmp": {
          "type": "boolean",
          "default": false,
          "description": "Include the XMP metadata packet (max 20,000 characters)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The PDF: multipart field `file`, raw binary body, or base64 in `file_base64`. Max 5/20/50 MB (Free/Starter/Pro)."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the PDF to fetch, instead of uploading."
         },
         "pages_limit": {
          "type": "number",
          "default": 50,
          "description": "Maximum number of pages listed in `pages`."
         },
         "xmp": {
          "type": "boolean",
          "default": false,
          "description": "Include the XMP metadata packet (max 20,000 characters)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "file_name": {
           "type": "string"
          },
          "size_bytes": {
           "type": "number"
          },
          "sha256": {
           "type": "string"
          },
          "pdf_version": {
           "type": "string"
          },
          "page_count": {
           "type": "number"
          },
          "encrypted": {
           "type": "boolean"
          },
          "linearized": {
           "type": "boolean"
          },
          "title": {
           "type": "string"
          },
          "author": {
           "type": "string"
          },
          "subject": {
           "type": "string"
          },
          "keywords": {
           "type": "string"
          },
          "creator": {
           "type": "string"
          },
          "producer": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "modified_at": {
           "type": "string"
          },
          "language": {},
          "page_size": {
           "type": "object",
           "properties": {
            "width_pt": {
             "type": "number"
            },
            "height_pt": {
             "type": "number"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "form_fields": {
           "type": "number"
          },
          "has_xmp": {
           "type": "boolean"
          },
          "info": {
           "type": "object",
           "properties": {
            "Producer": {
             "type": "string"
            },
            "ModDate": {
             "type": "string"
            },
            "Creator": {
             "type": "string"
            },
            "CreationDate": {
             "type": "string"
            },
            "Title": {
             "type": "string"
            },
            "Author": {
             "type": "string"
            },
            "Subject": {
             "type": "string"
            },
            "Keywords": {
             "type": "string"
            }
           }
          },
          "pages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "page": {
              "type": "number"
             },
             "width_pt": {
              "type": "number"
             },
             "height_pt": {
              "type": "number"
             },
             "width_mm": {
              "type": "number"
             },
             "height_mm": {
              "type": "number"
             },
             "rotation": {
              "type": "number"
             }
            }
           }
          }
         }
        },
        "example": {
         "source": "upload",
         "file_name": "invoice.pdf",
         "size_bytes": 924,
         "sha256": "cea1669714535747e08755dbe4a082e155b91a6817ded3f9b420c784e9d10b6c",
         "pdf_version": "1.7",
         "page_count": 2,
         "encrypted": false,
         "linearized": false,
         "title": "Invoice #1024",
         "author": "APIBox",
         "subject": "Monthly invoice",
         "keywords": "invoice apibox",
         "creator": "APIBox",
         "producer": "pdf-lib",
         "created_at": "2026-11-01T08:00:00.000Z",
         "modified_at": "2026-11-01T08:00:00.000Z",
         "language": null,
         "page_size": {
          "width_pt": 595.28,
          "height_pt": 841.89,
          "name": "A4"
         },
         "form_fields": 0,
         "has_xmp": false,
         "info": {
          "Producer": "pdf-lib",
          "ModDate": "D:20261101080000Z",
          "Creator": "APIBox",
          "CreationDate": "D:20261101080000Z",
          "Title": "Invoice #1024",
          "Author": "APIBox",
          "Subject": "Monthly invoice",
          "Keywords": "invoice apibox"
         },
         "pages": [
          {
           "page": 1,
           "width_pt": 595.28,
           "height_pt": 841.89,
           "width_mm": 210,
           "height_mm": 297,
           "rotation": 0
          },
          {
           "page": 2,
           "width_pt": 595.28,
           "height_pt": 841.89,
           "width_mm": 210,
           "height_mm": 297,
           "rotation": 0
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/webhooks": {
   "get": {
    "tags": [
     "Testing"
    ],
    "summary": "Webhook Tester",
    "description": "The Webhook Tester gives you disposable endpoints (“bins”) to debug webhooks and HTTP callbacks. `POST /v1/webhooks` creates a bin and returns its receiving URL, `https://apibox.io.vn/hook/<id>`, plus a link to the live viewer. Point Stripe, GitHub, a payment gateway or your own service at that URL: it accepts any HTTP method and any sub-path, and stores the method, path, query string, headers, client IP, country and the body (up to 256 KB; binary bodies are stored as base64).\n\nRead captured requests with `GET /v1/webhooks/<id>/requests` (newest first, `limit` 1–100, default 20). Pass `since` (ISO date or Unix seconds) to poll only for new requests. `GET /v1/webhooks` lists your active bins, `PATCH /v1/webhooks/<id>` changes the canned response the receiver sends back (`response_status`, `response_body`, `response_content_type`, `name`) so you can simulate errors and retries, `DELETE /v1/webhooks/<id>/requests` clears the history and `DELETE /v1/webhooks/<id>` removes the bin.\n\nBins created with an API key live 30 days. Each bin keeps its newest requests according to your plan – Free 50, Starter 500, Pro 2,000 – and you can have 2, 10 or 50 active bins on Free, Starter and Pro. The receiver accepts up to 60 requests per minute per bin.\n\nPath segments: `id`: Bin ID for /v1/webhooks/{id} (GET, PATCH, DELETE) and /v1/webhooks/{id}/requests[/{request_id}] (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/webhooks/",
    "operationId": "webhooksGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webhooks/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "GET …/requests: number of requests returned (1–100), newest first.",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "description": "GET …/requests: only requests received after this ISO date or Unix timestamp (seconds).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "viewer_url": {
           "type": "string"
          },
          "response": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "content_type": {
             "type": "string"
            },
            "body": {
             "type": "string"
            }
           }
          },
          "request_count": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "expires_at": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Testing"
    ],
    "summary": "Webhook Tester",
    "description": "The Webhook Tester gives you disposable endpoints (“bins”) to debug webhooks and HTTP callbacks. `POST /v1/webhooks` creates a bin and returns its receiving URL, `https://apibox.io.vn/hook/<id>`, plus a link to the live viewer. Point Stripe, GitHub, a payment gateway or your own service at that URL: it accepts any HTTP method and any sub-path, and stores the method, path, query string, headers, client IP, country and the body (up to 256 KB; binary bodies are stored as base64).\n\nRead captured requests with `GET /v1/webhooks/<id>/requests` (newest first, `limit` 1–100, default 20). Pass `since` (ISO date or Unix seconds) to poll only for new requests. `GET /v1/webhooks` lists your active bins, `PATCH /v1/webhooks/<id>` changes the canned response the receiver sends back (`response_status`, `response_body`, `response_content_type`, `name`) so you can simulate errors and retries, `DELETE /v1/webhooks/<id>/requests` clears the history and `DELETE /v1/webhooks/<id>` removes the bin.\n\nBins created with an API key live 30 days. Each bin keeps its newest requests according to your plan – Free 50, Starter 500, Pro 2,000 – and you can have 2, 10 or 50 active bins on Free, Starter and Pro. The receiver accepts up to 60 requests per minute per bin.\n\nPath segments: `id`: Bin ID for /v1/webhooks/{id} (GET, PATCH, DELETE) and /v1/webhooks/{id}/requests[/{request_id}] (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/webhooks/",
    "operationId": "webhooksPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webhooks/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "GET …/requests: number of requests returned (1–100), newest first.",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "description": "GET …/requests: only requests received after this ISO date or Unix timestamp (seconds).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "POST / PATCH: label of the bin (max 100 characters)."
         },
         "response_status": {
          "type": "number",
          "default": 200,
          "description": "POST / PATCH: HTTP status the receiver answers with (100–599)."
         },
         "response_body": {
          "type": "string",
          "default": "{\"ok\":true}",
          "description": "POST / PATCH: response body (max 10,000 characters)."
         },
         "response_content_type": {
          "type": "string",
          "default": "application/json",
          "description": "POST / PATCH: Content-Type of the response."
         }
        }
       },
       "example": {
        "name": "Stripe test",
        "response_status": 200,
        "response_body": "{\"received\":true}"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "viewer_url": {
           "type": "string"
          },
          "response": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "content_type": {
             "type": "string"
            },
            "body": {
             "type": "string"
            }
           }
          },
          "request_count": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "expires_at": {
           "type": "string"
          }
         }
        },
        "example": {
         "id": "adovzlj3btginkapev4iir",
         "name": "Stripe test",
         "url": "https://apibox.io.vn/hook/adovzlj3btginkapev4iir",
         "viewer_url": "https://apibox.io.vn/tools/webhook-tester/#adovzlj3btginkapev4iir",
         "response": {
          "status": 200,
          "content_type": "application/json",
          "body": "{\"received\":true}"
         },
         "request_count": 0,
         "created_at": "2026-11-10T05:09:53.000Z",
         "expires_at": "2026-12-10T05:09:53.000Z"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "delete": {
    "tags": [
     "Testing"
    ],
    "summary": "Webhook Tester",
    "description": "The Webhook Tester gives you disposable endpoints (“bins”) to debug webhooks and HTTP callbacks. `POST /v1/webhooks` creates a bin and returns its receiving URL, `https://apibox.io.vn/hook/<id>`, plus a link to the live viewer. Point Stripe, GitHub, a payment gateway or your own service at that URL: it accepts any HTTP method and any sub-path, and stores the method, path, query string, headers, client IP, country and the body (up to 256 KB; binary bodies are stored as base64).\n\nRead captured requests with `GET /v1/webhooks/<id>/requests` (newest first, `limit` 1–100, default 20). Pass `since` (ISO date or Unix seconds) to poll only for new requests. `GET /v1/webhooks` lists your active bins, `PATCH /v1/webhooks/<id>` changes the canned response the receiver sends back (`response_status`, `response_body`, `response_content_type`, `name`) so you can simulate errors and retries, `DELETE /v1/webhooks/<id>/requests` clears the history and `DELETE /v1/webhooks/<id>` removes the bin.\n\nBins created with an API key live 30 days. Each bin keeps its newest requests according to your plan – Free 50, Starter 500, Pro 2,000 – and you can have 2, 10 or 50 active bins on Free, Starter and Pro. The receiver accepts up to 60 requests per minute per bin.\n\nPath segments: `id`: Bin ID for /v1/webhooks/{id} (GET, PATCH, DELETE) and /v1/webhooks/{id}/requests[/{request_id}] (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/webhooks/",
    "operationId": "webhooksDelete",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webhooks/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "GET …/requests: number of requests returned (1–100), newest first.",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "description": "GET …/requests: only requests received after this ISO date or Unix timestamp (seconds).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "viewer_url": {
           "type": "string"
          },
          "response": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "content_type": {
             "type": "string"
            },
            "body": {
             "type": "string"
            }
           }
          },
          "request_count": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "expires_at": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "patch": {
    "tags": [
     "Testing"
    ],
    "summary": "Webhook Tester",
    "description": "The Webhook Tester gives you disposable endpoints (“bins”) to debug webhooks and HTTP callbacks. `POST /v1/webhooks` creates a bin and returns its receiving URL, `https://apibox.io.vn/hook/<id>`, plus a link to the live viewer. Point Stripe, GitHub, a payment gateway or your own service at that URL: it accepts any HTTP method and any sub-path, and stores the method, path, query string, headers, client IP, country and the body (up to 256 KB; binary bodies are stored as base64).\n\nRead captured requests with `GET /v1/webhooks/<id>/requests` (newest first, `limit` 1–100, default 20). Pass `since` (ISO date or Unix seconds) to poll only for new requests. `GET /v1/webhooks` lists your active bins, `PATCH /v1/webhooks/<id>` changes the canned response the receiver sends back (`response_status`, `response_body`, `response_content_type`, `name`) so you can simulate errors and retries, `DELETE /v1/webhooks/<id>/requests` clears the history and `DELETE /v1/webhooks/<id>` removes the bin.\n\nBins created with an API key live 30 days. Each bin keeps its newest requests according to your plan – Free 50, Starter 500, Pro 2,000 – and you can have 2, 10 or 50 active bins on Free, Starter and Pro. The receiver accepts up to 60 requests per minute per bin.\n\nPath segments: `id`: Bin ID for /v1/webhooks/{id} (GET, PATCH, DELETE) and /v1/webhooks/{id}/requests[/{request_id}] (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/webhooks/",
    "operationId": "webhooksPatch",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webhooks/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "GET …/requests: number of requests returned (1–100), newest first.",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "description": "GET …/requests: only requests received after this ISO date or Unix timestamp (seconds).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "POST / PATCH: label of the bin (max 100 characters)."
         },
         "response_status": {
          "type": "number",
          "default": 200,
          "description": "POST / PATCH: HTTP status the receiver answers with (100–599)."
         },
         "response_body": {
          "type": "string",
          "default": "{\"ok\":true}",
          "description": "POST / PATCH: response body (max 10,000 characters)."
         },
         "response_content_type": {
          "type": "string",
          "default": "application/json",
          "description": "POST / PATCH: Content-Type of the response."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "viewer_url": {
           "type": "string"
          },
          "response": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "content_type": {
             "type": "string"
            },
            "body": {
             "type": "string"
            }
           }
          },
          "request_count": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "expires_at": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vietqr": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "VietQR Generator",
    "description": "The VietQR API builds the standard EMVCo / NAPAS payload that every Vietnamese banking app scans: pick the bank (`bank=VCB`, `TCB`, `MB`, a bank name or its 6-digit NAPAS BIN), the account number, an optional amount in VND and a transfer note. You get a PNG image by default, an SVG with `format=svg`, or with `format=json` the raw payload string, the bank details and both images in one response. Size, colours, margin and error correction work like the QR Code API.\n\nThe payload is a dynamic QR (`01=12`) when an amount is set and a static one otherwise. Field 63 carries the CRC-16/CCITT checksum required by the specification. Vietnamese accents in the note are converted to plain ASCII (banks do not carry them reliably) and the original text is returned so you can see the change; keep notes under 25 characters, as some banks cut the rest.\n\n`GET /v1/vietqr/banks` returns the supported banks and e-wallets with their codes and BINs. `action=decode&payload=…` parses an existing VietQR string: bank, account, amount, note and whether the checksum is valid – handy to check what a printed code really contains.\n\nDocs: https://apibox.io.vn/docs/vietqr/",
    "operationId": "vietqrGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vietqr/"
    },
    "parameters": [
     {
      "name": "bank",
      "in": "query",
      "required": true,
      "description": "Bank code (VCB, ICB, BIDV, MB, TCB…), name (Vietcombank) or 6-digit NAPAS BIN. See `/v1/vietqr/banks`.",
      "schema": {
       "type": "string"
      },
      "example": "VCB"
     },
     {
      "name": "account",
      "in": "query",
      "required": true,
      "description": "Account number (or card number with `service=card`), up to 19 letters/digits.",
      "schema": {
       "type": "string"
      },
      "example": "0123456789"
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Amount in VND (whole number). Makes the QR dynamic.",
      "schema": {
       "type": "number"
      },
      "example": 150000
     },
     {
      "name": "content",
      "in": "query",
      "required": false,
      "description": "Transfer note, max 50 characters (accents removed). Aliases: `message`, `description`.",
      "schema": {
       "type": "string"
      },
      "example": "Thanh toan don ABX1234"
     },
     {
      "name": "service",
      "in": "query",
      "required": false,
      "description": "`account` (QRIBFTTA) or `card` (QRIBFTTC).",
      "schema": {
       "type": "string",
       "default": "account"
      }
     },
     {
      "name": "account_name",
      "in": "query",
      "required": false,
      "description": "Account holder, only echoed in JSON output (not part of the QR).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`png`, `svg` or `json`.",
      "schema": {
       "type": "string",
       "default": "png"
      },
      "example": "json"
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "description": "Image size in pixels (64–2000). `color`, `background`, `margin`, `ecc` work as in `/v1/qr`.",
      "schema": {
       "type": "number",
       "default": 300
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`decode` to parse the VietQR string given in `payload`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "bank": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "bin": {
             "type": "string"
            },
            "short_name": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "account": {
           "type": "string"
          },
          "account_name": {},
          "service": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "currency": {
           "type": "string"
          },
          "content": {
           "type": "string"
          },
          "data": {
           "type": "string"
          },
          "version": {
           "type": "number"
          },
          "modules": {
           "type": "number"
          },
          "ecc": {
           "type": "string"
          },
          "svg": {
           "type": "string"
          },
          "png_base64": {
           "type": "string"
          }
         }
        },
        "example": {
         "bank": {
          "code": "VCB",
          "bin": "970436",
          "short_name": "Vietcombank",
          "name": "Ngân hàng TMCP Ngoại thương Việt Nam"
         },
         "account": "0123456789",
         "account_name": null,
         "service": "account",
         "amount": 150000,
         "currency": "VND",
         "content": "Thanh toan don ABX1234",
         "data": "00020101021238540010A00000072701240006970436011001234567890208QRIBFTTA530370454061500005802VN62260822Thanh toan don ABX12346304FFCC",
         "version": 5,
         "modules": 37,
         "ecc": "M",
         "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 45 45\" …</svg>",
         "png_base64": "data:image/png;base64,iVBORw0KGgo…"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "VietQR Generator",
    "description": "The VietQR API builds the standard EMVCo / NAPAS payload that every Vietnamese banking app scans: pick the bank (`bank=VCB`, `TCB`, `MB`, a bank name or its 6-digit NAPAS BIN), the account number, an optional amount in VND and a transfer note. You get a PNG image by default, an SVG with `format=svg`, or with `format=json` the raw payload string, the bank details and both images in one response. Size, colours, margin and error correction work like the QR Code API.\n\nThe payload is a dynamic QR (`01=12`) when an amount is set and a static one otherwise. Field 63 carries the CRC-16/CCITT checksum required by the specification. Vietnamese accents in the note are converted to plain ASCII (banks do not carry them reliably) and the original text is returned so you can see the change; keep notes under 25 characters, as some banks cut the rest.\n\n`GET /v1/vietqr/banks` returns the supported banks and e-wallets with their codes and BINs. `action=decode&payload=…` parses an existing VietQR string: bank, account, amount, note and whether the checksum is valid – handy to check what a printed code really contains.\n\nDocs: https://apibox.io.vn/docs/vietqr/",
    "operationId": "vietqrPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vietqr/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "bank": {
          "type": "string",
          "description": "Bank code (VCB, ICB, BIDV, MB, TCB…), name (Vietcombank) or 6-digit NAPAS BIN. See `/v1/vietqr/banks`."
         },
         "account": {
          "type": "string",
          "description": "Account number (or card number with `service=card`), up to 19 letters/digits."
         },
         "amount": {
          "type": "number",
          "description": "Amount in VND (whole number). Makes the QR dynamic."
         },
         "content": {
          "type": "string",
          "description": "Transfer note, max 50 characters (accents removed). Aliases: `message`, `description`."
         },
         "service": {
          "type": "string",
          "default": "account",
          "description": "`account` (QRIBFTTA) or `card` (QRIBFTTC)."
         },
         "account_name": {
          "type": "string",
          "description": "Account holder, only echoed in JSON output (not part of the QR)."
         },
         "format": {
          "type": "string",
          "default": "png",
          "description": "`png`, `svg` or `json`."
         },
         "size": {
          "type": "number",
          "default": 300,
          "description": "Image size in pixels (64–2000). `color`, `background`, `margin`, `ecc` work as in `/v1/qr`."
         },
         "action": {
          "type": "string",
          "description": "`decode` to parse the VietQR string given in `payload`."
         }
        },
        "required": [
         "bank",
         "account"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "bank": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "bin": {
             "type": "string"
            },
            "short_name": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "account": {
           "type": "string"
          },
          "account_name": {},
          "service": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "currency": {
           "type": "string"
          },
          "content": {
           "type": "string"
          },
          "data": {
           "type": "string"
          },
          "version": {
           "type": "number"
          },
          "modules": {
           "type": "number"
          },
          "ecc": {
           "type": "string"
          },
          "svg": {
           "type": "string"
          },
          "png_base64": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/number-to-words": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Number to Words",
    "description": "The Number to Words API turns `1250000` into “Một triệu hai trăm năm mươi nghìn đồng” or “one million two hundred fifty thousand”. It follows the reading rules that are easy to get wrong in Vietnamese: “mốt” and “lăm” (21 → hai mươi mốt, 15 → mười lăm), “lẻ/linh” for a zero tens digit (105 → một trăm lẻ năm), “không trăm” inside large numbers (1,000,005 → một triệu không trăm lẻ năm) and the repeating “nghìn tỷ, triệu tỷ” scale.\n\nSet `currency=VND` to append “đồng” (no decimals allowed) or `currency=USD` for “đô la Mỹ … xu” / “dollars and … cents”. Without a currency, decimals are read after “phẩy” or “point”. `thousand=ngàn` and `odd=linh` switch to the Southern / formal variants, and the first letter is capitalised unless `capitalize=false`.\n\nThe input is forgiving: `1250000`, `1,250,000.50`, `1.250.000` (Vietnamese thousand separators), `1 250 000` and a trailing `đ` or `VND` are all understood. The normalised number is returned so you can check how it was read. A single dot is always a decimal point.\n\nDocs: https://apibox.io.vn/docs/number-to-words/",
    "operationId": "numberToWordsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/number-to-words/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "query",
      "required": true,
      "description": "The number, e.g. `1250000`, `1,250,000.50`, `1.250.000` or `-12.5`.",
      "schema": {
       "type": "string"
      },
      "example": "1250000"
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "`vi` or `en`.",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     },
     {
      "name": "currency",
      "in": "query",
      "required": false,
      "description": "`VND` or `USD` (empty: plain number).",
      "schema": {
       "type": "string"
      },
      "example": "VND"
     },
     {
      "name": "thousand",
      "in": "query",
      "required": false,
      "description": "Vietnamese word for thousand: `nghìn` or `ngàn`.",
      "schema": {
       "type": "string",
       "default": "nghìn"
      }
     },
     {
      "name": "odd",
      "in": "query",
      "required": false,
      "description": "Vietnamese word for a zero tens digit: `lẻ` or `linh`.",
      "schema": {
       "type": "string",
       "default": "lẻ"
      }
     },
     {
      "name": "capitalize",
      "in": "query",
      "required": false,
      "description": "Capitalise the first letter.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "number": {
           "type": "string"
          },
          "lang": {
           "type": "string"
          },
          "currency": {
           "type": "string"
          },
          "text": {
           "type": "string"
          }
         }
        },
        "example": {
         "number": "1250000",
         "lang": "vi",
         "currency": "VND",
         "text": "Một triệu hai trăm năm mươi nghìn đồng"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Number to Words",
    "description": "The Number to Words API turns `1250000` into “Một triệu hai trăm năm mươi nghìn đồng” or “one million two hundred fifty thousand”. It follows the reading rules that are easy to get wrong in Vietnamese: “mốt” and “lăm” (21 → hai mươi mốt, 15 → mười lăm), “lẻ/linh” for a zero tens digit (105 → một trăm lẻ năm), “không trăm” inside large numbers (1,000,005 → một triệu không trăm lẻ năm) and the repeating “nghìn tỷ, triệu tỷ” scale.\n\nSet `currency=VND` to append “đồng” (no decimals allowed) or `currency=USD` for “đô la Mỹ … xu” / “dollars and … cents”. Without a currency, decimals are read after “phẩy” or “point”. `thousand=ngàn` and `odd=linh` switch to the Southern / formal variants, and the first letter is capitalised unless `capitalize=false`.\n\nThe input is forgiving: `1250000`, `1,250,000.50`, `1.250.000` (Vietnamese thousand separators), `1 250 000` and a trailing `đ` or `VND` are all understood. The normalised number is returned so you can check how it was read. A single dot is always a decimal point.\n\nDocs: https://apibox.io.vn/docs/number-to-words/",
    "operationId": "numberToWordsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/number-to-words/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "number": {
          "type": "string",
          "description": "The number, e.g. `1250000`, `1,250,000.50`, `1.250.000` or `-12.5`."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "`vi` or `en`."
         },
         "currency": {
          "type": "string",
          "description": "`VND` or `USD` (empty: plain number)."
         },
         "thousand": {
          "type": "string",
          "default": "nghìn",
          "description": "Vietnamese word for thousand: `nghìn` or `ngàn`."
         },
         "odd": {
          "type": "string",
          "default": "lẻ",
          "description": "Vietnamese word for a zero tens digit: `lẻ` or `linh`."
         },
         "capitalize": {
          "type": "boolean",
          "default": true,
          "description": "Capitalise the first letter."
         }
        },
        "required": [
         "number"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "number": {
           "type": "string"
          },
          "lang": {
           "type": "string"
          },
          "currency": {
           "type": "string"
          },
          "text": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-provinces": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Provinces & Wards",
    "description": "Since 1 July 2025 Vietnam has 34 provinces and cities and no district level: each province is divided directly into phường (wards), xã (communes) and đặc khu (special zones). This API returns that structure with the official codes of the General Statistics Office, Vietnamese and English names, unit types and postal codes, ready to fill address forms and validate addresses. Later changes (for example communes upgraded to wards in 2026) are included; the response shows the dataset version and the latest resolution it covers.\n\n`GET /v1/vn-provinces` lists the provinces with their number of units and what they were formed from; `/v1/vn-provinces/{code}` (or a name such as `hcm`, `Hà Nội`) returns one province with all its wards, filterable by `type=ward|commune|special_zone`. `/v1/vn-provinces/wards/{code}` returns one unit with the list of pre-2025 wards/communes it was formed from, including their old district and province.\n\nTo convert old addresses, `old_ward={old code}` tells you which new unit(s) an old ward or commune went to (a few were split), and `q=` searches names without accents (`q=thu dau mot`). When a name no longer exists, the search also looks in the old names and says where they went. Data comes from the GSO conversion table and the open dataset of github.com/ThangLeQuoc/vietnamese-provinces-database (MIT) and is refreshed when new resolutions are published.\n\nPath segments: `code`: `/v1/vn-provinces/{code}`: 2-digit province code or name (`79`, `hcm`, `Hà Nội`). Alias: `province` query.\n\nDocs: https://apibox.io.vn/docs/vn-provinces/",
    "operationId": "vnProvincesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-provinces/"
    },
    "parameters": [
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "Ward / commune code (5 digits), same as `/v1/vn-provinces/wards/{code}`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search provinces and wards by name, accents optional. Combine with `province` and `limit` (max 100).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "match_old",
      "in": "query",
      "required": false,
      "description": "With `q`: also search pre-2025 names (always done when nothing current matches).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "old_ward",
      "in": "query",
      "required": false,
      "description": "Pre-2025 ward / commune code → the new unit(s) it became part of.",
      "schema": {
       "type": "string"
      },
      "example": "00013"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Filter the wards of a province: `ward`, `commune` or `special_zone`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "formed_from",
      "in": "query",
      "required": false,
      "description": "Include the old units each ward was formed from in lists and search results.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "version": {
           "type": "string"
          },
          "decree": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "old": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "change": {
             "type": "string"
            },
            "district": {
             "type": "string"
            },
            "district_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            }
           }
          },
          "split": {
           "type": "boolean"
          },
          "new": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "full_name": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "type_en": {
              "type": "string"
             },
             "slug": {
              "type": "string"
             },
             "postal_code": {
              "type": "string"
             },
             "province_code": {
              "type": "string"
             },
             "province": {
              "type": "string"
             },
             "change": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "version": "v5.2.0",
         "decree": "388/NQ-UBTVQH16",
         "updated": "2026-09-20",
         "old": {
          "code": "00013",
          "name": "Phường Quán Thánh",
          "change": "Nhập toàn bộ",
          "district": "Quận Ba Đình",
          "district_code": "001",
          "province": "Thành phố Hà Nội",
          "province_code": "01"
         },
         "split": false,
         "new": [
          {
           "code": "00004",
           "name": "Ba Đình",
           "full_name": "Phường Ba Đình",
           "name_en": "Ba Dinh",
           "type": "Phường",
           "type_en": "ward",
           "slug": "ba_dinh",
           "postal_code": "11120",
           "province_code": "01",
           "province": "Hà Nội",
           "change": "Nhập toàn bộ"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/whois": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "WHOIS / RDAP Lookup",
    "description": "The WHOIS API queries RDAP, the JSON successor of WHOIS that registries are required to run, and returns a short, consistent summary instead of free-form WHOIS text: registrar with its IANA ID and abuse contact, creation, last update and expiry dates, `days_until_expiry`, EPP status codes (such as `client transfer prohibited`), nameservers, DNSSEC and – when the registry publishes it – the registrant organisation and country.\n\nThe right RDAP server for each extension is taken from the official IANA bootstrap registry, which covers .com, .net, .org, .info, .dev, .app, .xyz and most other generic and many country-code domains. Subdomains are reduced automatically (`blog.example.com` → `example.com`). A domain that the registry does not know returns `registered: false`, which usually means it is available.\n\n.vn domains are not supported, because VNNIC has no public RDAP service, and neither are other extensions without RDAP (the error code is `tld_not_supported`). Results are cached for one hour.\n\nDocs: https://apibox.io.vn/docs/whois/",
    "operationId": "whoisGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/whois/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "description": "Domain name (a URL or subdomain is reduced to the domain).",
      "schema": {
       "type": "string"
      },
      "example": "github.com"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "domain": {
           "type": "string"
          },
          "unicode_name": {},
          "registered": {
           "type": "boolean"
          },
          "handle": {
           "type": "string"
          },
          "registrar": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "iana_id": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "abuse_email": {
             "type": "string"
            },
            "abuse_phone": {
             "type": "string"
            }
           }
          },
          "created": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "expires": {
           "type": "string"
          },
          "days_until_expiry": {
           "type": "number"
          },
          "status": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "nameservers": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "dnssec": {
           "type": "boolean"
          },
          "registrant": {},
          "rdap_server": {
           "type": "string"
          },
          "rdap_updated": {
           "type": "string"
          }
         }
        },
        "example": {
         "query": "github.com",
         "domain": "github.com",
         "unicode_name": null,
         "registered": true,
         "handle": "1264983250_DOMAIN_COM-VRSN",
         "registrar": {
          "name": "MarkMonitor Inc.",
          "iana_id": "292",
          "url": "http://www.markmonitor.com",
          "abuse_email": "abusecomplaints@markmonitor.com",
          "abuse_phone": "+1.2086851750"
         },
         "created": "2007-10-09T18:20:50Z",
         "updated": "2026-09-07T09:22:52Z",
         "expires": "2028-10-09T18:20:50Z",
         "days_until_expiry": 699,
         "status": [
          "client delete prohibited",
          "client transfer prohibited",
          "client update prohibited"
         ],
         "nameservers": [
          "dns1.p08.nsone.net",
          "dns2.p08.nsone.net",
          "ns-1283.awsdns-32.org",
          "ns-421.awsdns-52.com"
         ],
         "dnssec": false,
         "registrant": null,
         "rdap_server": "rdap.verisign.com",
         "rdap_updated": "2026-11-10T10:06:30Z"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/lunar-calendar": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Vietnamese Lunar Calendar",
    "description": "The Lunar Calendar API converts between the Gregorian calendar and the Vietnamese lunar calendar, computed for Vietnam’s timezone (UTC+7) with the astronomical algorithm of Hồ Ngọc Đức. This matters: in some years Tết falls one day earlier or a month differently than in China, so Chinese lunar libraries give wrong Vietnamese dates.\n\n`?date=2026-02-17` (default: today in Vietnam) returns the lunar day, month and year, whether the month is a leap month, the length of the lunar month, the leap month of that year, Can Chi of the year, month, day and first hour, the zodiac animal, the solar term (tiết khí), the six lucky hours (giờ hoàng đạo) and the lunar holiday of the day (Tết, Rằm tháng Giêng, Giỗ Tổ Hùng Vương, Vu Lan, Trung thu, Ông Công Ông Táo, Giao thừa…).\n\n`?lunar=2026-08-15` converts a lunar date to the solar date (add `leap=true` for a day of the leap month; impossible dates such as a missing 30th or a non-existent leap month return a clear error). `?month=2026-11` returns every day of a solar month with its lunar date for building calendars.\n\nDocs: https://apibox.io.vn/docs/lunar-calendar/",
    "operationId": "lunarCalendarGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/lunar-calendar/"
    },
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Solar date YYYY-MM-DD or DD/MM/YYYY → lunar (default: today in Vietnam).",
      "schema": {
       "type": "string"
      },
      "example": "2026-02-17"
     },
     {
      "name": "lunar",
      "in": "query",
      "required": false,
      "description": "Lunar date YYYY-MM-DD → solar date.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "leap",
      "in": "query",
      "required": false,
      "description": "With `lunar`: the day belongs to the leap month.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "month",
      "in": "query",
      "required": false,
      "description": "Solar month YYYY-MM: lunar date, Can Chi and holiday of every day.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "solar": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "weekday": {
             "type": "string"
            },
            "weekday_vi": {
             "type": "string"
            }
           }
          },
          "lunar": {
           "type": "object",
           "properties": {
            "day": {
             "type": "number"
            },
            "month": {
             "type": "number"
            },
            "year": {
             "type": "number"
            },
            "leap": {
             "type": "boolean"
            },
            "text": {
             "type": "string"
            },
            "month_length": {
             "type": "number"
            },
            "month_start": {
             "type": "string"
            },
            "leap_month_of_year": {}
           }
          },
          "can_chi_day": {
           "type": "string"
          },
          "holiday": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "can_chi": {
           "type": "object",
           "properties": {
            "year": {
             "type": "string"
            },
            "month": {
             "type": "string"
            },
            "day": {
             "type": "string"
            },
            "first_hour": {
             "type": "string"
            }
           }
          },
          "zodiac": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "solar_term": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "lucky_hours": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "chi": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             }
            }
           }
          },
          "julian_day": {
           "type": "number"
          },
          "first_or_full_moon": {
           "type": "string"
          }
         }
        },
        "example": {
         "solar": {
          "date": "2026-02-17",
          "weekday": "Tuesday",
          "weekday_vi": "Thứ Ba"
         },
         "lunar": {
          "day": 1,
          "month": 1,
          "year": 2026,
          "leap": false,
          "text": "01/01/2026",
          "month_length": 30,
          "month_start": "2026-02-17",
          "leap_month_of_year": null
         },
         "can_chi_day": "Nhâm Tuất",
         "holiday": {
          "vi": "Tết Nguyên Đán",
          "en": "Lunar New Year (Tết)"
         },
         "can_chi": {
          "year": "Bính Ngọ",
          "month": "Canh Dần",
          "day": "Nhâm Tuất",
          "first_hour": "Canh Tý"
         },
         "zodiac": {
          "vi": "Ngựa",
          "en": "Horse"
         },
         "solar_term": {
          "vi": "Lập xuân",
          "en": "Start of Spring"
         },
         "lucky_hours": [
          {
           "chi": "Dần",
           "from": "03:00",
           "to": "05:00"
          },
          {
           "chi": "Thìn",
           "from": "07:00",
           "to": "09:00"
          },
          {
           "chi": "Tỵ",
           "from": "09:00",
           "to": "11:00"
          },
          {
           "chi": "Thân",
           "from": "15:00",
           "to": "17:00"
          },
          {
           "chi": "Dậu",
           "from": "17:00",
           "to": "19:00"
          },
          {
           "chi": "Hợi",
           "from": "21:00",
           "to": "23:00"
          }
         ],
         "julian_day": 2461089,
         "first_or_full_moon": "mùng 1"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-id": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "CCCD & Tax Code Validator",
    "description": "The Vietnamese ID API checks the structure of identity numbers before you store them. A 12-digit CCCD number is decoded according to Circular 07/2016 and 59/2021 of the Ministry of Public Security: the first 3 digits are the province of birth registration (returned with its name and, since the 2025 merger, the province it now belongs to), the 4th digit encodes gender and century, the next 2 the birth year, and the last 6 are a serial number.\n\nA 10-digit tax code (mã số thuế) is validated with the official check digit (weights 31, 29, 23, 19, 17, 13, 7, 5, 3), and a 13-digit code (`0101248141-001`) is recognised as a branch / dependent unit. Since July 2025 the personal tax code is the CCCD number, so a 12-digit tax code is checked as a CCCD. Old 9-digit CMND numbers have no checksum: only their format is checked. `type=auto` (default) guesses the type from the length.\n\nThis is a structure check: it does not query any government database and cannot prove that a card or company exists. Numbers are processed in memory and never stored or logged; prefer POST so the number does not appear in URLs.\n\nDocs: https://apibox.io.vn/docs/vn-id/",
    "operationId": "vnIdGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-id/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "query",
      "required": true,
      "description": "CCCD, CMND or tax code; spaces, dots and dashes are ignored.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`auto`, `cccd`, `cmnd` or `tax_code` (alias `mst`).",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "details": {
           "type": "object",
           "properties": {
            "province_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_since_2025": {
             "type": "string"
            },
            "gender": {
             "type": "string"
            },
            "gender_code": {
             "type": "number"
            },
            "birth_year": {
             "type": "number"
            },
            "age_this_year": {
             "type": "number"
            },
            "serial": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "CCCD & Tax Code Validator",
    "description": "The Vietnamese ID API checks the structure of identity numbers before you store them. A 12-digit CCCD number is decoded according to Circular 07/2016 and 59/2021 of the Ministry of Public Security: the first 3 digits are the province of birth registration (returned with its name and, since the 2025 merger, the province it now belongs to), the 4th digit encodes gender and century, the next 2 the birth year, and the last 6 are a serial number.\n\nA 10-digit tax code (mã số thuế) is validated with the official check digit (weights 31, 29, 23, 19, 17, 13, 7, 5, 3), and a 13-digit code (`0101248141-001`) is recognised as a branch / dependent unit. Since July 2025 the personal tax code is the CCCD number, so a 12-digit tax code is checked as a CCCD. Old 9-digit CMND numbers have no checksum: only their format is checked. `type=auto` (default) guesses the type from the length.\n\nThis is a structure check: it does not query any government database and cannot prove that a card or company exists. Numbers are processed in memory and never stored or logged; prefer POST so the number does not appear in URLs.\n\nDocs: https://apibox.io.vn/docs/vn-id/",
    "operationId": "vnIdPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-id/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "number": {
          "type": "string",
          "description": "CCCD, CMND or tax code; spaces, dots and dashes are ignored."
         },
         "type": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `cccd`, `cmnd` or `tax_code` (alias `mst`)."
         }
        },
        "required": [
         "number"
        ]
       },
       "example": {
        "number": "001099012345"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "details": {
           "type": "object",
           "properties": {
            "province_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_since_2025": {
             "type": "string"
            },
            "gender": {
             "type": "string"
            },
            "gender_code": {
             "type": "number"
            },
            "birth_year": {
             "type": "number"
            },
            "age_this_year": {
             "type": "number"
            },
            "serial": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "001099012345",
         "normalized": "001099012345",
         "type": "cccd",
         "valid": true,
         "errors": [],
         "details": {
          "province_code": "001",
          "province": "Hà Nội",
          "province_since_2025": "Hà Nội",
          "gender": "male",
          "gender_code": 0,
          "birth_year": 1999,
          "age_this_year": 27,
          "serial": "012345"
         },
         "note": "Since 07/2025 the CCCD number is also the personal tax code. Structure check only: this does not prove the card exists."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-salary": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Gross ↔ Net Salary (Vietnam)",
    "description": "The salary API computes a monthly salary in Vietnam both ways: from gross to net (`gross=30000000`) and from the net amount an employee should receive back to the gross to put in the contract (`net=26215000`). It returns every step: compulsory insurance of the employee (BHXH 8%, BHYT 1.5%, BHTN 1%) with their caps, income before tax, family deductions, taxable income, tax per bracket and the employer’s cost (BHXH 17%, TNLĐ-BNN 0.5%, BHYT 3%, BHTN 1%, optional 2% union fund).\n\nRules are stored with their effective dates and the period is a parameter (`date` or `month`), so payroll for past months is computed with the rules of that time: the 7-bracket table and 11 / 4.4 million deductions until 2025; the 5-bracket table of Law 109/2025/QH15 and 15.5 / 6.2 million deductions (Resolution 110/2025/UBTVQH15) from tax year 2026; the base salary (2.34 → 2.53 million from 1/7/2026) for the 20× insurance cap and the regional minimum wages for the unemployment insurance cap. The legal reference of each value is returned in `rules`.\n\n`insurance_salary` sets a different salary for insurance (it defaults to gross), `non_taxable` excludes tax-free allowances, `region` (1–4) selects the minimum-wage region and `resident=false` applies the flat 20% of non-residents. The result is an estimate for planning and checking payroll; special cases (overtime, bonuses, foreigners’ insurance) need your own rules.\n\nDocs: https://apibox.io.vn/docs/vn-salary/",
    "operationId": "vnSalaryGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-salary/"
    },
    "parameters": [
     {
      "name": "gross",
      "in": "query",
      "required": false,
      "description": "Monthly gross salary in VND (send gross or net).",
      "schema": {
       "type": "number"
      },
      "example": 30000000
     },
     {
      "name": "net",
      "in": "query",
      "required": false,
      "description": "Monthly net salary in VND, to find the gross.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "dependents",
      "in": "query",
      "required": false,
      "description": "Number of registered dependants.",
      "schema": {
       "type": "number",
       "default": 0
      },
      "example": 1
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "Minimum-wage region 1–4 (for the BHTN cap).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Salary period, `YYYY-MM-DD` or `month=YYYY-MM` (default: today). From 2020-07.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "insurance_salary",
      "in": "query",
      "required": false,
      "description": "Salary used for insurance (default: gross).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "non_taxable",
      "in": "query",
      "required": false,
      "description": "Tax-free part of gross (meal allowance…).",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "insurance",
      "in": "query",
      "required": false,
      "description": "false: no compulsory insurance.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "resident",
      "in": "query",
      "required": false,
      "description": "false: non-resident, flat 20%.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "union_fund",
      "in": "query",
      "required": false,
      "description": "Add the 2% union fund to the employer cost.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "period": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "region": {
           "type": "number"
          },
          "gross": {
           "type": "number"
          },
          "net": {
           "type": "number"
          },
          "insurance": {
           "type": "object",
           "properties": {
            "salary": {
             "type": "number"
            },
            "bhxh": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "caps": {
             "type": "object",
             "properties": {
              "bhxh_bhyt": {
               "type": "number"
              },
              "bhtn": {
               "type": "number"
              }
             }
            }
           }
          },
          "income_before_tax": {
           "type": "number"
          },
          "deductions": {
           "type": "object",
           "properties": {
            "personal": {
             "type": "number"
            },
            "dependents": {
             "type": "number"
            },
            "dependent_count": {
             "type": "number"
            },
            "non_taxable_income": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "taxable_income": {
           "type": "number"
          },
          "personal_income_tax": {
           "type": "number"
          },
          "tax_brackets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "number"
             },
             "to": {
              "type": "number"
             },
             "rate": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "tax": {
              "type": "number"
             }
            }
           }
          },
          "employer": {
           "type": "object",
           "properties": {
            "bhxh": {
             "type": "number"
            },
            "tnld_bnn": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "total_cost": {
             "type": "number"
            }
           }
          },
          "rules": {
           "type": "object",
           "properties": {
            "personal_deduction": {
             "type": "number"
            },
            "dependent_deduction": {
             "type": "number"
            },
            "deduction_ref": {
             "type": "string"
            },
            "tax_table": {
             "type": "string"
            },
            "base_salary": {
             "type": "number"
            },
            "region_min_wage": {
             "type": "number"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array"
          }
         }
        },
        "example": {
         "period": "2026-11",
         "mode": "gross_to_net",
         "region": 1,
         "gross": 30000000,
         "net": 26592500,
         "insurance": {
          "salary": 30000000,
          "bhxh": 2400000,
          "bhyt": 450000,
          "bhtn": 300000,
          "total": 3150000,
          "caps": {
           "bhxh_bhyt": 50600000,
           "bhtn": 106200000
          }
         },
         "income_before_tax": 26850000,
         "deductions": {
          "personal": 15500000,
          "dependents": 6200000,
          "dependent_count": 1,
          "non_taxable_income": 0,
          "total": 21700000
         },
         "taxable_income": 5150000,
         "personal_income_tax": 257500,
         "tax_brackets": [
          {
           "from": 0,
           "to": 10000000,
           "rate": 0.05,
           "amount": 5150000,
           "tax": 257500
          }
         ],
         "employer": {
          "bhxh": 5100000,
          "tnld_bnn": 150000,
          "bhyt": 900000,
          "bhtn": 300000,
          "total": 6450000,
          "total_cost": 36450000
         },
         "rules": {
          "personal_deduction": 15500000,
          "dependent_deduction": 6200000,
          "deduction_ref": "Nghị quyết 110/2025/UBTVQH15",
          "tax_table": "Luật Thuế TNCN 109/2025/QH15 (5 bậc, áp dụng từ kỳ tính thuế 2026)",
          "base_salary": 2530000,
          "region_min_wage": 5310000,
          "…": "…"
         },
         "notes": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Gross ↔ Net Salary (Vietnam)",
    "description": "The salary API computes a monthly salary in Vietnam both ways: from gross to net (`gross=30000000`) and from the net amount an employee should receive back to the gross to put in the contract (`net=26215000`). It returns every step: compulsory insurance of the employee (BHXH 8%, BHYT 1.5%, BHTN 1%) with their caps, income before tax, family deductions, taxable income, tax per bracket and the employer’s cost (BHXH 17%, TNLĐ-BNN 0.5%, BHYT 3%, BHTN 1%, optional 2% union fund).\n\nRules are stored with their effective dates and the period is a parameter (`date` or `month`), so payroll for past months is computed with the rules of that time: the 7-bracket table and 11 / 4.4 million deductions until 2025; the 5-bracket table of Law 109/2025/QH15 and 15.5 / 6.2 million deductions (Resolution 110/2025/UBTVQH15) from tax year 2026; the base salary (2.34 → 2.53 million from 1/7/2026) for the 20× insurance cap and the regional minimum wages for the unemployment insurance cap. The legal reference of each value is returned in `rules`.\n\n`insurance_salary` sets a different salary for insurance (it defaults to gross), `non_taxable` excludes tax-free allowances, `region` (1–4) selects the minimum-wage region and `resident=false` applies the flat 20% of non-residents. The result is an estimate for planning and checking payroll; special cases (overtime, bonuses, foreigners’ insurance) need your own rules.\n\nDocs: https://apibox.io.vn/docs/vn-salary/",
    "operationId": "vnSalaryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-salary/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "gross": {
          "type": "number",
          "description": "Monthly gross salary in VND (send gross or net)."
         },
         "net": {
          "type": "number",
          "description": "Monthly net salary in VND, to find the gross."
         },
         "dependents": {
          "type": "number",
          "default": 0,
          "description": "Number of registered dependants."
         },
         "region": {
          "type": "number",
          "default": 1,
          "description": "Minimum-wage region 1–4 (for the BHTN cap)."
         },
         "date": {
          "type": "string",
          "description": "Salary period, `YYYY-MM-DD` or `month=YYYY-MM` (default: today). From 2020-07."
         },
         "insurance_salary": {
          "type": "number",
          "description": "Salary used for insurance (default: gross)."
         },
         "non_taxable": {
          "type": "number",
          "default": 0,
          "description": "Tax-free part of gross (meal allowance…)."
         },
         "insurance": {
          "type": "boolean",
          "default": true,
          "description": "false: no compulsory insurance."
         },
         "resident": {
          "type": "boolean",
          "default": true,
          "description": "false: non-resident, flat 20%."
         },
         "union_fund": {
          "type": "boolean",
          "default": false,
          "description": "Add the 2% union fund to the employer cost."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "period": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "region": {
           "type": "number"
          },
          "gross": {
           "type": "number"
          },
          "net": {
           "type": "number"
          },
          "insurance": {
           "type": "object",
           "properties": {
            "salary": {
             "type": "number"
            },
            "bhxh": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "caps": {
             "type": "object",
             "properties": {
              "bhxh_bhyt": {
               "type": "number"
              },
              "bhtn": {
               "type": "number"
              }
             }
            }
           }
          },
          "income_before_tax": {
           "type": "number"
          },
          "deductions": {
           "type": "object",
           "properties": {
            "personal": {
             "type": "number"
            },
            "dependents": {
             "type": "number"
            },
            "dependent_count": {
             "type": "number"
            },
            "non_taxable_income": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "taxable_income": {
           "type": "number"
          },
          "personal_income_tax": {
           "type": "number"
          },
          "tax_brackets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "number"
             },
             "to": {
              "type": "number"
             },
             "rate": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "tax": {
              "type": "number"
             }
            }
           }
          },
          "employer": {
           "type": "object",
           "properties": {
            "bhxh": {
             "type": "number"
            },
            "tnld_bnn": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "total_cost": {
             "type": "number"
            }
           }
          },
          "rules": {
           "type": "object",
           "properties": {
            "personal_deduction": {
             "type": "number"
            },
            "dependent_deduction": {
             "type": "number"
            },
            "deduction_ref": {
             "type": "string"
            },
            "tax_table": {
             "type": "string"
            },
            "base_salary": {
             "type": "number"
            },
            "region_min_wage": {
             "type": "number"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/exchange-rates": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Exchange Rates (VND)",
    "description": "The exchange rate API returns the rate table of Vietcombank, the reference most Vietnamese businesses use: cash buying, transfer buying and selling rates for 20 currencies (USD, EUR, JPY, CNY, KRW, SGD…). Pass `date=YYYY-MM-DD` for a past day, for example the date of an invoice; past tables are cached, today’s table is refreshed every 15 minutes.\n\nWith `amount`, `from` and `to` it converts: from a foreign currency to VND you get the amount at each buying rate and at the selling rate; from VND to a foreign currency, the amount the bank sells you. Only pairs between VND and a currency Vietcombank quotes are supported: other pairs (two foreign currencies, or a currency Vietcombank does not quote) return 400 `pair_not_supported` with the list of supported currencies and pairs.\n\nRates are for reference: bank branches and transfer types can differ. The response always names the source, the date of the table and the time Vietcombank last updated it. APIBox is not affiliated with Vietcombank.\n\nDocs: https://apibox.io.vn/docs/exchange-rates/",
    "operationId": "exchangeRatesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/exchange-rates/"
    },
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Day of the table, `YYYY-MM-DD` (default: today, Vietnam time).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "currencies",
      "in": "query",
      "required": false,
      "description": "Only these codes, e.g. `USD,EUR`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Amount to convert.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 100
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Currency to convert from (enables conversion).",
      "schema": {
       "type": "string"
      },
      "example": "USD"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Currency to convert to.",
      "schema": {
       "type": "string",
       "default": "VND"
      }
     },
     {
      "name": "source",
      "in": "query",
      "required": false,
      "description": "Only `vietcombank` (`market` is no longer supported and returns 400 `source_not_supported`).",
      "schema": {
       "type": "string",
       "default": "vietcombank"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "amount": {
           "type": "number"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "rate": {
           "type": "object",
           "properties": {
            "cash_buy": {
             "type": "number"
            },
            "transfer_buy": {
             "type": "number"
            },
            "sell": {
             "type": "number"
            }
           }
          },
          "result": {
           "type": "object",
           "properties": {
            "cash_buy": {
             "type": "number"
            },
            "transfer_buy": {
             "type": "number"
            },
            "sell": {
             "type": "number"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "amount": 100,
         "from": "USD",
         "to": "VND",
         "source": "Vietcombank",
         "date": "2026-11-10",
         "updated_at": "2026-11-10T16:14:44+07:00",
         "rate": {
          "cash_buy": 25380,
          "transfer_buy": 25410,
          "sell": 25790
         },
         "result": {
          "cash_buy": 2538000,
          "transfer_buy": 2541000,
          "sell": 2579000
         },
         "note": "cash_buy / transfer_buy: VND you receive when selling the currency to the bank; sell: VND you pay to buy it."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-plate": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Licence Plates",
    "description": "The licence plate API reads Vietnamese plates such as `30A-123.45`, `29-B1 123.45`, `51LD-12345` or `80-011-NG-01`. It returns the normalised plate, the local code with the province it was issued in (one of the 63 provinces before July 2025) and the province it belongs to now (one of the 34), the vehicle type (car or motorbike, under 50cc for two-letter motorbike series), the 4- or 5-digit format and the meaning of special series: LD, DA, KT, CD, RM, HC, MĐ, T and the foreign series NG, QT, CV, NN.\n\nAfter the merger every old code was kept (Circular 51/2025/TT-BCA): a 34 plate (Hải Dương) now belongs to Hải Phòng and 61 (Bình Dương) and 72 (Bà Rịa – Vũng Tàu) to Ho Chi Minh City; nobody has to change plates. `province=` does the reverse and lists all the codes of a province, old or new, and `list=true` returns the whole table.\n\nA plate number alone does not say whether the plate is white, yellow or blue, so the response lists the possible colours for that series. Military plates (two letters first, red) are recognised but their unit codes are not decoded. The API only reads the format; it does not look up owners or registrations.\n\nDocs: https://apibox.io.vn/docs/vn-plate/",
    "operationId": "vnPlateGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-plate/"
    },
    "parameters": [
     {
      "name": "plate",
      "in": "query",
      "required": true,
      "description": "Plate number, e.g. `30A-123.45`; or `/v1/vn-plate/{plate}`.",
      "schema": {
       "type": "string"
      },
      "example": "61A-555.55"
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: the codes of a province (old or new name).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`true`: the whole code table.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "kind": {
           "type": "string"
          },
          "formatted": {
           "type": "string"
          },
          "local_code": {
           "type": "string"
          },
          "series": {
           "type": "string"
          },
          "number": {
           "type": "string"
          },
          "vehicle": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "series_meaning": {},
          "possible_colors": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "region": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "old_province": {
             "type": "string"
            },
            "new_province": {
             "type": "string"
            },
            "new_province_code": {
             "type": "string"
            },
            "merged": {
             "type": "boolean"
            }
           }
          }
         }
        },
        "example": {
         "input": "61A-555.55",
         "valid": true,
         "kind": "civil",
         "formatted": "61A-555.55",
         "local_code": "61",
         "series": "A",
         "number": "55555",
         "vehicle": "car",
         "format": "5-digit (since 2010)",
         "series_meaning": null,
         "possible_colors": [
          "nền trắng, chữ đen: cá nhân, doanh nghiệp, tổ chức trong nước",
          "nền xanh, chữ trắng: cơ quan Đảng, Nhà nước, đơn vị sự nghiệp công lập, lực lượng công an",
          "nền vàng, chữ đen: xe kinh doanh vận tải"
         ],
         "region": {
          "code": "61",
          "old_province": "Bình Dương",
          "new_province": "Hồ Chí Minh",
          "new_province_code": "79",
          "merged": true
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-holidays": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Vietnam Holidays & Working Days",
    "description": "The holidays API knows Vietnam’s public holidays: New Year, Tết (computed with the lunar calendar), Hung Kings Day (10/3 lunar), 30/4 and 1/5, National Day 2/9 with its extra day and, from 2026, Vietnamese Culture Day 24/11. For years whose day-off schedule has been announced (2024–2026 and Tết / 2/9 of 2027) it uses the official dates, including the weekends inside each block and the Saturdays worked to make up for a bridge day; other years follow the Labour Code: the statutory days plus a compensatory day after any that falls on a weekend.\n\n`year=2026` lists the holidays of a year with their dates and the number of working days. `date=` tells whether a day is a working day and why not. `from=&to=` counts working days, weekend days and holiday days in a range, and `from=&add=10` returns the date 10 working days later (or earlier with a negative number), the usual way to compute deadlines and SLAs.\n\nOfficial schedules are those for civil servants (Saturday and Sunday off). Private companies must give at least the statutory days but may choose other dates for Tết and 2/9; `saturday_off=false` computes a six-day week. Each holiday says whether it is `official` or `estimated`.\n\nDocs: https://apibox.io.vn/docs/vn-holidays/",
    "operationId": "vnHolidaysGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-holidays/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "List the holidays of a year (2021–2199). Default: this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Check one day (`YYYY-MM-DD`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Start of a range, or start date for `add`.",
      "schema": {
       "type": "string"
      },
      "example": "2026-02-12"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "End of the range (inclusive): count working days.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "add",
      "in": "query",
      "required": false,
      "description": "Number of working days to add (negative: go back).",
      "schema": {
       "type": "number"
      },
      "example": 3
     },
     {
      "name": "saturday_off",
      "in": "query",
      "required": false,
      "description": "`false`: six-day week (only Sunday off).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "add_workdays": {
           "type": "number"
          },
          "saturday_off": {
           "type": "boolean"
          },
          "result": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "weekday": {
             "type": "string"
            },
            "weekday_vi": {
             "type": "string"
            },
            "is_workday": {
             "type": "boolean"
            },
            "is_weekend": {
             "type": "boolean"
            },
            "is_make_up_workday": {
             "type": "boolean"
            },
            "holiday": {}
           }
          },
          "calendar_days": {
           "type": "number"
          },
          "holidays_skipped": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "from": "2026-02-12",
         "add_workdays": 3,
         "saturday_off": true,
         "result": {
          "date": "2026-02-24",
          "weekday": "Tuesday",
          "weekday_vi": "Thứ Ba",
          "is_workday": true,
          "is_weekend": false,
          "is_make_up_workday": false,
          "holiday": null
         },
         "calendar_days": 12,
         "holidays_skipped": [
          "Lunar New Year (Tết)"
         ],
         "note": "Schedules marked \"official\" are those announced for civil servants…"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/regex": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Regex Tester",
    "description": "The regex API runs a regular expression (JavaScript / ECMAScript syntax, as in browsers and Node.js) on a text of up to 100,000 characters. `action=match` (the default) returns every match with its start and end position and the value and position of each numbered and named group; `test` returns true / false, `replace` applies a replacement with `$1`, `$<name>` and `$&`, and `split` splits the text.\n\nFlags are the usual `g i m s u v y` (and `d`, used internally for group positions). Without `g`, match returns the first match only. Invalid patterns return a 400 with the error of the engine, so the API also works as a validator for patterns typed by users.\n\nPatterns with a nested quantifier such as `(a+)+` or `(\\w*\\s?)*`, which can take exponential time on some inputs, are rejected with `unsafe_pattern`. Results are limited to 1,000 matches (`limit`, default 100); `count` still gives the total.\n\nDocs: https://apibox.io.vn/docs/regex/",
    "operationId": "regexGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/regex/"
    },
    "parameters": [
     {
      "name": "pattern",
      "in": "query",
      "required": true,
      "description": "The regular expression, without slashes.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Text to search (max 100,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "flags",
      "in": "query",
      "required": false,
      "description": "Flags, e.g. `gi`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`match`, `test`, `replace` or `split`.",
      "schema": {
       "type": "string",
       "default": "match"
      }
     },
     {
      "name": "replacement",
      "in": "query",
      "required": false,
      "description": "Replacement for `replace` ($1, $<name>, $&).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max matches / parts returned (1–1000).",
      "schema": {
       "type": "number",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "pattern": {
           "type": "string"
          },
          "flags": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "group_count": {
           "type": "number"
          },
          "group_names": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "global": {
           "type": "boolean"
          },
          "count": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "match": {
              "type": "string"
             },
             "index": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "groups": {
              "type": "array"
             },
             "named": {
              "type": "object",
              "properties": {}
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Regex Tester",
    "description": "The regex API runs a regular expression (JavaScript / ECMAScript syntax, as in browsers and Node.js) on a text of up to 100,000 characters. `action=match` (the default) returns every match with its start and end position and the value and position of each numbered and named group; `test` returns true / false, `replace` applies a replacement with `$1`, `$<name>` and `$&`, and `split` splits the text.\n\nFlags are the usual `g i m s u v y` (and `d`, used internally for group positions). Without `g`, match returns the first match only. Invalid patterns return a 400 with the error of the engine, so the API also works as a validator for patterns typed by users.\n\nPatterns with a nested quantifier such as `(a+)+` or `(\\w*\\s?)*`, which can take exponential time on some inputs, are rejected with `unsafe_pattern`. Results are limited to 1,000 matches (`limit`, default 100); `count` still gives the total.\n\nDocs: https://apibox.io.vn/docs/regex/",
    "operationId": "regexPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/regex/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pattern": {
          "type": "string",
          "description": "The regular expression, without slashes."
         },
         "text": {
          "type": "string",
          "description": "Text to search (max 100,000 characters)."
         },
         "flags": {
          "type": "string",
          "description": "Flags, e.g. `gi`."
         },
         "action": {
          "type": "string",
          "default": "match",
          "description": "`match`, `test`, `replace` or `split`."
         },
         "replacement": {
          "type": "string",
          "description": "Replacement for `replace` ($1, $<name>, $&)."
         },
         "limit": {
          "type": "number",
          "default": 100,
          "description": "Max matches / parts returned (1–1000)."
         }
        },
        "required": [
         "pattern"
        ]
       },
       "example": {
        "pattern": "(?<user>[\\w.]+)@([\\w.]+)",
        "flags": "g",
        "text": "a@x.com, b.c@y.vn"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "pattern": {
           "type": "string"
          },
          "flags": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "group_count": {
           "type": "number"
          },
          "group_names": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "global": {
           "type": "boolean"
          },
          "count": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "match": {
              "type": "string"
             },
             "index": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "groups": {
              "type": "array"
             },
             "named": {
              "type": "object",
              "properties": {}
             }
            }
           }
          }
         }
        },
        "example": {
         "pattern": "(?<user>[\\w.]+)@([\\w.]+)",
         "flags": "g",
         "action": "match",
         "group_count": 2,
         "group_names": [
          "user"
         ],
         "global": true,
         "count": 2,
         "truncated": false,
         "matches": [
          {
           "match": "a@x.com",
           "index": 0,
           "end": 7,
           "groups": [
            {
             "index": 1,
             "value": "a",
             "start": 0,
             "end": 1
            },
            {
             "index": 2,
             "value": "x.com",
             "start": 2,
             "end": 7
            }
           ],
           "named": {
            "user": "a"
           }
          },
          {
           "match": "b.c@y.vn",
           "index": 9,
           "end": 17,
           "groups": [
            {
             "index": 1,
             "value": "b.c",
             "start": 9,
             "end": 12
            },
            {
             "index": 2,
             "value": "y.vn",
             "start": 13,
             "end": 17
            }
           ],
           "named": {
            "user": "b.c"
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-text": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Text Tools",
    "description": "The Vietnamese text API gathers the conversions that Vietnamese software keeps needing. `remove_accents` turns “Tiếng Việt” into “Tieng Viet” (with `slug=true` for URLs). `to_unicode` converts text typed with the legacy TCVN3 / ABC fonts (.VnTime: “ViÖt Nam”) or VNI-Windows fonts (“Vieät Nam”) into Unicode; with `from=auto` it detects the encoding, which fixes old Word and Excel files and data exported from legacy systems.\n\n`telex` and `vni_typing` turn keystrokes into letters (“Tieengs Vieetj” → “Tiếng Việt”, “Tie6ng1” → “Tiếng”), useful for search boxes and keyboards without an input method. `normalize` recomposes NFD text (common in files from macOS) and places tone marks consistently in the old style (hòa, thúy) or the new style (hoà, thuý) with `tone_style=new`, so that the same word always compares equal.\n\n`split_name` splits full names into family, middle and given names (recognising compound family names such as Tôn Thất) and fixes their capitalisation; send one name per line for a batch. `sort_names` sorts a list the Vietnamese way: by given name, then middle name, then family name, with Vietnamese alphabetical order (a ă â … đ …).\n\nDocs: https://apibox.io.vn/docs/vn-text/",
    "operationId": "vnTextGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-text/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`remove_accents`, `to_unicode`, `telex`, `vni_typing`, `normalize`, `split_name` or `sort_names`.",
      "schema": {
       "type": "string",
       "default": "remove_accents"
      }
     },
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The text (max 200,000 characters). For names: one per line.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "For `to_unicode`: `auto`, `tcvn3` or `vni`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "tone_style",
      "in": "query",
      "required": false,
      "description": "`old` (hòa) or `new` (hoà).",
      "schema": {
       "type": "string",
       "default": "old"
      }
     },
     {
      "name": "slug",
      "in": "query",
      "required": false,
      "description": "With `remove_accents`: return a URL slug.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "detected": {
           "type": "boolean"
          },
          "length": {
           "type": "number"
          },
          "result": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Text Tools",
    "description": "The Vietnamese text API gathers the conversions that Vietnamese software keeps needing. `remove_accents` turns “Tiếng Việt” into “Tieng Viet” (with `slug=true` for URLs). `to_unicode` converts text typed with the legacy TCVN3 / ABC fonts (.VnTime: “ViÖt Nam”) or VNI-Windows fonts (“Vieät Nam”) into Unicode; with `from=auto` it detects the encoding, which fixes old Word and Excel files and data exported from legacy systems.\n\n`telex` and `vni_typing` turn keystrokes into letters (“Tieengs Vieetj” → “Tiếng Việt”, “Tie6ng1” → “Tiếng”), useful for search boxes and keyboards without an input method. `normalize` recomposes NFD text (common in files from macOS) and places tone marks consistently in the old style (hòa, thúy) or the new style (hoà, thuý) with `tone_style=new`, so that the same word always compares equal.\n\n`split_name` splits full names into family, middle and given names (recognising compound family names such as Tôn Thất) and fixes their capitalisation; send one name per line for a batch. `sort_names` sorts a list the Vietnamese way: by given name, then middle name, then family name, with Vietnamese alphabetical order (a ă â … đ …).\n\nDocs: https://apibox.io.vn/docs/vn-text/",
    "operationId": "vnTextPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-text/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "remove_accents",
          "description": "`remove_accents`, `to_unicode`, `telex`, `vni_typing`, `normalize`, `split_name` or `sort_names`."
         },
         "text": {
          "type": "string",
          "description": "The text (max 200,000 characters). For names: one per line."
         },
         "from": {
          "type": "string",
          "default": "auto",
          "description": "For `to_unicode`: `auto`, `tcvn3` or `vni`."
         },
         "tone_style": {
          "type": "string",
          "default": "old",
          "description": "`old` (hòa) or `new` (hoà)."
         },
         "names": {
          "type": "array",
          "items": {},
          "description": "For `sort_names`: an array of names (or one per line in `text`)."
         },
         "slug": {
          "type": "boolean",
          "description": "With `remove_accents`: return a URL slug."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "action": "to_unicode",
        "text": "Vieät Nam"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "detected": {
           "type": "boolean"
          },
          "length": {
           "type": "number"
          },
          "result": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "to_unicode",
         "from": "vni",
         "detected": true,
         "length": 8,
         "result": "Việt Nam"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/unit-convert": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Unit Converter",
    "description": "The unit conversion API converts a value between about 150 units in 11 categories: length, mass, area, volume, speed, data size (decimal KB/MB and binary KiB/MiB, bits and bytes), pressure, energy, power, time and temperature. `value=100&from=km/h&to=mph` returns the result and a ready-made text; without `to` it converts into every unit of the category, and without parameters it lists all units and their aliases.\n\nTraditional Vietnamese units are included with their usual modern values: gold in lượng / cây (37.5 g), chỉ (3.75 g) and phân; mass in lạng (100 g), yến, tạ and tấn; land in sào and mẫu Bắc Bộ (360 / 3,600 m²) and Trung Bộ (497 / 4,970 m²), công đất (1,000 m², or 1,296 m² for the “tầm lớn”) and thước; plus colloquial ly, phân, tấc, thước, cây số, khối and số điện (kWh).\n\nUnit names are matched without accents or case where it is unambiguous (`luong`, `Lượng`), and the category is chosen from both units, so `phân` means a centimetre next to `m` and a tenth of a chỉ next to `g`. Results are rounded to `precision` significant digits (default 10).\n\nDocs: https://apibox.io.vn/docs/unit-convert/",
    "operationId": "unitConvertGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/unit-convert/"
    },
    "parameters": [
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "The value to convert.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 2
     },
     {
      "name": "from",
      "in": "query",
      "required": true,
      "description": "Source unit, e.g. `km`, `lượng`, `sào`, `GiB`, `F`.",
      "schema": {
       "type": "string"
      },
      "example": "lượng"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Target unit (empty: every unit of the category).",
      "schema": {
       "type": "string"
      },
      "example": "g"
     },
     {
      "name": "precision",
      "in": "query",
      "required": false,
      "description": "Significant digits (1–15).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "value": {
           "type": "number"
          },
          "from": {
           "type": "object",
           "properties": {
            "unit": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "to": {
           "type": "object",
           "properties": {
            "unit": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "category": {
           "type": "string"
          },
          "result": {
           "type": "number"
          },
          "text": {
           "type": "string"
          }
         }
        },
        "example": {
         "value": 2,
         "from": {
          "unit": "lượng",
          "name": "lượng / cây vàng (37.5 g)"
         },
         "to": {
          "unit": "g",
          "name": "gram"
         },
         "category": "mass",
         "result": 75,
         "text": "2 lượng = 75 g"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Unit Converter",
    "description": "The unit conversion API converts a value between about 150 units in 11 categories: length, mass, area, volume, speed, data size (decimal KB/MB and binary KiB/MiB, bits and bytes), pressure, energy, power, time and temperature. `value=100&from=km/h&to=mph` returns the result and a ready-made text; without `to` it converts into every unit of the category, and without parameters it lists all units and their aliases.\n\nTraditional Vietnamese units are included with their usual modern values: gold in lượng / cây (37.5 g), chỉ (3.75 g) and phân; mass in lạng (100 g), yến, tạ and tấn; land in sào and mẫu Bắc Bộ (360 / 3,600 m²) and Trung Bộ (497 / 4,970 m²), công đất (1,000 m², or 1,296 m² for the “tầm lớn”) and thước; plus colloquial ly, phân, tấc, thước, cây số, khối and số điện (kWh).\n\nUnit names are matched without accents or case where it is unambiguous (`luong`, `Lượng`), and the category is chosen from both units, so `phân` means a centimetre next to `m` and a tenth of a chỉ next to `g`. Results are rounded to `precision` significant digits (default 10).\n\nDocs: https://apibox.io.vn/docs/unit-convert/",
    "operationId": "unitConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/unit-convert/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "value": {
          "type": "number",
          "default": 1,
          "description": "The value to convert."
         },
         "from": {
          "type": "string",
          "description": "Source unit, e.g. `km`, `lượng`, `sào`, `GiB`, `F`."
         },
         "to": {
          "type": "string",
          "description": "Target unit (empty: every unit of the category)."
         },
         "precision": {
          "type": "number",
          "default": 10,
          "description": "Significant digits (1–15)."
         }
        },
        "required": [
         "from"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "value": {
           "type": "number"
          },
          "from": {
           "type": "object",
           "properties": {
            "unit": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "to": {
           "type": "object",
           "properties": {
            "unit": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "category": {
           "type": "string"
          },
          "result": {
           "type": "number"
          },
          "text": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/fake-data": {
   "get": {
    "tags": [
     "Testing"
    ],
    "summary": "Vietnamese Fake Data",
    "description": "The fake data API generates realistic Vietnamese records for tests, demos and seeding databases: full names split into family, middle and given name (family names weighted by their real frequency, gender-appropriate middle names), birthdays, emails, mobile numbers with real prefixes of Viettel, Vinaphone, MobiFone, Vietnamobile and Gmobile, and addresses made of a street with a real phường / xã and province of the 2025 administrative map, with postal codes.\n\n`fields=all` adds CCCD numbers consistent with the person (province code, century and gender digit, birth year), 10-digit tax codes with a correct check digit, companies, job titles, bank accounts at real banks with the account name in capitals, usernames and UUIDs. Up to 1,000 records per call; `format=csv` downloads them as CSV. The same `seed` always gives the same data, so tests stay reproducible.\n\nNothing is copied from real people. Emails use the reserved example.com / .net / .org domains; CCCD numbers and tax codes only have a valid structure and are labelled as fake. Do not use them as real identity documents.\n\nDocs: https://apibox.io.vn/docs/fake-data/",
    "operationId": "fakeDataGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/fake-data/"
    },
    "parameters": [
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of records (1–1000).",
      "schema": {
       "type": "number",
       "default": 10
      },
      "example": 1
     },
     {
      "name": "fields",
      "in": "query",
      "required": false,
      "description": "Comma list: name, gender, birthday, email, phone, address, cccd, tax_code, company, job, bank_account, username, uuid, or `all`.",
      "schema": {
       "type": "string",
       "default": "name,gender,birthday,email,phone,address"
      }
     },
     {
      "name": "seed",
      "in": "query",
      "required": false,
      "description": "Seed for reproducible data.",
      "schema": {
       "type": "string"
      },
      "example": "abc"
     },
     {
      "name": "gender",
      "in": "query",
      "required": false,
      "description": "`any`, `male` or `female`.",
      "schema": {
       "type": "string",
       "default": "any"
      }
     },
     {
      "name": "min_age",
      "in": "query",
      "required": false,
      "description": "Minimum age.",
      "schema": {
       "type": "number",
       "default": 18
      }
     },
     {
      "name": "max_age",
      "in": "query",
      "required": false,
      "description": "Maximum age.",
      "schema": {
       "type": "number",
       "default": 65
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "seed": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "family_name": {
              "type": "string"
             },
             "middle_name": {
              "type": "string"
             },
             "given_name": {
              "type": "string"
             },
             "gender": {
              "type": "string"
             },
             "birthday": {
              "type": "string"
             },
             "age": {
              "type": "number"
             },
             "email": {
              "type": "string"
             },
             "phone": {
              "type": "string"
             },
             "phone_e164": {
              "type": "string"
             },
             "carrier": {
              "type": "string"
             },
             "address": {
              "type": "object"
             }
            }
           }
          }
         }
        },
        "example": {
         "seed": "abc",
         "count": 1,
         "fields": [
          "name",
          "gender",
          "birthday",
          "email",
          "phone",
          "address"
         ],
         "note": "Fake data for testing. Emails use reserved example domains; CCCD and tax codes only have a valid structure and must not be used as real documents.",
         "data": [
          {
           "name": "Nguyễn Minh Hà",
           "family_name": "Nguyễn",
           "middle_name": "Minh",
           "given_name": "Hà",
           "gender": "female",
           "birthday": "2003-12-18",
           "age": 23,
           "email": "ha.nguyen26@example.com",
           "phone": "0923091759",
           "phone_e164": "+84923091759",
           "carrier": "Vietnamobile",
           "address": {
            "street": "269/30 Nguyễn Thị Minh Khai",
            "ward": "Xã Tân Đông",
            "ward_code": "25522",
            "province": "Tỉnh Tây Ninh",
            "province_code": "80",
            "postal_code": "80311",
            "full": "269/30 Nguyễn Thị Minh Khai, Xã Tân Đông, Tỉnh Tây Ninh"
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Testing"
    ],
    "summary": "Vietnamese Fake Data",
    "description": "The fake data API generates realistic Vietnamese records for tests, demos and seeding databases: full names split into family, middle and given name (family names weighted by their real frequency, gender-appropriate middle names), birthdays, emails, mobile numbers with real prefixes of Viettel, Vinaphone, MobiFone, Vietnamobile and Gmobile, and addresses made of a street with a real phường / xã and province of the 2025 administrative map, with postal codes.\n\n`fields=all` adds CCCD numbers consistent with the person (province code, century and gender digit, birth year), 10-digit tax codes with a correct check digit, companies, job titles, bank accounts at real banks with the account name in capitals, usernames and UUIDs. Up to 1,000 records per call; `format=csv` downloads them as CSV. The same `seed` always gives the same data, so tests stay reproducible.\n\nNothing is copied from real people. Emails use the reserved example.com / .net / .org domains; CCCD numbers and tax codes only have a valid structure and are labelled as fake. Do not use them as real identity documents.\n\nDocs: https://apibox.io.vn/docs/fake-data/",
    "operationId": "fakeDataPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/fake-data/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "count": {
          "type": "number",
          "default": 10,
          "description": "Number of records (1–1000)."
         },
         "fields": {
          "type": "string",
          "default": "name,gender,birthday,email,phone,address",
          "description": "Comma list: name, gender, birthday, email, phone, address, cccd, tax_code, company, job, bank_account, username, uuid, or `all`."
         },
         "seed": {
          "type": "string",
          "description": "Seed for reproducible data."
         },
         "gender": {
          "type": "string",
          "default": "any",
          "description": "`any`, `male` or `female`."
         },
         "min_age": {
          "type": "number",
          "default": 18,
          "description": "Minimum age."
         },
         "max_age": {
          "type": "number",
          "default": 65,
          "description": "Maximum age."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `csv`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "seed": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "family_name": {
              "type": "string"
             },
             "middle_name": {
              "type": "string"
             },
             "given_name": {
              "type": "string"
             },
             "gender": {
              "type": "string"
             },
             "birthday": {
              "type": "string"
             },
             "age": {
              "type": "number"
             },
             "email": {
              "type": "string"
             },
             "phone": {
              "type": "string"
             },
             "phone_e164": {
              "type": "string"
             },
             "carrier": {
              "type": "string"
             },
             "address": {
              "type": "object"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/email-auth": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Email Authentication Check",
    "description": "The email authentication API checks whether a domain is set up to deliver email and to resist spoofing, the requirements Gmail, Yahoo and Outlook now enforce for bulk senders. It reads the MX records, the SPF record (detecting duplicates, `+all` / `?all`, deprecated `ptr` and counting the DNS lookups through every include against the limit of 10), DKIM keys at your selectors or at about 20 common ones (Google, Microsoft 365, Mailchimp, SendGrid, Resend, Zoho…), with their key size, and the DMARC policy with its reporting addresses.\n\nOptional records are reported too: MTA-STS and TLS-RPT for encrypted delivery and BIMI for a brand logo in the inbox. Every finding is a check with a status (`pass`, `info`, `warn`, `fail`) and a message in English or Vietnamese (`lang=vi`) that says what to change; the score from 0 to 100 and the A–F grade give a quick overview.\n\nDKIM selectors are not discoverable in DNS: if your provider uses a custom one, read the `s=` tag of the DKIM-Signature header of a sent email and pass it as `selectors=`. Records are read live through DNS-over-HTTPS (cached for 5 minutes).\n\nDocs: https://apibox.io.vn/docs/email-auth/",
    "operationId": "emailAuthGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-auth/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "description": "Domain (or an email address).",
      "schema": {
       "type": "string"
      },
      "example": "github.com"
     },
     {
      "name": "selectors",
      "in": "query",
      "required": false,
      "description": "DKIM selectors to check, comma-separated (default: ~20 common ones).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of the messages: `en` or `vi`.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "domain": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "mx": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "preference": {
              "type": "number"
             },
             "host": {
              "type": "string"
             }
            }
           }
          },
          "spf": {
           "type": "object",
           "properties": {
            "record": {
             "type": "string"
            },
            "all": {
             "type": "string"
            },
            "dns_lookups": {
             "type": "number"
            },
            "includes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "dmarc": {
           "type": "object",
           "properties": {
            "record": {
             "type": "string"
            },
            "p": {
             "type": "string"
            }
           }
          },
          "dkim": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "selector": {
              "type": "string"
             },
             "key_type": {
              "type": "string"
             },
             "key_bits": {
              "type": "number"
             },
             "revoked": {
              "type": "boolean"
             },
             "testing": {
              "type": "boolean"
             }
            }
           }
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "domain": "github.com",
         "score": 90,
         "grade": "A",
         "summary": {
          "passed": 5,
          "info": 3,
          "warnings": 2,
          "errors": 0
         },
         "mx": [
          {
           "preference": 1,
           "host": "aspmx.l.google.com"
          }
         ],
         "spf": {
          "record": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com … ~all",
          "all": "softfail",
          "dns_lookups": 10,
          "includes": [
           "spf.protection.outlook.com",
           "_netblocks.google.com",
           "…"
          ]
         },
         "dmarc": {
          "record": "v=DMARC1; p=quarantine; …",
          "p": "quarantine"
         },
         "dkim": [
          {
           "selector": "google",
           "key_type": "rsa",
           "key_bits": 2048,
           "revoked": false,
           "testing": false
          },
          {
           "selector": "selector1",
           "key_type": "rsa",
           "key_bits": 1024,
           "revoked": false,
           "testing": false
          }
         ],
         "checks": [
          {
           "id": "spf_lookups",
           "status": "warn",
           "message": "10/10 DNS lookups",
           "value": 10
          },
          {
           "id": "dmarc",
           "status": "pass",
           "message": "DMARC policy \"p=quarantine\""
          },
          {
           "id": "dkim_key",
           "status": "warn",
           "message": "RSA key shorter than 2048 bits at selector1, k1"
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/seo-check": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "SEO Check",
    "description": "The SEO check API fetches a page like a crawler and reviews what search engines and social networks read: HTTP status and redirects, HTTPS, response time, the length of the title and meta description, the number of H1 headings and skipped heading levels, the canonical URL, noindex in meta robots or the X-Robots-Tag header, hreflang alternates, the lang attribute, the mobile viewport, Open Graph and Twitter tags for link previews, images without alt text, links without text, the amount of text, JSON-LD structured data and the HTML size.\n\nIt also reads the site’s robots.txt to tell whether the page is blocked for crawlers and whether a sitemap is declared (`robots=false` skips it). Each item is a check with a status (`pass`, `info`, `warn`, `fail`) and a message in English or Vietnamese (`lang=vi`); the score (0–100) and grade weigh the items that matter most, such as indexability, status and title.\n\nThe `page` object gives the extracted values (title, description, H1s, canonical, Open Graph, link counts, word count, structured data types) for your own rules. Results are cached for 10 minutes (`fresh=true` to re-check). It analyses the HTML as served, without running JavaScript; Core Web Vitals and backlinks are out of scope.\n\nDocs: https://apibox.io.vn/docs/seo-check/",
    "operationId": "seoCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/seo-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Page URL (http or https).",
      "schema": {
       "type": "string"
      },
      "example": "https://vnexpress.net/"
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of the messages: `en` or `vi`.",
      "schema": {
       "type": "string",
       "default": "en"
      },
      "example": "vi"
     },
     {
      "name": "robots",
      "in": "query",
      "required": false,
      "description": "`false`: skip the robots.txt / sitemap checks.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "fresh",
      "in": "query",
      "required": false,
      "description": "Bypass the 10-minute cache.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "response_ms": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "page": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "h1": {
             "type": "array"
            },
            "headings": {
             "type": "object",
             "properties": {
              "h1": {
               "type": "number"
              },
              "h2": {
               "type": "number"
              },
              "h3": {
               "type": "number"
              },
              "h4": {
               "type": "number"
              },
              "h5": {
               "type": "number"
              },
              "h6": {
               "type": "number"
              }
             }
            },
            "lang": {
             "type": "string"
            },
            "canonical": {
             "type": "string"
            },
            "word_count": {
             "type": "number"
            },
            "structured_data": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "…": {
             "type": "string"
            }
           }
          },
          "robots_txt": {
           "type": "object",
           "properties": {
            "url": {
             "type": "string"
            },
            "found": {
             "type": "boolean"
            },
            "sitemaps": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "blocked": {
             "type": "boolean"
            }
           }
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "url": "https://vnexpress.net/",
         "final_url": "https://vnexpress.net/",
         "status": 200,
         "response_ms": 146,
         "score": 76,
         "grade": "C",
         "summary": {
          "passed": 14,
          "info": 2,
          "warnings": 1,
          "errors": 1
         },
         "page": {
          "title": "Báo VnExpress - Báo tiếng Việt nhiều người xem nhất",
          "h1": [],
          "headings": {
           "h1": 0,
           "h2": 1,
           "h3": 27,
           "h4": 0,
           "h5": 0,
           "h6": 0
          },
          "lang": "vi",
          "canonical": "https://vnexpress.net/",
          "word_count": 1257,
          "structured_data": [
           "WebSite",
           "Organization"
          ],
          "…": "…"
         },
         "robots_txt": {
          "url": "https://vnexpress.net/robots.txt",
          "found": true,
          "sitemaps": [
           "…"
          ],
          "blocked": false
         },
         "checks": [
          {
           "id": "title",
           "status": "pass",
           "message": "Tiêu đề dài 51 ký tự",
           "value": "Báo VnExpress - Báo tiếng Việt nhiều người xem nhất"
          },
          {
           "id": "description",
           "status": "warn",
           "message": "Meta description dài 192 ký tự (nên khoảng 70–160)",
           "value": "…"
          },
          {
           "id": "h1",
           "status": "fail",
           "message": "Không có thẻ <h1>"
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "SEO Check",
    "description": "The SEO check API fetches a page like a crawler and reviews what search engines and social networks read: HTTP status and redirects, HTTPS, response time, the length of the title and meta description, the number of H1 headings and skipped heading levels, the canonical URL, noindex in meta robots or the X-Robots-Tag header, hreflang alternates, the lang attribute, the mobile viewport, Open Graph and Twitter tags for link previews, images without alt text, links without text, the amount of text, JSON-LD structured data and the HTML size.\n\nIt also reads the site’s robots.txt to tell whether the page is blocked for crawlers and whether a sitemap is declared (`robots=false` skips it). Each item is a check with a status (`pass`, `info`, `warn`, `fail`) and a message in English or Vietnamese (`lang=vi`); the score (0–100) and grade weigh the items that matter most, such as indexability, status and title.\n\nThe `page` object gives the extracted values (title, description, H1s, canonical, Open Graph, link counts, word count, structured data types) for your own rules. Results are cached for 10 minutes (`fresh=true` to re-check). It analyses the HTML as served, without running JavaScript; Core Web Vitals and backlinks are out of scope.\n\nDocs: https://apibox.io.vn/docs/seo-check/",
    "operationId": "seoCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/seo-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Page URL (http or https)."
         },
         "lang": {
          "type": "string",
          "default": "en",
          "description": "Language of the messages: `en` or `vi`."
         },
         "robots": {
          "type": "boolean",
          "default": true,
          "description": "`false`: skip the robots.txt / sitemap checks."
         },
         "fresh": {
          "type": "boolean",
          "default": false,
          "description": "Bypass the 10-minute cache."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "response_ms": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "page": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "h1": {
             "type": "array"
            },
            "headings": {
             "type": "object",
             "properties": {
              "h1": {
               "type": "number"
              },
              "h2": {
               "type": "number"
              },
              "h3": {
               "type": "number"
              },
              "h4": {
               "type": "number"
              },
              "h5": {
               "type": "number"
              },
              "h6": {
               "type": "number"
              }
             }
            },
            "lang": {
             "type": "string"
            },
            "canonical": {
             "type": "string"
            },
            "word_count": {
             "type": "number"
            },
            "structured_data": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "…": {
             "type": "string"
            }
           }
          },
          "robots_txt": {
           "type": "object",
           "properties": {
            "url": {
             "type": "string"
            },
            "found": {
             "type": "boolean"
            },
            "sitemaps": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "blocked": {
             "type": "boolean"
            }
           }
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/address-parse": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Address Parser",
    "description": "The address parser reads addresses as people type them: `123 Lê Lợi, P. Bến Thành, Q.1, TP.HCM`, `45/2 Nguyễn Trãi, Phường 2, Quận 5`, `thon 3, xa ea tieu, huyen cu kuin, dak lak` (without accents) or the new form `Số 5 ngõ 10 phố Huế, Phường Hai Bà Trưng, Hà Nội`. It recognises abbreviations (P., Q., TX., TT., TP., P3, Q10), old and new province names and aliases such as HCM or Sài Gòn, and splits the house number from the street.\n\nThe result is the current unit: since 1 July 2025 there are no districts, so an old address is converted through the official conversion table of the General Statistics Office: Phường 2, Quận 5 becomes Phường Chợ Quán, TP. Hồ Chí Minh; Phường Phú Cường, TP. Thủ Dầu Một, Bình Dương becomes Phường Thủ Dầu Một, TP. Hồ Chí Minh. The response gives the new ward and province with their codes and postal code, a ready-to-print `full_address` and, for converted addresses, the old unit in `converted_from`.\n\nWhen an old ward was split between several new units, `ambiguous` is true and `candidates` lists them. Send up to 100 addresses at once with POST `{ \"addresses\": [...] }`. The data is the same as the Vietnam provinces API and follows later resolutions.\n\nDocs: https://apibox.io.vn/docs/address-parse/",
    "operationId": "addressParseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/address-parse/"
    },
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": true,
      "description": "Free-text address (max 500 characters).",
      "schema": {
       "type": "string"
      },
      "example": "123 Lê Lợi, P. Bến Thành, Q.1, TP.HCM"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "version": {
           "type": "string"
          },
          "decree": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "input": {
           "type": "string"
          },
          "parsed": {
           "type": "object",
           "properties": {
            "house_number": {
             "type": "string"
            },
            "street": {
             "type": "string"
            },
            "ward": {
             "type": "string"
            },
            "district": {
             "type": "string"
            },
            "province": {
             "type": "string"
            }
           }
          },
          "format": {
           "type": "string"
          },
          "matched": {
           "type": "boolean"
          },
          "ambiguous": {
           "type": "boolean"
          },
          "result": {
           "type": "object",
           "properties": {
            "ward": {
             "type": "string"
            },
            "ward_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            },
            "full_address": {
             "type": "string"
            },
            "converted_from": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "change": {
               "type": "string"
              },
              "district": {
               "type": "string"
              },
              "district_code": {
               "type": "string"
              },
              "province": {
               "type": "string"
              },
              "province_code": {
               "type": "string"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "version": "v5.2.0",
         "decree": "388/NQ-UBTVQH16",
         "updated": "2026-09-20",
         "input": "123 Lê Lợi, P. Bến Thành, Q.1, TP.HCM",
         "parsed": {
          "house_number": "123",
          "street": "Lê Lợi",
          "ward": "P. Bến Thành",
          "district": "Q.1",
          "province": "TP.HCM"
         },
         "format": "old (before 07/2025)",
         "matched": true,
         "ambiguous": false,
         "result": {
          "ward": "Phường Bến Thành",
          "ward_code": "26743",
          "province": "Thành phố Hồ Chí Minh",
          "province_code": "79",
          "postal_code": "71009",
          "full_address": "123 Lê Lợi, Phường Bến Thành, Thành phố Hồ Chí Minh",
          "converted_from": {
           "code": "26743",
           "name": "Phường Bến Thành",
           "change": "Nhập toàn bộ",
           "district": "Quận 1",
           "district_code": "760",
           "province": "Thành phố Hồ Chí Minh",
           "province_code": "79"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Address Parser",
    "description": "The address parser reads addresses as people type them: `123 Lê Lợi, P. Bến Thành, Q.1, TP.HCM`, `45/2 Nguyễn Trãi, Phường 2, Quận 5`, `thon 3, xa ea tieu, huyen cu kuin, dak lak` (without accents) or the new form `Số 5 ngõ 10 phố Huế, Phường Hai Bà Trưng, Hà Nội`. It recognises abbreviations (P., Q., TX., TT., TP., P3, Q10), old and new province names and aliases such as HCM or Sài Gòn, and splits the house number from the street.\n\nThe result is the current unit: since 1 July 2025 there are no districts, so an old address is converted through the official conversion table of the General Statistics Office: Phường 2, Quận 5 becomes Phường Chợ Quán, TP. Hồ Chí Minh; Phường Phú Cường, TP. Thủ Dầu Một, Bình Dương becomes Phường Thủ Dầu Một, TP. Hồ Chí Minh. The response gives the new ward and province with their codes and postal code, a ready-to-print `full_address` and, for converted addresses, the old unit in `converted_from`.\n\nWhen an old ward was split between several new units, `ambiguous` is true and `candidates` lists them. Send up to 100 addresses at once with POST `{ \"addresses\": [...] }`. The data is the same as the Vietnam provinces API and follows later resolutions.\n\nDocs: https://apibox.io.vn/docs/address-parse/",
    "operationId": "addressParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/address-parse/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "address": {
          "type": "string",
          "description": "Free-text address (max 500 characters)."
         },
         "addresses": {
          "type": "array",
          "items": {},
          "description": "Up to 100 addresses at once (POST JSON)."
         }
        },
        "required": [
         "address"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "version": {
           "type": "string"
          },
          "decree": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "input": {
           "type": "string"
          },
          "parsed": {
           "type": "object",
           "properties": {
            "house_number": {
             "type": "string"
            },
            "street": {
             "type": "string"
            },
            "ward": {
             "type": "string"
            },
            "district": {
             "type": "string"
            },
            "province": {
             "type": "string"
            }
           }
          },
          "format": {
           "type": "string"
          },
          "matched": {
           "type": "boolean"
          },
          "ambiguous": {
           "type": "boolean"
          },
          "result": {
           "type": "object",
           "properties": {
            "ward": {
             "type": "string"
            },
            "ward_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            },
            "full_address": {
             "type": "string"
            },
            "converted_from": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "change": {
               "type": "string"
              },
              "district": {
               "type": "string"
              },
              "district_code": {
               "type": "string"
              },
              "province": {
               "type": "string"
              },
              "province_code": {
               "type": "string"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/loan-calc": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Loan & Instalment Calculator",
    "description": "The loan calculator builds the full repayment schedule of a loan month by month: opening balance, principal, interest, payment and closing balance. It supports the three methods used by Vietnamese banks and consumer-finance companies: `declining` (dư nợ giảm dần: equal principal, interest on the remaining balance, the usual home and car loan), `annuity` (trả góp đều: the same payment every month) and `flat` (lãi phẳng: interest on the original amount every month, common for instalment purchases).\n\nReal offers often start with a promotional rate: `promo_rate=7.5&promo_months=12` applies it for the first year and the regular `rate` afterwards, recalculating the instalment. `prepay_month` and `prepay_fee` simulate an early full repayment with its penalty, and `start_date` adds payment dates. Every response also compares the three methods for the same loan.\n\n`effective_annual_rate` is the internal rate of return of the payments: a flat 12% loan really costs about 21% a year, which is the number to compare offers. Amounts are rounded to the đồng in each row.\n\nDocs: https://apibox.io.vn/docs/loan-calc/",
    "operationId": "loanCalcGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/loan-calc/"
    },
    "parameters": [
     {
      "name": "amount",
      "in": "query",
      "required": true,
      "description": "Loan amount.",
      "schema": {
       "type": "number"
      },
      "example": 120000000
     },
     {
      "name": "rate",
      "in": "query",
      "required": true,
      "description": "Yearly interest rate in %, e.g. `10.5`.",
      "schema": {
       "type": "number"
      },
      "example": 12
     },
     {
      "name": "months",
      "in": "query",
      "required": true,
      "description": "Term in months (or `years`).",
      "schema": {
       "type": "number"
      },
      "example": 12
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "`declining`, `annuity` or `flat`.",
      "schema": {
       "type": "string",
       "default": "declining"
      }
     },
     {
      "name": "promo_rate",
      "in": "query",
      "required": false,
      "description": "Promotional yearly rate in %.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "promo_months",
      "in": "query",
      "required": false,
      "description": "Number of months at the promotional rate.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "prepay_month",
      "in": "query",
      "required": false,
      "description": "Month of early full repayment.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "prepay_fee",
      "in": "query",
      "required": false,
      "description": "Early repayment fee in % of the prepaid principal.",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Disbursement date (`YYYY-MM-DD`) to add payment dates.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "schedule",
      "in": "query",
      "required": false,
      "description": "`false`: totals only.",
      "schema": {
       "type": "boolean",
       "default": true
      },
      "example": false
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "amount": {
           "type": "number"
          },
          "months": {
           "type": "number"
          },
          "rate": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "first_payment": {
           "type": "number"
          },
          "max_payment": {
           "type": "number"
          },
          "last_payment": {
           "type": "number"
          },
          "total_interest": {
           "type": "number"
          },
          "total_paid": {
           "type": "number"
          },
          "effective_annual_rate": {
           "type": "number"
          },
          "compare_methods": {
           "type": "object",
           "properties": {
            "declining": {
             "type": "object",
             "properties": {
              "first_payment": {
               "type": "number"
              },
              "last_payment": {
               "type": "number"
              },
              "total_interest": {
               "type": "number"
              }
             }
            },
            "annuity": {
             "type": "object",
             "properties": {
              "first_payment": {
               "type": "number"
              },
              "last_payment": {
               "type": "number"
              },
              "total_interest": {
               "type": "number"
              }
             }
            },
            "flat": {
             "type": "object",
             "properties": {
              "first_payment": {
               "type": "number"
              },
              "last_payment": {
               "type": "number"
              },
              "total_interest": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "amount": 120000000,
         "months": 12,
         "rate": 12,
         "method": "declining",
         "first_payment": 11200000,
         "max_payment": 11200000,
         "last_payment": 10100000,
         "total_interest": 7800000,
         "total_paid": 127800000,
         "effective_annual_rate": 12,
         "compare_methods": {
          "declining": {
           "first_payment": 11200000,
           "last_payment": 10100000,
           "total_interest": 7800000
          },
          "annuity": {
           "first_payment": 10661855,
           "last_payment": 10661855,
           "total_interest": 7942256
          },
          "flat": {
           "first_payment": 11200000,
           "last_payment": 11200000,
           "total_interest": 14400000
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Loan & Instalment Calculator",
    "description": "The loan calculator builds the full repayment schedule of a loan month by month: opening balance, principal, interest, payment and closing balance. It supports the three methods used by Vietnamese banks and consumer-finance companies: `declining` (dư nợ giảm dần: equal principal, interest on the remaining balance, the usual home and car loan), `annuity` (trả góp đều: the same payment every month) and `flat` (lãi phẳng: interest on the original amount every month, common for instalment purchases).\n\nReal offers often start with a promotional rate: `promo_rate=7.5&promo_months=12` applies it for the first year and the regular `rate` afterwards, recalculating the instalment. `prepay_month` and `prepay_fee` simulate an early full repayment with its penalty, and `start_date` adds payment dates. Every response also compares the three methods for the same loan.\n\n`effective_annual_rate` is the internal rate of return of the payments: a flat 12% loan really costs about 21% a year, which is the number to compare offers. Amounts are rounded to the đồng in each row.\n\nDocs: https://apibox.io.vn/docs/loan-calc/",
    "operationId": "loanCalcPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/loan-calc/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "amount": {
          "type": "number",
          "description": "Loan amount."
         },
         "rate": {
          "type": "number",
          "description": "Yearly interest rate in %, e.g. `10.5`."
         },
         "months": {
          "type": "number",
          "description": "Term in months (or `years`)."
         },
         "method": {
          "type": "string",
          "default": "declining",
          "description": "`declining`, `annuity` or `flat`."
         },
         "promo_rate": {
          "type": "number",
          "description": "Promotional yearly rate in %."
         },
         "promo_months": {
          "type": "number",
          "description": "Number of months at the promotional rate."
         },
         "prepay_month": {
          "type": "number",
          "description": "Month of early full repayment."
         },
         "prepay_fee": {
          "type": "number",
          "default": 0,
          "description": "Early repayment fee in % of the prepaid principal."
         },
         "start_date": {
          "type": "string",
          "description": "Disbursement date (`YYYY-MM-DD`) to add payment dates."
         },
         "schedule": {
          "type": "boolean",
          "default": true,
          "description": "`false`: totals only."
         }
        },
        "required": [
         "amount",
         "rate",
         "months"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "amount": {
           "type": "number"
          },
          "months": {
           "type": "number"
          },
          "rate": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "first_payment": {
           "type": "number"
          },
          "max_payment": {
           "type": "number"
          },
          "last_payment": {
           "type": "number"
          },
          "total_interest": {
           "type": "number"
          },
          "total_paid": {
           "type": "number"
          },
          "effective_annual_rate": {
           "type": "number"
          },
          "compare_methods": {
           "type": "object",
           "properties": {
            "declining": {
             "type": "object",
             "properties": {
              "first_payment": {
               "type": "number"
              },
              "last_payment": {
               "type": "number"
              },
              "total_interest": {
               "type": "number"
              }
             }
            },
            "annuity": {
             "type": "object",
             "properties": {
              "first_payment": {
               "type": "number"
              },
              "last_payment": {
               "type": "number"
              },
              "total_interest": {
               "type": "number"
              }
             }
            },
            "flat": {
             "type": "object",
             "properties": {
              "first_payment": {
               "type": "number"
              },
              "last_payment": {
               "type": "number"
              },
              "total_interest": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-query": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSONPath Query",
    "description": "The JSON query API evaluates a JSONPath expression on a JSON document and returns the matching values with their normalised paths. It implements RFC 9535: member and index selectors (`$.store.book[0]`, `$[\"key with spaces\"]`, negative indexes), wildcards, recursive descent (`$..price`), slices with steps (`[1:5:2]`, `[::-1]`), unions (`[0,2]`) and filters such as `$..book[?@.price < 10 && @.category == \"fiction\"].title`.\n\nFilters support existence tests (`[?@.isbn]`), comparisons of numbers and strings, `&&`, `||`, `!`, parentheses, references to the root (`$`) and the functions `length()`, `count()`, `match()` and `search()` (regular expressions, with the same protection against runaway patterns as the regex API).\n\nPass `pointer=/store/book/1/title` instead of `path` to read one value with a JSON Pointer (RFC 6901). Results are limited to 10,000 values (`limit`, default 1,000).\n\nDocs: https://apibox.io.vn/docs/json-query/",
    "operationId": "jsonQueryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-query/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "json": {
          "type": "object",
          "description": "The JSON document (object or JSON string)."
         },
         "path": {
          "type": "string",
          "description": "JSONPath expression starting with `$`."
         },
         "pointer": {
          "type": "string",
          "description": "JSON Pointer instead of `path`, e.g. `/a/0`."
         },
         "limit": {
          "type": "number",
          "default": 1000,
          "description": "Maximum number of values returned."
         }
        },
        "required": [
         "json"
        ]
       },
       "example": {
        "json": {
         "store": {
          "book": [
           {
            "title": "Sayings",
            "price": 8.95
           },
           {
            "title": "Sword",
            "price": 12.99
           },
           {
            "title": "Moby Dick",
            "price": 8.99,
            "isbn": "0-553-21311-3"
           }
          ]
         }
        },
        "path": "$..book[?@.price < 10].title"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "path": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "values": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "paths": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "path": "$..book[?@.price < 10].title",
         "count": 2,
         "truncated": false,
         "values": [
          "Sayings",
          "Moby Dick"
         ],
         "paths": [
          "$['store']['book'][0]['title']",
          "$['store']['book'][2]['title']"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSONPath Query",
    "description": "The JSON query API evaluates a JSONPath expression on a JSON document and returns the matching values with their normalised paths. It implements RFC 9535: member and index selectors (`$.store.book[0]`, `$[\"key with spaces\"]`, negative indexes), wildcards, recursive descent (`$..price`), slices with steps (`[1:5:2]`, `[::-1]`), unions (`[0,2]`) and filters such as `$..book[?@.price < 10 && @.category == \"fiction\"].title`.\n\nFilters support existence tests (`[?@.isbn]`), comparisons of numbers and strings, `&&`, `||`, `!`, parentheses, references to the root (`$`) and the functions `length()`, `count()`, `match()` and `search()` (regular expressions, with the same protection against runaway patterns as the regex API).\n\nPass `pointer=/store/book/1/title` instead of `path` to read one value with a JSON Pointer (RFC 6901). Results are limited to 10,000 values (`limit`, default 1,000).\n\nDocs: https://apibox.io.vn/docs/json-query/",
    "operationId": "jsonQueryGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-query/"
    },
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": false,
      "description": "JSONPath expression starting with `$`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pointer",
      "in": "query",
      "required": false,
      "description": "JSON Pointer instead of `path`, e.g. `/a/0`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum number of values returned.",
      "schema": {
       "type": "number",
       "default": 1000
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "path": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "values": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "paths": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-diff": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Diff & Patch",
    "description": "The JSON diff API compares two JSON values by structure, not by text: key order and formatting do not matter. `action=diff` (with `a` and `b`) returns whether they are equal, a summary of added, removed and replaced values, an RFC 6902 JSON Patch that turns `a` into `b` and the equivalent RFC 7386 Merge Patch, the format used by many REST APIs for PATCH requests.\n\n`action=patch` applies a JSON Patch (`add`, `remove`, `replace`, `move`, `copy`, `test`) to a document and returns the result; a failing `test` or a missing path returns 422 with the index of the operation, so patches can be validated before they reach your database. `action=merge` applies a Merge Patch (null removes a key).\n\nArrays are compared after removing their common beginning and end, so appending or removing items produces short patches. Paths use JSON Pointer with `~0` / `~1` escaping.\n\nDocs: https://apibox.io.vn/docs/json-diff/",
    "operationId": "jsonDiffPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-diff/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "diff",
          "description": "`diff`, `patch` or `merge`."
         },
         "a": {
          "type": "object",
          "description": "For diff: the original JSON."
         },
         "b": {
          "type": "object",
          "description": "For diff: the new JSON."
         },
         "json": {
          "type": "object",
          "description": "For patch / merge: the document."
         },
         "patch": {
          "type": "array",
          "items": {},
          "description": "RFC 6902 operations."
         },
         "merge_patch": {
          "type": "object",
          "description": "RFC 7386 merge patch."
         }
        }
       },
       "example": {
        "a": {
         "name": "A",
         "tags": [
          "x"
         ],
         "n": {
          "a": 1,
          "b": 2
         }
        },
        "b": {
         "name": "B",
         "tags": [
          "x",
          "y"
         ],
         "n": {
          "a": 1
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "equal": {
           "type": "boolean"
          },
          "summary": {
           "type": "object",
           "properties": {
            "added": {
             "type": "number"
            },
            "removed": {
             "type": "number"
            },
            "replaced": {
             "type": "number"
            }
           }
          },
          "patch": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "op": {
              "type": "string"
             },
             "path": {
              "type": "string"
             },
             "value": {
              "type": "string"
             }
            }
           }
          },
          "merge_patch": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "tags": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "n": {
             "type": "object",
             "properties": {
              "b": {}
             }
            }
           }
          }
         }
        },
        "example": {
         "equal": false,
         "summary": {
          "added": 1,
          "removed": 1,
          "replaced": 1
         },
         "patch": [
          {
           "op": "replace",
           "path": "/name",
           "value": "B"
          },
          {
           "op": "add",
           "path": "/tags/1",
           "value": "y"
          },
          {
           "op": "remove",
           "path": "/n/b"
          }
         ],
         "merge_patch": {
          "name": "B",
          "tags": [
           "x",
           "y"
          ],
          "n": {
           "b": null
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/totp": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "TOTP / 2FA Codes",
    "description": "The TOTP API gives your application two-factor authentication without a library. `action=generate` creates a random Base32 secret and its `otpauth://` URI, with your `issuer` and the user’s `account`; `action=qr` returns the same as a PNG or SVG QR code to scan with Google Authenticator, Microsoft Authenticator, Authy or 1Password. `action=verify` with `secret` and `code` checks a code typed by the user, accepting one time step of clock drift by default (`window`).\n\n`action=code` returns the current and next codes and how many seconds the current one remains valid. SHA-1 (the default every app supports), SHA-256 and SHA-512, 6 or 8 digits and other periods are supported, as well as counter-based HOTP (RFC 4226) with `type=hotp`; codes match the RFC test vectors.\n\nNothing is stored: the secret travels with each request and responses are not cached. Keep secrets encrypted in your own database, prevent replay by remembering the last accepted `time_step` per user, and rate-limit verification attempts.\n\nDocs: https://apibox.io.vn/docs/totp/",
    "operationId": "totpGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/totp/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`generate`, `qr`, `code` or `verify` (guessed from the other parameters).",
      "schema": {
       "type": "string",
       "default": "generate"
      }
     },
     {
      "name": "secret",
      "in": "query",
      "required": false,
      "description": "Base32 secret (for code / verify; optional for generate).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Code to verify.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "issuer",
      "in": "query",
      "required": false,
      "description": "Your app name shown in the authenticator.",
      "schema": {
       "type": "string"
      },
      "example": "APIBox"
     },
     {
      "name": "account",
      "in": "query",
      "required": false,
      "description": "User label, e.g. an email.",
      "schema": {
       "type": "string"
      },
      "example": "an@example.com"
     },
     {
      "name": "digits",
      "in": "query",
      "required": false,
      "description": "6–8 digits.",
      "schema": {
       "type": "number",
       "default": 6
      }
     },
     {
      "name": "period",
      "in": "query",
      "required": false,
      "description": "Time step in seconds.",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "algorithm",
      "in": "query",
      "required": false,
      "description": "`SHA1`, `SHA256` or `SHA512`.",
      "schema": {
       "type": "string",
       "default": "SHA1"
      }
     },
     {
      "name": "window",
      "in": "query",
      "required": false,
      "description": "Accepted drift in time steps (verify).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`totp` or `hotp` (with `counter`).",
      "schema": {
       "type": "string",
       "default": "totp"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "secret": {
           "type": "string"
          },
          "otpauth_uri": {
           "type": "string"
          },
          "algorithm": {
           "type": "string"
          },
          "digits": {
           "type": "number"
          },
          "period": {
           "type": "number"
          },
          "current_code": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "type": "totp",
         "secret": "OW7IHR3GMA57QTCFYF2WJ42XSPPCCUM7",
         "otpauth_uri": "otpauth://totp/APIBox%3Aan%40example.com?secret=OW7IHR3GMA57QTCFYF2WJ42XSPPCCUM7&issuer=APIBox&algorithm=SHA1&digits=6&period=30",
         "algorithm": "SHA1",
         "digits": 6,
         "period": 30,
         "current_code": "978344",
         "note": "Store the secret encrypted on your server; show the QR code (action=qr) once to the user."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "TOTP / 2FA Codes",
    "description": "The TOTP API gives your application two-factor authentication without a library. `action=generate` creates a random Base32 secret and its `otpauth://` URI, with your `issuer` and the user’s `account`; `action=qr` returns the same as a PNG or SVG QR code to scan with Google Authenticator, Microsoft Authenticator, Authy or 1Password. `action=verify` with `secret` and `code` checks a code typed by the user, accepting one time step of clock drift by default (`window`).\n\n`action=code` returns the current and next codes and how many seconds the current one remains valid. SHA-1 (the default every app supports), SHA-256 and SHA-512, 6 or 8 digits and other periods are supported, as well as counter-based HOTP (RFC 4226) with `type=hotp`; codes match the RFC test vectors.\n\nNothing is stored: the secret travels with each request and responses are not cached. Keep secrets encrypted in your own database, prevent replay by remembering the last accepted `time_step` per user, and rate-limit verification attempts.\n\nDocs: https://apibox.io.vn/docs/totp/",
    "operationId": "totpPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/totp/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "generate",
          "description": "`generate`, `qr`, `code` or `verify` (guessed from the other parameters)."
         },
         "secret": {
          "type": "string",
          "description": "Base32 secret (for code / verify; optional for generate)."
         },
         "code": {
          "type": "string",
          "description": "Code to verify."
         },
         "issuer": {
          "type": "string",
          "description": "Your app name shown in the authenticator."
         },
         "account": {
          "type": "string",
          "description": "User label, e.g. an email."
         },
         "digits": {
          "type": "number",
          "default": 6,
          "description": "6–8 digits."
         },
         "period": {
          "type": "number",
          "default": 30,
          "description": "Time step in seconds."
         },
         "algorithm": {
          "type": "string",
          "default": "SHA1",
          "description": "`SHA1`, `SHA256` or `SHA512`."
         },
         "window": {
          "type": "number",
          "default": 1,
          "description": "Accepted drift in time steps (verify)."
         },
         "type": {
          "type": "string",
          "default": "totp",
          "description": "`totp` or `hotp` (with `counter`)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "secret": {
           "type": "string"
          },
          "otpauth_uri": {
           "type": "string"
          },
          "algorithm": {
           "type": "string"
          },
          "digits": {
           "type": "number"
          },
          "period": {
           "type": "number"
          },
          "current_code": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/security-headers": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Security Headers Check",
    "description": "The security headers API fetches a URL and reviews the protections browsers apply from its response: an HTTPS redirect from http://, Strict-Transport-Security (max-age, includeSubDomains and whether the site is eligible for the HSTS preload list), Content-Security-Policy (flagging `unsafe-inline` without nonces, `unsafe-eval` and wildcard script sources), clickjacking protection with X-Frame-Options or `frame-ancestors`, X-Content-Type-Options, Referrer-Policy, Permissions-Policy and the cross-origin isolation headers.\n\nIt also checks the flags of the cookies the page sets (Secure, HttpOnly, SameSite), dangerous CORS combinations (`*` with credentials), resources loaded over http:// on an https page (mixed content) and headers that reveal software versions. Each finding is a check with a status and a message in English or Vietnamese (`lang=vi`); the score and grade (A+ when nothing is left to improve) summarise them.\n\nThe parsed HSTS and CSP directives, the cookies and all response headers are returned for your own rules. Results are cached for 10 minutes (`fresh=true` to re-check).\n\nDocs: https://apibox.io.vn/docs/security-headers/",
    "operationId": "securityHeadersGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/security-headers/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Page URL.",
      "schema": {
       "type": "string"
      },
      "example": "https://github.com/"
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of the messages: `en` or `vi`.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     },
     {
      "name": "fresh",
      "in": "query",
      "required": false,
      "description": "Bypass the 10-minute cache.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "hsts": {
           "type": "object",
           "properties": {
            "max_age": {
             "type": "number"
            },
            "include_subdomains": {
             "type": "boolean"
            },
            "preload": {
             "type": "boolean"
            },
            "preload_eligible": {
             "type": "boolean"
            }
           }
          },
          "csp": {
           "type": "object",
           "properties": {
            "default-src": {
             "type": "string"
            },
            "frame-ancestors": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "url": "https://github.com/",
         "final_url": "https://github.com/",
         "status": 200,
         "score": 100,
         "grade": "A+",
         "summary": {
          "passed": 8,
          "info": 1,
          "warnings": 0,
          "errors": 0
         },
         "hsts": {
          "max_age": 31536000,
          "include_subdomains": true,
          "preload": true,
          "preload_eligible": true
         },
         "csp": {
          "default-src": "'none'",
          "frame-ancestors": "'none'",
          "…": "…"
         },
         "checks": [
          {
           "id": "http_redirect",
           "status": "pass",
           "message": "http:// redirects to https://"
          },
          {
           "id": "hsts",
           "status": "pass",
           "message": "HSTS max-age 365 days, includeSubDomains, preload",
           "value": "max-age=31536000; includeSubdomains; preload"
          },
          {
           "id": "csp",
           "status": "pass",
           "message": "Content-Security-Policy restricts scripts",
           "value": "…"
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Security Headers Check",
    "description": "The security headers API fetches a URL and reviews the protections browsers apply from its response: an HTTPS redirect from http://, Strict-Transport-Security (max-age, includeSubDomains and whether the site is eligible for the HSTS preload list), Content-Security-Policy (flagging `unsafe-inline` without nonces, `unsafe-eval` and wildcard script sources), clickjacking protection with X-Frame-Options or `frame-ancestors`, X-Content-Type-Options, Referrer-Policy, Permissions-Policy and the cross-origin isolation headers.\n\nIt also checks the flags of the cookies the page sets (Secure, HttpOnly, SameSite), dangerous CORS combinations (`*` with credentials), resources loaded over http:// on an https page (mixed content) and headers that reveal software versions. Each finding is a check with a status and a message in English or Vietnamese (`lang=vi`); the score and grade (A+ when nothing is left to improve) summarise them.\n\nThe parsed HSTS and CSP directives, the cookies and all response headers are returned for your own rules. Results are cached for 10 minutes (`fresh=true` to re-check).\n\nDocs: https://apibox.io.vn/docs/security-headers/",
    "operationId": "securityHeadersPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/security-headers/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Page URL."
         },
         "lang": {
          "type": "string",
          "default": "en",
          "description": "Language of the messages: `en` or `vi`."
         },
         "fresh": {
          "type": "boolean",
          "default": false,
          "description": "Bypass the 10-minute cache."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "hsts": {
           "type": "object",
           "properties": {
            "max_age": {
             "type": "number"
            },
            "include_subdomains": {
             "type": "boolean"
            },
            "preload": {
             "type": "boolean"
            },
            "preload_eligible": {
             "type": "boolean"
            }
           }
          },
          "csp": {
           "type": "object",
           "properties": {
            "default-src": {
             "type": "string"
            },
            "frame-ancestors": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/schema-mock": {
   "post": {
    "tags": [
     "Testing"
    ],
    "summary": "JSON Schema Mock Data",
    "description": "The schema mock API turns a JSON Schema into sample data: objects with their required and optional properties, arrays within `minItems` / `maxItems`, numbers within `minimum` / `maximum` and `multipleOf`, strings within their length limits, `enum`, `const` and `examples`, and the usual `format` values (email, date, date-time, uuid, uri, hostname, ipv4, ipv6).\n\nSimple `pattern` values (digits, character classes, repetitions such as `^0[35789]\\d{8}$`) produce matching strings, local `$ref` (`#/$defs/...`, `#/definitions/...`) are resolved, `allOf` is merged and `oneOf` / `anyOf` pick a branch. Up to 100 items per call; the same `seed` gives the same data, so fixtures stay stable.\n\nEvery generated item is validated with the same validator as the JSON validator API (draft 2020-12): `valid` says whether all items pass. Keywords the generator does not handle (`not`, `if / then`, complex patterns) may produce invalid items, which are counted in `invalid_items`.\n\nDocs: https://apibox.io.vn/docs/schema-mock/",
    "operationId": "schemaMockPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/schema-mock/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "schema": {
          "type": "object",
          "description": "The JSON Schema."
         },
         "count": {
          "type": "number",
          "default": 1,
          "description": "Number of items (1–100)."
         },
         "seed": {
          "type": "string",
          "description": "Seed for reproducible data."
         }
        },
        "required": [
         "schema"
        ]
       },
       "example": {
        "schema": {
         "type": "object",
         "required": [
          "id",
          "email"
         ],
         "properties": {
          "id": {
           "type": "string",
           "format": "uuid"
          },
          "email": {
           "type": "string",
           "format": "email"
          },
          "age": {
           "type": "integer",
           "minimum": 18,
           "maximum": 99
          },
          "phone": {
           "type": "string",
           "pattern": "^0[35789]\\d{8}$"
          }
         }
        },
        "count": 1,
        "seed": "s"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "seed": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "valid": {
           "type": "boolean"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "email": {
              "type": "string"
             },
             "age": {
              "type": "number"
             },
             "phone": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "seed": "s",
         "count": 1,
         "valid": true,
         "data": [
          {
           "id": "dacf6276-1f2c-4cc4-830a-b315d3dc1f17",
           "email": "lorem.river4@example.com",
           "age": 89,
           "phone": "0913924197"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/sitemap-check": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Sitemap Checker",
    "description": "The sitemap checker reads a sitemap URL, or finds the sitemaps of a site from the `Sitemap:` lines of its robots.txt (falling back to /sitemap.xml). It follows sitemap indexes (up to 10 files), decompresses .xml.gz files and counts the URLs.\n\nIt reports what makes search engines ignore sitemaps: files over 50,000 URLs or 50 MB, `<loc>` values that are not absolute or point to another host, duplicate URLs, `<lastmod>` values that are not W3C dates and files that cannot be read. It then requests a sample of URLs spread over the sitemap (`sample`, default 10, max 20) and flags errors, redirects (list the final URLs) and pages that refuse crawlers.\n\nThe response contains every sitemap file read with its type and size, the total number of URLs, the most recent lastmod, the sampled statuses and the first 100 URLs, plus scored checks in English or Vietnamese (`lang=vi`).\n\nDocs: https://apibox.io.vn/docs/sitemap-check/",
    "operationId": "sitemapCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sitemap-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Sitemap URL or website URL.",
      "schema": {
       "type": "string"
      },
      "example": "https://www.cloudflare.com/sitemap.xml"
     },
     {
      "name": "sample",
      "in": "query",
      "required": false,
      "description": "URLs to request (0–20).",
      "schema": {
       "type": "number",
       "default": 10
      },
      "example": 5
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "`en` or `vi`.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     },
     {
      "name": "fresh",
      "in": "query",
      "required": false,
      "description": "Bypass the 10-minute cache.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "sitemaps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "status": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "urls": {
              "type": "number"
             },
             "bytes": {
              "type": "number"
             },
             "gzip": {
              "type": "boolean"
             }
            }
           }
          },
          "url_count": {
           "type": "number"
          },
          "with_lastmod": {
           "type": "number"
          },
          "latest_lastmod": {
           "type": "string"
          },
          "sample": {
           "type": "array",
           "items": {}
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "url": "https://www.cloudflare.com/sitemap.xml",
         "score": 85,
         "grade": "B",
         "summary": {
          "passed": 2,
          "info": 0,
          "warnings": 2,
          "errors": 0
         },
         "sitemaps": [
          {
           "url": "https://www.cloudflare.com/sitemap.xml",
           "status": 200,
           "type": "urlset",
           "urls": 1017,
           "bytes": 1639563,
           "gzip": false
          }
         ],
         "url_count": 1017,
         "with_lastmod": 1017,
         "latest_lastmod": "2026-11-10",
         "sample": [
          {
           "url": "https://www.cloudflare.com/",
           "status": 200,
           "redirected": false,
           "final_url": "https://www.cloudflare.com/"
          },
          "…"
         ],
         "checks": [
          {
           "id": "found",
           "status": "pass",
           "message": "1 sitemap file(s), 1017 URLs"
          },
          {
           "id": "sample_blocked",
           "status": "warn",
           "message": "3 sampled URLs refused our crawler (HTTP 403): bot protection may also slow search engines"
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Sitemap Checker",
    "description": "The sitemap checker reads a sitemap URL, or finds the sitemaps of a site from the `Sitemap:` lines of its robots.txt (falling back to /sitemap.xml). It follows sitemap indexes (up to 10 files), decompresses .xml.gz files and counts the URLs.\n\nIt reports what makes search engines ignore sitemaps: files over 50,000 URLs or 50 MB, `<loc>` values that are not absolute or point to another host, duplicate URLs, `<lastmod>` values that are not W3C dates and files that cannot be read. It then requests a sample of URLs spread over the sitemap (`sample`, default 10, max 20) and flags errors, redirects (list the final URLs) and pages that refuse crawlers.\n\nThe response contains every sitemap file read with its type and size, the total number of URLs, the most recent lastmod, the sampled statuses and the first 100 URLs, plus scored checks in English or Vietnamese (`lang=vi`).\n\nDocs: https://apibox.io.vn/docs/sitemap-check/",
    "operationId": "sitemapCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sitemap-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Sitemap URL or website URL."
         },
         "sample": {
          "type": "number",
          "default": 10,
          "description": "URLs to request (0–20)."
         },
         "lang": {
          "type": "string",
          "default": "en",
          "description": "`en` or `vi`."
         },
         "fresh": {
          "type": "boolean",
          "default": false,
          "description": "Bypass the 10-minute cache."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "passed": {
             "type": "number"
            },
            "info": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            }
           }
          },
          "sitemaps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "status": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "urls": {
              "type": "number"
             },
             "bytes": {
              "type": "number"
             },
             "gzip": {
              "type": "boolean"
             }
            }
           }
          },
          "url_count": {
           "type": "number"
          },
          "with_lastmod": {
           "type": "number"
          },
          "latest_lastmod": {
           "type": "string"
          },
          "sample": {
           "type": "array",
           "items": {}
          },
          "checks": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/feed": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "RSS / Atom to JSON",
    "description": "The feed API reads a feed and returns one normalised JSON shape whatever the format: RSS 2.0, RSS 1.0 (RDF), Atom or JSON Feed. Each item has an id, title, URL, published and updated dates in ISO 8601, author, a plain-text summary, categories, enclosures (podcasts, images) and an image taken from media tags, enclosures or the first picture of the content; `content=true` adds the full HTML content.\n\nGive it a normal page such as a news site’s home page and it discovers the feed from the `<link rel=\"alternate\">` tags (the list is returned in `discovered`). Relative links are resolved, HTML entities decoded and namespaced tags (content:encoded, dc:creator, media:content) understood, so Vietnamese news sites, WordPress blogs and podcasts work the same way.\n\nUp to 500 items (`limit`, default 50). Feeds are cached for 10 minutes (`fresh=true` to bypass); the fetcher refuses private addresses and limits feeds to 5 MB.\n\nDocs: https://apibox.io.vn/docs/feed/",
    "operationId": "feedGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/feed/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Feed URL or website URL.",
      "schema": {
       "type": "string"
      },
      "example": "https://tuoitre.vn/"
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Items returned (1–500).",
      "schema": {
       "type": "number",
       "default": 50
      },
      "example": 1
     },
     {
      "name": "content",
      "in": "query",
      "required": false,
      "description": "Include the full HTML content.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "fresh",
      "in": "query",
      "required": false,
      "description": "Bypass the 10-minute cache.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "fetched_url": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "feed_url": {
           "type": "string"
          },
          "discovered": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "title": {
              "type": "string"
             }
            }
           }
          },
          "item_count": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "published": {
              "type": "string"
             },
             "updated": {},
             "author": {
              "type": "string"
             },
             "summary": {
              "type": "string"
             },
             "image": {
              "type": "string"
             },
             "categories": {
              "type": "array"
             },
             "enclosures": {
              "type": "array"
             }
            }
           }
          }
         }
        },
        "example": {
         "url": "https://tuoitre.vn/",
         "fetched_url": "https://tuoitre.vn/home.rss",
         "format": "rss 2.0",
         "title": "TUOI TRE ONLINE - RSS Feed",
         "feed_url": "https://tuoitre.vn/home.rss",
         "discovered": [
          {
           "url": "https://tuoitre.vn/home.rss",
           "type": "application/rss+xml",
           "title": "…"
          }
         ],
         "item_count": 50,
         "items": [
          {
           "id": "https://tuoitre.vn/…-100261110213232734.htm",
           "title": "Bộ Giáo dục lý giải đề xuất tuyển sinh trường chuyên theo 3 khối thay vì từng môn",
           "url": "https://tuoitre.vn/…-100261110213232734.htm",
           "published": "2026-11-10T14:57:00.000Z",
           "updated": null,
           "author": "NGUYÊN BẢO",
           "summary": "Đề xuất đổi cách tuyển sinh trường chuyên đang…",
           "image": "https://cdn.tuoitre.vn/…jpg",
           "categories": [],
           "enclosures": []
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "RSS / Atom to JSON",
    "description": "The feed API reads a feed and returns one normalised JSON shape whatever the format: RSS 2.0, RSS 1.0 (RDF), Atom or JSON Feed. Each item has an id, title, URL, published and updated dates in ISO 8601, author, a plain-text summary, categories, enclosures (podcasts, images) and an image taken from media tags, enclosures or the first picture of the content; `content=true` adds the full HTML content.\n\nGive it a normal page such as a news site’s home page and it discovers the feed from the `<link rel=\"alternate\">` tags (the list is returned in `discovered`). Relative links are resolved, HTML entities decoded and namespaced tags (content:encoded, dc:creator, media:content) understood, so Vietnamese news sites, WordPress blogs and podcasts work the same way.\n\nUp to 500 items (`limit`, default 50). Feeds are cached for 10 minutes (`fresh=true` to bypass); the fetcher refuses private addresses and limits feeds to 5 MB.\n\nDocs: https://apibox.io.vn/docs/feed/",
    "operationId": "feedPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/feed/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Feed URL or website URL."
         },
         "limit": {
          "type": "number",
          "default": 50,
          "description": "Items returned (1–500)."
         },
         "content": {
          "type": "boolean",
          "default": false,
          "description": "Include the full HTML content."
         },
         "fresh": {
          "type": "boolean",
          "default": false,
          "description": "Bypass the 10-minute cache."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "fetched_url": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "feed_url": {
           "type": "string"
          },
          "discovered": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "title": {
              "type": "string"
             }
            }
           }
          },
          "item_count": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "published": {
              "type": "string"
             },
             "updated": {},
             "author": {
              "type": "string"
             },
             "summary": {
              "type": "string"
             },
             "image": {
              "type": "string"
             },
             "categories": {
              "type": "array"
             },
             "enclosures": {
              "type": "array"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/profanity-vi": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Profanity Filter",
    "description": "The profanity filter finds offensive words in Vietnamese comments, chats and reviews and returns a masked version. Its lexicon covers sexual and vulgar words, insults and teencode abbreviations (đm, vcl, dmm, clgt…) plus common English swear words and slurs, each with a category (`sexual`, `vulgar`, `insult`, `slur`) and a severity (mild, moderate, severe).\n\nIt is built for the usual tricks: missing accents where the result is still unambiguous (dit me), repeated letters (đụuuu), l33t digits and symbols (sh1t, f@ck), and separators inside words (đ.ị.t, l-ồ-n). Words that are only offensive with their accents (lồn, cặc, buồi) are matched with accents only, so “lon bia”, “các bạn” and “buổi sáng” are never flagged; ambiguous words (cc, đù, cave) are only checked with `strict=true`.\n\nThe response gives the overall severity, a score, each match with its position and the `censored` text (`mask` character, `keep_first=true` to keep the first letter). Add your own words with `extra_words` and whitelist with `allow`.\n\nDocs: https://apibox.io.vn/docs/profanity-vi/",
    "operationId": "profanityViGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/profanity-vi/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text to check (max 100,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "mask",
      "in": "query",
      "required": false,
      "description": "Masking character.",
      "schema": {
       "type": "string",
       "default": "*"
      }
     },
     {
      "name": "keep_first",
      "in": "query",
      "required": false,
      "description": "Keep the first letter of masked words.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "strict",
      "in": "query",
      "required": false,
      "description": "Also flag ambiguous words (cc, đù, cave…).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "extra_words",
      "in": "query",
      "required": false,
      "description": "Comma-separated words to add.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "allow",
      "in": "query",
      "required": false,
      "description": "Comma-separated words to ignore.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "profane": {
           "type": "boolean"
          },
          "severity": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "categories": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "word": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             }
            }
           }
          },
          "censored": {
           "type": "string"
          },
          "strict": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Profanity Filter",
    "description": "The profanity filter finds offensive words in Vietnamese comments, chats and reviews and returns a masked version. Its lexicon covers sexual and vulgar words, insults and teencode abbreviations (đm, vcl, dmm, clgt…) plus common English swear words and slurs, each with a category (`sexual`, `vulgar`, `insult`, `slur`) and a severity (mild, moderate, severe).\n\nIt is built for the usual tricks: missing accents where the result is still unambiguous (dit me), repeated letters (đụuuu), l33t digits and symbols (sh1t, f@ck), and separators inside words (đ.ị.t, l-ồ-n). Words that are only offensive with their accents (lồn, cặc, buồi) are matched with accents only, so “lon bia”, “các bạn” and “buổi sáng” are never flagged; ambiguous words (cc, đù, cave) are only checked with `strict=true`.\n\nThe response gives the overall severity, a score, each match with its position and the `censored` text (`mask` character, `keep_first=true` to keep the first letter). Add your own words with `extra_words` and whitelist with `allow`.\n\nDocs: https://apibox.io.vn/docs/profanity-vi/",
    "operationId": "profanityViPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/profanity-vi/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to check (max 100,000 characters)."
         },
         "mask": {
          "type": "string",
          "default": "*",
          "description": "Masking character."
         },
         "keep_first": {
          "type": "boolean",
          "default": false,
          "description": "Keep the first letter of masked words."
         },
         "strict": {
          "type": "boolean",
          "default": false,
          "description": "Also flag ambiguous words (cc, đù, cave…)."
         },
         "extra_words": {
          "type": "string",
          "description": "Comma-separated words to add."
         },
         "allow": {
          "type": "string",
          "description": "Comma-separated words to ignore."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Đm, cái này vcl thật",
        "keep_first": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "profane": {
           "type": "boolean"
          },
          "severity": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "categories": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "word": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             }
            }
           }
          },
          "censored": {
           "type": "string"
          },
          "strict": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "profane": true,
         "severity": "moderate",
         "score": 60,
         "count": 2,
         "categories": [
          "vulgar"
         ],
         "matches": [
          {
           "text": "Đm",
           "start": 0,
           "end": 2,
           "word": "dm",
           "category": "vulgar",
           "severity": "moderate"
          },
          {
           "text": "vcl",
           "start": 12,
           "end": 15,
           "word": "vcl",
           "category": "vulgar",
           "severity": "moderate"
          }
         ],
         "censored": "Đ*, cái này v** thật",
         "strict": false
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/password-check": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Password Strength & Breach Check",
    "description": "The password check API estimates how hard a password is to guess. Beyond length and character types it looks for what attackers try first: the most common passwords (including Vietnamese favourites such as matkhau or anhyeuem), common passwords with digits added, keyboard and alphabet sequences (qwerty, 1234, abcd), repeated characters, l33t substitutions (P@ssw0rd) and dates or years. It returns a score from 0 (very weak) to 4 (very strong), the estimated entropy, crack times for four attack scenarios and warnings and suggestions you can show next to a sign-up form.\n\nIt also checks the password against the Have I Been Pwned database of more than 900 million breached passwords. Only the first 5 characters of the SHA-1 hash leave our server (k-anonymity range search, with padding), so neither we nor HIBP learn the password; a breached password always scores 0. Set `breach=false` to skip this step.\n\nThe password is processed in memory only: it is not stored, logged or used as a cache key. Send it in a POST body rather than in the URL.\n\nDocs: https://apibox.io.vn/docs/password-check/",
    "operationId": "passwordCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/password-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "password": {
          "type": "string",
          "description": "The password (max 256 characters). Use POST."
         },
         "breach": {
          "type": "boolean",
          "default": true,
          "description": "`false`: skip the breach check."
         }
        },
        "required": [
         "password"
        ]
       },
       "example": {
        "password": "anhyeuem2024"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "length": {
           "type": "number"
          },
          "charsets": {
           "type": "object",
           "properties": {
            "lower": {
             "type": "boolean"
            },
            "upper": {
             "type": "boolean"
            },
            "digits": {
             "type": "boolean"
            },
            "symbols": {
             "type": "boolean"
            },
            "unicode": {
             "type": "boolean"
            }
           }
          },
          "entropy_bits": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "strength": {
           "type": "string"
          },
          "crack_time": {
           "type": "object",
           "properties": {
            "online_throttled": {
             "type": "string"
            },
            "online": {
             "type": "string"
            },
            "offline_slow_hash": {
             "type": "string"
            },
            "offline_fast_hash": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "suggestions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "breach": {
           "type": "object",
           "properties": {
            "checked": {
             "type": "boolean"
            },
            "found": {
             "type": "boolean"
            },
            "count": {
             "type": "number"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "length": 12,
         "charsets": {
          "lower": true,
          "upper": false,
          "digits": true,
          "symbols": false,
          "unicode": false
         },
         "entropy_bits": 10,
         "score": 0,
         "strength": "very weak",
         "crack_time": {
          "online_throttled": "5 hours",
          "online": "51 seconds",
          "offline_slow_hash": "less than a second",
          "offline_fast_hash": "less than a second"
         },
         "warnings": [
          "This password appeared … times in known data breaches: never use it",
          "A common password with a few characters added is still easy to guess",
          "Dates and years (birthdays) are among the first things attackers try"
         ],
         "suggestions": [
          "Mixing character types helps, but length helps more",
          "Use a different password for every site, ideally from a password manager"
         ],
         "breach": {
          "checked": true,
          "found": true,
          "count": 1234
         },
         "note": "The password is not stored or logged. …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/card-check": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Card Number Validator",
    "description": "The card check API validates the format of a payment card number before you send it to a payment gateway. It runs the Luhn checksum, detects the brand from the number’s prefix (Visa, Mastercard including the 2-series, American Express, JCB, Discover, Diners Club, UnionPay, Mir, Maestro and NAPAS domestic cards starting with 9704) and checks the length expected for that brand.\n\nFor Vietnamese NAPAS cards the issuing bank is read from the 6-digit BIN (970436 → Vietcombank, 970415 → VietinBank…), using the same bank list as the VietQR API. The response also gives the masked number (first 6 and last 4 digits) for display and logs, and the CVC length of the brand.\n\nFormat check only: it does not tell whether a card exists, is active or has funds. The number is processed in memory and is never stored, logged or cached. Never send CVC codes or expiry dates. Handling full card numbers on your own servers brings PCI DSS obligations; prefer tokenisation by your payment provider in production.\n\nDocs: https://apibox.io.vn/docs/card-check/",
    "operationId": "cardCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/card-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "number": {
          "type": "string",
          "description": "Card number (spaces and dashes allowed). Use POST."
         }
        },
        "required": [
         "number"
        ]
       },
       "example": {
        "number": "9704 3666 1458 1234"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "brand": {
           "type": "string"
          },
          "length": {
           "type": "number"
          },
          "luhn": {
           "type": "boolean"
          },
          "masked": {
           "type": "string"
          },
          "formatted_masked": {
           "type": "string"
          },
          "bin": {
           "type": "string"
          },
          "cvc_length": {},
          "domestic": {
           "type": "boolean"
          },
          "issuer": {
           "type": "object",
           "properties": {
            "bank": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "code": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": true,
         "errors": [],
         "brand": "NAPAS",
         "length": 16,
         "luhn": true,
         "masked": "970436••••••1234",
         "formatted_masked": "9704 36•• •••• 1234",
         "bin": "970436",
         "cvc_length": null,
         "domestic": true,
         "issuer": {
          "bank": "Vietcombank",
          "name": "Ngân hàng TMCP Ngoại thương Việt Nam",
          "code": "VCB"
         },
         "note": "Format check only: …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/unicode-check": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Unicode & Homoglyph Check",
    "description": "The Unicode check API shows what is really inside a string. With `text` it lists every character with its code point, UTF-8 bytes, general category and script, and flags invisible characters (zero-width spaces, soft hyphens, BOM, no-break spaces) and the bidirectional overrides used in “Trojan Source” attacks. It also gives lengths in code points, UTF-16 units, bytes and user-perceived characters, and whether the text is NFC or NFD (useful for Vietnamese text from macOS).\n\nWith `domain` it converts between Unicode and punycode (bücher.de ↔ xn--bcher-kva.de), lists the scripts of each label and the characters that look like Latin letters, and computes the “skeleton” the domain visually resembles. `аpple.com` (with a Cyrillic а) is reported as suspicious because it looks like apple.com but is a different domain, the classic IDN homograph phishing trick.\n\nThe look-alike table covers the Cyrillic, Greek, Cherokee and fullwidth characters most used for spoofing (a subset of Unicode’s confusables data).\n\nDocs: https://apibox.io.vn/docs/unicode-check/",
    "operationId": "unicodeCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/unicode-check/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Text to inspect (max 2,000 characters listed; `summary_only=true` for longer).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "Domain to check (Unicode or punycode).",
      "schema": {
       "type": "string"
      },
      "example": "аpple.com"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "ascii": {
           "type": "string"
          },
          "unicode": {
           "type": "string"
          },
          "is_idn": {
           "type": "boolean"
          },
          "labels": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "label": {
              "type": "string"
             },
             "scripts": {
              "type": "array"
             },
             "mixed_scripts": {
              "type": "boolean"
             },
             "confusable_chars": {
              "type": "array"
             }
            }
           }
          },
          "skeleton": {
           "type": "string"
          },
          "looks_like": {
           "type": "string"
          },
          "suspicious": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "аpple.com",
         "ascii": "xn--pple-43d.com",
         "unicode": "аpple.com",
         "is_idn": true,
         "labels": [
          {
           "label": "аpple",
           "scripts": [
            "Cyrillic",
            "Latin"
           ],
           "mixed_scripts": true,
           "confusable_chars": [
            {
             "char": "а",
             "codepoint": "U+0430",
             "script": "Cyrillic",
             "looks_like": "a"
            }
           ]
          },
          {
           "label": "com",
           "scripts": [
            "Latin"
           ],
           "mixed_scripts": false,
           "confusable_chars": []
          }
         ],
         "skeleton": "apple.com",
         "looks_like": "apple.com",
         "suspicious": true,
         "note": "This domain mixes scripts or uses look-alike characters: it renders like \"apple.com\" but is a different domain."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Unicode & Homoglyph Check",
    "description": "The Unicode check API shows what is really inside a string. With `text` it lists every character with its code point, UTF-8 bytes, general category and script, and flags invisible characters (zero-width spaces, soft hyphens, BOM, no-break spaces) and the bidirectional overrides used in “Trojan Source” attacks. It also gives lengths in code points, UTF-16 units, bytes and user-perceived characters, and whether the text is NFC or NFD (useful for Vietnamese text from macOS).\n\nWith `domain` it converts between Unicode and punycode (bücher.de ↔ xn--bcher-kva.de), lists the scripts of each label and the characters that look like Latin letters, and computes the “skeleton” the domain visually resembles. `аpple.com` (with a Cyrillic а) is reported as suspicious because it looks like apple.com but is a different domain, the classic IDN homograph phishing trick.\n\nThe look-alike table covers the Cyrillic, Greek, Cherokee and fullwidth characters most used for spoofing (a subset of Unicode’s confusables data).\n\nDocs: https://apibox.io.vn/docs/unicode-check/",
    "operationId": "unicodeCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/unicode-check/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to inspect (max 2,000 characters listed; `summary_only=true` for longer)."
         },
         "domain": {
          "type": "string",
          "description": "Domain to check (Unicode or punycode)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "ascii": {
           "type": "string"
          },
          "unicode": {
           "type": "string"
          },
          "is_idn": {
           "type": "boolean"
          },
          "labels": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "label": {
              "type": "string"
             },
             "scripts": {
              "type": "array"
             },
             "mixed_scripts": {
              "type": "boolean"
             },
             "confusable_chars": {
              "type": "array"
             }
            }
           }
          },
          "skeleton": {
           "type": "string"
          },
          "looks_like": {
           "type": "string"
          },
          "suspicious": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/html-tables": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML Tables to JSON",
    "description": "The HTML tables API turns `<table>` elements into data. Give it a URL or raw `html` and it returns each table with its caption, id, number of rows and columns, column headers and the rows as objects keyed by header (or as plain arrays with `format=rows`). Merged cells are expanded into a regular grid, so a cell with `rowspan=\"2\"` appears in both rows, and multi-row headers are combined (“Price / Buy”, “Price / Sell”).\n\nHeaders are detected from `<thead>` and rows of `<th>`, or from a first row of labels (`header=first` or `none` to force). Nested layout tables are skipped by default, `min_rows` drops tiny tables and `index` selects one table; with `format=csv` that table comes back as a UTF-8 CSV file (with BOM, so Excel opens Vietnamese text correctly).\n\nPages are fetched with the same protections as the other web APIs (no private addresses, 5 MB limit). Tables rendered by JavaScript after the page loads are not visible to the API.\n\nDocs: https://apibox.io.vn/docs/html-tables/",
    "operationId": "htmlTablesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-tables/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Page URL (or send `html`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "index",
      "in": "query",
      "required": false,
      "description": "Only this table (0-based).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `rows` or `csv` (with `index`).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "header",
      "in": "query",
      "required": false,
      "description": "`auto`, `first` or `none`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "min_rows",
      "in": "query",
      "required": false,
      "description": "Skip tables with fewer data rows.",
      "schema": {
       "type": "number",
       "default": 1
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {},
          "table_count": {
           "type": "number"
          },
          "returned": {
           "type": "number"
          },
          "tables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "caption": {},
             "id": {},
             "rows": {
              "type": "number"
             },
             "columns": {
              "type": "number"
             },
             "headers": {
              "type": "array"
             },
             "data": {
              "type": "array"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML Tables to JSON",
    "description": "The HTML tables API turns `<table>` elements into data. Give it a URL or raw `html` and it returns each table with its caption, id, number of rows and columns, column headers and the rows as objects keyed by header (or as plain arrays with `format=rows`). Merged cells are expanded into a regular grid, so a cell with `rowspan=\"2\"` appears in both rows, and multi-row headers are combined (“Price / Buy”, “Price / Sell”).\n\nHeaders are detected from `<thead>` and rows of `<th>`, or from a first row of labels (`header=first` or `none` to force). Nested layout tables are skipped by default, `min_rows` drops tiny tables and `index` selects one table; with `format=csv` that table comes back as a UTF-8 CSV file (with BOM, so Excel opens Vietnamese text correctly).\n\nPages are fetched with the same protections as the other web APIs (no private addresses, 5 MB limit). Tables rendered by JavaScript after the page loads are not visible to the API.\n\nDocs: https://apibox.io.vn/docs/html-tables/",
    "operationId": "htmlTablesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-tables/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Page URL (or send `html`)."
         },
         "html": {
          "type": "string",
          "description": "Raw HTML."
         },
         "index": {
          "type": "number",
          "description": "Only this table (0-based)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `rows` or `csv` (with `index`)."
         },
         "header": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `first` or `none`."
         },
         "min_rows": {
          "type": "number",
          "default": 1,
          "description": "Skip tables with fewer data rows."
         }
        }
       },
       "example": {
        "html": "<table><thead><tr><th rowspan=\"2\">Tên</th><th colspan=\"2\">Giá</th></tr><tr><th>Mua</th><th>Bán</th></tr></thead><tr><td>USD</td><td>25,380</td><td>25,790</td></tr></table>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {},
          "table_count": {
           "type": "number"
          },
          "returned": {
           "type": "number"
          },
          "tables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "caption": {},
             "id": {},
             "rows": {
              "type": "number"
             },
             "columns": {
              "type": "number"
             },
             "headers": {
              "type": "array"
             },
             "data": {
              "type": "array"
             }
            }
           }
          }
         }
        },
        "example": {
         "source": null,
         "table_count": 1,
         "returned": 1,
         "tables": [
          {
           "index": 0,
           "caption": null,
           "id": null,
           "rows": 1,
           "columns": 3,
           "headers": [
            "Tên",
            "Giá / Mua",
            "Giá / Bán"
           ],
           "data": [
            {
             "Tên": "USD",
             "Giá / Mua": "25,380",
             "Giá / Bán": "25,790"
            }
           ]
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ics": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "iCalendar (.ics) Generator",
    "description": "The ICS API builds iCalendar files (RFC 5545) that every calendar app imports: Google Calendar, Apple Calendar, Outlook, Thunderbird. Send one event as parameters or many as a JSON `events` array, each with a title, start (`YYYY-MM-DDTHH:MM` in Vietnam time, or a date for all-day events), end or `duration_minutes`, location, description, URL, recurrence rule (`rrule`, e.g. `FREQ=WEEKLY;COUNT=10`) and reminders (`alarm_minutes`). Text is escaped and long lines folded as the standard requires, and a VTIMEZONE for Asia/Ho_Chi_Minh is included.\n\nStandard calendars cannot repeat an event on a lunar date. With `lunar: { day: 10, month: 3, years: 10 }` the API computes the solar date of that lunar date for each year (10/3 âm lịch → 26/4/2026, 16/4/2027…) and writes one event per year: death anniversaries (giỗ), rằm and mùng 1, lunar birthdays, Hung Kings Day. A day 30 in a 29-day month falls on the last day of the month.\n\nThe response is a downloadable `.ics` file; `format=json` returns the file content and the list of computed dates instead.\n\nDocs: https://apibox.io.vn/docs/ics/",
    "operationId": "icsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ics/"
    },
    "parameters": [
     {
      "name": "lunar",
      "in": "query",
      "required": false,
      "description": "Single event on a lunar date `DD/MM`, with `years` and `from_year`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "events": {
          "type": "array",
          "items": {},
          "description": "Events: {title, start, end, duration_minutes, all_day, location, description, url, rrule, alarm_minutes, lunar}."
         },
         "title": {
          "type": "string",
          "description": "Single event: title (with `start` or `lunar`)."
         },
         "start": {
          "type": "string",
          "description": "`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM` (Vietnam time)."
         },
         "name": {
          "type": "string",
          "description": "Calendar name."
         },
         "format": {
          "type": "string",
          "default": "ics",
          "description": "`ics` (file) or `json`."
         }
        }
       },
       "example": {
        "name": "Lịch gia đình",
        "format": "json",
        "events": [
         {
          "title": "Giỗ ông nội",
          "lunar": {
           "day": 10,
           "month": 3,
           "years": 3,
           "from_year": 2026
          },
          "all_day": true,
          "alarm_minutes": 1440
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "events": {
           "type": "number"
          },
          "occurrences": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "date": {
              "type": "string"
             }
            }
           }
          },
          "ics": {
           "type": "string"
          }
         }
        },
        "example": {
         "events": 3,
         "occurrences": [
          {
           "title": "Giỗ ông nội",
           "date": "2026-04-26"
          },
          {
           "title": "Giỗ ông nội",
           "date": "2027-04-16"
          },
          {
           "title": "Giỗ ông nội",
           "date": "2028-04-04"
          }
         ],
         "ics": "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//APIBox//ics//VI\r\n…"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "iCalendar (.ics) Generator",
    "description": "The ICS API builds iCalendar files (RFC 5545) that every calendar app imports: Google Calendar, Apple Calendar, Outlook, Thunderbird. Send one event as parameters or many as a JSON `events` array, each with a title, start (`YYYY-MM-DDTHH:MM` in Vietnam time, or a date for all-day events), end or `duration_minutes`, location, description, URL, recurrence rule (`rrule`, e.g. `FREQ=WEEKLY;COUNT=10`) and reminders (`alarm_minutes`). Text is escaped and long lines folded as the standard requires, and a VTIMEZONE for Asia/Ho_Chi_Minh is included.\n\nStandard calendars cannot repeat an event on a lunar date. With `lunar: { day: 10, month: 3, years: 10 }` the API computes the solar date of that lunar date for each year (10/3 âm lịch → 26/4/2026, 16/4/2027…) and writes one event per year: death anniversaries (giỗ), rằm and mùng 1, lunar birthdays, Hung Kings Day. A day 30 in a 29-day month falls on the last day of the month.\n\nThe response is a downloadable `.ics` file; `format=json` returns the file content and the list of computed dates instead.\n\nDocs: https://apibox.io.vn/docs/ics/",
    "operationId": "icsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ics/"
    },
    "parameters": [
     {
      "name": "title",
      "in": "query",
      "required": false,
      "description": "Single event: title (with `start` or `lunar`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "start",
      "in": "query",
      "required": false,
      "description": "`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM` (Vietnam time).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lunar",
      "in": "query",
      "required": false,
      "description": "Single event on a lunar date `DD/MM`, with `years` and `from_year`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "name",
      "in": "query",
      "required": false,
      "description": "Calendar name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`ics` (file) or `json`.",
      "schema": {
       "type": "string",
       "default": "ics"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "events": {
           "type": "number"
          },
          "occurrences": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "date": {
              "type": "string"
             }
            }
           }
          },
          "ics": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/savings-calc": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Savings & Deposit Calculator",
    "description": "The savings calculator computes what a bank deposit earns. For a term deposit give the amount, the yearly rate and the term (`term_months`); interest can be paid at maturity (`interest=end`, lãi cuối kỳ), every month (`monthly`) or upfront (`upfront`, lãi trả trước, discounted as P·r·t / (1 + r·t)). Over a longer horizon (`months`) the deposit rolls over: with `rollover=principal_interest` interest is added to the principal at each renewal (compounding), with `principal` it is paid out.\n\nFor a regular savings plan (`monthly_deposit`, gửi góp) the API adds the deposit every month and compounds monthly. The response gives the total interest, the final balance, the total received and the effective annual yield, plus the schedule by period or by month, so offers with different terms and payment methods can be compared.\n\nThe calculation uses the simple monthly convention (rate / 12 × months). Banks count actual days (rate × days / 365), so real amounts can differ slightly; early withdrawal usually earns only the demand-deposit rate. Interest on bank deposits is exempt from personal income tax in Vietnam.\n\nDocs: https://apibox.io.vn/docs/savings-calc/",
    "operationId": "savingsCalcGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/savings-calc/"
    },
    "parameters": [
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Initial deposit.",
      "schema": {
       "type": "number"
      },
      "example": 100000000
     },
     {
      "name": "rate",
      "in": "query",
      "required": true,
      "description": "Yearly interest rate in %.",
      "schema": {
       "type": "number"
      },
      "example": 6
     },
     {
      "name": "term_months",
      "in": "query",
      "required": false,
      "description": "Term of the deposit (0 = demand).",
      "schema": {
       "type": "number",
       "default": 12
      },
      "example": 6
     },
     {
      "name": "months",
      "in": "query",
      "required": false,
      "description": "Total horizon in months (rollovers).",
      "schema": {
       "type": "number"
      },
      "example": 24
     },
     {
      "name": "interest",
      "in": "query",
      "required": false,
      "description": "`end`, `monthly` or `upfront`.",
      "schema": {
       "type": "string",
       "default": "end"
      }
     },
     {
      "name": "rollover",
      "in": "query",
      "required": false,
      "description": "`principal_interest`, `principal` or `none`.",
      "schema": {
       "type": "string",
       "default": "principal_interest"
      }
     },
     {
      "name": "monthly_deposit",
      "in": "query",
      "required": false,
      "description": "Regular monthly deposit (savings plan).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "rate": {
           "type": "number"
          },
          "term_months": {
           "type": "number"
          },
          "months": {
           "type": "number"
          },
          "interest_payment": {
           "type": "string"
          },
          "rollover": {
           "type": "string"
          },
          "total_interest": {
           "type": "number"
          },
          "interest_paid_out": {
           "type": "number"
          },
          "final_balance": {
           "type": "number"
          },
          "total_received": {
           "type": "number"
          },
          "effective_annual_yield": {
           "type": "number"
          },
          "tax_on_interest": {
           "type": "number"
          },
          "periods": {
           "type": "array",
           "items": {}
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "mode": "term_deposit",
         "amount": 100000000,
         "rate": 6,
         "term_months": 6,
         "months": 24,
         "interest_payment": "end",
         "rollover": "principal_interest",
         "total_interest": 12550881,
         "interest_paid_out": 0,
         "final_balance": 112550881,
         "total_received": 112550881,
         "effective_annual_yield": 6.09,
         "tax_on_interest": 0,
         "periods": [
          {
           "period": 1,
           "from_month": 1,
           "to_month": 6,
           "principal": 100000000,
           "interest": 3000000,
           "paid_out": 0,
           "balance": 103000000
          },
          "…"
         ],
         "note": "Simple monthly convention …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Savings & Deposit Calculator",
    "description": "The savings calculator computes what a bank deposit earns. For a term deposit give the amount, the yearly rate and the term (`term_months`); interest can be paid at maturity (`interest=end`, lãi cuối kỳ), every month (`monthly`) or upfront (`upfront`, lãi trả trước, discounted as P·r·t / (1 + r·t)). Over a longer horizon (`months`) the deposit rolls over: with `rollover=principal_interest` interest is added to the principal at each renewal (compounding), with `principal` it is paid out.\n\nFor a regular savings plan (`monthly_deposit`, gửi góp) the API adds the deposit every month and compounds monthly. The response gives the total interest, the final balance, the total received and the effective annual yield, plus the schedule by period or by month, so offers with different terms and payment methods can be compared.\n\nThe calculation uses the simple monthly convention (rate / 12 × months). Banks count actual days (rate × days / 365), so real amounts can differ slightly; early withdrawal usually earns only the demand-deposit rate. Interest on bank deposits is exempt from personal income tax in Vietnam.\n\nDocs: https://apibox.io.vn/docs/savings-calc/",
    "operationId": "savingsCalcPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/savings-calc/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "amount": {
          "type": "number",
          "description": "Initial deposit."
         },
         "rate": {
          "type": "number",
          "description": "Yearly interest rate in %."
         },
         "term_months": {
          "type": "number",
          "default": 12,
          "description": "Term of the deposit (0 = demand)."
         },
         "months": {
          "type": "number",
          "description": "Total horizon in months (rollovers)."
         },
         "interest": {
          "type": "string",
          "default": "end",
          "description": "`end`, `monthly` or `upfront`."
         },
         "rollover": {
          "type": "string",
          "default": "principal_interest",
          "description": "`principal_interest`, `principal` or `none`."
         },
         "monthly_deposit": {
          "type": "number",
          "description": "Regular monthly deposit (savings plan)."
         }
        },
        "required": [
         "rate"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "rate": {
           "type": "number"
          },
          "term_months": {
           "type": "number"
          },
          "months": {
           "type": "number"
          },
          "interest_payment": {
           "type": "string"
          },
          "rollover": {
           "type": "string"
          },
          "total_interest": {
           "type": "number"
          },
          "interest_paid_out": {
           "type": "number"
          },
          "final_balance": {
           "type": "number"
          },
          "total_received": {
           "type": "number"
          },
          "effective_annual_yield": {
           "type": "number"
          },
          "tax_on_interest": {
           "type": "number"
          },
          "periods": {
           "type": "array",
           "items": {}
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/avatar": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Avatar Generator",
    "description": "The avatar API draws a default profile picture for users who have not uploaded one. `style=initials` (default) writes the initials on a coloured circle, square or rounded square. Vietnamese names put the given name last, so the initials are the first letter of the family name and of the given name (Nguyễn Văn An → NA, Đặng Thị Ánh → ĐÁ, with accents preserved); `length=1` keeps only the given name and `initials=` sets them yourself.\n\n`style=identicon` draws a symmetric 5×5 pattern, handy for anonymous accounts, API keys or wallet addresses. The colour comes from a hash of the name, so the same user always gets the same avatar on every page, and text switches to dark on light backgrounds for contrast. `background` and `color` override the colours.\n\nInitials avatars are SVG (crisp at any size, usable directly in `<img src>`); identicons are also available as PNG. Use the URL form `/v1/avatar/Nguyễn Văn An.svg`; responses are cacheable for a week.\n\nDocs: https://apibox.io.vn/docs/avatar/",
    "operationId": "avatarGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/avatar/"
    },
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": true,
      "description": "Name or any seed (email, id…); or `/v1/avatar/{name}.svg`.",
      "schema": {
       "type": "string"
      },
      "example": "Nguyễn Văn An"
     },
     {
      "name": "style",
      "in": "query",
      "required": false,
      "description": "`initials` or `identicon`.",
      "schema": {
       "type": "string",
       "default": "initials"
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "description": "Size in px (16–1024).",
      "schema": {
       "type": "number",
       "default": 128
      },
      "example": 128
     },
     {
      "name": "shape",
      "in": "query",
      "required": false,
      "description": "`circle`, `square` or `rounded`.",
      "schema": {
       "type": "string",
       "default": "circle"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`svg`, or `png` (identicon).",
      "schema": {
       "type": "string",
       "default": "svg"
      }
     },
     {
      "name": "length",
      "in": "query",
      "required": false,
      "description": "Number of initials (1–3).",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour (hex).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Text / pattern colour (hex).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/svg+xml": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/svg+xml"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/gtin-check": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Barcode Check (EAN / UPC / ISBN)",
    "description": "The barcode check API validates the numbers printed under product barcodes. It recognises EAN-8, UPC-A (12 digits), EAN-13 and GTIN-14 / ITF-14, verifies the GS1 mod-10 check digit and returns the normalised 14-digit GTIN used in GS1 data exchange. With `compute=true` it calculates the missing check digit of a number you are creating.\n\nThe first three digits are looked up in the GS1 prefix table: 893 is GS1 Vietnam, 690–699 China, 885 Thailand, 450–459 and 490–499 Japan, 978–979 books (ISBN), 977 magazines (ISSN), 200–299 in-store numbers. Note that the prefix tells which GS1 member organisation licensed the company number, not the country where the product was made. Books also get their ISBN-10 / ISBN-13 forms and periodicals their ISSN; ISBN-10 numbers (with X) are accepted directly.\n\nThe prefix table comes from GS1’s official list and is refreshed automatically every week.\n\nDocs: https://apibox.io.vn/docs/gtin-check/",
    "operationId": "gtinCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/gtin-check/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": true,
      "description": "Barcode number (8, 12, 13 or 14 digits, or ISBN-10).",
      "schema": {
       "type": "string"
      },
      "example": "8934588012228"
     },
     {
      "name": "compute",
      "in": "query",
      "required": false,
      "description": "The code has no check digit: compute it.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "check_digit": {
           "type": "number"
          },
          "expected_check_digit": {
           "type": "number"
          },
          "gtin14": {
           "type": "string"
          },
          "gs1_prefix": {
           "type": "object",
           "properties": {
            "prefix": {
             "type": "string"
            },
            "range": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "country_code": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          },
          "vietnam": {
           "type": "object",
           "properties": {
            "gs1_prefix": {
             "type": "string"
            },
            "organisation": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "input": "8934588012228",
         "type": "EAN-13 (GTIN-13)",
         "valid": true,
         "check_digit": 8,
         "expected_check_digit": 8,
         "gtin14": "08934588012228",
         "gs1_prefix": {
          "prefix": "893",
          "range": "893",
          "name": "GS1 Vietnam",
          "country_code": "VN"
         },
         "note": "The prefix tells which GS1 member organisation issued the company prefix, not where the product was made.",
         "vietnam": {
          "gs1_prefix": "893",
          "organisation": "GS1 Việt Nam (Trung tâm Mã số Mã vạch Quốc gia)"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Barcode Check (EAN / UPC / ISBN)",
    "description": "The barcode check API validates the numbers printed under product barcodes. It recognises EAN-8, UPC-A (12 digits), EAN-13 and GTIN-14 / ITF-14, verifies the GS1 mod-10 check digit and returns the normalised 14-digit GTIN used in GS1 data exchange. With `compute=true` it calculates the missing check digit of a number you are creating.\n\nThe first three digits are looked up in the GS1 prefix table: 893 is GS1 Vietnam, 690–699 China, 885 Thailand, 450–459 and 490–499 Japan, 978–979 books (ISBN), 977 magazines (ISSN), 200–299 in-store numbers. Note that the prefix tells which GS1 member organisation licensed the company number, not the country where the product was made. Books also get their ISBN-10 / ISBN-13 forms and periodicals their ISSN; ISBN-10 numbers (with X) are accepted directly.\n\nThe prefix table comes from GS1’s official list and is refreshed automatically every week.\n\nDocs: https://apibox.io.vn/docs/gtin-check/",
    "operationId": "gtinCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/gtin-check/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Barcode number (8, 12, 13 or 14 digits, or ISBN-10).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compute",
      "in": "query",
      "required": false,
      "description": "The code has no check digit: compute it.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "check_digit": {
           "type": "number"
          },
          "expected_check_digit": {
           "type": "number"
          },
          "gtin14": {
           "type": "string"
          },
          "gs1_prefix": {
           "type": "object",
           "properties": {
            "prefix": {
             "type": "string"
            },
            "range": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "country_code": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          },
          "vietnam": {
           "type": "object",
           "properties": {
            "gs1_prefix": {
             "type": "string"
            },
            "organisation": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/swift-bic": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "SWIFT / BIC Codes (Vietnam)",
    "description": "The SWIFT / BIC API lists the codes needed to receive international transfers in Vietnam: about 88 institutions, from the state-owned banks (Vietcombank BFTVVNVX, VietinBank ICBVVNVX, BIDV BIDVVNVX, Agribank VBAAVNVX) and joint-stock banks to foreign-owned banks and the branches of foreign banks. Each bank has its official Vietnamese and English names, its VietQR / NAPAS code (VCB, ICB, MB…), its type, former names (LienVietPostBank → LPBank, OceanBank → MBV, CBBank → VCBNeo, DongA Bank → Vikki) and the source of the code.\n\nSearch with `q=` by short name, full name (with or without accents), former name or bank code. With `bic=` the API validates any 8- or 11-character BIC (ISO 9362): institution, country, location and branch parts, head office or branch, test BIC, and tells which bank in Vietnam it belongs to.\n\nCodes are cross-checked against the banks’ own pages and international directories; `verified` is true when the bank itself publishes the code. The list is compared every week with the NAPAS / VietQR bank list and new banks are added automatically. Always confirm the code with the beneficiary’s bank before a large transfer.\n\nDocs: https://apibox.io.vn/docs/swift-bic/",
    "operationId": "swiftBicGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/swift-bic/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Bank name, short name, former name or code (empty: full list).",
      "schema": {
       "type": "string"
      },
      "example": "oceanbank"
     },
     {
      "name": "bic",
      "in": "query",
      "required": false,
      "description": "A BIC to validate and look up (8 or 11 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Filter the list, e.g. `joint-stock`, `foreign`, `branch`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "updated": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "query": {
           "type": "string"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "bic": {
              "type": "string"
             },
             "bank_code": {
              "type": "string"
             },
             "short_name": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "former_names": {
              "type": "array"
             },
             "verified": {
              "type": "boolean"
             },
             "source": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "updated": "2026-11-10",
         "count": 88,
         "query": "oceanbank",
         "results": [
          {
           "bic": "OJBAVNVX",
           "bank_code": "MBV",
           "short_name": "MBV",
           "name": "Ngân hàng TNHH MTV Việt Nam Hiện Đại",
           "name_en": "Modern Bank of Vietnam Limited",
           "type": "single-member LLC commercial bank (subsidiary after compulsory transfer)",
           "former_names": [
            "Ngân hàng TM TNHH MTV Đại Dương (OceanBank)"
           ],
           "verified": false,
           "source": "https://www.theswiftcodes.com/vietnam/ojbavnvx/"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vsic": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Industry Codes (VSIC)",
    "description": "The VSIC API gives the Vietnamese Standard Industrial Classification, the “mã ngành kinh tế” declared when registering a company. Since 15 November 2025 the system is VSIC 2025 (Decision 36/2025/QĐ-TTg): 22 sections, 87 divisions, 259 groups, 495 classes and 743 sub-classes. `code=4711` returns a code with its level, its path up to the section, its children and the matching VSIC 2018 codes; `q=` searches names without accents (`q=ban le giay dep`), level-4 codes first because those are the ones used for business registration; `parent=` and `level=` browse the tree.\n\nVSIC 2018 (Decision 27/2018/QĐ-TTg, with English names) is still available with `version=2018`, because existing business licences, contracts and databases use its codes. Every code carries its correspondence in the other version, from the official conversion table of the General Statistics Office (Công văn 3061/CTK-CSCL, 26/12/2025); `partial: true` marks codes that were split or merged, where you must pick the right one by activity.\n\nThe 2025 list is re-read every week from the national business-registration portal and checked against the official counts; changes to the conversion annexes are detected and reviewed.\n\nDocs: https://apibox.io.vn/docs/vsic/",
    "operationId": "vsicGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vsic/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "A code (A, 47, 471, 4711, 47110).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search names (accents optional).",
      "schema": {
       "type": "string"
      },
      "example": "ban le giay dep"
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "List one level (1–5), or filter the search.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "parent",
      "in": "query",
      "required": false,
      "description": "Children of a code.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "version",
      "in": "query",
      "required": false,
      "description": "`2025` or `2018`.",
      "schema": {
       "type": "string",
       "default": "2025"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max search results (1–200).",
      "schema": {
       "type": "number",
       "default": 30
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "version": {
           "type": "string"
          },
          "decision": {
           "type": "string"
          },
          "in_force": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "query": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "level": {
              "type": "number"
             },
             "path": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "version": "2025",
         "decision": "36/2025/QĐ-TTg",
         "in_force": "2025-11-15",
         "updated": "2026-11-10",
         "query": "ban le giay dep",
         "count": 2,
         "results": [
          {
           "code": "4771",
           "name": "Bán lẻ hàng may mặc, giày, dép, hàng da và giả da",
           "level": 4,
           "path": "G > 47 > 477"
          },
          {
           "code": "47712",
           "name": "Bán lẻ giày, dép",
           "level": 5,
           "path": "G > 47 > 477 > 4771"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-tokenize": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Word Segmentation",
    "description": "Vietnamese writes a space between every syllable, so “học sinh” (student) looks like two words to search engines and text tools. The tokenizer API groups syllables into words using a dictionary of about 25,000 multi-syllable words plus the names of Vietnam’s provinces and wards, and picks the segmentation with the fewest tokens: “Học sinh trường Nguyễn Trãi … tại Thành phố Hồ Chí Minh” → `Học_sinh trường Nguyễn_Trãi … tại Thành_phố Hồ_Chí_Minh`.\n\nConsecutive title-case syllables are joined as proper names (people, organisations), without swallowing honorifics such as Ông or Bà or abbreviations like THPT. `segmented` returns the text with words joined by `_` (or your `separator`), the format used by most Vietnamese NLP tools; `details=true` adds every token with its type (word, syllable, name, number, punctuation) and character offsets.\n\n`action=keywords` ranks the multi-syllable words and names of a text by frequency, length and position, skipping common function phrases, to build tags, SEO keywords or search facets. The dictionary is refreshed automatically every week from its upstream list.\n\nDocs: https://apibox.io.vn/docs/vn-tokenize/",
    "operationId": "vnTokenizeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tokenize/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Vietnamese text (max 200,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`tokenize` or `keywords`.",
      "schema": {
       "type": "string",
       "default": "tokenize"
      }
     },
     {
      "name": "separator",
      "in": "query",
      "required": false,
      "description": "Character joining the syllables of a word.",
      "schema": {
       "type": "string",
       "default": "_"
      }
     },
     {
      "name": "details",
      "in": "query",
      "required": false,
      "description": "Return every token with type and offsets.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "names",
      "in": "query",
      "required": false,
      "description": "Group capitalised syllables into names.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Number of keywords (1–100).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "multi_syllable": {
           "type": "number"
          },
          "segmented": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Word Segmentation",
    "description": "Vietnamese writes a space between every syllable, so “học sinh” (student) looks like two words to search engines and text tools. The tokenizer API groups syllables into words using a dictionary of about 25,000 multi-syllable words plus the names of Vietnam’s provinces and wards, and picks the segmentation with the fewest tokens: “Học sinh trường Nguyễn Trãi … tại Thành phố Hồ Chí Minh” → `Học_sinh trường Nguyễn_Trãi … tại Thành_phố Hồ_Chí_Minh`.\n\nConsecutive title-case syllables are joined as proper names (people, organisations), without swallowing honorifics such as Ông or Bà or abbreviations like THPT. `segmented` returns the text with words joined by `_` (or your `separator`), the format used by most Vietnamese NLP tools; `details=true` adds every token with its type (word, syllable, name, number, punctuation) and character offsets.\n\n`action=keywords` ranks the multi-syllable words and names of a text by frequency, length and position, skipping common function phrases, to build tags, SEO keywords or search facets. The dictionary is refreshed automatically every week from its upstream list.\n\nDocs: https://apibox.io.vn/docs/vn-tokenize/",
    "operationId": "vnTokenizePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tokenize/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Vietnamese text (max 200,000 characters)."
         },
         "action": {
          "type": "string",
          "default": "tokenize",
          "description": "`tokenize` or `keywords`."
         },
         "separator": {
          "type": "string",
          "default": "_",
          "description": "Character joining the syllables of a word."
         },
         "details": {
          "type": "boolean",
          "default": false,
          "description": "Return every token with type and offsets."
         },
         "names": {
          "type": "boolean",
          "default": true,
          "description": "Group capitalised syllables into names."
         },
         "limit": {
          "type": "number",
          "default": 10,
          "description": "Number of keywords (1–100)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Chính phủ yêu cầu các bộ ngành đẩy mạnh chuyển đổi số và phát triển trí tuệ nhân tạo trong doanh nghiệp."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "multi_syllable": {
           "type": "number"
          },
          "segmented": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "tokenize",
         "count": 13,
         "multi_syllable": 7,
         "segmented": "Chính_phủ yêu_cầu các bộ ngành đẩy_mạnh chuyển_đổi số và phát_triển trí_tuệ_nhân_tạo trong doanh_nghiệp.",
         "note": "Dictionary-based segmentation …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/qr-decode": {
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "QR Code Reader",
    "description": "The QR reader API finds and decodes the QR code in an uploaded image (PNG or JPEG, sent as multipart `file`, a raw body or `file_base64`). It handles photos and screenshots, inverted codes and transparent backgrounds, and returns the text, the detected type (URL, Wi-Fi, vCard, e-mail, phone, OTP, EMVCo payment or plain text), the QR version and the position of the code in the image.\n\nVietnamese payment QR codes are decoded further: a VietQR / NAPAS 247 code gives the bank (name, code and BIN), the account or card number, the amount, the transfer note and whether the CRC is valid, so you can check a payment code before showing or paying it. Wi-Fi codes give the network name, security type and password.\n\nLarge photos are scaled down for speed and retried at full size when needed. Images are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/qr-decode/",
    "operationId": "qrDecodePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/qr-decode/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PNG or JPEG image (multipart, raw body or `file_base64`)."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "found": {
           "type": "boolean"
          },
          "data": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "version": {
           "type": "number"
          },
          "image": {
           "type": "object",
           "properties": {
            "format": {
             "type": "string"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "vietqr": {
           "type": "object",
           "properties": {
            "valid": {
             "type": "boolean"
            },
            "crc_valid": {
             "type": "boolean"
            },
            "bank": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "bin": {
               "type": "string"
              },
              "short_name": {
               "type": "string"
              },
              "name": {
               "type": "string"
              }
             }
            },
            "account": {
             "type": "string"
            },
            "amount": {
             "type": "number"
            },
            "content": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "found": true,
         "data": "00020101021238540010A00000072701240006970436011001234567890208QRIBFTTA530370454061500005802VN62260822Thanh toan don ABX12346304FFCC",
         "type": "vietqr",
         "version": 5,
         "image": {
          "format": "png",
          "width": 360,
          "height": 360
         },
         "vietqr": {
          "valid": true,
          "crc_valid": true,
          "bank": {
           "code": "VCB",
           "bin": "970436",
           "short_name": "Vietcombank",
           "name": "Ngân hàng TMCP Ngoại thương Việt Nam"
          },
          "account": "0123456789",
          "amount": 150000,
          "content": "Thanh toan don ABX1234",
          "…": "…"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/weather": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Weather Forecast (Vietnam)",
    "description": "The weather API returns the forecast for a province (code or name: `province=hcm`, `Hà Nội`, `68`) at its administrative centre after the 2025 merger, or for any `lat` / `lon`. The response has the current conditions (temperature, humidity, wind in m/s and km/h with direction, cloud cover, pressure, precipitation and a condition such as “Mưa rào” / “Rain showers”), an hourly forecast for the next 24 hours and a daily summary with minimum, maximum, precipitation and the main condition for up to 9 days. Times are in Vietnam time.\n\nForecasts come from MET Norway (the Norwegian Meteorological Institute, api.met.no), a global model that is free for commercial use under CC BY 4.0: show the attribution returned in `attribution`. Results are cached per location (coordinates rounded to about 1 km) until the source’s next update.\n\nFor typhoon warnings and official forecasts in Vietnam, refer to the National Center for Hydro-Meteorological Forecasting (nchmf.gov.vn).\n\nDocs: https://apibox.io.vn/docs/weather/",
    "operationId": "weatherGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/weather/"
    },
    "parameters": [
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province code or name (`79`, `hcm`, `Đà Nẵng`).",
      "schema": {
       "type": "string"
      },
      "example": "hcm"
     },
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "description": "Days in the daily forecast (1–9).",
      "schema": {
       "type": "number",
       "default": 7
      },
      "example": 3
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "location": {
           "type": "object",
           "properties": {
            "lat": {
             "type": "number"
            },
            "lon": {
             "type": "number"
            },
            "province_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "location": {
             "type": "string"
            }
           }
          },
          "timezone": {
           "type": "string"
          },
          "current": {
           "type": "object",
           "properties": {
            "time": {
             "type": "string"
            },
            "temperature": {
             "type": "number"
            },
            "humidity": {
             "type": "number"
            },
            "wind_speed": {
             "type": "number"
            },
            "wind_kmh": {
             "type": "number"
            },
            "wind_direction": {
             "type": "string"
            },
            "cloud_cover": {
             "type": "number"
            },
            "pressure": {
             "type": "number"
            },
            "precipitation_mm": {
             "type": "number"
            },
            "condition": {
             "type": "object",
             "properties": {
              "symbol": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              },
              "en": {
               "type": "string"
              }
             }
            }
           }
          },
          "hourly": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "daily": {
           "type": "array",
           "items": {}
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "location": {
          "lat": 10.78,
          "lon": 106.7,
          "province_code": "79",
          "province": "Thành phố Hồ Chí Minh",
          "location": "TP. Hồ Chí Minh"
         },
         "timezone": "Asia/Ho_Chi_Minh",
         "current": {
          "time": "2026-11-10T23:00:00+07:00",
          "temperature": 26.4,
          "humidity": 90.5,
          "wind_speed": 1.8,
          "wind_kmh": 6.5,
          "wind_direction": "NW",
          "cloud_cover": 100,
          "pressure": 1012.9,
          "precipitation_mm": 0,
          "condition": {
           "symbol": "cloudy",
           "vi": "Nhiều mây",
           "en": "Cloudy"
          }
         },
         "hourly": [
          "…24 hours…"
         ],
         "daily": [
          {
           "date": "2026-11-11",
           "min": 24.8,
           "max": 31.8,
           "precipitation_mm": 4.8,
           "condition": {
            "symbol": "rain",
            "vi": "Mưa",
            "en": "Rain"
           }
          },
          "…"
         ],
         "attribution": "Weather data: MET Norway (api.met.no), CC BY 4.0"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-zodiac": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Vietnamese Zodiac & Age",
    "description": "The Vietnamese zodiac API computes the traditional attributes of a birth year that many Vietnamese apps show: the lunar year (people born before Tết belong to the previous year, computed with the lunar calendar), the can chi name (Canh Ngọ, Giáp Tý…), the animal (the Vietnamese zodiac has the Cat instead of the Rabbit), the nạp âm destiny element (Lộ Bàng Thổ – “road-side earth”), and its generating and overcoming elements with associated colours.\n\nWith `gender` it adds the cung phi of the Eight Mansions (Khảm, Ly, Càn…), its element, direction and East / West group; without it both are returned. The response also gives the western age and the lunar age (tuổi mụ, counted from 1 and incremented at Tết), and the signs in tam hợp (harmony) and tứ hành xung (conflict).\n\nThese are cultural beliefs, useful for wedding, feng-shui, gift and entertainment features; the calculations follow the common traditional tables.\n\nDocs: https://apibox.io.vn/docs/vn-zodiac/",
    "operationId": "vnZodiacGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-zodiac/"
    },
    "parameters": [
     {
      "name": "birth_date",
      "in": "query",
      "required": false,
      "description": "Birth date `YYYY-MM-DD` (or `year=YYYY`).",
      "schema": {
       "type": "string"
      },
      "example": "1990-05-20"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Lunar birth year only.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gender",
      "in": "query",
      "required": false,
      "description": "`male` / `female` (or `nam` / `nữ`) for the cung phi.",
      "schema": {
       "type": "string"
      },
      "example": "male"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "solar_year": {
           "type": "number"
          },
          "lunar_year": {
           "type": "number"
          },
          "can_chi": {
           "type": "string"
          },
          "can": {
           "type": "string"
          },
          "chi": {
           "type": "string"
          },
          "con_giap": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "age": {
           "type": "object",
           "properties": {
            "western": {
             "type": "number"
            },
            "lunar": {
             "type": "number"
            }
           }
          },
          "menh": {
           "type": "object",
           "properties": {
            "nap_am": {
             "type": "string"
            },
            "meaning": {
             "type": "string"
            },
            "element": {
             "type": "string"
            },
            "element_en": {
             "type": "string"
            },
            "generated_by": {
             "type": "string"
            },
            "generates": {
             "type": "string"
            },
            "overcomes": {
             "type": "string"
            },
            "overcome_by": {
             "type": "string"
            },
            "lucky_colors": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "colors_to_avoid": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "cung_phi": {
           "type": "object",
           "properties": {
            "number": {
             "type": "number"
            },
            "cung": {
             "type": "string"
            },
            "element": {
             "type": "string"
            },
            "direction": {
             "type": "string"
            },
            "group": {
             "type": "string"
            }
           }
          },
          "compatible": {
           "type": "object",
           "properties": {
            "tam_hop": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "tu_hanh_xung": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "1990-05-20",
         "solar_year": 1990,
         "lunar_year": 1990,
         "can_chi": "Canh Ngọ",
         "can": "Canh",
         "chi": "Ngọ",
         "con_giap": {
          "vi": "Ngựa",
          "en": "Horse"
         },
         "age": {
          "western": 36,
          "lunar": 37
         },
         "menh": {
          "nap_am": "Lộ Bàng Thổ",
          "meaning": "Đất ven đường",
          "element": "Thổ",
          "element_en": "Earth",
          "generated_by": "Hỏa",
          "generates": "Kim",
          "overcomes": "Thủy",
          "overcome_by": "Mộc",
          "lucky_colors": [
           "vàng",
           "nâu đất",
           "đỏ",
           "hồng",
           "cam",
           "tím"
          ],
          "colors_to_avoid": [
           "xanh lá"
          ]
         },
         "cung_phi": {
          "number": 1,
          "cung": "Khảm",
          "element": "Thủy",
          "direction": "Bắc",
          "group": "Đông tứ mệnh"
         },
         "compatible": {
          "tam_hop": [
           "Dần",
           "Tuất"
          ],
          "tu_hanh_xung": [
           "Tý",
           "Mão",
           "Dậu"
          ]
         },
         "disclaimer": "Traditional beliefs, for culture and entertainment."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Vietnamese Zodiac & Age",
    "description": "The Vietnamese zodiac API computes the traditional attributes of a birth year that many Vietnamese apps show: the lunar year (people born before Tết belong to the previous year, computed with the lunar calendar), the can chi name (Canh Ngọ, Giáp Tý…), the animal (the Vietnamese zodiac has the Cat instead of the Rabbit), the nạp âm destiny element (Lộ Bàng Thổ – “road-side earth”), and its generating and overcoming elements with associated colours.\n\nWith `gender` it adds the cung phi of the Eight Mansions (Khảm, Ly, Càn…), its element, direction and East / West group; without it both are returned. The response also gives the western age and the lunar age (tuổi mụ, counted from 1 and incremented at Tết), and the signs in tam hợp (harmony) and tứ hành xung (conflict).\n\nThese are cultural beliefs, useful for wedding, feng-shui, gift and entertainment features; the calculations follow the common traditional tables.\n\nDocs: https://apibox.io.vn/docs/vn-zodiac/",
    "operationId": "vnZodiacPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-zodiac/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "birth_date": {
          "type": "string",
          "description": "Birth date `YYYY-MM-DD` (or `year=YYYY`)."
         },
         "year": {
          "type": "number",
          "description": "Lunar birth year only."
         },
         "gender": {
          "type": "string",
          "description": "`male` / `female` (or `nam` / `nữ`) for the cung phi."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "solar_year": {
           "type": "number"
          },
          "lunar_year": {
           "type": "number"
          },
          "can_chi": {
           "type": "string"
          },
          "can": {
           "type": "string"
          },
          "chi": {
           "type": "string"
          },
          "con_giap": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "age": {
           "type": "object",
           "properties": {
            "western": {
             "type": "number"
            },
            "lunar": {
             "type": "number"
            }
           }
          },
          "menh": {
           "type": "object",
           "properties": {
            "nap_am": {
             "type": "string"
            },
            "meaning": {
             "type": "string"
            },
            "element": {
             "type": "string"
            },
            "element_en": {
             "type": "string"
            },
            "generated_by": {
             "type": "string"
            },
            "generates": {
             "type": "string"
            },
            "overcomes": {
             "type": "string"
            },
            "overcome_by": {
             "type": "string"
            },
            "lucky_colors": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "colors_to_avoid": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "cung_phi": {
           "type": "object",
           "properties": {
            "number": {
             "type": "number"
            },
            "cung": {
             "type": "string"
            },
            "element": {
             "type": "string"
            },
            "direction": {
             "type": "string"
            },
            "group": {
             "type": "string"
            }
           }
          },
          "compatible": {
           "type": "object",
           "properties": {
            "tam_hop": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "tu_hanh_xung": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/webhook-verify": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Webhook Signature Verifier",
    "description": "Signature mismatches are the most common webhook bug: the body was re-serialised, the wrong secret was used, or the timestamp is outside the tolerance. The webhook verify API checks a payload against the signature scheme of the provider and shows the expected value next to the received one. Supported: Stripe (`Stripe-Signature` t= / v1=, 5-minute tolerance), GitHub (`X-Hub-Signature-256`), Slack (v0 with `X-Slack-Request-Timestamp`), Shopify (base64 `X-Shopify-Hmac-Sha256`), PayOS (HMAC over the sorted `data` fields, with the exact signed string) and SePay (`Authorization: Apikey`).\n\n`provider=generic` covers everything else: HMAC-SHA1/256/512, hex or base64, optional prefix and the header to read. Send the raw body as `payload` (a string, exactly as received) and either the `headers` object or the `signature`.\n\nUse it to debug integrations and in tests; in production verify signatures in your own code. Secrets are used in memory only and never stored or logged.\n\nDocs: https://apibox.io.vn/docs/webhook-verify/",
    "operationId": "webhookVerifyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webhook-verify/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "provider": {
          "type": "string",
          "default": "generic",
          "description": "`stripe`, `github`, `slack`, `shopify`, `payos`, `sepay` or `generic`."
         },
         "secret": {
          "type": "string",
          "description": "Signing secret / API key."
         },
         "payload": {
          "type": "string",
          "description": "Raw request body, as a string."
         },
         "headers": {
          "type": "object",
          "description": "Request headers (the signature header is read from here)."
         },
         "signature": {
          "type": "string",
          "description": "Signature value, instead of headers."
         },
         "tolerance": {
          "type": "number",
          "default": 300,
          "description": "Max age in seconds (Stripe, Slack); 0 = no check."
         },
         "algorithm": {
          "type": "string",
          "default": "sha256",
          "description": "Generic: `sha1`, `sha256`, `sha512`."
         },
         "encoding": {
          "type": "string",
          "default": "hex",
          "description": "Generic: `hex` or `base64`."
         }
        },
        "required": [
         "secret",
         "payload"
        ]
       },
       "example": {
        "provider": "github",
        "secret": "gh",
        "payload": "{\"id\":\"evt_1\"}",
        "signature": "sha256=eb445c690721bdf4fa91d361661d981eb0394f3089b9e9dfb96cddaef63da22e"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "provider": {
           "type": "string"
          },
          "expected": {
           "type": "string"
          },
          "received": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": true,
         "provider": "github",
         "expected": "sha256=eb445c690721bdf4fa91d361661d981eb0394f3089b9e9dfb96cddaef63da22e",
         "received": "sha256=eb445c690721bdf4fa91d361661d981eb0394f3089b9e9dfb96cddaef63da22e",
         "note": "The secret is used in memory only and never stored. …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/invoice-pdf": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Quote & Receipt PDF",
    "description": "The invoice PDF API turns a JSON document into a print-ready A4 PDF: seller and buyer blocks, a table of items (name, unit, quantity, unit price, optional discount and VAT rate per line), subtotal, discount, VAT and total, the amount written in Vietnamese words (“Mười ba triệu không trăm lẻ tám nghìn đồng”), payment details, notes and signature boxes. Long item names wrap and long documents continue on new pages with page numbers.\n\nText uses the Be Vietnam Pro typeface (SIL Open Font License), embedded as a subset so every Vietnamese character prints correctly and files stay small (about 30 KB). With `payment.bank` and `payment.account` a VietQR code with the exact amount and reference is printed, so customers pay by scanning it with any banking app.\n\nTypes: `quote` (Báo giá), `receipt` (Phiếu thu), `order` (Đơn đặt hàng) and `invoice` (Hoá đơn bán hàng), in Vietnamese or English, with your accent colour. These are commercial documents: they do not replace the e-invoices required by Decree 123/2020/NĐ-CP, which must be issued through a licensed e-invoice provider.\n\nDocs: https://apibox.io.vn/docs/invoice-pdf/",
    "operationId": "invoicePdfPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/invoice-pdf/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "default": "quote",
          "description": "`quote`, `receipt`, `order` or `invoice`."
         },
         "items": {
          "type": "array",
          "items": {},
          "description": "Lines: {name, unit, quantity, price, discount (%), vat (%)}."
         },
         "seller": {
          "type": "object",
          "description": "{name, address, tax_code, phone, email}."
         },
         "buyer": {
          "type": "object",
          "description": "{name, contact, address, tax_code, phone, email}."
         },
         "number": {
          "type": "string",
          "description": "Document number."
         },
         "date": {
          "type": "string",
          "description": "Date (default: today)."
         },
         "vat": {
          "type": "number",
          "default": 0,
          "description": "Default VAT rate in % for every line."
         },
         "discount": {
          "type": "number",
          "description": "Global discount amount."
         },
         "payment": {
          "type": "object",
          "description": "{bank, account, holder, content}: prints a VietQR code (VND)."
         },
         "currency": {
          "type": "string",
          "default": "VND",
          "description": "`VND`, `USD` or `EUR`."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "`vi` or `en`."
         },
         "color": {
          "type": "string",
          "description": "Accent colour (hex)."
         },
         "format": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf` or `json` (base64 PDF + totals)."
         }
        },
        "required": [
         "items"
        ]
       },
       "example": {
        "type": "quote",
        "number": "BG-2026-0012",
        "vat": 10,
        "seller": {
         "name": "Công ty TNHH ABC",
         "tax_code": "0312345678"
        },
        "buyer": {
         "name": "Công ty CP An Phát"
        },
        "items": [
         {
          "name": "Gói API Pro – 12 tháng",
          "unit": "gói",
          "quantity": 1,
          "price": 2400000
         }
        ],
        "payment": {
         "bank": "VCB",
         "account": "0123456789",
         "holder": "CONG TY ABC"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/pdf": {
        "schema": {
         "type": "string",
         "contentMediaType": "application/pdf"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/csv-clean": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "CSV Cleaner",
    "description": "CSV files exported from Excel and old Vietnamese software often arrive with garbled text (“Tª n”, “ViÖt Nam”, “Vieät Nam”), semicolons instead of commas, stray spaces and broken rows. The CSV cleaner detects the encoding by trying each candidate and checking which one produces real Vietnamese words: UTF-8 (with or without BOM), UTF-16 from Excel’s “Unicode text”, Windows-1258 and Windows-1252, and text typed with the legacy TCVN3 (ABC) and VNI fonts, which it converts to Unicode.\n\nIt detects the delimiter (comma, semicolon, tab, pipe) and parses quoted fields correctly, then cleans the data: trims and collapses spaces, removes invisible characters and no-break spaces, drops empty rows, pads or truncates rows to the header width, makes header names unique and optionally removes duplicate rows. The report says what was detected and changed.\n\nThe output is a UTF-8 CSV (with BOM by default, so Excel opens it with Vietnamese characters intact; comma, semicolon or tab delimiter) or JSON records.\n\nDocs: https://apibox.io.vn/docs/csv-clean/",
    "operationId": "csvCleanPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/csv-clean/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "csv": {
          "type": "string",
          "description": "CSV text."
         },
         "encoding": {
          "type": "string",
          "default": "auto",
          "description": "Force: `utf-8`, `windows-1258`, `windows-1252`, `utf-16le`, `tcvn3`, `vni`."
         },
         "delimiter": {
          "type": "string",
          "description": "Input delimiter (default: detected)."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "The first row is a header."
         },
         "dedupe": {
          "type": "boolean",
          "default": false,
          "description": "Remove duplicate rows."
         },
         "format": {
          "type": "string",
          "default": "csv",
          "description": "`csv` or `json`."
         },
         "output_delimiter": {
          "type": "string",
          "default": ",",
          "description": "`,`, `;` or `tab`."
         },
         "bom": {
          "type": "boolean",
          "default": true,
          "description": "Start the CSV with a UTF-8 BOM (for Excel)."
         }
        }
       },
       "example": {
        "csv": "Tên; Tuổi ;Tỉnh\n\"Nguyễn Văn An\" ; 30 ;Hà Nội\n\nTrần Thị B;25\n",
        "format": "json"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "CSV file (multipart, raw body or `file_base64`), or `csv` text."
         },
         "csv": {
          "type": "string",
          "description": "CSV text."
         },
         "encoding": {
          "type": "string",
          "default": "auto",
          "description": "Force: `utf-8`, `windows-1258`, `windows-1252`, `utf-16le`, `tcvn3`, `vni`."
         },
         "delimiter": {
          "type": "string",
          "description": "Input delimiter (default: detected)."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "The first row is a header."
         },
         "dedupe": {
          "type": "boolean",
          "default": false,
          "description": "Remove duplicate rows."
         },
         "format": {
          "type": "string",
          "default": "csv",
          "description": "`csv` or `json`."
         },
         "output_delimiter": {
          "type": "string",
          "default": ",",
          "description": "`,`, `;` or `tab`."
         },
         "bom": {
          "type": "boolean",
          "default": true,
          "description": "Start the CSV with a UTF-8 BOM (for Excel)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "detected": {
           "type": "object",
           "properties": {
            "encoding": {
             "type": "string"
            },
            "delimiter": {
             "type": "string"
            },
            "header": {
             "type": "boolean"
            }
           }
          },
          "rows": {
           "type": "number"
          },
          "columns": {
           "type": "number"
          },
          "report": {
           "type": "object",
           "properties": {
            "input_rows": {
             "type": "number"
            },
            "empty_rows_removed": {
             "type": "number"
            },
            "cells_trimmed": {
             "type": "number"
            },
            "rows_padded": {
             "type": "number"
            },
            "rows_truncated": {
             "type": "number"
            },
            "duplicates_removed": {
             "type": "number"
            },
            "invisible_chars_removed": {
             "type": "number"
            }
           }
          },
          "headers": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "Tên": {
              "type": "string"
             },
             "Tuổi": {
              "type": "string"
             },
             "Tỉnh": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "detected": {
          "encoding": "utf-8",
          "delimiter": ";",
          "header": true
         },
         "rows": 2,
         "columns": 3,
         "report": {
          "input_rows": 5,
          "empty_rows_removed": 1,
          "cells_trimmed": 3,
          "rows_padded": 1,
          "rows_truncated": 0,
          "duplicates_removed": 0,
          "invisible_chars_removed": 0
         },
         "headers": [
          "Tên",
          "Tuổi",
          "Tỉnh"
         ],
         "data": [
          {
           "Tên": "Nguyễn Văn An",
           "Tuổi": "30",
           "Tỉnh": "Hà Nội"
          },
          {
           "Tên": "Trần Thị B",
           "Tuổi": "25",
           "Tỉnh": ""
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/email-inline": {
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "Email CSS Inliner",
    "description": "Many e-mail clients ignore or strip `<style>` blocks, so HTML e-mails must carry their CSS in `style` attributes. The inliner parses the style sheets of the message, applies each rule to the matching elements in the right order (selector specificity, source order, `!important`, existing inline styles winning over normal rules) and writes the result inline.\n\nRules that cannot be inlined, such as `@media` queries for mobile layouts, `:hover` and `@font-face`, are kept in a single `<style>` element in the head (`keep_style_tags=true` keeps the original blocks too). After inlining, the API reports compatibility problems: flexbox and grid, `position`, `float`, background images, `border-radius` and `box-shadow` in Outlook, CSS variables, `calc()`, rem / vh units, images without alt text, and messages over Gmail’s 102 KB clipping limit.\n\nSelectors supported: tags, classes, ids, attributes, descendant and child combinators, `:first-child` and similar structural pseudo-classes.\n\nDocs: https://apibox.io.vn/docs/email-inline/",
    "operationId": "emailInlinePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-inline/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "The e-mail HTML (max 2 MB)."
         },
         "keep_style_tags": {
          "type": "boolean",
          "default": false,
          "description": "Keep the original <style> blocks."
         }
        },
        "required": [
         "html"
        ]
       },
       "example": {
        "html": "<style>p{color:red} .big{font-size:20px} @media (max-width:600px){p{font-size:12px}}</style><p class=\"big\">Xin chào</p>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "html": {
           "type": "string"
          },
          "stats": {
           "type": "object",
           "properties": {
            "rules": {
             "type": "number"
            },
            "applications": {
             "type": "number"
            },
            "unmatched_selectors": {
             "type": "number"
            },
            "kept_in_style_tag": {
             "type": "number"
            },
            "size_kb": {
             "type": "number"
            }
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "html": "<!DOCTYPE html><html><head><style>@media (max-width:600px){p{font-size:12px}}</style></head><body><p class=\"big\" style=\"color: red; font-size: 20px\">Xin chào</p></body></html>",
         "stats": {
          "rules": 2,
          "applications": 2,
          "unmatched_selectors": 0,
          "kept_in_style_tag": 1,
          "size_kb": 0
         },
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/semver": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Semver",
    "description": "The semver API applies the rules of npm’s semver package, the reference implementation of Semantic Versioning 2.0.0. With `version` it parses a version (major, minor, patch, pre-release and build parts), compares it with `compare=` (lower / higher / equal and which part differs), tests it against a `range` such as `^1.2.0`, `~3.4`, `>=2 <3`, `1.x || 2.x` or `1.2.3 - 2.0.0`, and lists the next version for every release type.\n\nWith `versions` (an array or a comma-separated list) it sorts them, reports invalid entries, returns the latest and latest stable version and, with a range, the versions that satisfy it and the highest and lowest matches, which is how package managers pick a version.\n\n`coerce=true` turns loose input such as `v2`, `1.2` or `release-3.4.1` into a valid version; pre-releases only match ranges that mention them unless `include_prerelease=true`.\n\nDocs: https://apibox.io.vn/docs/semver/",
    "operationId": "semverGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/semver/"
    },
    "parameters": [
     {
      "name": "version",
      "in": "query",
      "required": false,
      "description": "A version to parse.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare",
      "in": "query",
      "required": false,
      "description": "Another version to compare with.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "range",
      "in": "query",
      "required": false,
      "description": "npm range, e.g. `^1.2.0`.",
      "schema": {
       "type": "string"
      },
      "example": ">=1.2 <2"
     },
     {
      "name": "versions",
      "in": "query",
      "required": false,
      "description": "List to sort / filter (array or comma-separated).",
      "schema": {
       "type": "string"
      },
      "example": "1.0.0,2.0.0-rc.1,1.10.0,1.2.0"
     },
     {
      "name": "bump",
      "in": "query",
      "required": false,
      "description": "`major`, `minor`, `patch`, `premajor`, `preminor`, `prepatch`, `prerelease`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "coerce",
      "in": "query",
      "required": false,
      "description": "Accept loose input (v2, 1.2).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "include_prerelease",
      "in": "query",
      "required": false,
      "description": "Let ranges match pre-releases.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "sorted": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "invalid": {
           "type": "array"
          },
          "latest": {
           "type": "string"
          },
          "latest_stable": {
           "type": "string"
          },
          "range": {
           "type": "string"
          },
          "normalized_range": {
           "type": "string"
          },
          "satisfying": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "max_satisfying": {
           "type": "string"
          },
          "min_satisfying": {
           "type": "string"
          }
         }
        },
        "example": {
         "count": 4,
         "sorted": [
          "1.0.0",
          "1.2.0",
          "1.10.0",
          "2.0.0-rc.1"
         ],
         "invalid": [],
         "latest": "2.0.0-rc.1",
         "latest_stable": "1.10.0",
         "range": ">=1.2 <2",
         "normalized_range": ">=1.2.0 <2.0.0-0",
         "satisfying": [
          "1.10.0",
          "1.2.0"
         ],
         "max_satisfying": "1.10.0",
         "min_satisfying": "1.2.0"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Semver",
    "description": "The semver API applies the rules of npm’s semver package, the reference implementation of Semantic Versioning 2.0.0. With `version` it parses a version (major, minor, patch, pre-release and build parts), compares it with `compare=` (lower / higher / equal and which part differs), tests it against a `range` such as `^1.2.0`, `~3.4`, `>=2 <3`, `1.x || 2.x` or `1.2.3 - 2.0.0`, and lists the next version for every release type.\n\nWith `versions` (an array or a comma-separated list) it sorts them, reports invalid entries, returns the latest and latest stable version and, with a range, the versions that satisfy it and the highest and lowest matches, which is how package managers pick a version.\n\n`coerce=true` turns loose input such as `v2`, `1.2` or `release-3.4.1` into a valid version; pre-releases only match ranges that mention them unless `include_prerelease=true`.\n\nDocs: https://apibox.io.vn/docs/semver/",
    "operationId": "semverPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/semver/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "version": {
          "type": "string",
          "description": "A version to parse."
         },
         "compare": {
          "type": "string",
          "description": "Another version to compare with."
         },
         "range": {
          "type": "string",
          "description": "npm range, e.g. `^1.2.0`."
         },
         "versions": {
          "type": "string",
          "description": "List to sort / filter (array or comma-separated)."
         },
         "bump": {
          "type": "string",
          "description": "`major`, `minor`, `patch`, `premajor`, `preminor`, `prepatch`, `prerelease`."
         },
         "coerce": {
          "type": "boolean",
          "default": false,
          "description": "Accept loose input (v2, 1.2)."
         },
         "include_prerelease": {
          "type": "boolean",
          "default": false,
          "description": "Let ranges match pre-releases."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "sorted": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "invalid": {
           "type": "array"
          },
          "latest": {
           "type": "string"
          },
          "latest_stable": {
           "type": "string"
          },
          "range": {
           "type": "string"
          },
          "normalized_range": {
           "type": "string"
          },
          "satisfying": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "max_satisfying": {
           "type": "string"
          },
          "min_satisfying": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/base-convert": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Number Base & Roman Converter",
    "description": "The base conversion API converts an integer between any bases from 2 to 36 and Roman numerals. Input is detected automatically (`0x` hex, `0b` binary, `0o` octal, Roman letters, otherwise decimal) or set with `from`; underscores and spaces are ignored and negative numbers are allowed. Numbers of any size are supported (no 2^53 limit), which is useful for IDs, hashes and big counters.\n\nBy default the result is given in binary, octal, decimal, hexadecimal, base36 and Roman numerals; `to=2,16,roman` selects the targets. The response also contains grouped binary (nibbles), upper-case hex with prefix, the decimal with thousands separators and the number of bits and bytes needed.\n\nRoman numerals follow the standard subtractive form (IV, IX, XL, CM) from I to MMMCMXCIX (3,999); invalid forms such as IIII or VX are rejected.\n\nDocs: https://apibox.io.vn/docs/base-convert/",
    "operationId": "baseConvertGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/base-convert/"
    },
    "parameters": [
     {
      "name": "value",
      "in": "query",
      "required": true,
      "description": "The number (e.g. `255`, `0xFF`, `0b1010`, `MMXXVI`).",
      "schema": {
       "type": "string"
      },
      "example": "MMXXVI"
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "`auto`, `roman` or a base 2–36.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Targets, e.g. `2,16,roman` (default: 2, 8, 10, 16, 36, roman).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "decimal": {
           "type": "string"
          },
          "results": {
           "type": "object",
           "properties": {
            "base2": {
             "type": "string"
            },
            "base8": {
             "type": "string"
            },
            "base10": {
             "type": "string"
            },
            "base16": {
             "type": "string"
            },
            "base36": {
             "type": "string"
            },
            "roman": {
             "type": "string"
            }
           }
          },
          "formatted": {
           "type": "object",
           "properties": {
            "binary": {
             "type": "string"
            },
            "hex": {
             "type": "string"
            },
            "grouped": {
             "type": "string"
            }
           }
          },
          "bits": {
           "type": "number"
          },
          "bytes": {
           "type": "number"
          }
         }
        },
        "example": {
         "input": "MMXXVI",
         "from": "roman",
         "decimal": "2026",
         "results": {
          "base2": "11111101010",
          "base8": "3752",
          "base10": "2026",
          "base16": "7ea",
          "base36": "1ka",
          "roman": "MMXXVI"
         },
         "formatted": {
          "binary": "111 1110 1010",
          "hex": "0x7EA",
          "grouped": "2,026"
         },
         "bits": 11,
         "bytes": 2
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Number Base & Roman Converter",
    "description": "The base conversion API converts an integer between any bases from 2 to 36 and Roman numerals. Input is detected automatically (`0x` hex, `0b` binary, `0o` octal, Roman letters, otherwise decimal) or set with `from`; underscores and spaces are ignored and negative numbers are allowed. Numbers of any size are supported (no 2^53 limit), which is useful for IDs, hashes and big counters.\n\nBy default the result is given in binary, octal, decimal, hexadecimal, base36 and Roman numerals; `to=2,16,roman` selects the targets. The response also contains grouped binary (nibbles), upper-case hex with prefix, the decimal with thousands separators and the number of bits and bytes needed.\n\nRoman numerals follow the standard subtractive form (IV, IX, XL, CM) from I to MMMCMXCIX (3,999); invalid forms such as IIII or VX are rejected.\n\nDocs: https://apibox.io.vn/docs/base-convert/",
    "operationId": "baseConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/base-convert/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "value": {
          "type": "string",
          "description": "The number (e.g. `255`, `0xFF`, `0b1010`, `MMXXVI`)."
         },
         "from": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `roman` or a base 2–36."
         },
         "to": {
          "type": "string",
          "description": "Targets, e.g. `2,16,roman` (default: 2, 8, 10, 16, 36, roman)."
         }
        },
        "required": [
         "value"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "decimal": {
           "type": "string"
          },
          "results": {
           "type": "object",
           "properties": {
            "base2": {
             "type": "string"
            },
            "base8": {
             "type": "string"
            },
            "base10": {
             "type": "string"
            },
            "base16": {
             "type": "string"
            },
            "base36": {
             "type": "string"
            },
            "roman": {
             "type": "string"
            }
           }
          },
          "formatted": {
           "type": "object",
           "properties": {
            "binary": {
             "type": "string"
            },
            "hex": {
             "type": "string"
            },
            "grouped": {
             "type": "string"
            }
           }
          },
          "bits": {
           "type": "number"
          },
          "bytes": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/og-image": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Social Image Generator",
    "description": "The OG image API draws the picture shown when a link is shared on Facebook, Zalo, X, LinkedIn or Slack. Give it a `title`, an optional `subtitle`, a small `tag` (“Mới”, “Blog”…) and a `site` name; it lays them out on a 1200×630 canvas with a colour band and returns a PNG (or JPEG). The title takes the largest size that fits in four lines and long titles end with an ellipsis.\n\nText is rendered from the Be Vietnam Pro typeface, designed for Vietnamese, so stacked diacritics (ặ, ễ, ỗ) are positioned correctly, which many generic image services get wrong. Choose a `theme` (light, dark, brand), your own `background`, `background2` (gradient), `color` and `accent`, `align=center`, and the `size`: og (1200×630), twitter (1200×675), linkedin, square (1080×1080) or story (1080×1920).\n\nUse the URL directly in `<meta property=\"og:image\">`: images are cacheable for a day, so social networks fetch them once.\n\nDocs: https://apibox.io.vn/docs/og-image/",
    "operationId": "ogImageGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/og-image/"
    },
    "parameters": [
     {
      "name": "title",
      "in": "query",
      "required": true,
      "description": "Main title (max 300 characters).",
      "schema": {
       "type": "string"
      },
      "example": "Bộ API cho lập trình viên Việt Nam"
     },
     {
      "name": "subtitle",
      "in": "query",
      "required": false,
      "description": "Subtitle.",
      "schema": {
       "type": "string"
      },
      "example": "VietQR, tỉnh thành, lịch âm"
     },
     {
      "name": "tag",
      "in": "query",
      "required": false,
      "description": "Small label above the title.",
      "schema": {
       "type": "string"
      },
      "example": "Mới"
     },
     {
      "name": "site",
      "in": "query",
      "required": false,
      "description": "Site / brand name at the bottom.",
      "schema": {
       "type": "string"
      },
      "example": "apibox.io.vn"
     },
     {
      "name": "theme",
      "in": "query",
      "required": false,
      "description": "`light`, `dark` or `brand`.",
      "schema": {
       "type": "string",
       "default": "light"
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "description": "`og`, `twitter`, `linkedin`, `square`, `story`.",
      "schema": {
       "type": "string",
       "default": "og"
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour (hex); `background2` for a gradient.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Text colour.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "accent",
      "in": "query",
      "required": false,
      "description": "Accent colour (band, tag).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "align",
      "in": "query",
      "required": false,
      "description": "`left` or `center`.",
      "schema": {
       "type": "string",
       "default": "left"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`png` or `jpeg`.",
      "schema": {
       "type": "string",
       "default": "png"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/png": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/png"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Social Image Generator",
    "description": "The OG image API draws the picture shown when a link is shared on Facebook, Zalo, X, LinkedIn or Slack. Give it a `title`, an optional `subtitle`, a small `tag` (“Mới”, “Blog”…) and a `site` name; it lays them out on a 1200×630 canvas with a colour band and returns a PNG (or JPEG). The title takes the largest size that fits in four lines and long titles end with an ellipsis.\n\nText is rendered from the Be Vietnam Pro typeface, designed for Vietnamese, so stacked diacritics (ặ, ễ, ỗ) are positioned correctly, which many generic image services get wrong. Choose a `theme` (light, dark, brand), your own `background`, `background2` (gradient), `color` and `accent`, `align=center`, and the `size`: og (1200×630), twitter (1200×675), linkedin, square (1080×1080) or story (1080×1920).\n\nUse the URL directly in `<meta property=\"og:image\">`: images are cacheable for a day, so social networks fetch them once.\n\nDocs: https://apibox.io.vn/docs/og-image/",
    "operationId": "ogImagePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/og-image/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string",
          "description": "Main title (max 300 characters)."
         },
         "subtitle": {
          "type": "string",
          "description": "Subtitle."
         },
         "tag": {
          "type": "string",
          "description": "Small label above the title."
         },
         "site": {
          "type": "string",
          "description": "Site / brand name at the bottom."
         },
         "theme": {
          "type": "string",
          "default": "light",
          "description": "`light`, `dark` or `brand`."
         },
         "size": {
          "type": "string",
          "default": "og",
          "description": "`og`, `twitter`, `linkedin`, `square`, `story`."
         },
         "background": {
          "type": "string",
          "description": "Background colour (hex); `background2` for a gradient."
         },
         "color": {
          "type": "string",
          "description": "Text colour."
         },
         "accent": {
          "type": "string",
          "description": "Accent colour (band, tag)."
         },
         "align": {
          "type": "string",
          "default": "left",
          "description": "`left` or `center`."
         },
         "format": {
          "type": "string",
          "default": "png",
          "description": "`png` or `jpeg`."
         }
        },
        "required": [
         "title"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/png": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/png"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/image-resize": {
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Image Resize & Convert",
    "description": "The image resize API transforms an uploaded PNG or JPEG. Set `width` and / or `height` (the other side keeps the aspect ratio) and a `fit`: `inside` (default, fits in the box), `cover` (fills the box and crops the centre, ideal for thumbnails), `contain` (fits and pads with a `background` colour) or `fill` (stretches). `crop=x,y,width,height` cuts a region first, `rotate` (90, 180, 270) and `flip` (horizontal, vertical) fix orientation, and `no_enlarge=true` never upscales.\n\nShrinking uses area averaging, which keeps fine details sharp without aliasing; enlarging uses bilinear interpolation. Output `format=jpeg` with `quality` (1–100, default 82) to reduce size; transparent areas are flattened on the background colour. Headers report the new size and the input / output byte counts.\n\nImages up to 25 megapixels and the file size of your plan are accepted; everything runs in memory and nothing is stored.\n\nDocs: https://apibox.io.vn/docs/image-resize/",
    "operationId": "imageResizePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-resize/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "width": {
          "type": "number",
          "description": "Target width (px)."
         },
         "height": {
          "type": "number",
          "description": "Target height (px)."
         },
         "fit": {
          "type": "string",
          "default": "inside",
          "description": "`inside`, `cover`, `contain`, `fill`."
         },
         "crop": {
          "type": "string",
          "description": "`x,y,width,height` before resizing."
         },
         "rotate": {
          "type": "number",
          "description": "90, 180 or 270."
         },
         "flip": {
          "type": "string",
          "description": "`horizontal` or `vertical`."
         },
         "format": {
          "type": "string",
          "description": "`png` or `jpeg` (default: same as input)."
         },
         "quality": {
          "type": "number",
          "default": 82,
          "description": "JPEG quality 1–100."
         },
         "background": {
          "type": "string",
          "default": "ffffff",
          "description": "Padding / flatten colour."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PNG or JPEG (multipart, raw body or `file_base64`)."
         },
         "width": {
          "type": "number",
          "description": "Target width (px)."
         },
         "height": {
          "type": "number",
          "description": "Target height (px)."
         },
         "fit": {
          "type": "string",
          "default": "inside",
          "description": "`inside`, `cover`, `contain`, `fill`."
         },
         "crop": {
          "type": "string",
          "description": "`x,y,width,height` before resizing."
         },
         "rotate": {
          "type": "number",
          "description": "90, 180 or 270."
         },
         "flip": {
          "type": "string",
          "description": "`horizontal` or `vertical`."
         },
         "format": {
          "type": "string",
          "description": "`png` or `jpeg` (default: same as input)."
         },
         "quality": {
          "type": "number",
          "default": 82,
          "description": "JPEG quality 1–100."
         },
         "background": {
          "type": "string",
          "default": "ffffff",
          "description": "Padding / flatten colour."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/jpeg": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/jpeg"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/image-diff": {
   "post": {
    "tags": [
     "Testing"
    ],
    "summary": "Image Diff",
    "description": "The image diff API compares two PNG or JPEG images of the same size, such as screenshots of a page before and after a change. It uses pixelmatch, the algorithm of many visual regression tools: colours are compared in a perceptual space with a `threshold` (0 = exact, default 0.1), and differences caused by anti-aliasing are ignored unless `include_aa=true`.\n\nThe JSON result says whether the images are identical, how many pixels differ and what percentage of the image that is, and the bounding box of the changes. `output=image` returns the diff image itself: the first image faded, with changed pixels in red and anti-aliasing in yellow; `include_image=true` adds it as base64 to the JSON.\n\nImages of different sizes are reported as such; `resize=true` scales the second image to the first one before comparing. Each image may have up to 12.5 megapixels.\n\nDocs: https://apibox.io.vn/docs/image-diff/",
    "operationId": "imageDiffPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-diff/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "threshold": {
          "type": "number",
          "default": 0.1,
          "description": "Colour distance threshold 0–1."
         },
         "include_aa": {
          "type": "boolean",
          "default": false,
          "description": "Count anti-aliasing as differences."
         },
         "output": {
          "type": "string",
          "default": "json",
          "description": "`json` or `image` (diff PNG)."
         },
         "resize": {
          "type": "boolean",
          "default": false,
          "description": "Scale b to a when sizes differ."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "a": {
          "type": "string",
          "format": "binary",
          "description": "First image (multipart field `a`, or `a_base64`)."
         },
         "b": {
          "type": "string",
          "format": "binary",
          "description": "Second image (`b` / `b_base64`)."
         },
         "threshold": {
          "type": "number",
          "default": 0.1,
          "description": "Colour distance threshold 0–1."
         },
         "include_aa": {
          "type": "boolean",
          "default": false,
          "description": "Count anti-aliasing as differences."
         },
         "output": {
          "type": "string",
          "default": "json",
          "description": "`json` or `image` (diff PNG)."
         },
         "resize": {
          "type": "boolean",
          "default": false,
          "description": "Scale b to a when sizes differ."
         }
        },
        "required": [
         "a",
         "b"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "identical": {
           "type": "boolean"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "diff_pixels": {
           "type": "number"
          },
          "diff_percent": {
           "type": "number"
          },
          "threshold": {
           "type": "number"
          },
          "bounding_box": {
           "type": "object",
           "properties": {
            "x": {
             "type": "number"
            },
            "y": {
             "type": "number"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          }
         }
        },
        "example": {
         "identical": false,
         "width": 1200,
         "height": 630,
         "diff_pixels": 758,
         "diff_percent": 0.1003,
         "threshold": 0.1,
         "bounding_box": {
          "x": 409,
          "y": 327,
          "width": 324,
          "height": 58
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/md-pdf": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Markdown to PDF",
    "description": "The Markdown to PDF API turns GitHub-flavoured Markdown into a print-ready PDF without a browser. It renders headings with rules, paragraphs with bold, *italic*, `inline code` and clickable links, ordered, unordered and task lists (nested), blockquotes, fenced code blocks on a tinted background, tables with column alignment and widths based on their content, and horizontal rules. Long content flows over several pages with page numbers and an optional `title` in the footer.\n\nText uses Be Vietnam Pro, embedded as a subset, so Vietnamese renders perfectly and files stay small. Choose the `page` size (a4, a5, letter), the base `font_size` and the `margin`; `format=json` returns the PDF as base64 with the page count.\n\nImages in the Markdown are replaced by their alt text, and raw HTML is reduced to its text. For styled documents such as quotes and receipts, see the invoice PDF API.\n\nDocs: https://apibox.io.vn/docs/md-pdf/",
    "operationId": "mdPdfPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/md-pdf/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "markdown": {
          "type": "string",
          "description": "Markdown text (max 500,000 characters)."
         },
         "title": {
          "type": "string",
          "description": "Document title (metadata, footer)."
         },
         "page": {
          "type": "string",
          "default": "a4",
          "description": "`a4`, `a5` or `letter`."
         },
         "font_size": {
          "type": "number",
          "default": 10.5,
          "description": "Base font size (8–16 pt)."
         },
         "margin": {
          "type": "number",
          "default": 54,
          "description": "Page margin in pt (20–100)."
         },
         "format": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf` or `json` (base64)."
         }
        },
        "required": [
         "markdown"
        ]
       },
       "example": {
        "markdown": "# Hướng dẫn\n\n**Bước 1:** tạo API key.\n\n| Ngân hàng | Mã |\n|---|---|\n| Vietcombank | VCB |",
        "title": "Hướng dẫn"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/pdf": {
        "schema": {
         "type": "string",
         "contentMediaType": "application/pdf"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/broken-links": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Broken Link Checker",
    "description": "The broken link checker loads a page, collects its links (`<a href>`), images and optionally stylesheets and scripts (`include=links,images,assets`), resolves relative URLs, removes duplicates and checks each one: first with a HEAD request, then with GET for servers that refuse HEAD, following redirects with the same protections as the other web APIs.\n\nEach result has its status, response time, final URL when redirected and anchor text, so broken links are easy to find in the page. The report separates broken links (404, 410, 5xx, timeouts, DNS errors), links that redirect (update them to the final URL) and links that refuse automated checks (401, 403, 429), and gives a score. `scope=internal` or `external` restricts the check.\n\nTo be fair to the sites being checked, one call checks one page, links are checked 8 at a time with an 8-second timeout, and the number of links per call depends on your plan (20 on the free online tool, 50 Free, 100 Starter, 200 Pro).\n\nDocs: https://apibox.io.vn/docs/broken-links/",
    "operationId": "brokenLinksGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/broken-links/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Page URL.",
      "schema": {
       "type": "string"
      },
      "example": "https://en.wikipedia.org/wiki/Provinces_of_Vietnam"
     },
     {
      "name": "include",
      "in": "query",
      "required": false,
      "description": "Comma list: `links`, `images`, `assets`.",
      "schema": {
       "type": "string",
       "default": "links,images"
      }
     },
     {
      "name": "scope",
      "in": "query",
      "required": false,
      "description": "`all`, `internal` or `external`.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max links to check (capped by plan).",
      "schema": {
       "type": "number"
      },
      "example": 40
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of the messages: `en` or `vi`.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "totals": {
           "type": "object",
           "properties": {
            "found": {
             "type": "number"
            },
            "checked": {
             "type": "number"
            },
            "ok": {
             "type": "number"
            },
            "broken": {
             "type": "number"
            },
            "redirected": {
             "type": "number"
            },
            "blocked": {
             "type": "number"
            },
            "invalid": {
             "type": "number"
            },
            "skipped": {
             "type": "number"
            }
           }
          },
          "broken": {
           "type": "array"
          },
          "redirected": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "links": {
           "type": "array",
           "items": {}
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "url": "https://en.wikipedia.org/wiki/Provinces_of_Vietnam",
         "score": 95,
         "grade": "A",
         "totals": {
          "found": 589,
          "checked": 40,
          "ok": 40,
          "broken": 0,
          "redirected": 5,
          "blocked": 0,
          "invalid": 0,
          "skipped": 549
         },
         "broken": [],
         "redirected": [
          "…"
         ],
         "links": [
          {
           "url": "https://en.wikipedia.org/wiki/Vietnam",
           "status": 200,
           "ok": true,
           "kind": "link",
           "internal": true,
           "ms": 85
          },
          "…"
         ],
         "checks": [
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Broken Link Checker",
    "description": "The broken link checker loads a page, collects its links (`<a href>`), images and optionally stylesheets and scripts (`include=links,images,assets`), resolves relative URLs, removes duplicates and checks each one: first with a HEAD request, then with GET for servers that refuse HEAD, following redirects with the same protections as the other web APIs.\n\nEach result has its status, response time, final URL when redirected and anchor text, so broken links are easy to find in the page. The report separates broken links (404, 410, 5xx, timeouts, DNS errors), links that redirect (update them to the final URL) and links that refuse automated checks (401, 403, 429), and gives a score. `scope=internal` or `external` restricts the check.\n\nTo be fair to the sites being checked, one call checks one page, links are checked 8 at a time with an 8-second timeout, and the number of links per call depends on your plan (20 on the free online tool, 50 Free, 100 Starter, 200 Pro).\n\nDocs: https://apibox.io.vn/docs/broken-links/",
    "operationId": "brokenLinksPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/broken-links/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Page URL."
         },
         "include": {
          "type": "string",
          "default": "links,images",
          "description": "Comma list: `links`, `images`, `assets`."
         },
         "scope": {
          "type": "string",
          "default": "all",
          "description": "`all`, `internal` or `external`."
         },
         "limit": {
          "type": "number",
          "description": "Max links to check (capped by plan)."
         },
         "lang": {
          "type": "string",
          "default": "en",
          "description": "Language of the messages: `en` or `vi`."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "grade": {
           "type": "string"
          },
          "totals": {
           "type": "object",
           "properties": {
            "found": {
             "type": "number"
            },
            "checked": {
             "type": "number"
            },
            "ok": {
             "type": "number"
            },
            "broken": {
             "type": "number"
            },
            "redirected": {
             "type": "number"
            },
            "blocked": {
             "type": "number"
            },
            "invalid": {
             "type": "number"
            },
            "skipped": {
             "type": "number"
            }
           }
          },
          "broken": {
           "type": "array"
          },
          "redirected": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "links": {
           "type": "array",
           "items": {}
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/lang-detect": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Language Detection",
    "description": "The language detection API identifies the language of a text using trigram statistics (the franc model, covering the 82 most spoken languages) and returns the ISO 639-1 and 639-3 codes, the language name in English and Vietnamese, a confidence score, whether the result is reliable, the scripts found (Latin, Han, Cyrillic, Thai…) and the next candidates.\n\nVietnamese gets special rules: text with tone marks is recognised with certainty, and text typed without accents (“xin chao cac ban”), which general detectors confuse with other languages, is detected from frequent Vietnamese syllables and flagged in `note`. Up to 100 texts can be sent at once with `texts`.\n\nVery short texts (a few words) are inherently ambiguous: check `reliable` before acting on the result. Everything runs locally without AI models, so it is fast and free of per-token costs.\n\nDocs: https://apibox.io.vn/docs/lang-detect/",
    "operationId": "langDetectGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/lang-detect/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text (max 100,000 characters; the first 20,000 are analysed).",
      "schema": {
       "type": "string"
      },
      "example": "Xin chao cac ban, hom nay troi dep qua"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "length": {
           "type": "number"
          },
          "language": {
           "type": "string"
          },
          "iso639_3": {
           "type": "string"
          },
          "name": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "confidence": {
           "type": "number"
          },
          "reliable": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          },
          "scripts": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "candidates": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "length": 38,
         "language": "vi",
         "iso639_3": "vie",
         "name": {
          "en": "Vietnamese",
          "vi": "Tiếng Việt"
         },
         "confidence": 1,
         "reliable": true,
         "note": "Vietnamese written without accents (không dấu)",
         "scripts": [
          "Latin"
         ],
         "candidates": [
          {
           "language": "vi",
           "iso639_3": "vie",
           "score": 1
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Language Detection",
    "description": "The language detection API identifies the language of a text using trigram statistics (the franc model, covering the 82 most spoken languages) and returns the ISO 639-1 and 639-3 codes, the language name in English and Vietnamese, a confidence score, whether the result is reliable, the scripts found (Latin, Han, Cyrillic, Thai…) and the next candidates.\n\nVietnamese gets special rules: text with tone marks is recognised with certainty, and text typed without accents (“xin chao cac ban”), which general detectors confuse with other languages, is detected from frequent Vietnamese syllables and flagged in `note`. Up to 100 texts can be sent at once with `texts`.\n\nVery short texts (a few words) are inherently ambiguous: check `reliable` before acting on the result. Everything runs locally without AI models, so it is fast and free of per-token costs.\n\nDocs: https://apibox.io.vn/docs/lang-detect/",
    "operationId": "langDetectPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/lang-detect/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text (max 100,000 characters; the first 20,000 are analysed)."
         },
         "texts": {
          "type": "array",
          "items": {},
          "description": "Up to 100 texts at once."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "length": {
           "type": "number"
          },
          "language": {
           "type": "string"
          },
          "iso639_3": {
           "type": "string"
          },
          "name": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "confidence": {
           "type": "number"
          },
          "reliable": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          },
          "scripts": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "candidates": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/summarize": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Text Summarizer",
    "description": "The summarize API produces an extractive summary: it splits the text into sentences, represents each one by its words (Vietnamese words are segmented first, so “ngân hàng” counts as one word), builds a similarity graph between sentences with TF-IDF weights and ranks them with TextRank, the algorithm behind PageRank. The best `sentences` (or a `ratio` of the text) are returned in their original order, with their scores, the main keywords and the compression ratio.\n\nBecause sentences are copied from the text, the summary never invents facts, and the same text always gives the same summary. Abbreviations such as “TP.” and decimals are handled when splitting sentences, and the language is detected automatically (or set with `lang`).\n\nExtractive summaries work best on news, reports and documentation. For rewritten, abstractive summaries an AI model is needed; this API deliberately avoids them to stay fast and cheap.\n\nDocs: https://apibox.io.vn/docs/summarize/",
    "operationId": "summarizePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/summarize/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The text (max 200,000 characters)."
         },
         "sentences": {
          "type": "number",
          "description": "Number of sentences (1–50; default about 25%, max 5)."
         },
         "ratio": {
          "type": "number",
          "description": "Share of sentences to keep (0.05–0.9), instead of `sentences`."
         },
         "lang": {
          "type": "string",
          "description": "`vi` or `en` (default: detected)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Ngân hàng Nhà nước vừa công bố giảm lãi suất điều hành thêm 0,5 điểm phần trăm… (8 câu)",
        "sentences": 3
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "lang": {
           "type": "string"
          },
          "sentences_total": {
           "type": "number"
          },
          "sentences_selected": {
           "type": "number"
          },
          "summary": {
           "type": "string"
          },
          "sentences": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "keywords": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "compression": {
           "type": "number"
          },
          "method": {
           "type": "string"
          }
         }
        },
        "example": {
         "lang": "vi",
         "sentences_total": 8,
         "sentences_selected": 3,
         "summary": "Ngân hàng Nhà nước vừa công bố giảm lãi suất điều hành thêm 0,5 điểm phần trăm, áp dụng từ ngày 15/11. Các ngân hàng thương mại dự kiến sẽ giảm lãi suất cho vay trong tháng tới. Ngân hàng Nhà nước cho biết sẽ theo dõi chặt chẽ diễn biến thị trường để điều hành linh hoạt.",
         "sentences": [
          "…"
         ],
         "keywords": [
          "ngân hàng",
          "lãi suất",
          "…"
         ],
         "compression": 0.4,
         "method": "Extractive (TextRank over TF-IDF sentence similarity); …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/xlsx-convert": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Excel ↔ JSON / CSV",
    "description": "The Excel API works in both directions. Upload an `.xlsx` file and get the first visible sheet (or the one named in `sheet`, by name or index) as JSON objects keyed by the header row, as raw rows (`format=rows`) or as CSV (`format=csv`, UTF-8 with BOM so Excel reopens it correctly, `delimiter=;` for European Excel). Date cells are recognised from their number format and returned as `2026-11-11`, booleans stay booleans, empty rows are skipped and duplicate headers get a suffix (`Tên_2`). `list=sheets` only lists the sheets, `skip_rows` skips a title block above the header and `limit` caps the rows returned.\n\nSend JSON instead of a file to create a workbook: `data` (an array of objects or of arrays) for one sheet, or `sheets` (`{\"Sheet name\": [...]}`) for up to 20 sheets. Objects produce a bold, frozen header row with an auto filter; `YYYY-MM-DD` strings become real Excel dates (dd/mm/yyyy). The answer is the `.xlsx` file itself, named after `filename`.\n\nOur own reader and writer run in memory: up to 1,000,000 cells when writing, 2,000,000 cells when reading, within the file size of your plan. Old `.xls` files are not supported (save them as `.xlsx`), and formulas are read as their last computed value.\n\nDocs: https://apibox.io.vn/docs/xlsx-convert/",
    "operationId": "xlsxConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/xlsx-convert/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "sheet": {
          "type": "string",
          "description": "Reading: sheet name or 0-based index (default: first visible sheet). Writing with `data`: sheet name."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (objects by header), `rows` (arrays) or `csv`."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "`false`: the first row is data, not a header."
         },
         "skip_rows": {
          "type": "number",
          "default": 0,
          "description": "Rows to skip before the header (0–1000)."
         },
         "skip_empty": {
          "type": "boolean",
          "default": true,
          "description": "`false` keeps empty rows."
         },
         "limit": {
          "type": "number",
          "default": 100000,
          "description": "Maximum rows returned (JSON)."
         },
         "delimiter": {
          "type": "string",
          "default": ",",
          "description": "CSV delimiter: `,` or `;`."
         },
         "list": {
          "type": "string",
          "description": "`sheets`: only list the sheets."
         },
         "data": {
          "type": "array",
          "items": {},
          "description": "Writing: array of objects or arrays for one sheet; the answer is an .xlsx file."
         },
         "sheets": {
          "type": "object",
          "description": "Writing: `{\"Sheet name\": [rows]}`, up to 20 sheets."
         },
         "filename": {
          "type": "string",
          "default": "data",
          "description": "Name of the generated file (without .xlsx)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .xlsx file to read (multipart, raw body or `file_base64`)."
         },
         "sheet": {
          "type": "string",
          "description": "Reading: sheet name or 0-based index (default: first visible sheet). Writing with `data`: sheet name."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (objects by header), `rows` (arrays) or `csv`."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "`false`: the first row is data, not a header."
         },
         "skip_rows": {
          "type": "number",
          "default": 0,
          "description": "Rows to skip before the header (0–1000)."
         },
         "skip_empty": {
          "type": "boolean",
          "default": true,
          "description": "`false` keeps empty rows."
         },
         "limit": {
          "type": "number",
          "default": 100000,
          "description": "Maximum rows returned (JSON)."
         },
         "delimiter": {
          "type": "string",
          "default": ",",
          "description": "CSV delimiter: `,` or `;`."
         },
         "list": {
          "type": "string",
          "description": "`sheets`: only list the sheets."
         },
         "data": {
          "type": "array",
          "items": {},
          "description": "Writing: array of objects or arrays for one sheet; the answer is an .xlsx file."
         },
         "sheets": {
          "type": "object",
          "description": "Writing: `{\"Sheet name\": [rows]}`, up to 20 sheets."
         },
         "filename": {
          "type": "string",
          "default": "data",
          "description": "Name of the generated file (without .xlsx)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sheet": {
           "type": "string"
          },
          "sheets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "hidden": {
              "type": "boolean"
             }
            }
           }
          },
          "rows": {
           "type": "number"
          },
          "columns": {
           "type": "number"
          },
          "headers": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "truncated": {
           "type": "boolean"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "Họ tên": {
              "type": "string"
             },
             "Tuổi": {
              "type": "number"
             },
             "Ngày mua": {
              "type": "string"
             },
             "VIP": {
              "type": "boolean"
             }
            }
           }
          }
         }
        },
        "example": {
         "sheet": "Khách hàng",
         "sheets": [
          {
           "index": 0,
           "name": "Khách hàng",
           "hidden": false
          }
         ],
         "rows": 2,
         "columns": 4,
         "headers": [
          "Họ tên",
          "Tuổi",
          "Ngày mua",
          "VIP"
         ],
         "truncated": false,
         "data": [
          {
           "Họ tên": "Nguyễn Văn An",
           "Tuổi": 30,
           "Ngày mua": "2026-11-11",
           "VIP": true
          },
          {
           "Họ tên": "Trần Thị Bình",
           "Tuổi": 25,
           "Ngày mua": "2026-01-02",
           "VIP": false
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/docx-convert": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Word to Markdown / HTML",
    "description": "The DOCX converter reads a Word document and rewrites its content as Markdown (default), clean HTML (`format=html`, no inline styles) or plain text. Headings come from the Word heading styles (Title, Heading 1–6), bold and italic runs become `bold` / `_italic_`, hyperlinks keep their URL, bulleted and numbered lists keep their nesting and numbering, and tables become Markdown or HTML tables.\n\nBesides `content`, the answer lists the `headings` (an outline of the document), the title and author from the document properties, and `stats` (paragraphs, list items, tables, words, characters), handy to check an upload or to index the text in a search engine.\n\nImages, comments, headers and footers and tracked changes are not converted. Old `.doc` files are not supported: save them as `.docx` first. Files are processed in memory within the file size of your plan and never stored.\n\nDocs: https://apibox.io.vn/docs/docx-convert/",
    "operationId": "docxConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/docx-convert/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "format": {
          "type": "string",
          "default": "markdown",
          "description": "`markdown`, `html` or `text`."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .docx file (multipart, raw body or `file_base64`)."
         },
         "format": {
          "type": "string",
          "default": "markdown",
          "description": "`markdown`, `html` or `text`."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "author": {
           "type": "string"
          },
          "modified": {},
          "content": {
           "type": "string"
          },
          "headings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "level": {
              "type": "number"
             },
             "text": {
              "type": "string"
             }
            }
           }
          },
          "stats": {
           "type": "object",
           "properties": {
            "paragraphs": {
             "type": "number"
            },
            "list_items": {
             "type": "number"
            },
            "tables": {
             "type": "number"
            },
            "words": {
             "type": "number"
            },
            "characters": {
             "type": "number"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "format": "markdown",
         "title": "HĐ mẫu",
         "author": "APIBox",
         "modified": null,
         "content": "# Hợp đồng dịch vụ\n\n# Điều 1. Phạm vi\n\nBên A **cung cấp** dịch vụ _API_ cho Bên B.\n\n[Xem tài liệu](https://apibox.io.vn/docs/)\n\n1. Bước một\n2. Bước hai\n   1. Chi tiết a\n\n- Điểm chấm\n\n| Gói | Giá |\n| --- | --- |\n| Pro | 15 USD |\n\nHết.",
         "headings": [
          {
           "level": 1,
           "text": "Hợp đồng dịch vụ"
          },
          {
           "level": 1,
           "text": "Điều 1. Phạm vi"
          }
         ],
         "stats": {
          "paragraphs": 3,
          "list_items": 4,
          "tables": 1,
          "words": 40,
          "characters": 160
         },
         "note": "Images, comments, headers / footers and tracked changes are not converted."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pdf-tools": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "PDF Tools",
    "description": "One endpoint, several `action`s. `merge` joins up to 20 PDFs in order (multipart `file1`, `file2`… or a `files_base64` array). `extract` builds a new PDF from `pages` such as `1-3,5,8-last` (in the order given, so `3,1` reorders). `split` cuts the document every N pages (`every`) or by ranges (`ranges=1-3;4-6`) and returns a ZIP of the parts. `rotate` turns pages by 90, 180 or 270 degrees. `info` (the default) returns the page count, title, producer and page size.\n\n`watermark` draws a semi-transparent diagonal text (`text`, `opacity` 0.03–1, default 0.15) across each page, sized to the page; `page_numbers` writes labels such as `Trang {n}/{total}` (`format`, `position` top / bottom + left / center / right, `start`). Both use the Be Vietnam Pro font, so “BẢN NHÁP” or “Trang 1/5” render with correct diacritics. Every action except `merge` accepts `pages` to work on part of the document.\n\nThe answer is the resulting PDF (or ZIP for `split`, JSON for `info`). Password-protected PDFs are refused; files are processed in memory within the file size of your plan.\n\nDocs: https://apibox.io.vn/docs/pdf-tools/",
    "operationId": "pdfToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-tools/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "info",
          "description": "`merge`, `extract`, `split`, `rotate`, `watermark`, `page_numbers` or `info`."
         },
         "pages": {
          "type": "string",
          "description": "Pages, e.g. `1-3,5,8-last`. Required for `extract`; for rotate / watermark / page_numbers it limits the pages (default: all)."
         },
         "every": {
          "type": "number",
          "default": 1,
          "description": "`split`: pages per part."
         },
         "ranges": {
          "type": "string",
          "description": "`split`: explicit parts separated by `;`, e.g. `1-3;4-6` (max 200 parts)."
         },
         "angle": {
          "type": "number",
          "default": 90,
          "description": "`rotate`: 90, 180 or 270 (-90 also accepted)."
         },
         "text": {
          "type": "string",
          "description": "`watermark`: the text (required, max 100 characters)."
         },
         "opacity": {
          "type": "number",
          "default": 0.15,
          "description": "`watermark`: 0.03–1."
         },
         "format": {
          "type": "string",
          "default": "{n} / {total}",
          "description": "`page_numbers`: label with `{n}` and `{total}`."
         },
         "position": {
          "type": "string",
          "default": "bottom-center",
          "description": "`page_numbers`: `top-` or `bottom-` + `left`, `center`, `right`."
         },
         "start": {
          "type": "number",
          "default": 1,
          "description": "`page_numbers`: first number."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "info",
          "description": "`merge`, `extract`, `split`, `rotate`, `watermark`, `page_numbers` or `info`."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The PDF (multipart, raw body or `file_base64`). For `merge`: `file1`, `file2`… (up to `file10`) or `files_base64` (array, up to 20)."
         },
         "pages": {
          "type": "string",
          "description": "Pages, e.g. `1-3,5,8-last`. Required for `extract`; for rotate / watermark / page_numbers it limits the pages (default: all)."
         },
         "every": {
          "type": "number",
          "default": 1,
          "description": "`split`: pages per part."
         },
         "ranges": {
          "type": "string",
          "description": "`split`: explicit parts separated by `;`, e.g. `1-3;4-6` (max 200 parts)."
         },
         "angle": {
          "type": "number",
          "default": 90,
          "description": "`rotate`: 90, 180 or 270 (-90 also accepted)."
         },
         "text": {
          "type": "string",
          "description": "`watermark`: the text (required, max 100 characters)."
         },
         "opacity": {
          "type": "number",
          "default": 0.15,
          "description": "`watermark`: 0.03–1."
         },
         "format": {
          "type": "string",
          "default": "{n} / {total}",
          "description": "`page_numbers`: label with `{n}` and `{total}`."
         },
         "position": {
          "type": "string",
          "default": "bottom-center",
          "description": "`page_numbers`: `top-` or `bottom-` + `left`, `center`, `right`."
         },
         "start": {
          "type": "number",
          "default": 1,
          "description": "`page_numbers`: first number."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "pages": {
           "type": "number"
          },
          "title": {
           "type": "string"
          },
          "author": {},
          "producer": {
           "type": "string"
          },
          "page_size_pt": {
           "type": "object",
           "properties": {
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "actions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "pages": 1,
         "title": "Báo giá",
         "author": null,
         "producer": "APIBox md-pdf",
         "page_size_pt": {
          "width": 595,
          "height": 842
         },
         "actions": [
          "merge",
          "extract",
          "split",
          "rotate",
          "watermark",
          "page_numbers",
          "info"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pdf-text": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "PDF to Text",
    "description": "The PDF text API reads the text layer of a PDF with the PDF.js engine and returns it page by page (`pages: [{ page, text }]`) or as one string with `merge=true`. Vietnamese text produced by Word, LibreOffice, invoicing software or our own PDF APIs is returned as proper Unicode. `pages=2-4` restricts the output to some pages.\n\nThe answer also contains the document information (title, author, creator, producer), the total page count and character and word counts. When pages have no text at all, a `note` warns that the file looks scanned: such PDFs are images and need OCR, which this API does not do.\n\nUp to 500 pages are read per call by default (`max_pages`, at most 2,000), within the file size of your plan. Password-protected PDFs are refused. Layout (columns, tables) is flattened to lines of text.\n\nDocs: https://apibox.io.vn/docs/pdf-text/",
    "operationId": "pdfTextPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-text/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pages": {
          "type": "string",
          "description": "Pages to return, e.g. `1-3,5`."
         },
         "merge": {
          "type": "boolean",
          "default": false,
          "description": "`true`: one `text` string instead of `pages`."
         },
         "max_pages": {
          "type": "number",
          "default": 500,
          "description": "Refuse longer documents unless `pages` is given (1–2000)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The PDF (multipart, raw body or `file_base64`)."
         },
         "pages": {
          "type": "string",
          "description": "Pages to return, e.g. `1-3,5`."
         },
         "merge": {
          "type": "boolean",
          "default": false,
          "description": "`true`: one `text` string instead of `pages`."
         },
         "max_pages": {
          "type": "number",
          "default": 500,
          "description": "Refuse longer documents unless `pages` is given (1–2000)."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "pages_total": {
           "type": "number"
          },
          "pages_returned": {
           "type": "number"
          },
          "info": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "author": {},
            "creator": {
             "type": "string"
            },
            "producer": {
             "type": "string"
            }
           }
          },
          "characters": {
           "type": "number"
          },
          "words": {
           "type": "number"
          },
          "pages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "page": {
              "type": "number"
             },
             "text": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "pages_total": 1,
         "pages_returned": 1,
         "info": {
          "title": "Báo giá",
          "author": null,
          "creator": "apibox.io.vn",
          "producer": "APIBox md-pdf"
         },
         "characters": 137,
         "words": 32,
         "pages": [
          {
           "page": 1,
           "text": "Báo giá dịch vụ\nKính gửi Quý khách,\nCông ty xin gửi báo giá gói API Pro: 15 USD / tháng.\nĐiều khoản\nThanh toán trong 7 ngày.\n1 / 1Báo giá"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/sql-format": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "SQL Formatter",
    "description": "The SQL formatter rewrites a query with one clause per line, indented column lists and joins, and a consistent case for keywords, data types and functions (`keyword_case` upper, lower or preserve). Choose the `dialect` so its syntax is understood: `mysql`, `mariadb`, `postgresql`, `sqlite`, `tsql` (SQL Server), `plsql` (Oracle), `bigquery`, `snowflake`, `redshift`, `spark`, `db2`, `trino`, `clickhouse` or standard `sql`.\n\nTune the layout with `indent` (1–8 spaces) or `tabs=true`, `expression_width` (how long a parenthesised expression may stay on one line), `logical_operator_newline` (`before` or `after` AND / OR) and `lines_between_queries` for scripts with several statements. String literals and comments are kept.\n\n`minify=true` does the opposite: comments are removed and whitespace outside quotes collapsed, for logs or query strings. A query that cannot be parsed returns `invalid_sql` with the position of the problem.\n\nDocs: https://apibox.io.vn/docs/sql-format/",
    "operationId": "sqlFormatPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sql-format/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "sql": {
          "type": "string",
          "description": "The SQL (max 500,000 characters)."
         },
         "dialect": {
          "type": "string",
          "default": "sql",
          "description": "`sql`, `mysql`, `mariadb`, `postgresql`, `sqlite`, `tsql`, `plsql`, `bigquery`, `snowflake`, `redshift`, `spark`, `db2`, `trino`, `clickhouse`."
         },
         "keyword_case": {
          "type": "string",
          "default": "upper",
          "description": "`upper`, `lower` or `preserve`."
         },
         "indent": {
          "type": "number",
          "default": 2,
          "description": "Spaces per level (1–8)."
         },
         "tabs": {
          "type": "boolean",
          "default": false,
          "description": "Indent with tabs."
         },
         "expression_width": {
          "type": "number",
          "default": 50,
          "description": "Max width of a parenthesised expression on one line (20–200)."
         },
         "logical_operator_newline": {
          "type": "string",
          "default": "before",
          "description": "Line break `before` or `after` AND / OR."
         },
         "lines_between_queries": {
          "type": "number",
          "default": 1,
          "description": "Blank lines between statements (0–5)."
         },
         "minify": {
          "type": "boolean",
          "default": false,
          "description": "Compact the SQL instead of formatting it."
         }
        },
        "required": [
         "sql"
        ]
       },
       "example": {
        "sql": "select u.id, u.name, count(o.id) as orders from users u left join orders o on o.user_id = u.id where u.city = 'Hà Nội' and o.total > 100000 group by u.id, u.name order by orders desc limit 10",
        "dialect": "postgresql"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "dialect": {
           "type": "string"
          },
          "formatted": {
           "type": "string"
          },
          "statements": {
           "type": "number"
          },
          "length": {
           "type": "object",
           "properties": {
            "input": {
             "type": "number"
            },
            "output": {
             "type": "number"
            }
           }
          }
         }
        },
        "example": {
         "dialect": "postgresql",
         "formatted": "SELECT\n  u.id,\n  u.name,\n  COUNT(o.id) AS orders\nFROM\n  users u\n  LEFT JOIN orders o ON o.user_id = u.id\nWHERE\n  u.city = 'Hà Nội'\n  AND o.total > 100000\nGROUP BY\n  u.id,\n  u.name\nORDER BY\n  orders DESC\nLIMIT\n  10",
         "statements": 1,
         "length": {
          "input": 191,
          "output": 213
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "SQL Formatter",
    "description": "The SQL formatter rewrites a query with one clause per line, indented column lists and joins, and a consistent case for keywords, data types and functions (`keyword_case` upper, lower or preserve). Choose the `dialect` so its syntax is understood: `mysql`, `mariadb`, `postgresql`, `sqlite`, `tsql` (SQL Server), `plsql` (Oracle), `bigquery`, `snowflake`, `redshift`, `spark`, `db2`, `trino`, `clickhouse` or standard `sql`.\n\nTune the layout with `indent` (1–8 spaces) or `tabs=true`, `expression_width` (how long a parenthesised expression may stay on one line), `logical_operator_newline` (`before` or `after` AND / OR) and `lines_between_queries` for scripts with several statements. String literals and comments are kept.\n\n`minify=true` does the opposite: comments are removed and whitespace outside quotes collapsed, for logs or query strings. A query that cannot be parsed returns `invalid_sql` with the position of the problem.\n\nDocs: https://apibox.io.vn/docs/sql-format/",
    "operationId": "sqlFormatGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sql-format/"
    },
    "parameters": [
     {
      "name": "sql",
      "in": "query",
      "required": true,
      "description": "The SQL (max 500,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "dialect",
      "in": "query",
      "required": false,
      "description": "`sql`, `mysql`, `mariadb`, `postgresql`, `sqlite`, `tsql`, `plsql`, `bigquery`, `snowflake`, `redshift`, `spark`, `db2`, `trino`, `clickhouse`.",
      "schema": {
       "type": "string",
       "default": "sql"
      }
     },
     {
      "name": "keyword_case",
      "in": "query",
      "required": false,
      "description": "`upper`, `lower` or `preserve`.",
      "schema": {
       "type": "string",
       "default": "upper"
      }
     },
     {
      "name": "indent",
      "in": "query",
      "required": false,
      "description": "Spaces per level (1–8).",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "tabs",
      "in": "query",
      "required": false,
      "description": "Indent with tabs.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "expression_width",
      "in": "query",
      "required": false,
      "description": "Max width of a parenthesised expression on one line (20–200).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "logical_operator_newline",
      "in": "query",
      "required": false,
      "description": "Line break `before` or `after` AND / OR.",
      "schema": {
       "type": "string",
       "default": "before"
      }
     },
     {
      "name": "lines_between_queries",
      "in": "query",
      "required": false,
      "description": "Blank lines between statements (0–5).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "minify",
      "in": "query",
      "required": false,
      "description": "Compact the SQL instead of formatting it.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "dialect": {
           "type": "string"
          },
          "formatted": {
           "type": "string"
          },
          "statements": {
           "type": "number"
          },
          "length": {
           "type": "object",
           "properties": {
            "input": {
             "type": "number"
            },
            "output": {
             "type": "number"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/minify": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "JS / CSS / HTML Minifier",
    "description": "The minifier shrinks front-end code for production. JavaScript goes through Terser (two compression passes, local names mangled, `module=true` for ES modules), CSS through CSSO (merges rules, shortens colours and values, `restructure=false` for a safer pass), JSON is re-serialised without whitespace, and HTML loses comments and whitespace between block tags while its inline `<script>` and `<style>` blocks are minified too.\n\nLeave `type` empty to detect the language from the code, or set `js`, `css`, `html` or `json`. License comments (`/*! … */`, `@license`, `@preserve`) are kept. In HTML, `<pre>` and `<textarea>` content is left untouched, one space is kept between inline tags, and `minify_js=false` / `minify_css=false` leave embedded code as it is.\n\nThe answer gives the minified code and `size`: input and output bytes, the percentage saved and gzip sizes, the number that matters for download time. Syntax errors return `parse_error` with the line and column.\n\nDocs: https://apibox.io.vn/docs/minify/",
    "operationId": "minifyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/minify/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "description": "The code to minify (max 2,000,000 characters)."
         },
         "type": {
          "type": "string",
          "description": "`js`, `css`, `html` or `json` (default: detected)."
         },
         "mangle": {
          "type": "boolean",
          "default": true,
          "description": "JS: shorten local names."
         },
         "module": {
          "type": "boolean",
          "default": false,
          "description": "JS: treat the code as an ES module."
         },
         "restructure": {
          "type": "boolean",
          "default": true,
          "description": "CSS: merge and move rules."
         },
         "minify_js": {
          "type": "boolean",
          "default": true,
          "description": "HTML: minify inline scripts."
         },
         "minify_css": {
          "type": "boolean",
          "default": true,
          "description": "HTML: minify `<style>` and `style=\"\"`."
         }
        },
        "required": [
         "code"
        ]
       },
       "example": {
        "code": "function tinhTong(soThuNhat, soThuHai) {\n  // cộng hai số\n  const tong = soThuNhat + soThuHai;\n  return tong;\n}\nconsole.log(tinhTong(1, 2));"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "minified": {
           "type": "string"
          },
          "size": {
           "type": "object",
           "properties": {
            "input": {
             "type": "number"
            },
            "output": {
             "type": "number"
            },
            "saved_percent": {
             "type": "number"
            },
            "gzip_input": {
             "type": "number"
            },
            "gzip_output": {
             "type": "number"
            }
           }
          }
         }
        },
        "example": {
         "type": "js",
         "minified": "function tinhTong(n,o){return n+o}console.log(tinhTong(1,2));",
         "size": {
          "input": 144,
          "output": 61,
          "saved_percent": 57.6,
          "gzip_input": 132,
          "gzip_output": 74
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/sun-times": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Sunrise & Sunset Times",
    "description": "The sun times API computes, for a date, the sunrise and sunset, solar noon and the sun’s elevation at noon, the day length, civil, nautical and astronomical twilight, and the golden hour (sun between −4° and +6°, the soft light photographers look for), plus the moon phase in Vietnamese and English, its illumination and the next new and full moon.\n\nGive a province (`province=hn`, a name such as `Đà Nẵng`, a 2-digit code, or in the path `/v1/sun-times/hcm`) or any `lat` and `lon`. Times are local, UTC+7 by default (`tz` changes it), and `days` (up to 31) returns a series starting at `date` (default: today in Vietnam).\n\nEverything is calculated with the NOAA solar equations, accurate to about a minute, without any external service, so answers are instant. Near the poles the sunrise is `null` when the sun does not rise.\n\nDocs: https://apibox.io.vn/docs/sun-times/",
    "operationId": "sunTimesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sun-times/"
    },
    "parameters": [
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province code or name (`hn`, `hcm`, `Đà Nẵng`, `48`), as `?province=` or in the path. Required unless `lat` / `lon`.",
      "schema": {
       "type": "string"
      },
      "example": "Hà Nội"
     },
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "`YYYY-MM-DD` (default: today in Vietnam).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "description": "Number of days (1–31); more than 1 returns a `days` array.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "tz",
      "in": "query",
      "required": false,
      "description": "UTC offset of the returned times, in hours.",
      "schema": {
       "type": "number",
       "default": 7
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "location": {
           "type": "object",
           "properties": {
            "lat": {
             "type": "number"
            },
            "lon": {
             "type": "number"
            },
            "province_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "location": {
             "type": "string"
            }
           }
          },
          "timezone_offset": {
           "type": "number"
          },
          "date": {
           "type": "string"
          },
          "sunrise": {
           "type": "string"
          },
          "sunset": {
           "type": "string"
          },
          "solar_noon": {
           "type": "string"
          },
          "day_length": {
           "type": "string"
          },
          "day_length_hours": {
           "type": "number"
          },
          "solar_noon_elevation": {
           "type": "number"
          },
          "civil_twilight": {
           "type": "object",
           "properties": {
            "dawn": {
             "type": "string"
            },
            "dusk": {
             "type": "string"
            }
           }
          },
          "nautical_twilight": {
           "type": "object",
           "properties": {
            "dawn": {
             "type": "string"
            },
            "dusk": {
             "type": "string"
            }
           }
          },
          "astronomical_twilight": {
           "type": "object",
           "properties": {
            "dawn": {
             "type": "string"
            },
            "dusk": {
             "type": "string"
            }
           }
          },
          "golden_hour": {
           "type": "object",
           "properties": {
            "morning": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "evening": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "moon": {
           "type": "object",
           "properties": {
            "phase_vi": {
             "type": "string"
            },
            "phase_en": {
             "type": "string"
            },
            "age_days": {
             "type": "number"
            },
            "illumination": {
             "type": "number"
            },
            "next_new_moon": {
             "type": "string"
            },
            "next_full_moon": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "location": {
          "lat": 21.0285,
          "lon": 105.8542,
          "province_code": "01",
          "province": "Thành phố Hà Nội",
          "location": "Hà Nội"
         },
         "timezone_offset": 7,
         "date": "2026-11-11",
         "sunrise": "06:04",
         "sunset": "17:17",
         "solar_noon": "11:40",
         "day_length": "11h13",
         "day_length_hours": 11.21,
         "solar_noon_elevation": 51.7,
         "civil_twilight": {
          "dawn": "05:41",
          "dusk": "17:40"
         },
         "nautical_twilight": {
          "dawn": "05:14",
          "dusk": "18:07"
         },
         "astronomical_twilight": {
          "dawn": "04:48",
          "dusk": "18:33"
         },
         "golden_hour": {
          "morning": [
           "05:50",
           "06:35"
          ],
          "evening": [
           "16:46",
           "17:31"
          ]
         },
         "moon": {
          "phase_vi": "Trăng mới (sóc)",
          "phase_en": "New moon",
          "age_days": 1.5,
          "illumination": 0.024,
          "next_new_moon": "2026-12-09",
          "next_full_moon": "2026-11-24"
         },
         "note": "Times in local time (UTC+7 by default), accurate to about one minute; golden hour = sun between −4° and +6°."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-spellcheck": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Spell Checker",
    "description": "The Vietnamese spell checker reads the text syllable by syllable. It reports syllables that do not exist in Vietnamese (`phát triễn` → triển), breaches of the spelling rules (`kon` → con, `ghà` → gà, `ngiệp` → nghiệp, a stop consonant with the wrong tone), and a list of frequent real-word mistakes such as `xử dụng`, `sử lý`, `nghành`, `chuẩn đoán`, `bổ xung` or `sát nhập`.\n\nTypography is checked too: spaces before punctuation, missing spaces after a comma, double spaces and a lowercase letter at the start of a sentence. Every issue has its position (`start`, `end`), a type, a severity (error, warning, info), messages in Vietnamese and English and suggestions; `corrected` is the text with the first suggestion of each error applied. Both tone-mark styles (hoà / hòa) are accepted, English words and acronyms are left alone, and `ignore` lists words to skip.\n\nIt works from a syllable inventory and rules, without an AI model, so it is fast and predictable; grammar and word choice (dành / giành) are not checked.\n\nDocs: https://apibox.io.vn/docs/vn-spellcheck/",
    "operationId": "vnSpellcheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-spellcheck/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to check (max 50,000 characters)."
         },
         "ignore": {
          "type": "string",
          "description": "Comma-separated words to skip (brand names, jargon)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Chúng tôi xử dụng công nghệ để sử lý dữ liệu ,giúp doanh nghiệp phát triễn. kết quả rất tốt."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "issues": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "text": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message_vi": {
              "type": "string"
             },
             "message_en": {
              "type": "string"
             },
             "suggestions": {
              "type": "array"
             }
            }
           }
          },
          "corrected": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "errors": 3,
         "warnings": 0,
         "info": 2,
         "issues": [
          {
           "start": 10,
           "end": 17,
           "text": "xử dụng",
           "type": "common_misspelling",
           "severity": "error",
           "message_vi": "Viết đúng là \"sử dụng\"",
           "message_en": "The correct spelling is \"sử dụng\"",
           "suggestions": [
            "sử dụng"
           ]
          },
          {
           "start": 31,
           "end": 36,
           "text": "sử lý",
           "type": "common_misspelling",
           "severity": "error",
           "message_vi": "Viết đúng là \"xử lý\"",
           "message_en": "The correct spelling is \"xử lý\"",
           "suggestions": [
            "xử lý"
           ]
          },
          {
           "start": 44,
           "end": 46,
           "text": " ,",
           "type": "punctuation",
           "severity": "info",
           "message_vi": "Không đặt dấu cách trước dấu câu",
           "message_en": "No space before punctuation",
           "suggestions": [
            ", "
           ]
          },
          {
           "start": 69,
           "end": 74,
           "text": "triễn",
           "type": "unknown_syllable",
           "severity": "error",
           "message_vi": "Âm tiết không tồn tại trong tiếng Việt",
           "message_en": "Not a Vietnamese syllable",
           "suggestions": [
            "triển",
            "triền",
            "tiền"
           ]
          },
          {
           "start": 76,
           "end": 77,
           "text": "k",
           "type": "capitalization",
           "severity": "info",
           "message_vi": "Viết hoa chữ cái đầu câu",
           "message_en": "Capitalise the first letter of the sentence",
           "suggestions": [
            "K"
           ]
          }
         ],
         "corrected": "Chúng tôi sử dụng công nghệ để xử lý dữ liệu, giúp doanh nghiệp phát triển. Kết quả rất tốt.",
         "note": "Spelling check: syllables, spelling rules and frequent mistakes. Grammar and word choice (e.g. dành / giành) are not checked."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Spell Checker",
    "description": "The Vietnamese spell checker reads the text syllable by syllable. It reports syllables that do not exist in Vietnamese (`phát triễn` → triển), breaches of the spelling rules (`kon` → con, `ghà` → gà, `ngiệp` → nghiệp, a stop consonant with the wrong tone), and a list of frequent real-word mistakes such as `xử dụng`, `sử lý`, `nghành`, `chuẩn đoán`, `bổ xung` or `sát nhập`.\n\nTypography is checked too: spaces before punctuation, missing spaces after a comma, double spaces and a lowercase letter at the start of a sentence. Every issue has its position (`start`, `end`), a type, a severity (error, warning, info), messages in Vietnamese and English and suggestions; `corrected` is the text with the first suggestion of each error applied. Both tone-mark styles (hoà / hòa) are accepted, English words and acronyms are left alone, and `ignore` lists words to skip.\n\nIt works from a syllable inventory and rules, without an AI model, so it is fast and predictable; grammar and word choice (dành / giành) are not checked.\n\nDocs: https://apibox.io.vn/docs/vn-spellcheck/",
    "operationId": "vnSpellcheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-spellcheck/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Text to check (max 50,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ignore",
      "in": "query",
      "required": false,
      "description": "Comma-separated words to skip (brand names, jargon).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "issues": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "text": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message_vi": {
              "type": "string"
             },
             "message_en": {
              "type": "string"
             },
             "suggestions": {
              "type": "array"
             }
            }
           }
          },
          "corrected": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-diacritics": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Accent Restoration",
    "description": "The accent restoration API turns Vietnamese typed without diacritics, common in SMS, chats, old databases and product names, back into proper Vietnamese: `Ngan hang Nha nuoc vua giam lai suat` → `Ngân hàng Nhà nước vừa giảm lãi suất`. Each run of unaccented words is solved as a whole with dynamic programming: the API prefers sequences that form dictionary words of two to four syllables, then the most frequent syllables.\n\nCapitalisation is kept (`Ha Noi` → `Hà Nội`, `CONG TY` → `CÔNG TY`), punctuation and numbers are left alone, and words that are not Vietnamese stay unchanged. `alternatives=1–5` lists, for every ambiguous syllable, the other likely readings, so an interface can let the user pick (ban: bạn / bán / bàn).\n\nIt runs on a word list and frequency tables, without an AI model, in a few milliseconds. Results are good for common phrases and names; short or unusual sentences can need a human check. Text that is already partly accented is fine: syllables typed with accents are kept as they are and help choose the accents of their neighbours.\n\nDocs: https://apibox.io.vn/docs/vn-diacritics/",
    "operationId": "vnDiacriticsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-diacritics/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Unaccented Vietnamese text (max 20,000 characters)."
         },
         "alternatives": {
          "type": "number",
          "default": 0,
          "description": "Other readings to list per ambiguous syllable (0–5)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Ngan hang Nha nuoc vua giam lai suat dieu hanh",
        "alternatives": 2
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "syllables_changed": {
           "type": "number"
          },
          "ambiguous_syllables": {
           "type": "number"
          },
          "alternatives": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "word": {
              "type": "string"
             },
             "position": {
              "type": "number"
             },
             "options": {
              "type": "array"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "Ngan hang Nha nuoc vua giam lai suat dieu hanh",
         "result": "Ngân hàng Nhà nước vừa giảm lãi suất điều hành",
         "syllables_changed": 10,
         "ambiguous_syllables": 8,
         "alternatives": [
          {
           "word": "Ngân",
           "position": 0,
           "options": [
            "ngân",
            "ngắn",
            "ngăn"
           ]
          },
          {
           "word": "vừa",
           "position": 19,
           "options": [
            "vừa",
            "vua",
            "vựa"
           ]
          },
          {
           "word": "lãi",
           "position": 28,
           "options": [
            "lai",
            "lại",
            "lãi"
           ]
          }
         ],
         "note": "Accents are chosen from a dictionary and syllable frequencies; ambiguous words (ban: bạn / bán / bàn) may need a human check."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Accent Restoration",
    "description": "The accent restoration API turns Vietnamese typed without diacritics, common in SMS, chats, old databases and product names, back into proper Vietnamese: `Ngan hang Nha nuoc vua giam lai suat` → `Ngân hàng Nhà nước vừa giảm lãi suất`. Each run of unaccented words is solved as a whole with dynamic programming: the API prefers sequences that form dictionary words of two to four syllables, then the most frequent syllables.\n\nCapitalisation is kept (`Ha Noi` → `Hà Nội`, `CONG TY` → `CÔNG TY`), punctuation and numbers are left alone, and words that are not Vietnamese stay unchanged. `alternatives=1–5` lists, for every ambiguous syllable, the other likely readings, so an interface can let the user pick (ban: bạn / bán / bàn).\n\nIt runs on a word list and frequency tables, without an AI model, in a few milliseconds. Results are good for common phrases and names; short or unusual sentences can need a human check. Text that is already partly accented is fine: syllables typed with accents are kept as they are and help choose the accents of their neighbours.\n\nDocs: https://apibox.io.vn/docs/vn-diacritics/",
    "operationId": "vnDiacriticsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-diacritics/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Unaccented Vietnamese text (max 20,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "alternatives",
      "in": "query",
      "required": false,
      "description": "Other readings to list per ambiguous syllable (0–5).",
      "schema": {
       "type": "number",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "syllables_changed": {
           "type": "number"
          },
          "ambiguous_syllables": {
           "type": "number"
          },
          "alternatives": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "word": {
              "type": "string"
             },
             "position": {
              "type": "number"
             },
             "options": {
              "type": "array"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-good-days": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Good Days (Almanac)",
    "description": "The good-days API applies the rules of the traditional Vietnamese almanac (lịch vạn niên) to a date: the day’s can chi and lunar date, its guardian deity among the 12 (hoàng đạo = auspicious, hắc đạo = inauspicious), its trực (one of 12 day officers, with what it suits and what it does not), its mansion among the 28 (nhị thập bát tú), the classic days to avoid (tam nương, nguyệt kỵ, sát chủ, thọ tử, Dương Công kỵ nhật), the clashing ages (tuổi xung) and the six lucky two-hour periods (giờ hoàng đạo).\n\nAdd an `activity` (cuoi-hoi wedding, khai-truong opening, dong-tho groundbreaking, xuat-hanh travel, nhap-trach moving house, ky-ket contract, mua-xe buying a car, nhap-hoc school) and a lunar `birth_year` to get a `score` and a `verdict` (tốt, bình thường, xấu) that take the activity and a personal clash into account. With `from` / `to` (up to 366 days) it scans a period, `only_good=true` keeps the good days and `sort=score` ranks them.\n\nMonths follow the solar terms (tiết khí) for hoàng đạo and trực, and the lunar calendar for the days to avoid, as in printed almanacs. Schools differ: the result is a cultural reference, not advice.\n\nDocs: https://apibox.io.vn/docs/vn-good-days/",
    "operationId": "vnGoodDaysGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-good-days/"
    },
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "`YYYY-MM-DD` (default: today in Vietnam).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Start of a period to scan (`YYYY-MM-DD`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "End of the period (default: from + 29 days; at most 366 days).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "activity",
      "in": "query",
      "required": false,
      "description": "`cuoi-hoi`, `khai-truong`, `dong-tho`, `xuat-hanh`, `nhap-trach`, `ky-ket`, `mua-xe`, `nhap-hoc` (English aliases: wedding, opening, travel, moving…).",
      "schema": {
       "type": "string"
      },
      "example": "khai-truong"
     },
     {
      "name": "birth_year",
      "in": "query",
      "required": false,
      "description": "Lunar year of birth (1900–2100) to check clashes.",
      "schema": {
       "type": "number"
      },
      "example": 1990
     },
     {
      "name": "only_good",
      "in": "query",
      "required": false,
      "description": "Period: keep only days with verdict “tốt”.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`score`: best days first.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Period: maximum days returned (1–366).",
      "schema": {
       "type": "number",
       "default": 100
      }
     },
     {
      "name": "tho_tu",
      "in": "query",
      "required": false,
      "description": "`chi`: thọ tử by earthly branch only (some almanacs).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "weekday": {
           "type": "string"
          },
          "weekday_vi": {
           "type": "string"
          },
          "lunar": {
           "type": "object",
           "properties": {
            "day": {
             "type": "number"
            },
            "month": {
             "type": "number"
            },
            "year": {
             "type": "number"
            },
            "leap": {
             "type": "boolean"
            },
            "text": {
             "type": "string"
            }
           }
          },
          "can_chi_day": {
           "type": "string"
          },
          "hoang_dao": {
           "type": "object",
           "properties": {
            "than": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "good": {
             "type": "boolean"
            }
           }
          },
          "truc": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "good_for": {
             "type": "string"
            },
            "bad_for": {
             "type": "string"
            }
           }
          },
          "sao": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "good": {
             "type": "boolean"
            }
           }
          },
          "bad_days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "note": {
              "type": "string"
             }
            }
           }
          },
          "clashing_ages": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "clashing_chi": {
           "type": "string"
          },
          "lucky_hours": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "chi": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             }
            }
           }
          },
          "personal": {
           "type": "object",
           "properties": {
            "birth_year": {
             "type": "number"
            },
            "can_chi": {
             "type": "string"
            },
            "clash": {}
           }
          },
          "activity": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "truc_fit": {
             "type": "string"
            }
           }
          },
          "score": {
           "type": "number"
          },
          "verdict": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "weekday": "Wednesday",
         "weekday_vi": "Thứ Tư",
         "lunar": {
          "day": 3,
          "month": 10,
          "year": 2026,
          "leap": false,
          "text": "03/10/2026"
         },
         "can_chi_day": "Kỷ Sửu",
         "hoang_dao": {
          "than": "Ngọc Đường",
          "type": "hoàng đạo",
          "good": true
         },
         "truc": {
          "name": "Mãn",
          "good_for": "cầu tài, cúng tế, giao dịch, nhập kho, khai trương",
          "bad_for": "nhậm chức, kiện tụng, an táng"
         },
         "sao": {
          "name": "Chẩn",
          "good": true
         },
         "bad_days": [
          {
           "name": "Tam nương",
           "severity": "hard",
           "note": "Ngày 3, 7, 13, 18, 22, 27 âm lịch"
          }
         ],
         "clashing_ages": [
          "Quý Mùi",
          "Ất Mùi"
         ],
         "clashing_chi": "Mùi",
         "lucky_hours": [
          {
           "chi": "Dần",
           "from": "03:00",
           "to": "05:00"
          },
          {
           "chi": "Mão",
           "from": "05:00",
           "to": "07:00"
          },
          {
           "chi": "Tỵ",
           "from": "09:00",
           "to": "11:00"
          },
          {
           "chi": "Thân",
           "from": "15:00",
           "to": "17:00"
          },
          {
           "chi": "Tuất",
           "from": "19:00",
           "to": "21:00"
          },
          {
           "chi": "Hợi",
           "from": "21:00",
           "to": "23:00"
          }
         ],
         "personal": {
          "birth_year": 1990,
          "can_chi": "Canh Ngọ",
          "clash": null
         },
         "activity": {
          "code": "khai-truong",
          "vi": "Khai trương",
          "en": "Business opening",
          "truc_fit": "good"
         },
         "score": 2,
         "verdict": "xấu",
         "note": "Traditional Vietnamese almanac rules (hoàng đạo by solar month / tiết khí, trực by tiết khí, ngày kỵ by lunar month). For cultural reference only; sources and schools differ."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/hs-code/{code}": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam HS Codes & Tariffs",
    "description": "The HS code API serves Vietnam’s import-export nomenclature (AHTN 2022, Thông tư 31/2022/TT-BTC): 11,414 eight-digit tariff lines with their chapters, headings and subheadings. A line gives the Vietnamese and English description, unit, normal and MFN import duty, VAT, export duty, special consumption and environmental tax, the preferential rates of every free trade agreement (ATIGA, ACFTA, CPTPP, EVFTA, UKVFTA, RCEP by partner group…) and the policies attached to the code (licences, specialised inspections). A VAT value such as `8/10` means 10%, reduced to 8% under the VAT-reduction decree.\n\nLook up a code in the path (`/v1/hs-code/8471.30.20`, dots optional) or with `?code=`: 2, 4 and 6-digit codes return the description, hierarchy, children and number of lines. Search with `?q=` in Vietnamese or English (`máy tính xách tay`, `laptop`, `cà phê rang`), with or without accents (accents count when you type them: bia ≠ bìa), or by code prefix (`q=8517`); `level` chooses 2, 4, 6, 8 or any.\n\nData comes from the 2026 “Biểu thuế xuất nhập khẩu” workbook compiled from the customs tariff and published by Trung tâm WTO và Hội nhập – VCCI (trungtamwto.vn), refreshed weekly, with manual overrides for later decrees. It is a lookup aid with no legal value: check the legal texts before declaring goods.\n\nDocs: https://apibox.io.vn/docs/hs-code/",
    "operationId": "hsCodeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/hs-code/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "description": "HS code of 2, 4, 6 or 8 digits, dots optional (`8471.30.20`), in the path or as `?code=`.",
      "schema": {
       "type": "string"
      },
      "example": "8471.30.20"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search words (Vietnamese or English) or a code prefix; required when no code is given.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "Search level: `2`, `4`, `6`, `8` or `any`.",
      "schema": {
       "type": "string",
       "default": "8"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Search results (1–50).",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "level": {
           "type": "number"
          },
          "description_vi": {
           "type": "string"
          },
          "description_en": {
           "type": "string"
          },
          "unit": {
           "type": "string"
          },
          "unit_en": {
           "type": "string"
          },
          "normal_rate": {
           "type": "number"
          },
          "mfn_rate": {
           "type": "number"
          },
          "vat": {
           "type": "string"
          },
          "vat_reduction": {},
          "export_rate": {},
          "special_consumption_tax": {},
          "environmental_tax": {},
          "fta": {
           "type": "object",
           "properties": {
            "ACFTA": {
             "type": "number"
            },
            "ATIGA": {
             "type": "number"
            },
            "AJCEP": {
             "type": "number"
            },
            "VJEPA": {
             "type": "number"
            },
            "AKFTA": {
             "type": "number"
            },
            "AANZFTA": {
             "type": "number"
            },
            "AIFTA": {
             "type": "number"
            },
            "VKFTA": {
             "type": "number"
            },
            "VCFTA": {
             "type": "number"
            },
            "VN-EAEU": {
             "type": "string"
            },
            "CPTPP": {
             "type": "number"
            },
            "AHKFTA": {
             "type": "number"
            },
            "EVFTA": {
             "type": "number"
            },
            "UKVFTA": {
             "type": "number"
            },
            "VN-LAO": {
             "type": "number"
            },
            "VIFTA": {
             "type": "number"
            },
            "RCEPT": {
             "type": "object",
             "properties": {
              "A": {
               "type": "number"
              },
              "B": {
               "type": "number"
              },
              "C": {
               "type": "number"
              },
              "D": {
               "type": "number"
              },
              "E": {
               "type": "number"
              },
              "F": {
               "type": "number"
              }
             }
            }
           }
          },
          "policies": {
           "type": "string"
          },
          "parent": {
           "type": "string"
          },
          "path_vi": {
           "type": "string"
          },
          "path_en": {
           "type": "string"
          },
          "code_formatted": {
           "type": "string"
          },
          "hierarchy": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "level": {
              "type": "number"
             },
             "description_vi": {
              "type": "string"
             },
             "description_en": {
              "type": "string"
             }
            }
           }
          },
          "chapter_98": {
           "type": "array"
          },
          "data_version": {
           "type": "string"
          },
          "tariff_year": {
           "type": "number"
          },
          "source": {
           "type": "string"
          },
          "source_page": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "rcept_groups": {
           "type": "object",
           "properties": {
            "A": {
             "type": "string"
            },
            "B": {
             "type": "string"
            },
            "C": {
             "type": "string"
            },
            "D": {
             "type": "string"
            },
            "E": {
             "type": "string"
            },
            "F": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "code": "84713020",
         "level": 8,
         "description_vi": "Máy tính xách tay kể cả notebook và subnotebook",
         "description_en": "Laptops including notebooks and subnotebooks",
         "unit": "chiếc",
         "unit_en": "unit",
         "normal_rate": 5,
         "mfn_rate": 0,
         "vat": "8/10",
         "vat_reduction": null,
         "export_rate": null,
         "special_consumption_tax": null,
         "environmental_tax": null,
         "fta": {
          "ACFTA": 0,
          "ATIGA": 0,
          "AJCEP": 0,
          "VJEPA": 0,
          "AKFTA": 0,
          "AANZFTA": 0,
          "AIFTA": 0,
          "VKFTA": 0,
          "VCFTA": 0,
          "VN-EAEU": "*",
          "CPTPP": 0,
          "AHKFTA": 0,
          "EVFTA": 0,
          "UKVFTA": 0,
          "VN-LAO": 0,
          "VIFTA": 0,
          "RCEPT": {
           "A": 0,
           "B": 0,
           "C": 0,
           "D": 0,
           "E": 0,
           "F": 0
          }
         },
         "policies": "Hàng tiêu dùng QSD cấp NK (08/2023/TT-BCT - PL1.I); KTCN về hiệu suất năng lượng và dán nhãn năng lượng (1725/QĐ-BCT 2024); SP CNTT ĐQSD cấm NK (11/2018/TT-BTTTT); SPHH lĩnh vực CNTT và VT bắt buộc phải công bố hợp quy (29/2025/TT-BKHCN-PL2)",
         "parent": "847130",
         "path_vi": "Máy xử lý dữ liệu tự động và các khối chức năng của chúng; … > Máy xử lý dữ liệu tự động loại xách tay, có khối lượng không quá 10 kg, … > Máy tính xách tay kể cả notebook và subnotebook",
         "path_en": "Automatic data processing machines and units thereof; … > Portable automatic data processing machines, weighing not more than 10 kg, … > Laptops including notebooks and subnotebooks",
         "code_formatted": "8471.30.20",
         "hierarchy": [
          {
           "code": "84",
           "level": 2,
           "description_vi": "Lò phản ứng hạt nhân, nồi hơi, máy và thiết bị cơ khí; các bộ phận của chúng",
           "description_en": "Nuclear reactors, boilers, machinery and mechanical appliances; parts thereof"
          },
          {
           "code": "847130",
           "level": 6,
           "description_vi": "Máy xử lý dữ liệu tự động loại xách tay, có khối lượng không quá 10 kg, gồm ít nhất một đơn vị xử lý dữ liệu trung tâm, một bàn phím và một màn hình:",
           "description_en": "Portable automatic data processing machines, weighing not more than 10 kg, consisting of at least a central processing unit, a keyboard and a display:"
          }
         ],
         "chapter_98": [],
         "data_version": "2026-33303fdd33",
         "tariff_year": 2026,
         "source": "Biểu thuế xuất nhập khẩu Việt Nam (Trung tâm WTO và Hội nhập – VCCI, trungtamwto.vn)",
         "source_page": "https://trungtamwto.vn/chuyen-de/31581-bieu-thue-xuat-nhap-khau-viet-nam-nam-2026",
         "note": "Lookup aid compiled from the customs tariff workbook; check the decree texts before declaring goods. VAT \"8/10\" = 10%, reduced to 8% where the reduction applies.",
         "rcept_groups": {
          "A": "ASEAN",
          "B": "Australia",
          "C": "China",
          "D": "Japan",
          "E": "Korea",
          "F": "New Zealand"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/sitemap-generate": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Sitemap Generator",
    "description": "The sitemap generator crawls a site from the `url` you give, following links on the same host (after the first redirect, so http → https and www are handled), six pages at a time. It respects robots.txt (rules for APIBoxBot or `*`), skips pages marked `noindex` (meta robots or `X-Robots-Tag`), does not follow `nofollow` links, and when a page declares a canonical URL elsewhere, the canonical page is listed instead. Images, PDFs, scripts and other files are ignored.\n\nShape the crawl with `max_pages`, `max_depth` (0–10, default 5), `path_prefix` (only `/blog/`…), `exclude` (a regular expression), `keep_query=true` for sites whose pages differ by query string, and `ignore_robots` for your own site. Each URL gets its `lastmod` (from the Last-Modified header), an optional `changefreq` and a `priority` that decreases with link depth (`priority=false` drops it).\n\nThe JSON answer lists the pages with their titles and depth, what was skipped and why, the sitemaps declared in robots.txt and the XML itself; `format=xml` returns the sitemap.xml file directly. Pages per call depend on your plan (Free 50, Starter 200, Pro 500, online tool 20), and a crawl stops after about 25 seconds.\n\nDocs: https://apibox.io.vn/docs/sitemap-generate/",
    "operationId": "sitemapGenerateGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sitemap-generate/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Start URL (usually the home page).",
      "schema": {
       "type": "string"
      },
      "example": "https://www.sitemaps.org/"
     },
     {
      "name": "max_pages",
      "in": "query",
      "required": false,
      "description": "Pages to include (default and maximum: your plan’s cap).",
      "schema": {
       "type": "number"
      },
      "example": 10
     },
     {
      "name": "max_depth",
      "in": "query",
      "required": false,
      "description": "Link depth from the start page (0–10).",
      "schema": {
       "type": "number",
       "default": 5
      }
     },
     {
      "name": "path_prefix",
      "in": "query",
      "required": false,
      "description": "Only URLs whose path starts with it, e.g. `/blog/`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "exclude",
      "in": "query",
      "required": false,
      "description": "Regular expression of URLs to leave out.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "keep_query",
      "in": "query",
      "required": false,
      "description": "Keep query strings (default: removed).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "ignore_robots",
      "in": "query",
      "required": false,
      "description": "Ignore robots.txt (for your own site).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "changefreq",
      "in": "query",
      "required": false,
      "description": "`always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly` or `never`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "priority",
      "in": "query",
      "required": false,
      "description": "Add `<priority>` by depth.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `xml` (the sitemap.xml file).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "site": {
           "type": "string"
          },
          "pages": {
           "type": "number"
          },
          "complete": {
           "type": "boolean"
          },
          "limits": {
           "type": "object",
           "properties": {
            "max_pages": {
             "type": "number"
            },
            "max_depth": {
             "type": "number"
            },
            "plan_cap": {
             "type": "number"
            }
           }
          },
          "robots_txt": {
           "type": "string"
          },
          "sitemaps_in_robots": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "skipped": {
           "type": "object",
           "properties": {
            "robots": {
             "type": "number"
            },
            "noindex": {
             "type": "number"
            },
            "not_html": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            },
            "canonical_elsewhere": {
             "type": "number"
            },
            "redirected_away": {
             "type": "number"
            }
           }
          },
          "queued_not_crawled": {
           "type": "number"
          },
          "errors": {
           "type": "array"
          },
          "urls": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "loc": {
              "type": "string"
             },
             "lastmod": {
              "type": "string"
             },
             "depth": {
              "type": "number"
             },
             "title": {
              "type": "string"
             }
            }
           }
          },
          "xml": {
           "type": "string"
          }
         }
        },
        "example": {
         "url": "https://www.sitemaps.org/",
         "site": "https://www.sitemaps.org",
         "pages": 5,
         "complete": true,
         "limits": {
          "max_pages": 10,
          "max_depth": 5,
          "plan_cap": 500
         },
         "robots_txt": "respected",
         "sitemaps_in_robots": [
          "https://www.sitemaps.org/sitemap.xml"
         ],
         "skipped": {
          "robots": 0,
          "noindex": 0,
          "not_html": 2,
          "errors": 0,
          "canonical_elsewhere": 0,
          "redirected_away": 0
         },
         "queued_not_crawled": 0,
         "errors": [],
         "urls": [
          {
           "loc": "https://www.sitemaps.org/",
           "lastmod": "2021-09-23",
           "depth": 0,
           "title": "sitemaps.org - Home"
          },
          {
           "loc": "https://www.sitemaps.org/faq.html",
           "lastmod": "2021-07-08",
           "depth": 1,
           "title": "sitemaps.org - FAQ"
          },
          {
           "loc": "https://www.sitemaps.org/protocol.html",
           "lastmod": "2022-12-15",
           "depth": 1,
           "title": "sitemaps.org - Protocol"
          }
         ],
         "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url><loc>https://www.sitemaps.org/</loc><lastmod>2021-09-23</lastmod><priority>1.0</priority></url>\n  <url><loc>https://www.sitemaps.org/faq.html</loc><lastmod>2021-07-08</lastmod><priority>0.8</priority></url>\n  <url><loc>https://www.sitemaps.org/protocol.html</loc><lastmod>2022-12-15</lastmod><priority>0.8</priority></url>\n  …\n</urlset>\n"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Sitemap Generator",
    "description": "The sitemap generator crawls a site from the `url` you give, following links on the same host (after the first redirect, so http → https and www are handled), six pages at a time. It respects robots.txt (rules for APIBoxBot or `*`), skips pages marked `noindex` (meta robots or `X-Robots-Tag`), does not follow `nofollow` links, and when a page declares a canonical URL elsewhere, the canonical page is listed instead. Images, PDFs, scripts and other files are ignored.\n\nShape the crawl with `max_pages`, `max_depth` (0–10, default 5), `path_prefix` (only `/blog/`…), `exclude` (a regular expression), `keep_query=true` for sites whose pages differ by query string, and `ignore_robots` for your own site. Each URL gets its `lastmod` (from the Last-Modified header), an optional `changefreq` and a `priority` that decreases with link depth (`priority=false` drops it).\n\nThe JSON answer lists the pages with their titles and depth, what was skipped and why, the sitemaps declared in robots.txt and the XML itself; `format=xml` returns the sitemap.xml file directly. Pages per call depend on your plan (Free 50, Starter 200, Pro 500, online tool 20), and a crawl stops after about 25 seconds.\n\nDocs: https://apibox.io.vn/docs/sitemap-generate/",
    "operationId": "sitemapGeneratePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sitemap-generate/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Start URL (usually the home page)."
         },
         "max_pages": {
          "type": "number",
          "description": "Pages to include (default and maximum: your plan’s cap)."
         },
         "max_depth": {
          "type": "number",
          "default": 5,
          "description": "Link depth from the start page (0–10)."
         },
         "path_prefix": {
          "type": "string",
          "description": "Only URLs whose path starts with it, e.g. `/blog/`."
         },
         "exclude": {
          "type": "string",
          "description": "Regular expression of URLs to leave out."
         },
         "keep_query": {
          "type": "boolean",
          "default": false,
          "description": "Keep query strings (default: removed)."
         },
         "ignore_robots": {
          "type": "boolean",
          "default": false,
          "description": "Ignore robots.txt (for your own site)."
         },
         "changefreq": {
          "type": "string",
          "description": "`always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly` or `never`."
         },
         "priority": {
          "type": "boolean",
          "default": true,
          "description": "Add `<priority>` by depth."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xml` (the sitemap.xml file)."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "site": {
           "type": "string"
          },
          "pages": {
           "type": "number"
          },
          "complete": {
           "type": "boolean"
          },
          "limits": {
           "type": "object",
           "properties": {
            "max_pages": {
             "type": "number"
            },
            "max_depth": {
             "type": "number"
            },
            "plan_cap": {
             "type": "number"
            }
           }
          },
          "robots_txt": {
           "type": "string"
          },
          "sitemaps_in_robots": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "skipped": {
           "type": "object",
           "properties": {
            "robots": {
             "type": "number"
            },
            "noindex": {
             "type": "number"
            },
            "not_html": {
             "type": "number"
            },
            "errors": {
             "type": "number"
            },
            "canonical_elsewhere": {
             "type": "number"
            },
            "redirected_away": {
             "type": "number"
            }
           }
          },
          "queued_not_crawled": {
           "type": "number"
          },
          "errors": {
           "type": "array"
          },
          "urls": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "loc": {
              "type": "string"
             },
             "lastmod": {
              "type": "string"
             },
             "depth": {
              "type": "number"
             },
             "title": {
              "type": "string"
             }
            }
           }
          },
          "xml": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/monitors": {
   "get": {
    "tags": [
     "Testing"
    ],
    "summary": "Uptime Monitors",
    "description": "Monitors watch your websites and APIs from our servers. `POST /v1/monitors` with a `url` creates one: it is checked at once, then every `interval_minutes`, with `GET` or `HEAD`, an `expect_status` list (default `200-399`, e.g. `200,301`), an optional `keyword` that must appear in the body and a `timeout_ms`. A monitor turns `down` after 2 consecutive failed checks (after a first failure the URL is re-checked at the next 5-minute run) and `up` again on the first success; only these changes create an event and send alerts.\n\nAlerts go to the verified e-mail address of your account (`alert_email`, on by default; “down” e-mails are spaced at least 30 minutes apart per monitor and capped per day) and / or to your `webhook_url`, which receives a JSON POST: `{\"event\": \"monitor.down\" | \"monitor.up\", \"monitor\": {id, type, name, url}, \"status_code\", \"response_ms\", \"error\", \"at\", \"down_since\"}`. `GET /v1/monitors` lists your monitors with status, last check and uptime; `/v1/monitors/{id}` shows one with its recent events, `PATCH` (or POST) updates it (`paused=true` pauses it), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a manual test without changing the statistics.\n\nMonitors belong to an account: call with your API key or while signed in, or manage them from the dashboard. The plan sets the number of monitors and the shortest interval (Free: 3 monitors, every 15 minutes; Starter: 20 and Pro: 100, every 5 minutes). Creating, updating and testing count one request like every other API; GET reads are free.\n\nHeartbeat monitors (`type=heartbeat`) work the other way round, as a dead-man switch for cron jobs, backups and scripts: creating one returns a secret `ping_url` (`https://apibox.io.vn/hb/<token>`) that your job calls with GET, POST or HEAD, no API key needed, after each successful run. Set `period_minutes` (1–525600) or a `cron` expression with a `timezone`, plus `grace_minutes` (default 10). If no ping arrives before the deadline (last ping + period, or the next scheduled time, + grace), the monitor turns down and the same alerts are sent; the next ping brings it back up. Append `/start` when the job begins (it must then finish within the grace time and the duration is recorded), `/fail` or `/<exit code>` (non-zero = failure) to report an error at once, and POST up to 1 KB of output as a note. A new heartbeat is not reported late before its first ping. `GET /v1/monitors/{id}` shows the last 50 pings (also `/{id}/pings`), `new_token=true` issues a new URL; pings do not use your quota and heartbeats count toward the same monitor limit. In webhooks of heartbeats `url` is null and `exit_code` / `last_ping_at` replace `status_code` / `response_ms`.\n\nPath segments: `id`: `/v1/monitors/{id}` (GET, PATCH, POST, DELETE), `/{id}/events` (history), `/{id}/check` (POST: manual test), `/{id}/pings` (heartbeat: last 50 pings).\n\nDocs: https://apibox.io.vn/docs/monitors/",
    "operationId": "monitorsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/monitors/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/events`: number of events (1–200).",
      "schema": {
       "type": "number",
       "default": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "expect_status": {
           "type": "string"
          },
          "keyword": {},
          "interval_minutes": {
           "type": "number"
          },
          "timeout_ms": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          },
          "uptime_percent": {
           "type": "number"
          },
          "checks": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "failed": {
             "type": "number"
            }
           }
          },
          "status_since": {
           "type": "string"
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "ok": {
             "type": "boolean"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Testing"
    ],
    "summary": "Uptime Monitors",
    "description": "Monitors watch your websites and APIs from our servers. `POST /v1/monitors` with a `url` creates one: it is checked at once, then every `interval_minutes`, with `GET` or `HEAD`, an `expect_status` list (default `200-399`, e.g. `200,301`), an optional `keyword` that must appear in the body and a `timeout_ms`. A monitor turns `down` after 2 consecutive failed checks (after a first failure the URL is re-checked at the next 5-minute run) and `up` again on the first success; only these changes create an event and send alerts.\n\nAlerts go to the verified e-mail address of your account (`alert_email`, on by default; “down” e-mails are spaced at least 30 minutes apart per monitor and capped per day) and / or to your `webhook_url`, which receives a JSON POST: `{\"event\": \"monitor.down\" | \"monitor.up\", \"monitor\": {id, type, name, url}, \"status_code\", \"response_ms\", \"error\", \"at\", \"down_since\"}`. `GET /v1/monitors` lists your monitors with status, last check and uptime; `/v1/monitors/{id}` shows one with its recent events, `PATCH` (or POST) updates it (`paused=true` pauses it), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a manual test without changing the statistics.\n\nMonitors belong to an account: call with your API key or while signed in, or manage them from the dashboard. The plan sets the number of monitors and the shortest interval (Free: 3 monitors, every 15 minutes; Starter: 20 and Pro: 100, every 5 minutes). Creating, updating and testing count one request like every other API; GET reads are free.\n\nHeartbeat monitors (`type=heartbeat`) work the other way round, as a dead-man switch for cron jobs, backups and scripts: creating one returns a secret `ping_url` (`https://apibox.io.vn/hb/<token>`) that your job calls with GET, POST or HEAD, no API key needed, after each successful run. Set `period_minutes` (1–525600) or a `cron` expression with a `timezone`, plus `grace_minutes` (default 10). If no ping arrives before the deadline (last ping + period, or the next scheduled time, + grace), the monitor turns down and the same alerts are sent; the next ping brings it back up. Append `/start` when the job begins (it must then finish within the grace time and the duration is recorded), `/fail` or `/<exit code>` (non-zero = failure) to report an error at once, and POST up to 1 KB of output as a note. A new heartbeat is not reported late before its first ping. `GET /v1/monitors/{id}` shows the last 50 pings (also `/{id}/pings`), `new_token=true` issues a new URL; pings do not use your quota and heartbeats count toward the same monitor limit. In webhooks of heartbeats `url` is null and `exit_code` / `last_ping_at` replace `status_code` / `response_ms`.\n\nPath segments: `id`: `/v1/monitors/{id}` (GET, PATCH, POST, DELETE), `/{id}/events` (history), `/{id}/check` (POST: manual test), `/{id}/pings` (heartbeat: last 50 pings).\n\nDocs: https://apibox.io.vn/docs/monitors/",
    "operationId": "monitorsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/monitors/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/events`: number of events (1–200).",
      "schema": {
       "type": "number",
       "default": 50
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "URL to monitor (required when creating an http monitor)."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "method": {
          "type": "string",
          "default": "GET",
          "description": "`GET` or `HEAD`."
         },
         "expect_status": {
          "type": "string",
          "default": "200-399",
          "description": "Accepted status codes or ranges, e.g. `200,301` (up to 10)."
         },
         "keyword": {
          "type": "string",
          "description": "Text that must appear in the body (GET only, max 200 characters)."
         },
         "interval_minutes": {
          "type": "number",
          "description": "Check interval: from your plan’s minimum (15 Free, 5 Starter / Pro) to 1440. Default: the plan minimum, at least 5."
         },
         "timeout_ms": {
          "type": "number",
          "default": 10000,
          "description": "Timeout per check (1000–15000 ms)."
         },
         "alert_email": {
          "type": "boolean",
          "default": true,
          "description": "E-mail the verified account address on down / up."
         },
         "webhook_url": {
          "type": "string",
          "description": "URL receiving a JSON POST (`monitor.down` / `monitor.up`); empty to remove."
         },
         "paused": {
          "type": "boolean",
          "default": false,
          "description": "Pause or resume checks."
         },
         "type": {
          "type": "string",
          "default": "http",
          "description": "`http` (we check a URL) or `heartbeat` (your job pings us). Cannot be changed later."
         },
         "period_minutes": {
          "type": "number",
          "default": 60,
          "description": "Heartbeat: expected time between pings (1–525600)."
         },
         "cron": {
          "type": "string",
          "description": "Heartbeat: expected schedule as a cron expression (instead of period_minutes); empty to go back to a period."
         },
         "timezone": {
          "type": "string",
          "default": "UTC",
          "description": "Heartbeat: IANA time zone of `cron`."
         },
         "grace_minutes": {
          "type": "number",
          "default": 10,
          "description": "Heartbeat: extra time after the deadline before it turns down (1–43200); also the maximum run time after /start."
         },
         "new_token": {
          "type": "boolean",
          "description": "Heartbeat (PATCH): issue a new ping URL, the old one stops working."
         }
        }
       },
       "example": {
        "url": "https://example.com/",
        "name": "Trang chủ",
        "interval_minutes": 5,
        "webhook_url": "https://example.com/hooks/uptime"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "expect_status": {
           "type": "string"
          },
          "keyword": {},
          "interval_minutes": {
           "type": "number"
          },
          "timeout_ms": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          },
          "uptime_percent": {
           "type": "number"
          },
          "checks": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "failed": {
             "type": "number"
            }
           }
          },
          "status_since": {
           "type": "string"
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "ok": {
             "type": "boolean"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          }
         }
        },
        "example": {
         "id": "mon_k3x9q2v7b1m8d4f0a6zc",
         "type": "http",
         "name": "Trang chủ",
         "url": "https://example.com/",
         "method": "GET",
         "expect_status": "200-399",
         "keyword": null,
         "interval_minutes": 5,
         "timeout_ms": 10000,
         "alert_email": true,
         "webhook_url": "https://example.com/hooks/uptime",
         "paused": false,
         "status": "up",
         "last_check": {
          "at": "2026-11-11T03:20:00.000Z",
          "status_code": 200,
          "response_ms": 184,
          "error": null
         },
         "uptime_percent": 100,
         "checks": {
          "total": 1,
          "failed": 0
         },
         "status_since": "2026-11-11T03:20:00.000Z",
         "next_check_at": "2026-11-11T03:25:00.000Z",
         "created_at": "2026-11-11T03:20:00.000Z",
         "first_check": {
          "ok": true,
          "status_code": 200,
          "response_ms": 184,
          "error": null
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "patch": {
    "tags": [
     "Testing"
    ],
    "summary": "Uptime Monitors",
    "description": "Monitors watch your websites and APIs from our servers. `POST /v1/monitors` with a `url` creates one: it is checked at once, then every `interval_minutes`, with `GET` or `HEAD`, an `expect_status` list (default `200-399`, e.g. `200,301`), an optional `keyword` that must appear in the body and a `timeout_ms`. A monitor turns `down` after 2 consecutive failed checks (after a first failure the URL is re-checked at the next 5-minute run) and `up` again on the first success; only these changes create an event and send alerts.\n\nAlerts go to the verified e-mail address of your account (`alert_email`, on by default; “down” e-mails are spaced at least 30 minutes apart per monitor and capped per day) and / or to your `webhook_url`, which receives a JSON POST: `{\"event\": \"monitor.down\" | \"monitor.up\", \"monitor\": {id, type, name, url}, \"status_code\", \"response_ms\", \"error\", \"at\", \"down_since\"}`. `GET /v1/monitors` lists your monitors with status, last check and uptime; `/v1/monitors/{id}` shows one with its recent events, `PATCH` (or POST) updates it (`paused=true` pauses it), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a manual test without changing the statistics.\n\nMonitors belong to an account: call with your API key or while signed in, or manage them from the dashboard. The plan sets the number of monitors and the shortest interval (Free: 3 monitors, every 15 minutes; Starter: 20 and Pro: 100, every 5 minutes). Creating, updating and testing count one request like every other API; GET reads are free.\n\nHeartbeat monitors (`type=heartbeat`) work the other way round, as a dead-man switch for cron jobs, backups and scripts: creating one returns a secret `ping_url` (`https://apibox.io.vn/hb/<token>`) that your job calls with GET, POST or HEAD, no API key needed, after each successful run. Set `period_minutes` (1–525600) or a `cron` expression with a `timezone`, plus `grace_minutes` (default 10). If no ping arrives before the deadline (last ping + period, or the next scheduled time, + grace), the monitor turns down and the same alerts are sent; the next ping brings it back up. Append `/start` when the job begins (it must then finish within the grace time and the duration is recorded), `/fail` or `/<exit code>` (non-zero = failure) to report an error at once, and POST up to 1 KB of output as a note. A new heartbeat is not reported late before its first ping. `GET /v1/monitors/{id}` shows the last 50 pings (also `/{id}/pings`), `new_token=true` issues a new URL; pings do not use your quota and heartbeats count toward the same monitor limit. In webhooks of heartbeats `url` is null and `exit_code` / `last_ping_at` replace `status_code` / `response_ms`.\n\nPath segments: `id`: `/v1/monitors/{id}` (GET, PATCH, POST, DELETE), `/{id}/events` (history), `/{id}/check` (POST: manual test), `/{id}/pings` (heartbeat: last 50 pings).\n\nDocs: https://apibox.io.vn/docs/monitors/",
    "operationId": "monitorsPatch",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/monitors/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/events`: number of events (1–200).",
      "schema": {
       "type": "number",
       "default": 50
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "URL to monitor (required when creating an http monitor)."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "method": {
          "type": "string",
          "default": "GET",
          "description": "`GET` or `HEAD`."
         },
         "expect_status": {
          "type": "string",
          "default": "200-399",
          "description": "Accepted status codes or ranges, e.g. `200,301` (up to 10)."
         },
         "keyword": {
          "type": "string",
          "description": "Text that must appear in the body (GET only, max 200 characters)."
         },
         "interval_minutes": {
          "type": "number",
          "description": "Check interval: from your plan’s minimum (15 Free, 5 Starter / Pro) to 1440. Default: the plan minimum, at least 5."
         },
         "timeout_ms": {
          "type": "number",
          "default": 10000,
          "description": "Timeout per check (1000–15000 ms)."
         },
         "alert_email": {
          "type": "boolean",
          "default": true,
          "description": "E-mail the verified account address on down / up."
         },
         "webhook_url": {
          "type": "string",
          "description": "URL receiving a JSON POST (`monitor.down` / `monitor.up`); empty to remove."
         },
         "paused": {
          "type": "boolean",
          "default": false,
          "description": "Pause or resume checks."
         },
         "type": {
          "type": "string",
          "default": "http",
          "description": "`http` (we check a URL) or `heartbeat` (your job pings us). Cannot be changed later."
         },
         "period_minutes": {
          "type": "number",
          "default": 60,
          "description": "Heartbeat: expected time between pings (1–525600)."
         },
         "cron": {
          "type": "string",
          "description": "Heartbeat: expected schedule as a cron expression (instead of period_minutes); empty to go back to a period."
         },
         "timezone": {
          "type": "string",
          "default": "UTC",
          "description": "Heartbeat: IANA time zone of `cron`."
         },
         "grace_minutes": {
          "type": "number",
          "default": 10,
          "description": "Heartbeat: extra time after the deadline before it turns down (1–43200); also the maximum run time after /start."
         },
         "new_token": {
          "type": "boolean",
          "description": "Heartbeat (PATCH): issue a new ping URL, the old one stops working."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "expect_status": {
           "type": "string"
          },
          "keyword": {},
          "interval_minutes": {
           "type": "number"
          },
          "timeout_ms": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          },
          "uptime_percent": {
           "type": "number"
          },
          "checks": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "failed": {
             "type": "number"
            }
           }
          },
          "status_since": {
           "type": "string"
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "ok": {
             "type": "boolean"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "delete": {
    "tags": [
     "Testing"
    ],
    "summary": "Uptime Monitors",
    "description": "Monitors watch your websites and APIs from our servers. `POST /v1/monitors` with a `url` creates one: it is checked at once, then every `interval_minutes`, with `GET` or `HEAD`, an `expect_status` list (default `200-399`, e.g. `200,301`), an optional `keyword` that must appear in the body and a `timeout_ms`. A monitor turns `down` after 2 consecutive failed checks (after a first failure the URL is re-checked at the next 5-minute run) and `up` again on the first success; only these changes create an event and send alerts.\n\nAlerts go to the verified e-mail address of your account (`alert_email`, on by default; “down” e-mails are spaced at least 30 minutes apart per monitor and capped per day) and / or to your `webhook_url`, which receives a JSON POST: `{\"event\": \"monitor.down\" | \"monitor.up\", \"monitor\": {id, type, name, url}, \"status_code\", \"response_ms\", \"error\", \"at\", \"down_since\"}`. `GET /v1/monitors` lists your monitors with status, last check and uptime; `/v1/monitors/{id}` shows one with its recent events, `PATCH` (or POST) updates it (`paused=true` pauses it), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a manual test without changing the statistics.\n\nMonitors belong to an account: call with your API key or while signed in, or manage them from the dashboard. The plan sets the number of monitors and the shortest interval (Free: 3 monitors, every 15 minutes; Starter: 20 and Pro: 100, every 5 minutes). Creating, updating and testing count one request like every other API; GET reads are free.\n\nHeartbeat monitors (`type=heartbeat`) work the other way round, as a dead-man switch for cron jobs, backups and scripts: creating one returns a secret `ping_url` (`https://apibox.io.vn/hb/<token>`) that your job calls with GET, POST or HEAD, no API key needed, after each successful run. Set `period_minutes` (1–525600) or a `cron` expression with a `timezone`, plus `grace_minutes` (default 10). If no ping arrives before the deadline (last ping + period, or the next scheduled time, + grace), the monitor turns down and the same alerts are sent; the next ping brings it back up. Append `/start` when the job begins (it must then finish within the grace time and the duration is recorded), `/fail` or `/<exit code>` (non-zero = failure) to report an error at once, and POST up to 1 KB of output as a note. A new heartbeat is not reported late before its first ping. `GET /v1/monitors/{id}` shows the last 50 pings (also `/{id}/pings`), `new_token=true` issues a new URL; pings do not use your quota and heartbeats count toward the same monitor limit. In webhooks of heartbeats `url` is null and `exit_code` / `last_ping_at` replace `status_code` / `response_ms`.\n\nPath segments: `id`: `/v1/monitors/{id}` (GET, PATCH, POST, DELETE), `/{id}/events` (history), `/{id}/check` (POST: manual test), `/{id}/pings` (heartbeat: last 50 pings).\n\nDocs: https://apibox.io.vn/docs/monitors/",
    "operationId": "monitorsDelete",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/monitors/"
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/events`: number of events (1–200).",
      "schema": {
       "type": "number",
       "default": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "expect_status": {
           "type": "string"
          },
          "keyword": {},
          "interval_minutes": {
           "type": "number"
          },
          "timeout_ms": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          },
          "uptime_percent": {
           "type": "number"
          },
          "checks": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "failed": {
             "type": "number"
            }
           }
          },
          "status_since": {
           "type": "string"
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "ok": {
             "type": "boolean"
            },
            "status_code": {
             "type": "number"
            },
            "response_ms": {
             "type": "number"
            },
            "error": {}
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-electricity": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Electricity Bill",
    "description": "Send the kWh used (or the two meter readings) and get the household bill under the EVN retail tariff in force on that date: the 5-tier schedule of QĐ 2892/QĐ-BCT from 1/11/2026 (100 / 100 / 200 / 300 kWh, then the rest), or the earlier 6-tier schedules (QĐ 1279/QĐ-BCT, QĐ 2699/QĐ-BCT). The answer lists every tier, the amount before VAT, VAT (8% until 31/12/2026 under NĐ 174/2025, 10% after) and the total. `compare=true` adds the difference against the previous tariff.\n\nWhen the reading period (`from` – `to`) spans a tariff change, the kWh and the tier sizes are split by days, as EVN does without remote-read data. `persons` applies the tenant quota (4 registered persons = one household), `tenant_flat=true` bills everything at the tier-2 price (short leases without declared tenants), and `amount` works backwards from a bill to the kWh.\n\nFor boarding houses, `rooms` splits a bill between sub-meters: proportionally (common areas shared equally, by use, or kept by the landlord), at a fixed price per kWh, or with each room billed as its own household. `customer` also covers production, business, accommodation, EV charging, schools and public lighting with peak / normal / off-peak kWh by voltage.\n\nDocs: https://apibox.io.vn/docs/vn-electricity/",
    "operationId": "vnElectricityGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-electricity/"
    },
    "parameters": [
     {
      "name": "kwh",
      "in": "query",
      "required": false,
      "description": "kWh used in the period (or send `start_reading` + `end_reading`).",
      "schema": {
       "type": "number"
      },
      "example": 250
     },
     {
      "name": "start_reading",
      "in": "query",
      "required": false,
      "description": "Meter reading at the start of the period.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "end_reading",
      "in": "query",
      "required": false,
      "description": "Meter reading at the end of the period.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date whose tariff applies (YYYY-MM-DD, default today).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Previous reading date; with `to`, splits the period at tariff changes.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Current reading date.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "customer",
      "in": "query",
      "required": false,
      "description": "`household`, `production`, `business`, `accommodation`, `ev_charging`, `health_education`, `public_admin`.",
      "schema": {
       "type": "string",
       "default": "household"
      }
     },
     {
      "name": "voltage",
      "in": "query",
      "required": false,
      "description": "Non-household: `low` (≤ 1 kV), `medium`, `high` (35–220 kV), `extra_high` (≥ 220 kV).",
      "schema": {
       "type": "string",
       "default": "low"
      }
     },
     {
      "name": "peak_kwh",
      "in": "query",
      "required": false,
      "description": "Non-household: kWh at peak hours (`offpeak_kwh`, `normal_kwh` likewise).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "persons",
      "in": "query",
      "required": false,
      "description": "Registered persons (tenants): quota = persons / 4 households.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "households",
      "in": "query",
      "required": false,
      "description": "Number of household quotas on the meter.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "tenant_flat",
      "in": "query",
      "required": false,
      "description": "Bill all kWh at the tier-2 price.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Reverse: bill amount incl. VAT -> kWh.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "vat_percent",
      "in": "query",
      "required": false,
      "description": "Override the VAT rate.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "compare",
      "in": "query",
      "required": false,
      "description": "Add the difference with the previous tariff.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "customer": {
           "type": "string"
          },
          "kwh": {
           "type": "number"
          },
          "amount_before_vat": {
           "type": "number"
          },
          "vat_percent": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "total": {
           "type": "number"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tariff": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "kwh": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "tiers": {
              "type": "array"
             }
            }
           }
          },
          "quota": {
           "type": "object",
           "properties": {
            "households": {
             "type": "number"
            }
           }
          },
          "tariff": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "tiers": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "customer": "household",
         "kwh": 250,
         "amount_before_vat": 563700,
         "vat_percent": 8,
         "vat": 45096,
         "total": 608796,
         "segments": [
          {
           "tariff": "QĐ 2892/QĐ-BCT",
           "effective_from": "2026-11-01",
           "kwh": 250,
           "amount": 563700,
           "tiers": [
            {
             "tier": 1,
             "kwh": 100,
             "price": 1901,
             "amount": 190100,
             "limit": 100
            },
            {
             "tier": 2,
             "kwh": 100,
             "price": 2289,
             "amount": 228900,
             "limit": 100
            },
            {
             "tier": 3,
             "kwh": 50,
             "price": 2894,
             "amount": 144700,
             "limit": 200
            }
           ]
          }
         ],
         "quota": {
          "households": 1
         },
         "tariff": {
          "decree": "QĐ 2892/QĐ-BCT",
          "effective_from": "2026-11-01",
          "tiers": [
           {
            "tier": 1,
            "kwh": 100,
            "price": 1901
           },
           {
            "tier": 2,
            "kwh": 100,
            "price": 2289
           },
           {
            "tier": 3,
            "kwh": 200,
            "price": 2894
           },
           {
            "tier": 4,
            "kwh": 300,
            "price": 3456
           },
           {
            "tier": 5,
            "kwh": null,
            "price": 3844
           }
          ]
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Electricity Bill",
    "description": "Send the kWh used (or the two meter readings) and get the household bill under the EVN retail tariff in force on that date: the 5-tier schedule of QĐ 2892/QĐ-BCT from 1/11/2026 (100 / 100 / 200 / 300 kWh, then the rest), or the earlier 6-tier schedules (QĐ 1279/QĐ-BCT, QĐ 2699/QĐ-BCT). The answer lists every tier, the amount before VAT, VAT (8% until 31/12/2026 under NĐ 174/2025, 10% after) and the total. `compare=true` adds the difference against the previous tariff.\n\nWhen the reading period (`from` – `to`) spans a tariff change, the kWh and the tier sizes are split by days, as EVN does without remote-read data. `persons` applies the tenant quota (4 registered persons = one household), `tenant_flat=true` bills everything at the tier-2 price (short leases without declared tenants), and `amount` works backwards from a bill to the kWh.\n\nFor boarding houses, `rooms` splits a bill between sub-meters: proportionally (common areas shared equally, by use, or kept by the landlord), at a fixed price per kWh, or with each room billed as its own household. `customer` also covers production, business, accommodation, EV charging, schools and public lighting with peak / normal / off-peak kWh by voltage.\n\nDocs: https://apibox.io.vn/docs/vn-electricity/",
    "operationId": "vnElectricityPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-electricity/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "kwh": {
          "type": "number",
          "description": "kWh used in the period (or send `start_reading` + `end_reading`)."
         },
         "start_reading": {
          "type": "number",
          "description": "Meter reading at the start of the period."
         },
         "end_reading": {
          "type": "number",
          "description": "Meter reading at the end of the period."
         },
         "date": {
          "type": "string",
          "description": "Date whose tariff applies (YYYY-MM-DD, default today)."
         },
         "from": {
          "type": "string",
          "description": "Previous reading date; with `to`, splits the period at tariff changes."
         },
         "to": {
          "type": "string",
          "description": "Current reading date."
         },
         "customer": {
          "type": "string",
          "default": "household",
          "description": "`household`, `production`, `business`, `accommodation`, `ev_charging`, `health_education`, `public_admin`."
         },
         "voltage": {
          "type": "string",
          "default": "low",
          "description": "Non-household: `low` (≤ 1 kV), `medium`, `high` (35–220 kV), `extra_high` (≥ 220 kV)."
         },
         "peak_kwh": {
          "type": "number",
          "description": "Non-household: kWh at peak hours (`offpeak_kwh`, `normal_kwh` likewise)."
         },
         "persons": {
          "type": "number",
          "description": "Registered persons (tenants): quota = persons / 4 households."
         },
         "households": {
          "type": "number",
          "default": 1,
          "description": "Number of household quotas on the meter."
         },
         "tenant_flat": {
          "type": "boolean",
          "description": "Bill all kWh at the tier-2 price."
         },
         "amount": {
          "type": "number",
          "description": "Reverse: bill amount incl. VAT -> kWh."
         },
         "rooms": {
          "type": "array",
          "items": {},
          "description": "Room split: `[{\"name\":\"P1\",\"kwh\":80}, {\"name\":\"P2\",\"start_reading\":100,\"end_reading\":190}]`."
         },
         "split": {
          "type": "string",
          "default": "proportional",
          "description": "`proportional`, `fixed_price` (with `price_per_kwh`) or `separate`; `common` = `equal` / `proportional` / `landlord`."
         },
         "vat_percent": {
          "type": "number",
          "description": "Override the VAT rate."
         },
         "compare": {
          "type": "boolean",
          "description": "Add the difference with the previous tariff."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "customer": {
           "type": "string"
          },
          "kwh": {
           "type": "number"
          },
          "amount_before_vat": {
           "type": "number"
          },
          "vat_percent": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "total": {
           "type": "number"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tariff": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "kwh": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "tiers": {
              "type": "array"
             }
            }
           }
          },
          "quota": {
           "type": "object",
           "properties": {
            "households": {
             "type": "number"
            }
           }
          },
          "tariff": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "tiers": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-household-tax": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Household Business Tax",
    "description": "Lump-sum tax (thuế khoán) ended on 1/1/2026. Send the annual revenue and the business sector (or several `lines`) and the API applies the 2026 rules: no VAT or PIT up to 1 billion VND of revenue (NĐ 141/2026/NĐ-CP, which raised the 500-million threshold of Luật Thuế TNCN 109/2025 and NĐ 68/2026), VAT as a percentage of the whole revenue above it (1% distribution, 5% services, 3% production / transport, 2% other), and PIT on the revenue above the threshold (0.5% / 2% / 1.5% / 1%, 5% for leasing, agents and digital content).\n\nUp to 3 billion the household may choose the income method instead: (revenue − `expenses`) × 15%. Above 3 billion it is compulsory, at 17% (up to 50 billion) or 20%. When `expenses` is given the API computes both and picks the cheaper one, unless `method` is set. The threshold is deducted once, from the lines with the highest rate first, and the 30% PIT reduction for revenue up to 10 billion in 2026–2027 (NĐ 398/2026/NĐ-CP) is applied.\n\nThe answer also tells whether returns are quarterly or monthly, whether e-invoices are compulsory, and lists the legal texts used. `year=2025` applies the previous rules (100-million threshold, TT 40/2021). It is an estimate, not tax advice.\n\nDocs: https://apibox.io.vn/docs/vn-household-tax/",
    "operationId": "vnHouseholdTaxGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-household-tax/"
    },
    "parameters": [
     {
      "name": "revenue",
      "in": "query",
      "required": false,
      "description": "Annual revenue in VND (with `sector`).",
      "schema": {
       "type": "number"
      },
      "example": 2000000000
     },
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "`distribution`, `services`, `production`, `asset_leasing`, `real_estate_leasing`, `agency`, `digital_content`, `other`.",
      "schema": {
       "type": "string",
       "default": "other"
      },
      "example": "distribution"
     },
     {
      "name": "expenses",
      "in": "query",
      "required": false,
      "description": "Deductible expenses of the year (income method; required above 3 billion).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "Force `revenue` or `income`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Tax year (2025–2030, default this year).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "revenue": {
           "type": "number"
          },
          "threshold": {
           "type": "number"
          },
          "below_threshold": {
           "type": "boolean"
          },
          "vat": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "lines": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "pit": {
           "type": "object",
           "properties": {
            "method": {
             "type": "string"
            },
            "gross": {
             "type": "number"
            },
            "reduction_30_percent": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "revenue_method": {
             "type": "object",
             "properties": {
              "method": {
               "type": "string"
              },
              "allowed": {
               "type": "boolean"
              },
              "lines": {
               "type": "array"
              },
              "pit": {
               "type": "number"
              }
             }
            }
           }
          },
          "total_tax": {
           "type": "number"
          },
          "effective_rate_percent": {
           "type": "number"
          },
          "obligations": {
           "type": "object",
           "properties": {
            "declare": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "e_invoice_required": {
             "type": "boolean"
            },
            "licence_fee": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "revenue": 2000000000,
         "threshold": 1000000000,
         "below_threshold": false,
         "vat": {
          "total": 20000000,
          "lines": [
           {
            "sector": "distribution",
            "revenue": 2000000000,
            "rate_percent": 1,
            "vat": 20000000
           }
          ]
         },
         "pit": {
          "method": "revenue",
          "gross": 5000000,
          "reduction_30_percent": 1500000,
          "total": 3500000,
          "revenue_method": {
           "method": "revenue",
           "allowed": true,
           "lines": [
            {
             "sector": "distribution",
             "revenue": 2000000000,
             "taxable_revenue": 1000000000,
             "rate_percent": 0.5,
             "pit": 5000000
            }
           ],
           "pit": 5000000
          }
         },
         "total_tax": 23500000,
         "effective_rate_percent": 1.18,
         "obligations": {
          "declare": "Quarterly returns, due the last day of the first month of the next quarter",
          "period": "quarterly",
          "e_invoice_required": true,
          "licence_fee": "abolished from 1/1/2026"
         },
         "legal": [
          "Luật Thuế TNCN 109/2025/QH15 Điều 7",
          "Luật Thuế GTGT 48/2024/QH15 Điều 12",
          "Nghị định 68/2026/NĐ-CP, sửa đổi bởi Nghị định 141/2026/NĐ-CP (threshold 1 billion from 1/1/2026)",
          "Nghị quyết 198/2025/QH15 Điều 10 (no lump-sum tax, no licence fee from 1/1/2026)",
          "Nghị định 398/2026/NĐ-CP (PIT −30% for revenue ≤ 10 billion, 2026–2027)"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Household Business Tax",
    "description": "Lump-sum tax (thuế khoán) ended on 1/1/2026. Send the annual revenue and the business sector (or several `lines`) and the API applies the 2026 rules: no VAT or PIT up to 1 billion VND of revenue (NĐ 141/2026/NĐ-CP, which raised the 500-million threshold of Luật Thuế TNCN 109/2025 and NĐ 68/2026), VAT as a percentage of the whole revenue above it (1% distribution, 5% services, 3% production / transport, 2% other), and PIT on the revenue above the threshold (0.5% / 2% / 1.5% / 1%, 5% for leasing, agents and digital content).\n\nUp to 3 billion the household may choose the income method instead: (revenue − `expenses`) × 15%. Above 3 billion it is compulsory, at 17% (up to 50 billion) or 20%. When `expenses` is given the API computes both and picks the cheaper one, unless `method` is set. The threshold is deducted once, from the lines with the highest rate first, and the 30% PIT reduction for revenue up to 10 billion in 2026–2027 (NĐ 398/2026/NĐ-CP) is applied.\n\nThe answer also tells whether returns are quarterly or monthly, whether e-invoices are compulsory, and lists the legal texts used. `year=2025` applies the previous rules (100-million threshold, TT 40/2021). It is an estimate, not tax advice.\n\nDocs: https://apibox.io.vn/docs/vn-household-tax/",
    "operationId": "vnHouseholdTaxPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-household-tax/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "revenue": {
          "type": "number",
          "description": "Annual revenue in VND (with `sector`)."
         },
         "sector": {
          "type": "string",
          "default": "other",
          "description": "`distribution`, `services`, `production`, `asset_leasing`, `real_estate_leasing`, `agency`, `digital_content`, `other`."
         },
         "lines": {
          "type": "array",
          "items": {},
          "description": "Several business lines: `[{\"sector\":\"distribution\",\"revenue\":600000000}, ...]`."
         },
         "expenses": {
          "type": "number",
          "description": "Deductible expenses of the year (income method; required above 3 billion)."
         },
         "method": {
          "type": "string",
          "description": "Force `revenue` or `income`."
         },
         "year": {
          "type": "number",
          "description": "Tax year (2025–2030, default this year)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "revenue": {
           "type": "number"
          },
          "threshold": {
           "type": "number"
          },
          "below_threshold": {
           "type": "boolean"
          },
          "vat": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "lines": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "pit": {
           "type": "object",
           "properties": {
            "method": {
             "type": "string"
            },
            "gross": {
             "type": "number"
            },
            "reduction_30_percent": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "revenue_method": {
             "type": "object",
             "properties": {
              "method": {
               "type": "string"
              },
              "allowed": {
               "type": "boolean"
              },
              "lines": {
               "type": "array"
              },
              "pit": {
               "type": "number"
              }
             }
            }
           }
          },
          "total_tax": {
           "type": "number"
          },
          "effective_rate_percent": {
           "type": "number"
          },
          "obligations": {
           "type": "object",
           "properties": {
            "declare": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "e_invoice_required": {
             "type": "boolean"
            },
            "licence_fee": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-insurance-benefits": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Social Insurance Benefits",
    "description": "One endpoint, five calculations chosen with `type`. `unemployment`: 60% of the average contribution wage of the last 6 months, capped at 5 × the regional minimum wage, for 3 months (12 to under 36 months of contributions) plus one month per further 12 months, up to 12 (Luật Việc làm 74/2025/QH15). The region comes from `region` or from a ward name.\n\n`lump_sum` (BHXH một lần): send the contribution `periods` with their wages; each month is adjusted with the coefficients for 2026 (Công văn 340/BHXH-CSXH), then 1.5 months of average wage per year before 2014 and 2 months per year from 2014, with the official rounding of odd months (Luật BHXH 41/2024/QH15 Điều 70). The answer also says whether withdrawal is possible under the post-1/7/2025 rules.\n\n`severance` and `job_loss` follow Bộ luật Lao động 2019 Điều 46–47 (time covered by unemployment insurance excluded), and `maternity` returns the lump sum (2 × the reference level, 2,530,000 đ from 1/7/2026), the mother's 6-month leave pay and the father's leave days.\n\nDocs: https://apibox.io.vn/docs/vn-insurance-benefits/",
    "operationId": "vnInsuranceBenefitsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-insurance-benefits/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": true,
      "description": "`unemployment`, `lump_sum`, `severance`, `job_loss` or `maternity`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "salary",
      "in": "query",
      "required": false,
      "description": "Average monthly wage (contribution wage, or contract wage for severance).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "contribution_months",
      "in": "query",
      "required": false,
      "description": "Unemployment: months of unemployment-insurance contributions.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "Unemployment: wage region I–IV (or `ward` + `province`).",
      "schema": {
       "type": "string",
       "default": "I"
      }
     },
     {
      "name": "last_month",
      "in": "query",
      "required": false,
      "description": "Unemployment: last contribution month (YYYY-MM).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Severance: first working day.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "end_date",
      "in": "query",
      "required": false,
      "description": "Severance: contract end date.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "unemployment_insurance_months",
      "in": "query",
      "required": false,
      "description": "Severance: months covered by unemployment insurance (excluded).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "birth_date",
      "in": "query",
      "required": false,
      "description": "Maternity: date of birth (reference level of that month).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "children",
      "in": "query",
      "required": false,
      "description": "Maternity: number of children born.",
      "schema": {
       "type": "number",
       "default": 1
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "average_salary": {
           "type": "number"
          },
          "contribution_months": {
           "type": "number"
          },
          "eligible": {
           "type": "boolean"
          },
          "monthly_benefit": {
           "type": "number"
          },
          "capped": {
           "type": "boolean"
          },
          "cap": {
           "type": "object",
           "properties": {
            "amount": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "region": {
             "type": "string"
            },
            "region_from": {
             "type": "string"
            },
            "min_wage": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            }
           }
          },
          "benefit_months": {
           "type": "number"
          },
          "total": {
           "type": "number"
          },
          "reserved_months": {
           "type": "number"
          },
          "payment_start": {
           "type": "string"
          },
          "legal": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Social Insurance Benefits",
    "description": "One endpoint, five calculations chosen with `type`. `unemployment`: 60% of the average contribution wage of the last 6 months, capped at 5 × the regional minimum wage, for 3 months (12 to under 36 months of contributions) plus one month per further 12 months, up to 12 (Luật Việc làm 74/2025/QH15). The region comes from `region` or from a ward name.\n\n`lump_sum` (BHXH một lần): send the contribution `periods` with their wages; each month is adjusted with the coefficients for 2026 (Công văn 340/BHXH-CSXH), then 1.5 months of average wage per year before 2014 and 2 months per year from 2014, with the official rounding of odd months (Luật BHXH 41/2024/QH15 Điều 70). The answer also says whether withdrawal is possible under the post-1/7/2025 rules.\n\n`severance` and `job_loss` follow Bộ luật Lao động 2019 Điều 46–47 (time covered by unemployment insurance excluded), and `maternity` returns the lump sum (2 × the reference level, 2,530,000 đ from 1/7/2026), the mother's 6-month leave pay and the father's leave days.\n\nDocs: https://apibox.io.vn/docs/vn-insurance-benefits/",
    "operationId": "vnInsuranceBenefitsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-insurance-benefits/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "description": "`unemployment`, `lump_sum`, `severance`, `job_loss` or `maternity`."
         },
         "salary": {
          "type": "number",
          "description": "Average monthly wage (contribution wage, or contract wage for severance)."
         },
         "salaries": {
          "type": "array",
          "items": {},
          "description": "Unemployment: the last 6 monthly contribution wages."
         },
         "contribution_months": {
          "type": "number",
          "description": "Unemployment: months of unemployment-insurance contributions."
         },
         "region": {
          "type": "string",
          "default": "I",
          "description": "Unemployment: wage region I–IV (or `ward` + `province`)."
         },
         "last_month": {
          "type": "string",
          "description": "Unemployment: last contribution month (YYYY-MM)."
         },
         "periods": {
          "type": "array",
          "items": {},
          "description": "Lump sum: `[{\"from\":\"2015-01\",\"to\":\"2020-12\",\"salary\":8000000}]`."
         },
         "start_date": {
          "type": "string",
          "description": "Severance: first working day."
         },
         "end_date": {
          "type": "string",
          "description": "Severance: contract end date."
         },
         "unemployment_insurance_months": {
          "type": "number",
          "description": "Severance: months covered by unemployment insurance (excluded)."
         },
         "birth_date": {
          "type": "string",
          "description": "Maternity: date of birth (reference level of that month)."
         },
         "children": {
          "type": "number",
          "default": 1,
          "description": "Maternity: number of children born."
         }
        },
        "required": [
         "type"
        ]
       },
       "example": {
        "type": "unemployment",
        "salary": 10000000,
        "contribution_months": 40,
        "region": "I"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "average_salary": {
           "type": "number"
          },
          "contribution_months": {
           "type": "number"
          },
          "eligible": {
           "type": "boolean"
          },
          "monthly_benefit": {
           "type": "number"
          },
          "capped": {
           "type": "boolean"
          },
          "cap": {
           "type": "object",
           "properties": {
            "amount": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "region": {
             "type": "string"
            },
            "region_from": {
             "type": "string"
            },
            "min_wage": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            }
           }
          },
          "benefit_months": {
           "type": "number"
          },
          "total": {
           "type": "number"
          },
          "reserved_months": {
           "type": "number"
          },
          "payment_start": {
           "type": "string"
          },
          "legal": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "type": "unemployment",
         "average_salary": 10000000,
         "contribution_months": 40,
         "eligible": true,
         "monthly_benefit": 6000000,
         "capped": false,
         "cap": {
          "amount": 26550000,
          "rule": "5 × regional minimum wage of the last contribution month",
          "region": "I",
          "region_from": "region",
          "min_wage": 5310000,
          "decree": "293/2025/NĐ-CP"
         },
         "benefit_months": 4,
         "total": 24000000,
         "reserved_months": 4,
         "payment_start": "from the 11th working day after a complete application",
         "legal": "Luật Việc làm 74/2025/QH15 Điều 38, 39 (from 1/1/2026): 60% of the average contribution wage of the last 6 months, max 5 × regional minimum wage; 12 to under 36 months -> 3 months, +1 month per further 12 months, max 12 months.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-registration-fee": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Registration Fee",
    "description": "Send the asset type, its taxable value and the province. The API applies NĐ 10/2022/NĐ-CP as amended by NĐ 51/2025 and NĐ 175/2025: 10% for passenger cars up to 9 seats unless the provincial council set more (e.g. 12% in Lạng Sơn and, from 8/8/2026, Hải Phòng; 11% in Tuyên Quang), 60% of that for double-cab pick-ups and vans, 0% for the first registration of battery electric cars (until 31/12/2030), 2% for second-hand cars and other vehicles, 2% for motorbikes (1% from the second registration) and 0.5% for houses and land.\n\nFor a used vehicle, `years_used` (or `year_of_manufacture`) applies the remaining-value table (90% / 70% / 50% / 30% / 20%). Houses and land accept `area_m2` × `price_per_m2`. `rate_percent` overrides the rate when your province adopts a new resolution.\n\nFor vehicles, `on_road` adds the other costs of the \"giá lăn bánh\": registration and plate fee by area (14,000,000 đ for cars in Hà Nội and TP.HCM, 140,000 đ elsewhere, TT 155/2025/TT-BTC), 12 months of road-use fee (NĐ 90/2023) and compulsory third-party insurance (NĐ 67/2023).\n\nDocs: https://apibox.io.vn/docs/vn-registration-fee/",
    "operationId": "vnRegistrationFeeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-registration-fee/"
    },
    "parameters": [
     {
      "name": "asset",
      "in": "query",
      "required": false,
      "description": "`car`, `pickup`, `ev_car`, `other_car`, `motorbike`, `house`, `land`.",
      "schema": {
       "type": "string",
       "default": "car"
      },
      "example": "car"
     },
     {
      "name": "value",
      "in": "query",
      "required": true,
      "description": "Taxable value in VND (price table value of a new vehicle, or the property value).",
      "schema": {
       "type": "number"
      },
      "example": 800000000
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province (name or code, 34 provinces) for the car rate and plate area.",
      "schema": {
       "type": "string"
      },
      "example": "Hà Nội"
     },
     {
      "name": "registration",
      "in": "query",
      "required": false,
      "description": "`first` or `subsequent` (used vehicle).",
      "schema": {
       "type": "string",
       "default": "first"
      }
     },
     {
      "name": "years_used",
      "in": "query",
      "required": false,
      "description": "Used vehicle: years of use (or `year_of_manufacture`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "area_m2",
      "in": "query",
      "required": false,
      "description": "House / land: area (with `price_per_m2`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Seats (insurance premium).",
      "schema": {
       "type": "number",
       "default": 5
      }
     },
     {
      "name": "price",
      "in": "query",
      "required": false,
      "description": "Selling price for the on-road total (default = value).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rate_percent",
      "in": "query",
      "required": false,
      "description": "Override the rate.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Registration date (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "asset": {
           "type": "string"
          },
          "asset_vi": {
           "type": "string"
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "registration": {
           "type": "string"
          },
          "taxable_value": {
           "type": "number"
          },
          "rate_percent": {
           "type": "number"
          },
          "registration_fee": {
           "type": "number"
          },
          "legal": {
           "type": "string"
          },
          "on_road": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "registration_fee": {
             "type": "number"
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "asset": "car",
         "asset_vi": "Ô tô chở người đến 9 chỗ",
         "province": {
          "code": "01",
          "name": "Thành phố Hà Nội"
         },
         "registration": "first",
         "taxable_value": 800000000,
         "rate_percent": 10,
         "registration_fee": 80000000,
         "legal": "NĐ 10/2022/NĐ-CP Điều 8 khoản 5 (mức chung 10%); no higher provincial resolution on record",
         "on_road": {
          "price": 800000000,
          "registration_fee": 80000000,
          "items": [
           {
            "item": "Registration and plate fee (area I)",
            "item_vi": "Lệ phí đăng ký, cấp biển số (khu vực I)",
            "amount": 14000000,
            "ref": "TT 155/2025/TT-BTC"
           },
           {
            "item": "Road-use fee, 12 months (individual owner)",
            "item_vi": "Phí sử dụng đường bộ 12 tháng (xe cá nhân)",
            "amount": 1560000,
            "ref": "NĐ 90/2023/NĐ-CP"
           },
           {
            "item": "Compulsory third-party insurance, 1 year (incl. 10% VAT)",
            "item_vi": "Bảo hiểm TNDS bắt buộc 1 năm (gồm VAT 10%)",
            "amount": 480700,
            "ref": "NĐ 67/2023/NĐ-CP"
           }
          ],
          "total": 896040700
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Registration Fee",
    "description": "Send the asset type, its taxable value and the province. The API applies NĐ 10/2022/NĐ-CP as amended by NĐ 51/2025 and NĐ 175/2025: 10% for passenger cars up to 9 seats unless the provincial council set more (e.g. 12% in Lạng Sơn and, from 8/8/2026, Hải Phòng; 11% in Tuyên Quang), 60% of that for double-cab pick-ups and vans, 0% for the first registration of battery electric cars (until 31/12/2030), 2% for second-hand cars and other vehicles, 2% for motorbikes (1% from the second registration) and 0.5% for houses and land.\n\nFor a used vehicle, `years_used` (or `year_of_manufacture`) applies the remaining-value table (90% / 70% / 50% / 30% / 20%). Houses and land accept `area_m2` × `price_per_m2`. `rate_percent` overrides the rate when your province adopts a new resolution.\n\nFor vehicles, `on_road` adds the other costs of the \"giá lăn bánh\": registration and plate fee by area (14,000,000 đ for cars in Hà Nội and TP.HCM, 140,000 đ elsewhere, TT 155/2025/TT-BTC), 12 months of road-use fee (NĐ 90/2023) and compulsory third-party insurance (NĐ 67/2023).\n\nDocs: https://apibox.io.vn/docs/vn-registration-fee/",
    "operationId": "vnRegistrationFeePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-registration-fee/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "asset": {
          "type": "string",
          "default": "car",
          "description": "`car`, `pickup`, `ev_car`, `other_car`, `motorbike`, `house`, `land`."
         },
         "value": {
          "type": "number",
          "description": "Taxable value in VND (price table value of a new vehicle, or the property value)."
         },
         "province": {
          "type": "string",
          "description": "Province (name or code, 34 provinces) for the car rate and plate area."
         },
         "registration": {
          "type": "string",
          "default": "first",
          "description": "`first` or `subsequent` (used vehicle)."
         },
         "years_used": {
          "type": "number",
          "description": "Used vehicle: years of use (or `year_of_manufacture`)."
         },
         "area_m2": {
          "type": "number",
          "description": "House / land: area (with `price_per_m2`)."
         },
         "seats": {
          "type": "number",
          "default": 5,
          "description": "Seats (insurance premium)."
         },
         "price": {
          "type": "number",
          "description": "Selling price for the on-road total (default = value)."
         },
         "rate_percent": {
          "type": "number",
          "description": "Override the rate."
         },
         "date": {
          "type": "string",
          "description": "Registration date (default today)."
         }
        },
        "required": [
         "value"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "asset": {
           "type": "string"
          },
          "asset_vi": {
           "type": "string"
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "registration": {
           "type": "string"
          },
          "taxable_value": {
           "type": "number"
          },
          "rate_percent": {
           "type": "number"
          },
          "registration_fee": {
           "type": "number"
          },
          "legal": {
           "type": "string"
          },
          "on_road": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "registration_fee": {
             "type": "number"
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-tax-calendar": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Tax Calendar",
    "description": "Pick a year, the entity (`company` or `household` business) and the filing periods, and get every tax deadline falling in that year: monthly returns on the 20th, quarterly returns on the last day of the following month, provisional CIT on day 30, annual CIT / PIT finalisation and financial statements at the end of the 3rd month after the fiscal year, individual PIT finalisation at the end of April, and the household-business calendar of NĐ 68/2026/NĐ-CP.\n\nEvery date that falls on a weekend or a public holiday is moved to the next working day (NĐ 252/2026/NĐ-CP Điều 3), using the official day-off schedules of our Vietnamese holiday calendar; `moved_because` says why. The business licence fee (due 30/1) is only listed up to 2025: it was abolished from 1/1/2026 by Nghị quyết 198/2025/QH15.\n\n`extension=true` adds the payment deadlines extended by NĐ 245/2026/NĐ-CP for eligible taxpayers. `month` and `upcoming=true` filter the list, and `format=ics` returns a calendar file with a reminder 3 days before each deadline.\n\nDocs: https://apibox.io.vn/docs/vn-tax-calendar/",
    "operationId": "vnTaxCalendarGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-calendar/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Year (default this year).",
      "schema": {
       "type": "number"
      },
      "example": 2026
     },
     {
      "name": "entity",
      "in": "query",
      "required": false,
      "description": "`company` or `household`.",
      "schema": {
       "type": "string",
       "default": "company"
      }
     },
     {
      "name": "vat_period",
      "in": "query",
      "required": false,
      "description": "`monthly`, `quarterly` or `none` (households: quarterly by default).",
      "schema": {
       "type": "string",
       "default": "monthly"
      },
      "example": "quarterly"
     },
     {
      "name": "pit_period",
      "in": "query",
      "required": false,
      "description": "PIT withholding period (default = vat_period).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fiscal_year_end_month",
      "in": "query",
      "required": false,
      "description": "Last month of the fiscal year.",
      "schema": {
       "type": "number",
       "default": 12
      }
     },
     {
      "name": "extension",
      "in": "query",
      "required": false,
      "description": "Add NĐ 245/2026 extended payment dates.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "month",
      "in": "query",
      "required": false,
      "description": "Only deadlines in this month.",
      "schema": {
       "type": "number"
      },
      "example": 7
     },
     {
      "name": "upcoming",
      "in": "query",
      "required": false,
      "description": "Only deadlines from today.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `ics` (calendar file).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "entity": {
           "type": "string"
          },
          "vat_period": {
           "type": "string"
          },
          "pit_period": {
           "type": "string"
          },
          "deadlines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "period": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "title_vi": {
              "type": "string"
             },
             "title_en": {
              "type": "string"
             },
             "due_date": {
              "type": "string"
             },
             "statutory_date": {
              "type": "string"
             },
             "moved": {
              "type": "boolean"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "entity": "company",
         "vat_period": "quarterly",
         "pit_period": "quarterly",
         "deadlines": [
          {
           "period": "2026-Q2",
           "kind": "cit",
           "title_vi": "Tạm nộp thuế TNDN quý 2/2026",
           "title_en": "Provisional CIT payment, Q2 2026",
           "due_date": "2026-07-30",
           "statutory_date": "2026-07-30",
           "moved": false,
           "ref": "NĐ 126/2020/NĐ-CP Điều 55 (ngày 30 tháng đầu quý sau)"
          },
          {
           "period": "2026-Q2",
           "kind": "pit",
           "title_vi": "Khai, nộp thuế TNCN khấu trừ quý 2/2026",
           "title_en": "PIT withholding return, Q2 2026",
           "due_date": "2026-07-31",
           "statutory_date": "2026-07-31",
           "moved": false,
           "ref": "NĐ 252/2026/NĐ-CP Điều 10 khoản 3"
          },
          {
           "period": "2026-Q2",
           "kind": "vat",
           "title_vi": "Khai, nộp thuế GTGT quý 2/2026",
           "title_en": "VAT return and payment, Q2 2026",
           "due_date": "2026-07-31",
           "statutory_date": "2026-07-31",
           "moved": false,
           "ref": "NĐ 252/2026/NĐ-CP Điều 10 khoản 3"
          }
         ],
         "count": 3,
         "notes": [
          "Due dates falling on a weekend or public holiday move to the next working day (NĐ 252/2026/NĐ-CP Điều 3 khoản 7)."
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Tax Calendar",
    "description": "Pick a year, the entity (`company` or `household` business) and the filing periods, and get every tax deadline falling in that year: monthly returns on the 20th, quarterly returns on the last day of the following month, provisional CIT on day 30, annual CIT / PIT finalisation and financial statements at the end of the 3rd month after the fiscal year, individual PIT finalisation at the end of April, and the household-business calendar of NĐ 68/2026/NĐ-CP.\n\nEvery date that falls on a weekend or a public holiday is moved to the next working day (NĐ 252/2026/NĐ-CP Điều 3), using the official day-off schedules of our Vietnamese holiday calendar; `moved_because` says why. The business licence fee (due 30/1) is only listed up to 2025: it was abolished from 1/1/2026 by Nghị quyết 198/2025/QH15.\n\n`extension=true` adds the payment deadlines extended by NĐ 245/2026/NĐ-CP for eligible taxpayers. `month` and `upcoming=true` filter the list, and `format=ics` returns a calendar file with a reminder 3 days before each deadline.\n\nDocs: https://apibox.io.vn/docs/vn-tax-calendar/",
    "operationId": "vnTaxCalendarPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-calendar/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "year": {
          "type": "number",
          "description": "Year (default this year)."
         },
         "entity": {
          "type": "string",
          "default": "company",
          "description": "`company` or `household`."
         },
         "vat_period": {
          "type": "string",
          "default": "monthly",
          "description": "`monthly`, `quarterly` or `none` (households: quarterly by default)."
         },
         "pit_period": {
          "type": "string",
          "description": "PIT withholding period (default = vat_period)."
         },
         "fiscal_year_end_month": {
          "type": "number",
          "default": 12,
          "description": "Last month of the fiscal year."
         },
         "extension": {
          "type": "boolean",
          "description": "Add NĐ 245/2026 extended payment dates."
         },
         "month": {
          "type": "number",
          "description": "Only deadlines in this month."
         },
         "upcoming": {
          "type": "boolean",
          "description": "Only deadlines from today."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `ics` (calendar file)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "entity": {
           "type": "string"
          },
          "vat_period": {
           "type": "string"
          },
          "pit_period": {
           "type": "string"
          },
          "deadlines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "period": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "title_vi": {
              "type": "string"
             },
             "title_en": {
              "type": "string"
             },
             "due_date": {
              "type": "string"
             },
             "statutory_date": {
              "type": "string"
             },
             "moved": {
              "type": "boolean"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-retirement": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Retirement Age",
    "description": "Send a birth date and sex and get the retirement age that applies (men 60 years 3 months in 2021 rising by 3 months a year to 62 in 2028; women 55 years 4 months rising by 4 months a year to 60 in 2035), the day the age is reached, the retirement date (end of that month) and the first pension month, exactly as in Phụ lục I of NĐ 135/2020/NĐ-CP.\n\n`condition=reduced` applies the roadmap 5 years lower (Phụ lục II: at least 15 years of heavy or hazardous work, especially difficult areas, or ≥ 61% reduced working capacity), `mining` up to 10 years lower, and `later` the maximum 5 years later; with the normal condition the answer also shows the reduced age.\n\nWith `contribution_years` (or `contribution_months`) the API adds the pension rate of Luật BHXH 41/2024/QH15 Điều 66: 45% for 15 years (women) or 20 years (men, 40% at 15 years), +2% per extra year, up to 75%.\n\nDocs: https://apibox.io.vn/docs/vn-retirement/",
    "operationId": "vnRetirementGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-retirement/"
    },
    "parameters": [
     {
      "name": "birth_date",
      "in": "query",
      "required": true,
      "description": "Birth date (YYYY-MM-DD; YYYY-MM uses day 1).",
      "schema": {
       "type": "string"
      },
      "example": "1975-08-20"
     },
     {
      "name": "sex",
      "in": "query",
      "required": true,
      "description": "`male` or `female`.",
      "schema": {
       "type": "string"
      },
      "example": "female"
     },
     {
      "name": "condition",
      "in": "query",
      "required": false,
      "description": "`normal`, `reduced`, `mining` or `later`.",
      "schema": {
       "type": "string",
       "default": "normal"
      }
     },
     {
      "name": "contribution_years",
      "in": "query",
      "required": false,
      "description": "Years of social-insurance contributions (pension rate).",
      "schema": {
       "type": "number"
      },
      "example": 20
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "birth_date": {
           "type": "string"
          },
          "sex": {
           "type": "string"
          },
          "condition": {
           "type": "string"
          },
          "retirement_age": {
           "type": "object",
           "properties": {
            "years": {
             "type": "number"
            },
            "months": {
             "type": "number"
            },
            "text_vi": {
             "type": "string"
            }
           }
          },
          "reaches_age_on": {
           "type": "string"
          },
          "retirement_date": {
           "type": "string"
          },
          "pension_start": {
           "type": "string"
          },
          "already_retired": {
           "type": "boolean"
          },
          "reduced_age": {
           "type": "object",
           "properties": {
            "age": {
             "type": "object",
             "properties": {
              "years": {
               "type": "number"
              },
              "months": {
               "type": "number"
              },
              "text_vi": {
               "type": "string"
              }
             }
            },
            "from": {
             "type": "string"
            },
            "applies_to": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "string"
          },
          "pension": {
           "type": "object",
           "properties": {
            "contribution_years": {
             "type": "number"
            },
            "eligible": {
             "type": "boolean"
            },
            "rate_percent": {
             "type": "number"
            },
            "legal": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "birth_date": "1975-08-20",
         "sex": "female",
         "condition": "normal",
         "retirement_age": {
          "years": 60,
          "months": 0,
          "text_vi": "60 tuổi"
         },
         "reaches_age_on": "2035-08-20",
         "retirement_date": "2035-08-31",
         "pension_start": "2035-09-01",
         "already_retired": false,
         "reduced_age": {
          "age": {
           "years": 52,
           "months": 4,
           "text_vi": "52 tuổi 4 tháng"
          },
          "from": "2027-12-20",
          "applies_to": "heavy / hazardous work or especially difficult areas ≥ 15 years, reduced working capacity ≥ 61% (NĐ 135/2020 Điều 5)"
         },
         "legal": "NĐ 135/2020/NĐ-CP Điều 4, Phụ lục I",
         "pension": {
          "contribution_years": 20,
          "eligible": true,
          "rate_percent": 55,
          "legal": "Luật BHXH 41/2024/QH15 Điều 64, 66 (15 years minimum; early retirement reduces the rate by 2% per year early)"
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-min-wage": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Minimum Wage",
    "description": "Look up which wage region (vùng I–IV) a phường, xã or đặc khu belongs to and its minimum wage: NĐ 293/2025/NĐ-CP in 2026 (5,310,000 / 4,730,000 / 4,140,000 / 3,700,000 đ per month) and NĐ 399/2026/NĐ-CP from 1/1/2027 (5,700,000 / 5,080,000 / 4,450,000 / 4,040,000 đ). Both appendices list the new administrative units after 1/7/2025 by name; every one of the 3,321 wards is mapped to its code, so the answer also shows the region from the next decree.\n\nSend `ward` as a name (with `province` when the name exists in several provinces) or a 5-digit code, `old_ward` with a pre-2025 commune code (converted through the official merger table, including split communes), or only `province` to list its regions and the wards named in each. Without parameters you get the rates in force; `date` picks another day (2024-07-01 onwards for the rates).\n\nData is rebuilt from the decree appendices by a script that checks every name against the ward list.\n\nDocs: https://apibox.io.vn/docs/vn-min-wage/",
    "operationId": "vnMinWageGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-min-wage/"
    },
    "parameters": [
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "Current ward / commune name or 5-digit code.",
      "schema": {
       "type": "string"
      },
      "example": "Thục Phán"
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province (name or code); alone, lists its regions.",
      "schema": {
       "type": "string"
      },
      "example": "Cao Bằng"
     },
     {
      "name": "old_ward",
      "in": "query",
      "required": false,
      "description": "Pre-2025 ward / commune code.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ward": {
              "type": "string"
             },
             "ward_code": {
              "type": "string"
             },
             "province": {
              "type": "string"
             },
             "province_code": {
              "type": "string"
             },
             "region": {
              "type": "string"
             },
             "monthly": {
              "type": "number"
             },
             "hourly": {
              "type": "number"
             },
             "from_next_decree": {
              "type": "object"
             }
            }
           }
          },
          "decree": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "effective_to": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "upcoming": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "monthly": {
             "type": "object",
             "properties": {
              "I": {
               "type": "number"
              },
              "II": {
               "type": "number"
              },
              "III": {
               "type": "number"
              },
              "IV": {
               "type": "number"
              }
             }
            },
            "hourly": {
             "type": "object",
             "properties": {
              "I": {
               "type": "number"
              },
              "II": {
               "type": "number"
              },
              "III": {
               "type": "number"
              },
              "IV": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "results": [
          {
           "ward": "Phường Thục Phán",
           "ward_code": "01273",
           "province": "Tỉnh Cao Bằng",
           "province_code": "04",
           "region": "III",
           "monthly": 4140000,
           "hourly": 20000,
           "from_next_decree": {
            "region": "III",
            "monthly": 4450000,
            "hourly": 21400,
            "effective_from": "2027-01-01"
           }
          }
         ],
         "decree": "293/2025/NĐ-CP",
         "effective_from": "2026-01-01",
         "effective_to": "2026-12-31",
         "source": "https://lsvn.vn/danh-muc-dia-ban-ap-dung-muc-luong-toi-thieu-tu-ngay-01-01-2026-a165752.html",
         "reviewed": "2026-11-11",
         "upcoming": {
          "decree": "399/2026/NĐ-CP",
          "effective_from": "2027-01-01",
          "monthly": {
           "I": 5700000,
           "II": 5080000,
           "III": 4450000,
           "IV": 4040000
          },
          "hourly": {
           "I": 27400,
           "II": 24400,
           "III": 21400,
           "IV": 19400
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-einvoice": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Vietnam e-invoice XML reader",
    "description": "Send the XML file of a Vietnamese electronic invoice (hóa đơn điện tử, the format of QĐ 1450/QĐ-TCT used by every provider: MISA, Viettel, VNPT, BKAV, FPT…). The API reads the `HDon` / `DLHDon` structure, also inside the `TDiep` message wrapper and with namespace prefixes, and returns clean JSON: invoice template, symbol, number and date, currency, the seller and the buyer (name, tax code, address, bank account), each line (code, name, unit, quantity, unit price, discount, amount, VAT rate), the VAT groups, fees and totals, the tax authority code (MCCQT) and the signatures that are present (signer subject, signing time). `format=csv` returns the lines as CSV for a spreadsheet.\n\nEvery invoice is re-checked: quantity × price − discount per line, the sum of lines per VAT rate, VAT = amount × rate, the totals, and the amount in words (`TgTTTBChu`) read back as a number. The symbol (ký hiệu) such as `1C26TAA` is explained part by part (VAT invoice, with a tax authority code, year 2026, registered by the seller…) and checked against the issue year, following TT 91/2026/TT-BTC (same structure as TT 32/2025 and TT 78/2021, plus letter F). Tax codes get a check-digit test.\n\nSignatures are listed, not verified cryptographically, and the invoice is not looked up on the tax authority portal. Files are processed in memory (up to 5 MB) and never stored.\n\n`format=pdf` renders the invoice as an A4 PDF (bản thể hiện) with the Be Vietnam Pro font: seller, buyer, lines, VAT groups, totals, amount in words, tax authority code and the signature blocks (listed, not verified). Every page carries a banner saying it was rendered by APIBox from the XML and is not the seller's original; failed checks are printed in red.\n\nDocs: https://apibox.io.vn/docs/vn-einvoice/",
    "operationId": "vnEinvoicePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-einvoice/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "The XML as a string instead of a file."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (default), `csv` (one row per invoice line, UTF-8 with BOM) or `pdf` (readable A4 rendering, labelled as rendered by APIBox, not the seller's original)."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "pdf: labels in `vi` or `en`."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The invoice XML file (multipart, raw `application/xml` body or `file_base64`)."
         },
         "xml": {
          "type": "string",
          "description": "The XML as a string instead of a file."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (default), `csv` (one row per invoice line, UTF-8 with BOM) or `pdf` (readable A4 rendering, labelled as rendered by APIBox, not the seller's original)."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "pdf: labels in `vi` or `en`."
         }
        }
       }
      },
      "application/xml": {
       "schema": {
        "type": "string"
       },
       "example": "<HDon><DLHDon Id=\"data\"><TTChung><PBan>2.1.0</PBan><THDon>HÓA ĐƠN GIÁ TRỊ GIA TĂNG</THDon><KHMSHDon>1</KHMSHDon><KHHDon>C26TAA</KHHDon><SHDon>123</SHDon><NLap>2026-11-10</NLap><DVTTe>VND</DVTTe><HTTToan>TM/CK</HTTToan></TTChung>\n<NDHDon><NBan><Ten>CÔNG TY TNHH THƯƠNG MẠI ABC</Ten><MST>0312345673</MST><DChi>12 Nguyễn Huệ, Phường Sài Gòn, TP. Hồ Chí Minh</DChi></NBan>\n<NMua><Ten>CÔNG TY CỔ PHẦN XYZ</Ten><MST>0100109106</MST><DChi>1 Tràng Tiền, Phường Hoàn Kiếm, Hà Nội</DChi></NMua>\n<DSHHDVu><HHDVu><TChat>1</TChat><STT>1</STT><THHDVu>Máy tính xách tay</THHDVu><DVTinh>Chiếc</DVTinh><SLuong>2</SLuong><DGia>15000000</DGia><ThTien>30000000</ThTien><TSuat>10%</TSuat></HHDVu>\n<HHDVu><TChat>1</TChat><STT>2</STT><THHDVu>Dịch vụ cài đặt</THHDVu><DVTinh>Gói</DVTinh><SLuong>1</SLuong><DGia>1500000</DGia><STCKhau>150000</STCKhau><ThTien>1350000</ThTien><TSuat>8%</TSuat></HHDVu></DSHHDVu>\n<TToan><THTTLTSuat><LTSuat><TSuat>10%</TSuat><ThTien>30000000</ThTien><TThue>3000000</TThue></LTSuat><LTSuat><TSuat>8%</TSuat><ThTien>1350000</ThTien><TThue>108000</TThue></LTSuat></THTTLTSuat>\n<TgTCThue>31350000</TgTCThue><TgTThue>3108000</TgTThue><TgTTTBSo>34458000</TgTTTBSo><TgTTTBChu>Ba mươi tư triệu bốn trăm năm mươi tám nghìn đồng</TgTTTBChu></TToan></NDHDon></DLHDon></HDon>"
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "invoice": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "template": {
             "type": "string"
            },
            "symbol": {
             "type": "string"
            },
            "number": {
             "type": "string"
            },
            "issue_date": {
             "type": "string"
            },
            "currency": {
             "type": "string"
            },
            "exchange_rate": {},
            "payment_method": {
             "type": "string"
            },
            "tax_authority_code": {},
            "provider_tax_code": {},
            "id": {
             "type": "string"
            },
            "related_invoice": {}
           }
          },
          "symbol_info": {
           "type": "object",
           "properties": {
            "template": {
             "type": "string"
            },
            "symbol": {
             "type": "string"
            },
            "full": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            },
            "errors": {
             "type": "array"
            },
            "parts": {
             "type": "object",
             "properties": {
              "template": {
               "type": "object"
              },
              "authority_code": {
               "type": "object"
              },
              "year": {
               "type": "object"
              },
              "type": {
               "type": "object"
              },
              "seller_code": {
               "type": "object"
              }
             }
            }
           }
          },
          "seller": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "tax_code": {
             "type": "string"
            },
            "tax_code_check": {
             "type": "object",
             "properties": {
              "valid": {
               "type": "boolean"
              },
              "kind": {
               "type": "string"
              }
             }
            },
            "address": {
             "type": "string"
            }
           }
          },
          "buyer": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "tax_code": {
             "type": "string"
            },
            "tax_code_check": {
             "type": "object",
             "properties": {
              "valid": {
               "type": "boolean"
              },
              "kind": {
               "type": "string"
              }
             }
            },
            "address": {
             "type": "string"
            }
           }
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "kind": {
              "type": "string"
             },
             "kind_name": {
              "type": "string"
             },
             "code": {},
             "name": {
              "type": "string"
             },
             "unit": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "unit_price": {
              "type": "number"
             },
             "discount_rate": {},
             "discount_amount": {},
             "amount": {
              "type": "number"
             },
             "vat_rate": {
              "type": "string"
             },
             "vat_amount": {}
            }
           }
          },
          "vat_groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vat_rate": {
              "type": "string"
             },
             "taxable_amount": {
              "type": "number"
             },
             "vat_amount": {
              "type": "number"
             }
            }
           }
          },
          "fees": {
           "type": "array"
          },
          "totals": {
           "type": "object",
           "properties": {
            "before_vat": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "fees": {},
            "trade_discount": {},
            "total": {
             "type": "number"
            },
            "total_in_words": {
             "type": "string"
            }
           }
          },
          "signatures": {
           "type": "object",
           "properties": {
            "seller": {},
            "buyer": {},
            "tax_authority": {},
            "note": {
             "type": "string"
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "failed_checks": {
           "type": "number"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "check": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "expected": {},
             "actual": {},
             "message": {
              "type": "string"
             }
            }
           }
          },
          "legal_basis": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "invoice": {
          "name": "HÓA ĐƠN GIÁ TRỊ GIA TĂNG",
          "version": "2.1.0",
          "template": "1",
          "symbol": "C26TAA",
          "number": "123",
          "issue_date": "2026-11-10",
          "currency": "VND",
          "exchange_rate": null,
          "payment_method": "TM/CK",
          "tax_authority_code": null,
          "provider_tax_code": null,
          "id": "data",
          "related_invoice": null
         },
         "symbol_info": {
          "template": "1",
          "symbol": "C26TAA",
          "full": "1C26TAA",
          "valid": true,
          "errors": [],
          "parts": {
           "template": {
            "value": "1",
            "vi": "Hóa đơn giá trị gia tăng",
            "en": "VAT invoice"
           },
           "authority_code": {
            "value": "C",
            "vi": "Hóa đơn có mã của cơ quan thuế",
            "en": "With a tax authority code"
           },
           "year": {
            "value": "26",
            "year": 2026
           },
           "type": {
            "value": "T",
            "vi": "Hóa đơn do doanh nghiệp, tổ chức, hộ, cá nhân kinh doanh đăng ký sử dụng với cơ quan thuế",
            "en": "Invoice registered with the tax authority by the seller"
           },
           "seller_code": {
            "value": "AA",
            "note": "Chosen by the seller to manage its invoice series"
           }
          }
         },
         "seller": {
          "name": "CÔNG TY TNHH THƯƠNG MẠI ABC",
          "tax_code": "0312345673",
          "tax_code_check": {
           "valid": true,
           "kind": "organisation"
          },
          "address": "12 Nguyễn Huệ, Phường Sài Gòn, TP. Hồ Chí Minh"
         },
         "buyer": {
          "name": "CÔNG TY CỔ PHẦN XYZ",
          "tax_code": "0100109106",
          "tax_code_check": {
           "valid": true,
           "kind": "organisation"
          },
          "address": "1 Tràng Tiền, Phường Hoàn Kiếm, Hà Nội"
         },
         "lines": [
          {
           "no": 1,
           "kind": "1",
           "kind_name": "goods/service",
           "code": null,
           "name": "Máy tính xách tay",
           "unit": "Chiếc",
           "quantity": 2,
           "unit_price": 15000000,
           "discount_rate": null,
           "discount_amount": null,
           "amount": 30000000,
           "vat_rate": "10%",
           "vat_amount": null
          },
          {
           "no": 2,
           "kind": "1",
           "kind_name": "goods/service",
           "code": null,
           "name": "Dịch vụ cài đặt",
           "unit": "Gói",
           "quantity": 1,
           "unit_price": 1500000,
           "discount_rate": null,
           "discount_amount": 150000,
           "amount": 1350000,
           "vat_rate": "8%",
           "vat_amount": null
          }
         ],
         "vat_groups": [
          {
           "vat_rate": "10%",
           "taxable_amount": 30000000,
           "vat_amount": 3000000
          },
          {
           "vat_rate": "8%",
           "taxable_amount": 1350000,
           "vat_amount": 108000
          }
         ],
         "fees": [],
         "totals": {
          "before_vat": 31350000,
          "vat": 3108000,
          "fees": null,
          "trade_discount": null,
          "total": 34458000,
          "total_in_words": "Ba mươi tư triệu bốn trăm năm mươi tám nghìn đồng"
         },
         "signatures": {
          "seller": null,
          "buyer": null,
          "tax_authority": null,
          "note": "Signatures are listed, not verified cryptographically."
         },
         "valid": false,
         "failed_checks": 1,
         "checks": [
          {
           "check": "line 1: quantity × unit price − discount = amount",
           "ok": true,
           "expected": 30000000,
           "actual": 30000000
          },
          {
           "check": "VAT 8%: amount × rate = VAT",
           "ok": true,
           "expected": 108000,
           "actual": 108000
          },
          {
           "check": "total = before VAT + VAT + fees",
           "ok": true,
           "expected": 34458000,
           "actual": 34458000
          },
          {
           "check": "amount in words matches the total",
           "ok": true,
           "expected": "Ba mươi tư triệu bốn trăm năm mươi tám nghìn đồng",
           "actual": "Ba mươi tư triệu bốn trăm năm mươi tám nghìn đồng",
           "message": "words read as 34458000"
          },
          {
           "check": "invoice symbol (ký hiệu) is well formed",
           "ok": true,
           "actual": "1C26TAA"
          },
          {
           "check": "invoice with tax authority code carries <MCCQT>",
           "ok": false,
           "message": "No MCCQT element (the file may be the seller copy before the tax authority code was granted)"
          }
         ],
         "legal_basis": "Thông tư 91/2026/TT-BTC (from 01/07/2026; same symbol structure as TT 32/2025 and TT 78/2021) and NĐ 254/2026/NĐ-CP; XML: QĐ 1450/QĐ-TCT (amended by QĐ 1510/QĐ-TCT)",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cccd-qr": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "CCCD QR code reader",
    "description": "The QR code printed on Vietnamese chip ID cards (CCCD gắn chip since 2021, thẻ căn cước since 07/2024) holds one line of text separated by `|`: the 12-digit personal ID number, the old 9-digit CMND number (may be empty), full name, date of birth (ddmmyyyy), sex, place of residence and issue date. Send that text as `qr`, or a photo of the code as `image` (PNG / JPEG, the QR is read on the server), and get clean JSON with ISO dates.\n\nThe 12-digit number is checked against the card itself: province of registration (with the province it belongs to since the 2025 merger), the sex / century digit and the two birth-year digits must agree with the printed date of birth and sex. The name is split into family, middle and given names, the address is matched to the current wards and provinces, and the validity is computed from the renewal ages 14, 25, 40 and 60 of the Law on Identification 2023 (a card issued within 2 years before one of these ages stays valid until the next one).\n\nThis reads what the QR says; it does not prove the card is genuine (use the NFC chip for eKYC). The data is personal: it is processed in memory only, never stored and never logged.\n\nDocs: https://apibox.io.vn/docs/cccd-qr/",
    "operationId": "cccdQrPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cccd-qr/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "qr": {
          "type": "string",
          "description": "The QR text (`ID|old ID|name|ddmmyyyy|sex|address|ddmmyyyy`)."
         },
         "address": {
          "type": "boolean",
          "default": true,
          "description": "`false`: do not match the address to current wards."
         }
        }
       },
       "example": {
        "qr": "079099012345|272345678|Nguyễn Văn An|15081999|Nam|123 Lê Lợi, Phường Bến Thành, Quận 1, TP. Hồ Chí Minh|20042021"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "qr": {
          "type": "string",
          "description": "The QR text (`ID|old ID|name|ddmmyyyy|sex|address|ddmmyyyy`)."
         },
         "image": {
          "type": "string",
          "format": "binary",
          "description": "Or a PNG / JPEG photo of the QR code (multipart or `image_base64`)."
         },
         "address": {
          "type": "boolean",
          "default": true,
          "description": "`false`: do not match the address to current wards."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "id_number": {
           "type": "string"
          },
          "old_id_number": {
           "type": "string"
          },
          "full_name": {
           "type": "string"
          },
          "date_of_birth": {
           "type": "string"
          },
          "sex": {
           "type": "string"
          },
          "address": {
           "type": "string"
          },
          "issue_date": {
           "type": "string"
          },
          "name_parts": {
           "type": "object",
           "properties": {
            "family_name": {
             "type": "string"
            },
            "middle_name": {
             "type": "string"
            },
            "given_name": {
             "type": "string"
            },
            "unaccented": {
             "type": "string"
            }
           }
          },
          "number_details": {
           "type": "object",
           "properties": {
            "province_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_since_2025": {
             "type": "string"
            },
            "sex": {
             "type": "string"
            },
            "century_digit": {
             "type": "number"
            },
            "birth_year": {
             "type": "number"
            },
            "serial": {
             "type": "string"
            }
           }
          },
          "validity": {
           "type": "object",
           "properties": {
            "valid_until": {
             "type": "string"
            },
            "lifetime": {
             "type": "boolean"
            },
            "expired": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "address_parsed": {
           "type": "object",
           "properties": {
            "format": {
             "type": "string"
            },
            "matched": {
             "type": "boolean"
            },
            "result": {
             "type": "object",
             "properties": {
              "ward": {
               "type": "string"
              },
              "ward_code": {
               "type": "string"
              },
              "province": {
               "type": "string"
              },
              "province_code": {
               "type": "string"
              },
              "postal_code": {
               "type": "string"
              },
              "full_address": {
               "type": "string"
              }
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "source": "text",
         "valid": true,
         "errors": [],
         "warnings": [],
         "id_number": "079099012345",
         "old_id_number": "272345678",
         "full_name": "Nguyễn Văn An",
         "date_of_birth": "1999-08-15",
         "sex": "male",
         "address": "123 Lê Lợi, Phường Bến Thành, Quận 1, TP. Hồ Chí Minh",
         "issue_date": "2021-04-20",
         "name_parts": {
          "family_name": "Nguyễn",
          "middle_name": "Văn",
          "given_name": "An",
          "unaccented": "NGUYEN VAN AN"
         },
         "number_details": {
          "province_code": "079",
          "province": "TP. Hồ Chí Minh",
          "province_since_2025": "TP. Hồ Chí Minh",
          "sex": "male",
          "century_digit": 0,
          "birth_year": 1999,
          "serial": "012345"
         },
         "validity": {
          "valid_until": "2024-08-15",
          "lifetime": false,
          "expired": true,
          "rule": "Renew at 14, 25, 40 and 60; a card issued within 2 years before one of these ages stays valid until the next one (Luật Căn cước 2023, Điều 21)."
         },
         "address_parsed": {
          "format": "old (before 07/2025)",
          "matched": true,
          "result": {
           "ward": "Phường Bến Thành",
           "ward_code": "26743",
           "province": "Thành phố Hồ Chí Minh",
           "province_code": "79",
           "postal_code": "71009",
           "full_address": "123 Lê Lợi, Phường Bến Thành, Thành phố Hồ Chí Minh"
          }
         },
         "note": "Parsed from the QR text only: this does not prove the card is genuine (use NFC chip reading / C06 verification for eKYC). Nothing is stored or logged."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/bhyt-check": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "BHYT card code decoder",
    "description": "A Vietnamese health insurance card code has 15 characters, e.g. `DN4797931234567`: 2 letters for the beneficiary group (DN = employee of a company, HT = pensioner, TE = child under 6, HS / SV = pupil / student…), 1 digit for the benefit level (1–5), 2 digits for the province that issued the card and the 10-digit social insurance number (mã số BHXH). The API splits the code and explains each part in Vietnamese and English.\n\nGroup codes and benefit levels follow Appendix I of Official Letter 1804/BHXH-QLT (04/08/2025, after the 2024 amendment of the Health Insurance Law): 65 groups in five categories (paid by employers, by the social insurance fund, by the state budget, partly by the budget, voluntary), plus old codes still printed on cards. Levels are returned with their share of costs (100%, 95%, 80%…) and conditions. A level that differs from the usual one for the group is flagged as a warning, not an error, because a person in several groups gets the best benefit. `codes` checks up to 500 codes at once and `list=true` returns the full table.\n\nOnly the structure is decoded: the card is not looked up on the VSS portal (validity dates and registered clinic are unknown), and nothing is stored.\n\nDocs: https://apibox.io.vn/docs/bhyt-check/",
    "operationId": "bhytCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/bhyt-check/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": true,
      "description": "The 15-character card code (spaces allowed), or a 10-digit social insurance number.",
      "schema": {
       "type": "string"
      },
      "example": "DN4797931234567"
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`true`: return the table of group codes and levels.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "formatted": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "group": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "category": {
             "type": "object",
             "properties": {
              "number": {
               "type": "number"
              },
              "vi": {
               "type": "string"
              },
              "en": {
               "type": "string"
              }
             }
            },
            "legacy": {
             "type": "boolean"
            },
            "usual_benefit_level": {
             "type": "number"
            }
           }
          },
          "benefit_level": {
           "type": "object",
           "properties": {
            "level": {
             "type": "number"
            },
            "percent": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "since_2025": {
             "type": "string"
            }
           }
          },
          "social_insurance_number": {
           "type": "string"
          },
          "legal_basis": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "DN4797931234567",
         "normalized": "DN4797931234567",
         "formatted": "DN 4 79 7931234567",
         "format": "card code (15 characters)",
         "valid": true,
         "errors": [],
         "warnings": [],
         "group": {
          "code": "DN",
          "vi": "Người lao động làm việc theo hợp đồng lao động, người quản lý trong doanh nghiệp nhà nước",
          "en": "Employees and managers of state-owned enterprises",
          "category": {
           "number": 1,
           "vi": "Nhóm do người lao động và người sử dụng lao động đóng",
           "en": "Paid by employer and employee"
          },
          "legacy": false,
          "usual_benefit_level": 4
         },
         "benefit_level": {
          "level": 4,
          "percent": 80,
          "vi": "80% chi phí KCB trong phạm vi được hưởng; 100% khi KCB tại tuyến xã, chi phí một lần dưới 15% lương cơ sở hoặc đủ 5 năm liên tục và chi trả cùng trong năm vượt 6 tháng lương cơ sở",
          "en": "80% of covered costs; 100% at commune level, below 15% of the base salary per visit, or after 5 consecutive years once co-payments exceed 6 months of base salary"
         },
         "province": {
          "code": "79",
          "name": "TP. Hồ Chí Minh",
          "since_2025": "TP. Hồ Chí Minh"
         },
         "social_insurance_number": "7931234567",
         "legal_basis": "QĐ 1351/QĐ-BHXH (card code structure); Công văn 1804/BHXH-QLT 04/08/2025, Phụ lục I (group codes, benefit levels); Luật BHYT 2008 amended by Luật 51/2024/QH15 (Điều 22)",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "BHYT card code decoder",
    "description": "A Vietnamese health insurance card code has 15 characters, e.g. `DN4797931234567`: 2 letters for the beneficiary group (DN = employee of a company, HT = pensioner, TE = child under 6, HS / SV = pupil / student…), 1 digit for the benefit level (1–5), 2 digits for the province that issued the card and the 10-digit social insurance number (mã số BHXH). The API splits the code and explains each part in Vietnamese and English.\n\nGroup codes and benefit levels follow Appendix I of Official Letter 1804/BHXH-QLT (04/08/2025, after the 2024 amendment of the Health Insurance Law): 65 groups in five categories (paid by employers, by the social insurance fund, by the state budget, partly by the budget, voluntary), plus old codes still printed on cards. Levels are returned with their share of costs (100%, 95%, 80%…) and conditions. A level that differs from the usual one for the group is flagged as a warning, not an error, because a person in several groups gets the best benefit. `codes` checks up to 500 codes at once and `list=true` returns the full table.\n\nOnly the structure is decoded: the card is not looked up on the VSS portal (validity dates and registered clinic are unknown), and nothing is stored.\n\nDocs: https://apibox.io.vn/docs/bhyt-check/",
    "operationId": "bhytCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/bhyt-check/"
    },
    "parameters": [
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`true`: return the table of group codes and levels.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "description": "The 15-character card code (spaces allowed), or a 10-digit social insurance number."
         },
         "codes": {
          "type": "array",
          "items": {},
          "description": "Up to 500 codes at once."
         }
        },
        "required": [
         "code"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "formatted": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "group": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "category": {
             "type": "object",
             "properties": {
              "number": {
               "type": "number"
              },
              "vi": {
               "type": "string"
              },
              "en": {
               "type": "string"
              }
             }
            },
            "legacy": {
             "type": "boolean"
            },
            "usual_benefit_level": {
             "type": "number"
            }
           }
          },
          "benefit_level": {
           "type": "object",
           "properties": {
            "level": {
             "type": "number"
            },
            "percent": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "since_2025": {
             "type": "string"
            }
           }
          },
          "social_insurance_number": {
           "type": "string"
          },
          "legal_basis": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-number-parse": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese amounts to numbers",
    "description": "The reverse of number-to-words for Vietnamese. The parser understands standard reading (`hai nghìn không trăm hai mươi sáu`, `một trăm lẻ năm`, `ba mươi mốt`, `mười lăm nghìn`), colloquial shortcuts (`hai triệu rưỡi`, `trăm rưỡi`, `một tỷ hai` = 1.2 billion, `hai lăm nghìn`, `nửa triệu`), shop and chat slang (`500k`, `2tr5`, `1k2`, `2 củ`, `1 tỏi`, `2 lít`), Vietnamese decimal and thousands separators (`1,5 triệu`, `1.500.000đ`) and text typed without accents (`hai trieu ruoi`).\n\nEach result has the value, the currency when one is written (đồng, đ, VNĐ, $, USD) or implied by slang, the amount read back in words, a confidence score and the alternative reading when the text is ambiguous (`2tr5` could literally be 2,000,005; `1.500` could be 1.5). `mode=extract` finds every amount inside a sentence with its character positions, handy for chat orders or bank transfer notes; `texts` parses up to 1,000 strings at once.\n\nRanges such as “2-3 triệu” are returned as two amounts, and digit sequences like “hai ba” are rejected as ambiguous instead of guessed.\n\nDocs: https://apibox.io.vn/docs/vn-number-parse/",
    "operationId": "vnNumberParseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-number-parse/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The amount (or a sentence with `mode=extract`).",
      "schema": {
       "type": "string"
      },
      "example": "Cọc 2tr5, còn lại một triệu hai trăm nghìn đồng, ship 30k"
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`parse`: the whole text is one amount; `extract`: find amounts inside the text.",
      "schema": {
       "type": "string",
       "default": "parse"
      },
      "example": "extract"
     },
     {
      "name": "money_only",
      "in": "query",
      "required": false,
      "description": "Extract: keep only amounts with a currency, slang or a scale (nghìn, triệu…).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "text": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "amounts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "value": {
              "type": "number"
             },
             "currency": {
              "type": "string"
             },
             "is_money": {
              "type": "boolean"
             },
             "in_words": {
              "type": "string"
             },
             "confidence": {
              "type": "number"
             },
             "alternatives": {
              "type": "array"
             },
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             }
            }
           }
          },
          "total": {
           "type": "number"
          }
         }
        },
        "example": {
         "mode": "extract",
         "text": "Cọc 2tr5, còn lại một triệu hai trăm nghìn đồng, ship 30k",
         "count": 3,
         "amounts": [
          {
           "text": "2tr5",
           "value": 2500000,
           "currency": "VND",
           "is_money": true,
           "in_words": "Hai triệu năm trăm nghìn đồng",
           "confidence": 0.85,
           "alternatives": [
            {
             "value": 2000005,
             "reading": "literal (the trailing number as units)"
            }
           ],
           "start": 4,
           "end": 8
          },
          {
           "text": "một triệu hai trăm nghìn đồng",
           "value": 1200000,
           "currency": "VND",
           "is_money": true,
           "in_words": "Một triệu hai trăm nghìn đồng",
           "confidence": 1,
           "alternatives": [],
           "start": 18,
           "end": 47
          },
          {
           "text": "30k",
           "value": 30000,
           "currency": "VND",
           "is_money": true,
           "in_words": "Ba mươi nghìn đồng",
           "confidence": 1,
           "alternatives": [],
           "start": 54,
           "end": 57
          }
         ],
         "total": 3730000
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese amounts to numbers",
    "description": "The reverse of number-to-words for Vietnamese. The parser understands standard reading (`hai nghìn không trăm hai mươi sáu`, `một trăm lẻ năm`, `ba mươi mốt`, `mười lăm nghìn`), colloquial shortcuts (`hai triệu rưỡi`, `trăm rưỡi`, `một tỷ hai` = 1.2 billion, `hai lăm nghìn`, `nửa triệu`), shop and chat slang (`500k`, `2tr5`, `1k2`, `2 củ`, `1 tỏi`, `2 lít`), Vietnamese decimal and thousands separators (`1,5 triệu`, `1.500.000đ`) and text typed without accents (`hai trieu ruoi`).\n\nEach result has the value, the currency when one is written (đồng, đ, VNĐ, $, USD) or implied by slang, the amount read back in words, a confidence score and the alternative reading when the text is ambiguous (`2tr5` could literally be 2,000,005; `1.500` could be 1.5). `mode=extract` finds every amount inside a sentence with its character positions, handy for chat orders or bank transfer notes; `texts` parses up to 1,000 strings at once.\n\nRanges such as “2-3 triệu” are returned as two amounts, and digit sequences like “hai ba” are rejected as ambiguous instead of guessed.\n\nDocs: https://apibox.io.vn/docs/vn-number-parse/",
    "operationId": "vnNumberParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-number-parse/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The amount (or a sentence with `mode=extract`)."
         },
         "mode": {
          "type": "string",
          "default": "parse",
          "description": "`parse`: the whole text is one amount; `extract`: find amounts inside the text."
         },
         "texts": {
          "type": "array",
          "items": {},
          "description": "Up to 1,000 strings (batch)."
         },
         "money_only": {
          "type": "boolean",
          "default": false,
          "description": "Extract: keep only amounts with a currency, slang or a scale (nghìn, triệu…)."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "text": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "amounts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "value": {
              "type": "number"
             },
             "currency": {
              "type": "string"
             },
             "is_money": {
              "type": "boolean"
             },
             "in_words": {
              "type": "string"
             },
             "confidence": {
              "type": "number"
             },
             "alternatives": {
              "type": "array"
             },
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             }
            }
           }
          },
          "total": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-name": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese name parser",
    "description": "Vietnamese names are written family name first (`Nguyễn Văn Hùng`) and people are addressed by the last word. The API normalises spacing and capitals (`nguyễn  văn HÙNG` → `Nguyễn Văn Hùng`), splits family, middle and given names, including multi-word family names (Tôn Nữ, Tôn Thất, Âu Dương, Nguyễn Phước, Công Tằng Tôn Nữ), and detects names written in Western order (`Hung Van Nguyen`). It returns `first_name` / `last_name` for international forms, unaccented and upper-case forms for bank cards, initials, a URL slug and common corporate e-mail local parts (`hungnv`, `hung.nguyen`).\n\nGender is guessed with a probability from the middle name (Thị, Văn) and statistics of about 2,500 labelled given names (duyet/vietnamese-namedb, MIT licence, refreshed weekly). The answer also suggests a salutation (anh / chị, ông / bà, `Chào chị Hương`, `Kính gửi Bà …`); neutral names such as Anh or Linh return a lower confidence or `unknown`. Send `names` (array or one per line, up to 1,000) to process a list, and `sort=true` to sort it the Vietnamese way (given name, then middle, then family, with the Vietnamese alphabet).\n\nThe gender guess is statistical and should only be used for wording, never for decisions about a person. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/vn-name/",
    "operationId": "vnNameGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-name/"
    },
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": true,
      "description": "Full name (max 200 characters).",
      "schema": {
       "type": "string"
      },
      "example": "nguyễn  thị thu HƯƠNG"
     },
     {
      "name": "order",
      "in": "query",
      "required": false,
      "description": "`auto`, `family_first` or `given_first`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "With `names`: sort in Vietnamese order.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "full_name": {
           "type": "string"
          },
          "family_name": {
           "type": "string"
          },
          "middle_name": {
           "type": "string"
          },
          "given_name": {
           "type": "string"
          },
          "first_name": {
           "type": "string"
          },
          "last_name": {
           "type": "string"
          },
          "order_detected": {
           "type": "string"
          },
          "word_count": {
           "type": "number"
          },
          "unaccented": {
           "type": "string"
          },
          "upper_unaccented": {
           "type": "string"
          },
          "initials": {
           "type": "string"
          },
          "gender": {
           "type": "string"
          },
          "gender_probability_female": {
           "type": "number"
          },
          "gender_confidence": {
           "type": "number"
          },
          "gender_evidence": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "salutation": {
           "type": "object",
           "properties": {
            "informal": {
             "type": "string"
            },
            "formal": {
             "type": "string"
            },
            "greeting_vi": {
             "type": "string"
            },
            "letter_vi": {
             "type": "string"
            }
           }
          },
          "slug": {
           "type": "string"
          },
          "email_local_parts": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "sort_key": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "source": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "nguyễn  thị thu HƯƠNG",
         "full_name": "Nguyễn Thị Thu Hương",
         "family_name": "Nguyễn",
         "middle_name": "Thị Thu",
         "given_name": "Hương",
         "first_name": "Thị Thu Hương",
         "last_name": "Nguyễn",
         "order_detected": "family_first",
         "word_count": 4,
         "unaccented": "Nguyen Thi Thu Huong",
         "upper_unaccented": "NGUYEN THI THU HUONG",
         "initials": "NTTH",
         "gender": "female",
         "gender_probability_female": 1,
         "gender_confidence": 1,
         "gender_evidence": [
          "middle name \"Thị\" (female)",
          "given name \"hương\": 0 male / 25 female names"
         ],
         "salutation": {
          "informal": "chị",
          "formal": "bà",
          "greeting_vi": "Chào chị Hương",
          "letter_vi": "Kính gửi Bà Nguyễn Thị Thu Hương"
         },
         "slug": "nguyen-thi-thu-huong",
         "email_local_parts": [
          "huongntt",
          "huong.nguyen",
          "nguyenthithuhuong"
         ],
         "sort_key": "kzspj xkl xky pjy}ip~11111111611111111141",
         "warnings": [],
         "source": "Gender statistics: duyet/vietnamese-namedb (MIT, © Van-Duyet Le), 1230 male / 1303 female names; updated 2026-11-11",
         "note": "Gender is a statistical guess from the name only; do not use it for decisions about a person."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese name parser",
    "description": "Vietnamese names are written family name first (`Nguyễn Văn Hùng`) and people are addressed by the last word. The API normalises spacing and capitals (`nguyễn  văn HÙNG` → `Nguyễn Văn Hùng`), splits family, middle and given names, including multi-word family names (Tôn Nữ, Tôn Thất, Âu Dương, Nguyễn Phước, Công Tằng Tôn Nữ), and detects names written in Western order (`Hung Van Nguyen`). It returns `first_name` / `last_name` for international forms, unaccented and upper-case forms for bank cards, initials, a URL slug and common corporate e-mail local parts (`hungnv`, `hung.nguyen`).\n\nGender is guessed with a probability from the middle name (Thị, Văn) and statistics of about 2,500 labelled given names (duyet/vietnamese-namedb, MIT licence, refreshed weekly). The answer also suggests a salutation (anh / chị, ông / bà, `Chào chị Hương`, `Kính gửi Bà …`); neutral names such as Anh or Linh return a lower confidence or `unknown`. Send `names` (array or one per line, up to 1,000) to process a list, and `sort=true` to sort it the Vietnamese way (given name, then middle, then family, with the Vietnamese alphabet).\n\nThe gender guess is statistical and should only be used for wording, never for decisions about a person. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/vn-name/",
    "operationId": "vnNamePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-name/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Full name (max 200 characters)."
         },
         "names": {
          "type": "array",
          "items": {},
          "description": "Up to 1,000 names (array, or a string with one name per line)."
         },
         "order": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `family_first` or `given_first`."
         },
         "sort": {
          "type": "boolean",
          "default": false,
          "description": "With `names`: sort in Vietnamese order."
         }
        },
        "required": [
         "name"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "full_name": {
           "type": "string"
          },
          "family_name": {
           "type": "string"
          },
          "middle_name": {
           "type": "string"
          },
          "given_name": {
           "type": "string"
          },
          "first_name": {
           "type": "string"
          },
          "last_name": {
           "type": "string"
          },
          "order_detected": {
           "type": "string"
          },
          "word_count": {
           "type": "number"
          },
          "unaccented": {
           "type": "string"
          },
          "upper_unaccented": {
           "type": "string"
          },
          "initials": {
           "type": "string"
          },
          "gender": {
           "type": "string"
          },
          "gender_probability_female": {
           "type": "number"
          },
          "gender_confidence": {
           "type": "number"
          },
          "gender_evidence": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "salutation": {
           "type": "object",
           "properties": {
            "informal": {
             "type": "string"
            },
            "formal": {
             "type": "string"
            },
            "greeting_vi": {
             "type": "string"
            },
            "letter_vi": {
             "type": "string"
            }
           }
          },
          "slug": {
           "type": "string"
          },
          "email_local_parts": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "sort_key": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "source": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-date-parse": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese date parser",
    "description": "The parser reads the date and time expressions people type in Vietnamese chats and forms, with or without accents, and resolves them against a reference time (`ref`, default now in Asia/Ho_Chi_Minh): relative days (`hôm nay`, `ngày mai`, `ngày kia`, `hôm qua`), offsets (`3 ngày nữa`, `2 tiếng nữa`, `cách đây 2 tháng`), weekdays with week modifiers (`thứ 2 tuần sau`, `t6 này`, `chủ nhật tuần trước`, `thứ 6 tới`), periods (`tuần sau`, `cuối tháng này`, `đầu năm sau`, `tháng 8`), explicit dates (`20/11`, `ngày 15 tháng 8 năm 2027`, `mùng 2 tháng 9`) and times (`8h`, `8h30`, `8 giờ rưỡi`, `9 giờ kém 15`, `3h chiều`, `8h tối`).\n\nLunar dates use the Vietnamese lunar calendar (UTC+7): `15/8 âm lịch`, `rằm tháng 7`, `mùng 5 Tết`, `28 Tết`, `giao thừa`, plus holidays such as Trung thu, Vu Lan, Giỗ Tổ, Noel or Quốc khánh. The answer has a type (`date`, `datetime` or `range` with start and end), the ISO date and date-time with the +07:00 offset, the weekday, the lunar date of the result and the words that were matched. Without a year, the next occurrence is chosen (`prefer=past` or `nearest` to change it).\n\nWorks on whole sentences (“đặt bàn 7h tối thứ 7 này nhé”); `texts` handles up to 500 strings. Expressions it does not understand return `found: false` rather than a guess.\n\nDocs: https://apibox.io.vn/docs/vn-date-parse/",
    "operationId": "vnDateParseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-date-parse/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The expression or sentence (max 500 characters).",
      "schema": {
       "type": "string"
      },
      "example": "thứ 2 tuần sau 9h sáng"
     },
     {
      "name": "ref",
      "in": "query",
      "required": false,
      "description": "Reference time, ISO (`2026-11-11` or `2026-11-11T09:30`, Vietnam time unless an offset is given). Default: now.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11T09:30"
     },
     {
      "name": "prefer",
      "in": "query",
      "required": false,
      "description": "`future`, `past` or `nearest` when the year or week is not written.",
      "schema": {
       "type": "string",
       "default": "future"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ref": {
           "type": "string"
          },
          "timezone": {
           "type": "string"
          },
          "prefer": {
           "type": "string"
          },
          "text": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "type": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "time": {
           "type": "string"
          },
          "datetime": {
           "type": "string"
          },
          "part_of_day": {
           "type": "string"
          },
          "weekday": {
           "type": "string"
          },
          "weekday_vi": {
           "type": "string"
          },
          "calendar": {
           "type": "string"
          },
          "lunar": {
           "type": "object",
           "properties": {
            "day": {
             "type": "number"
            },
            "month": {
             "type": "number"
            },
            "year": {
             "type": "number"
            },
            "leap": {
             "type": "boolean"
            },
            "text": {
             "type": "string"
            }
           }
          },
          "holiday": {},
          "matched": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "notes": {
           "type": "array"
          }
         }
        },
        "example": {
         "ref": "2026-11-11T09:30:00+07:00",
         "timezone": "Asia/Ho_Chi_Minh",
         "prefer": "future",
         "text": "thứ 2 tuần sau 9h sáng",
         "found": true,
         "type": "datetime",
         "date": "2026-11-16",
         "time": "09:00",
         "datetime": "2026-11-16T09:00:00+07:00",
         "part_of_day": "morning",
         "weekday": "Monday",
         "weekday_vi": "Thứ Hai",
         "calendar": "solar",
         "lunar": {
          "day": 8,
          "month": 10,
          "year": 2026,
          "leap": false,
          "text": "08/10/2026"
         },
         "holiday": null,
         "matched": [
          "sáng",
          "thứ 2 tuần sau",
          "9h"
         ],
         "notes": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese date parser",
    "description": "The parser reads the date and time expressions people type in Vietnamese chats and forms, with or without accents, and resolves them against a reference time (`ref`, default now in Asia/Ho_Chi_Minh): relative days (`hôm nay`, `ngày mai`, `ngày kia`, `hôm qua`), offsets (`3 ngày nữa`, `2 tiếng nữa`, `cách đây 2 tháng`), weekdays with week modifiers (`thứ 2 tuần sau`, `t6 này`, `chủ nhật tuần trước`, `thứ 6 tới`), periods (`tuần sau`, `cuối tháng này`, `đầu năm sau`, `tháng 8`), explicit dates (`20/11`, `ngày 15 tháng 8 năm 2027`, `mùng 2 tháng 9`) and times (`8h`, `8h30`, `8 giờ rưỡi`, `9 giờ kém 15`, `3h chiều`, `8h tối`).\n\nLunar dates use the Vietnamese lunar calendar (UTC+7): `15/8 âm lịch`, `rằm tháng 7`, `mùng 5 Tết`, `28 Tết`, `giao thừa`, plus holidays such as Trung thu, Vu Lan, Giỗ Tổ, Noel or Quốc khánh. The answer has a type (`date`, `datetime` or `range` with start and end), the ISO date and date-time with the +07:00 offset, the weekday, the lunar date of the result and the words that were matched. Without a year, the next occurrence is chosen (`prefer=past` or `nearest` to change it).\n\nWorks on whole sentences (“đặt bàn 7h tối thứ 7 này nhé”); `texts` handles up to 500 strings. Expressions it does not understand return `found: false` rather than a guess.\n\nDocs: https://apibox.io.vn/docs/vn-date-parse/",
    "operationId": "vnDateParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-date-parse/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The expression or sentence (max 500 characters)."
         },
         "ref": {
          "type": "string",
          "description": "Reference time, ISO (`2026-11-11` or `2026-11-11T09:30`, Vietnam time unless an offset is given). Default: now."
         },
         "prefer": {
          "type": "string",
          "default": "future",
          "description": "`future`, `past` or `nearest` when the year or week is not written."
         },
         "texts": {
          "type": "array",
          "items": {},
          "description": "Up to 500 strings (batch)."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ref": {
           "type": "string"
          },
          "timezone": {
           "type": "string"
          },
          "prefer": {
           "type": "string"
          },
          "text": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "type": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "time": {
           "type": "string"
          },
          "datetime": {
           "type": "string"
          },
          "part_of_day": {
           "type": "string"
          },
          "weekday": {
           "type": "string"
          },
          "weekday_vi": {
           "type": "string"
          },
          "calendar": {
           "type": "string"
          },
          "lunar": {
           "type": "object",
           "properties": {
            "day": {
             "type": "number"
            },
            "month": {
             "type": "number"
            },
            "year": {
             "type": "number"
            },
            "leap": {
             "type": "boolean"
            },
            "text": {
             "type": "string"
            }
           }
          },
          "holiday": {},
          "matched": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "notes": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/sms-count": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "SMS segment counter",
    "description": "An SMS holds 160 characters of the GSM 7-bit alphabet, or only 70 as soon as one character is outside it (UCS-2), and long messages are split into parts of 153 or 67 characters. Every Vietnamese accent, curly quote or emoji therefore doubles or triples the cost of a message. The API tells you the encoding, the units used (septets or UTF-16 code units, the GSM extension characters ^ { } [ ] ~ | € \\ counting twice), the number of segments and what is left in the last one.\n\nIt lists each character that forces UCS-2 with its code point, position and suggested replacement, and returns a GSM-safe version of the text: Vietnamese accents removed, smart quotes, dashes and ellipses replaced, emoji dropped, with its own segment count and how many segments it saves. `segments=true` adds the text of each part, and `brandname` checks an alphanumeric sender ID (at most 11 characters).\n\nCounting follows 3GPP TS 23.038 / 23.040; carriers may add their own limits on concatenated brandname messages.\n\nDocs: https://apibox.io.vn/docs/sms-count/",
    "operationId": "smsCountGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sms-count/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The message (max 20,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "segments",
      "in": "query",
      "required": false,
      "description": "`true`: include the text of each segment.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "brandname",
      "in": "query",
      "required": false,
      "description": "Sender ID to check (≤ 11 characters).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "encoding": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          },
          "units": {
           "type": "number"
          },
          "unit": {
           "type": "string"
          },
          "segments": {
           "type": "number"
          },
          "per_segment": {
           "type": "number"
          },
          "remaining_in_segment": {
           "type": "number"
          },
          "ucs2_characters": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "char": {
              "type": "string"
             },
             "codepoint": {
              "type": "string"
             },
             "count": {
              "type": "number"
             },
             "first_index": {
              "type": "number"
             },
             "replacement": {
              "type": "string"
             }
            }
           }
          },
          "extension_characters": {
           "type": "array"
          },
          "gsm_version": {
           "type": "object",
           "properties": {
            "encoding": {
             "type": "string"
            },
            "characters": {
             "type": "number"
            },
            "units": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            },
            "segments": {
             "type": "number"
            },
            "per_segment": {
             "type": "number"
            },
            "remaining_in_segment": {
             "type": "number"
            },
            "text": {
             "type": "string"
            },
            "changed_characters": {
             "type": "number"
            },
            "saves_segments": {
             "type": "number"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "SMS segment counter",
    "description": "An SMS holds 160 characters of the GSM 7-bit alphabet, or only 70 as soon as one character is outside it (UCS-2), and long messages are split into parts of 153 or 67 characters. Every Vietnamese accent, curly quote or emoji therefore doubles or triples the cost of a message. The API tells you the encoding, the units used (septets or UTF-16 code units, the GSM extension characters ^ { } [ ] ~ | € \\ counting twice), the number of segments and what is left in the last one.\n\nIt lists each character that forces UCS-2 with its code point, position and suggested replacement, and returns a GSM-safe version of the text: Vietnamese accents removed, smart quotes, dashes and ellipses replaced, emoji dropped, with its own segment count and how many segments it saves. `segments=true` adds the text of each part, and `brandname` checks an alphanumeric sender ID (at most 11 characters).\n\nCounting follows 3GPP TS 23.038 / 23.040; carriers may add their own limits on concatenated brandname messages.\n\nDocs: https://apibox.io.vn/docs/sms-count/",
    "operationId": "smsCountPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sms-count/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The message (max 20,000 characters)."
         },
         "segments": {
          "type": "boolean",
          "default": false,
          "description": "`true`: include the text of each segment."
         },
         "brandname": {
          "type": "string",
          "description": "Sender ID to check (≤ 11 characters)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Mã OTP của bạn là 123456, hiệu lực 5 phút."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "encoding": {
           "type": "string"
          },
          "characters": {
           "type": "number"
          },
          "units": {
           "type": "number"
          },
          "unit": {
           "type": "string"
          },
          "segments": {
           "type": "number"
          },
          "per_segment": {
           "type": "number"
          },
          "remaining_in_segment": {
           "type": "number"
          },
          "ucs2_characters": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "char": {
              "type": "string"
             },
             "codepoint": {
              "type": "string"
             },
             "count": {
              "type": "number"
             },
             "first_index": {
              "type": "number"
             },
             "replacement": {
              "type": "string"
             }
            }
           }
          },
          "extension_characters": {
           "type": "array"
          },
          "gsm_version": {
           "type": "object",
           "properties": {
            "encoding": {
             "type": "string"
            },
            "characters": {
             "type": "number"
            },
            "units": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            },
            "segments": {
             "type": "number"
            },
            "per_segment": {
             "type": "number"
            },
            "remaining_in_segment": {
             "type": "number"
            },
            "text": {
             "type": "string"
            },
            "changed_characters": {
             "type": "number"
            },
            "saves_segments": {
             "type": "number"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "encoding": "UCS-2",
         "characters": 42,
         "units": 42,
         "unit": "UTF-16 code units",
         "segments": 1,
         "per_segment": 70,
         "remaining_in_segment": 28,
         "ucs2_characters": [
          {
           "char": "ã",
           "codepoint": "U+00E3",
           "count": 1,
           "first_index": 1,
           "replacement": "a"
          },
          {
           "char": "ủ",
           "codepoint": "U+1EE7",
           "count": 1,
           "first_index": 8,
           "replacement": "u"
          },
          {
           "char": "ạ",
           "codepoint": "U+1EA1",
           "count": 1,
           "first_index": 12,
           "replacement": "a"
          },
          {
           "char": "ệ",
           "codepoint": "U+1EC7",
           "count": 1,
           "first_index": 28,
           "replacement": "e"
          },
          {
           "char": "ự",
           "codepoint": "U+1EF1",
           "count": 1,
           "first_index": 32,
           "replacement": "u"
          },
          {
           "char": "ú",
           "codepoint": "U+00FA",
           "count": 1,
           "first_index": 39,
           "replacement": "u"
          }
         ],
         "extension_characters": [],
         "gsm_version": {
          "encoding": "GSM-7",
          "characters": 42,
          "units": 42,
          "unit": "septets",
          "segments": 1,
          "per_segment": 160,
          "remaining_in_segment": 118,
          "text": "Ma OTP cua ban la 123456, hieu luc 5 phut.",
          "changed_characters": 7,
          "saves_segments": 0
         },
         "note": "Single SMS: 160 GSM-7 characters or 70 UCS-2 characters; concatenated parts carry a 7-byte header (153 / 67 per part). Characters of the GSM extension table (^ { } \\ [ ] ~ | €) count twice. Any Vietnamese accent forces UCS-2."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-accounts/{number}": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Chart of Accounts",
    "description": "The chart of accounts API returns the official Vietnamese account list: Thông tư 99/2025/TT-BTC (Phụ lục II, for fiscal years from 1 January 2026, replacing Circular 200/2014) by default, or Thông tư 133/2016/TT-BTC for small and medium-sized enterprises with `chart=tt133`. Ask for one account (`/v1/vn-accounts/3331`) to get its name in Vietnamese and English, level, group (loại tài khoản), the parent chain and the sub-accounts; or list and search with `q` (accents optional, `tien gui` finds 112 and 1281; digits search by number prefix), `level` (1–4) and `group` (1–9).\n\nFor migrations, `mapping=tt200` lists every level-1 account of Circular 200 with its Circular 99 counterpart and the kind of change: added (215 Tài sản sinh học, 332 Phải trả cổ tức, lợi nhuận), removed (161, 417, 461, 611, 631), merged (441 and 466 into 4118, Article 29), renamed (112 Tiền gửi không kỳ hạn…), or changed level-2 accounts. Filter with `change=removed` or one account with `tt200=441`.\n\nThe tables are transcribed by hand from the appendices of the circulars and reviewed yearly; every answer carries the circular number, effective date and review date. English names are our own translation, not an official one.\n\nDocs: https://apibox.io.vn/docs/vn-accounts/",
    "operationId": "vnAccountsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-accounts/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "description": "Account number (3–6 digits), in the path or as `?number=`.",
      "schema": {
       "type": "string"
      },
      "example": "3331"
     },
     {
      "name": "chart",
      "in": "query",
      "required": false,
      "description": "`tt99` (Circular 99/2025, enterprises) or `tt133` (Circular 133/2016, SMEs).",
      "schema": {
       "type": "string",
       "default": "tt99"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search words (accents optional) or a number prefix.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "Only accounts of this level (1–4).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Only this account group (loại 1–9).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "mapping",
      "in": "query",
      "required": false,
      "description": "`tt200`: Circular 200 -> Circular 99 mapping of level-1 accounts.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "tt200",
      "in": "query",
      "required": false,
      "description": "With mapping: one Circular 200 account, e.g. `441`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "change",
      "in": "query",
      "required": false,
      "description": "With mapping: `added`, `removed`, `merged`, `renamed`, `changed_sub` or `unchanged`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum accounts in a list (1–500).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "number": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "level": {
           "type": "number"
          },
          "parent": {
           "type": "string"
          },
          "group": {
           "type": "number"
          },
          "group_name_vi": {
           "type": "string"
          },
          "group_name_en": {
           "type": "string"
          },
          "hierarchy": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "number": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "level": {
              "type": "number"
             },
             "parent": {},
             "group": {
              "type": "number"
             }
            }
           }
          },
          "children": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "number": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "level": {
              "type": "number"
             },
             "parent": {
              "type": "string"
             },
             "group": {
              "type": "number"
             }
            }
           }
          },
          "tt200_mapping": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tt200": {
              "type": "string"
             },
             "tt200_name_vi": {
              "type": "string"
             },
             "tt99": {
              "type": "string"
             },
             "tt99_name_vi": {
              "type": "string"
             },
             "change": {
              "type": "string"
             },
             "note_vi": {
              "type": "string"
             },
             "note_en": {
              "type": "string"
             }
            }
           }
          },
          "chart": {
           "type": "string"
          },
          "circular": {
           "type": "string"
          },
          "title_vi": {
           "type": "string"
          },
          "issued": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "appendix": {
           "type": "string"
          },
          "replaces": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "transition_vi": {
           "type": "string"
          },
          "account_count": {
           "type": "number"
          },
          "reviewed": {
           "type": "string"
          },
          "translation_note": {
           "type": "string"
          }
         }
        },
        "example": {
         "number": "3331",
         "name_vi": "Thuế giá trị gia tăng phải nộp",
         "name_en": "VAT payable",
         "level": 2,
         "parent": "333",
         "group": 3,
         "group_name_vi": "Loại tài khoản nợ phải trả",
         "group_name_en": "Liabilities",
         "hierarchy": [
          {
           "number": "333",
           "name_vi": "Thuế và các khoản phải nộp Nhà nước",
           "name_en": "Taxes and other payables to the State",
           "level": 1,
           "parent": null,
           "group": 3
          }
         ],
         "children": [
          {
           "number": "33311",
           "name_vi": "Thuế GTGT đầu ra",
           "name_en": "Output VAT",
           "level": 3,
           "parent": "3331",
           "group": 3
          },
          {
           "number": "33312",
           "name_vi": "Thuế GTGT hàng nhập khẩu",
           "name_en": "VAT on imports",
           "level": 3,
           "parent": "3331",
           "group": 3
          }
         ],
         "tt200_mapping": [
          {
           "tt200": "333",
           "tt200_name_vi": "Thuế và các khoản phải nộp Nhà nước",
           "tt99": "333",
           "tt99_name_vi": "Thuế và các khoản phải nộp Nhà nước",
           "change": "unchanged",
           "note_vi": "Giữ nguyên số hiệu, tên và TK cấp 2.",
           "note_en": "Number, name and level-2 accounts unchanged."
          }
         ],
         "chart": "tt99",
         "circular": "99/2025/TT-BTC",
         "title_vi": "Thông tư hướng dẫn Chế độ kế toán doanh nghiệp",
         "issued": "2025-10-27",
         "effective_from": "2026-01-01",
         "appendix": "Phụ lục II",
         "replaces": [
          "200/2014/TT-BTC",
          "75/2015/TT-BTC",
          "53/2016/TT-BTC",
          "195/2012/TT-BTC"
         ],
         "transition_vi": "Điều 29 (Chuyển đổi số dư trên sổ kế toán) và Điều 30 (Điều khoản chuyển tiếp).",
         "account_count": 184,
         "reviewed": "2026-11-11",
         "translation_note": "name_en is an unofficial translation"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-traffic-fines": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Traffic Fines",
    "description": "The traffic fines API searches the violations of Nghị định 168/2024/NĐ-CP (in force since 1 January 2025), as amended by Nghị định 238/2026/NĐ-CP (from 15 August 2026). Type the violation the way people say it, with or without accents (`vuot den do`, `nồng độ cồn`, `khong doi mu bao hiem`, `điện thoại`) and filter by vehicle with `vehicle=car`, `motorbike`, `bicycle` (bicycles, e-bikes, rudimentary vehicles), `pedestrian`, `special` (special-use machines) or `general`; a vehicle named in the query (`nong do con xe may`) is used as the filter. Each result gives the fine range in VND, the driving-licence points deducted (trừ điểm GPLX) and where that deduction is written, the additional penalties and remedial measures, and the exact reference (điểm, khoản, Điều).\n\nGet one entry with `id` or in the path (`/v1/vn-traffic-fines/6.9.b`, or `6.9` for a whole clause), list a vehicle's violations with `vehicle` alone, only the ones with licence points with `points=true`, or sort by the highest fine with `sort=fine`.\n\nCoverage: about 350 common violations from Articles 6–10, 12–21 and 34–36, hand-transcribed from the decree text; specialised transport-business rules and the sanctioning-authority articles are not included (the call without parameters returns the coverage). Amounts are for individuals; it is a reference, not legal advice, and late fines by plate (phạt nguội) are not looked up.\n\nDocs: https://apibox.io.vn/docs/vn-traffic-fines/",
    "operationId": "vnTrafficFinesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-traffic-fines/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Violation in words, accents optional (`vuot den do`).",
      "schema": {
       "type": "string"
      },
      "example": "vuot den do"
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`car`, `motorbike`, `bicycle`, `pedestrian`, `special` or `general` (Vietnamese names like `xe may` work).",
      "schema": {
       "type": "string"
      },
      "example": "car"
     },
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "Entry id article.clause.point (`6.9.b`) or a clause (`6.9`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "article",
      "in": "query",
      "required": false,
      "description": "Only this article of the decree.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "points",
      "in": "query",
      "required": false,
      "description": "Only violations with licence points deducted.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`fine` to sort by the highest fine.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum results (1–400).",
      "schema": {
       "type": "number",
       "default": 20
      },
      "example": 1
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "decree": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "amended_by": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "decree": {
              "type": "string"
             },
             "issued": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "query": {
           "type": "string"
          },
          "vehicle": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vehicle": {
              "type": "string"
             },
             "article": {
              "type": "number"
             },
             "clause": {
              "type": "number"
             },
             "point": {
              "type": "string"
             },
             "reference_vi": {
              "type": "string"
             },
             "reference_en": {
              "type": "string"
             },
             "behavior_vi": {
              "type": "string"
             },
             "behavior_en": {
              "type": "string"
             },
             "fine_min": {
              "type": "number"
             },
             "fine_max": {
              "type": "number"
             },
             "fine_text": {
              "type": "string"
             },
             "licence_points": {
              "type": "number"
             },
             "licence_points_ref": {
              "type": "string"
             },
             "additional_vi": {
              "type": "array"
             },
             "additional_ref": {},
             "note": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "entries": {
             "type": "number"
            },
            "by_vehicle": {
             "type": "object",
             "properties": {
              "car": {
               "type": "number"
              },
              "motorbike": {
               "type": "number"
              },
              "special": {
               "type": "number"
              },
              "bicycle": {
               "type": "number"
              },
              "pedestrian": {
               "type": "number"
              },
              "general": {
               "type": "number"
              }
             }
            },
            "articles": {
             "type": "array",
             "items": {
              "type": "number"
             }
            }
           }
          }
         }
        },
        "example": {
         "decree": "168/2024/NĐ-CP",
         "effective_from": "2025-01-01",
         "amended_by": [
          {
           "decree": "238/2026/NĐ-CP",
           "issued": "2026-06-26",
           "effective_from": "2026-08-15"
          }
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only, transcribed by hand from the decree; check the official text (vbpl.vn) before relying on an amount. Fines are for individuals; organisations pay double unless fine_org_* says otherwise.",
         "query": "vuot den do",
         "vehicle": "car",
         "count": 6,
         "results": [
          {
           "id": "6.9.b",
           "vehicle": "car",
           "article": 6,
           "clause": 9,
           "point": "b",
           "reference_vi": "Điểm b khoản 9 Điều 6 Nghị định 168/2024/NĐ-CP",
           "reference_en": "Decree 168/2024/ND-CP, Article 6(9)(b)",
           "behavior_vi": "Không chấp hành hiệu lệnh của đèn tín hiệu giao thông",
           "behavior_en": "Running a red light / disobeying traffic signals",
           "fine_min": 18000000,
           "fine_max": 20000000,
           "fine_text": "18.000.000 đ – 20.000.000 đ",
           "licence_points": 4,
           "licence_points_ref": "6.16.b",
           "additional_vi": [],
           "additional_ref": null,
           "note": "Trường hợp gây tai nạn giao thông xử phạt theo khoản 10 Điều này."
          }
         ],
         "coverage": {
          "entries": 351,
          "by_vehicle": {
           "car": 130,
           "motorbike": 98,
           "special": 60,
           "bicycle": 33,
           "pedestrian": 6,
           "general": 24
          },
          "articles": [
           6,
           7,
           8,
           9,
           10,
           12,
           13,
           14,
           15,
           16,
           17,
           18,
           19,
           20,
           21,
           34,
           35,
           36
          ]
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-postcode/{code}": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Postcodes",
    "description": "The postcode API covers the national postcode system (Mã bưu chính quốc gia, Quyết định 2475/QĐ-BTTTT) as amended for the 2025 reorganisation by Quyết định 2334/QĐ-BKHCN of 24 August 2025: 34 provinces and about 3,300 phường, xã and đặc khu, each with its own 5-digit code. Send a code (`/v1/vn-postcode/11120`) to see whether it is assigned to a ward and which province owns its range, a prefix (`711`) to list the codes under it, a ward name with `q` (accents optional, `ben thanh`), optionally with `province`, or `province` alone to list every ward code of a province.\n\nA valid code that no ward uses is reported with `assigned_to_ward: false` (post offices and large customers have their own codes); 6-digit codes from before 2018 are rejected. Names and ward codes follow our administrative-units data (/v1/vn-provinces), rebuilt weekly from official sources.\n\nDocs: https://apibox.io.vn/docs/vn-postcode/",
    "operationId": "vnPostcodeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-postcode/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "description": "5-digit postcode, or a 2–4 digit prefix.",
      "schema": {
       "type": "string"
      },
      "example": "11120"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Ward / commune name, accents optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or 2-digit code (`79`, `Hà Nội`, `hcm`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum wards returned (1–500).",
      "schema": {
       "type": "number",
       "default": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "valid_format": {
           "type": "boolean"
          },
          "assigned_to_ward": {
           "type": "boolean"
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "postcode_prefixes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "wards": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "postal_code": {
              "type": "string"
             },
             "ward": {
              "type": "string"
             },
             "ward_code": {
              "type": "string"
             },
             "province": {
              "type": "string"
             },
             "province_code": {
              "type": "string"
             }
            }
           }
          },
          "note": {},
          "decision": {
           "type": "string"
          },
          "decision_date": {
           "type": "string"
          },
          "amended_by": {
           "type": "string"
          },
          "amended_on": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "structure": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "code": "11120",
         "valid_format": true,
         "assigned_to_ward": true,
         "province": {
          "code": "01",
          "name": "Thành phố Hà Nội",
          "postcode_prefixes": [
           "10",
           "11",
           "12",
           "13",
           "14"
          ]
         },
         "wards": [
          {
           "postal_code": "11120",
           "ward": "Phường Ba Đình",
           "ward_code": "00004",
           "province": "Thành phố Hà Nội",
           "province_code": "01"
          }
         ],
         "note": null,
         "decision": "2475/QĐ-BTTTT",
         "decision_date": "2017-12-29",
         "amended_by": "2334/QĐ-BKHCN",
         "amended_on": "2025-08-24",
         "effective_from": "2025-08-24",
         "structure": "NNXXX: 5 digits. NN = province (some provinces own several 2-digit ranges after the 2025 merger); the full 5 digits = a phường / xã / đặc khu, or a post office / special customer.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-catalogs/{catalog}/{code}": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Form Catalogs",
    "description": "The catalogs API serves the coded lists that Vietnamese forms ask for, each with its code system: `ethnic` (54 ethnic groups, codes 01–54 of Quyết định 121-TCTK/PPCĐ, with common aliases such as Việt, Khmer, Mông), `religion` (the 16 religions recognised by the State, Công văn 6955/BNV-TGCP), `nationality` (ISO 3166-1 alpha-2 / alpha-3 / numeric with Vietnamese names), `occupation` (Danh mục nghề nghiệp Việt Nam VSCO 2020, Quyết định 34/2020/QĐ-TTg, levels 1–4), `education` (general education levels and the 8 levels of the Vietnamese qualifications framework with ISCED codes), `marital_status`, `blood_type`, `gender` (ISO/IEC 5218), `id_document` (căn cước, CCCD, passport…) and `relationship`.\n\nGet a whole list (`/v1/vn-catalogs/religion`), one code (`/v1/vn-catalogs/ethnic/08`, `nationality/VNM`), or search with `q`, accents optional (`q=kinh`, `q=han quoc`, `q=lap trinh` in occupations). Occupations list level 1 by default; use `level` or `parent=25` to go down the tree.\n\nEthnic groups, religions and occupations are rebuilt by a checked script from the HL7 Vietnam VN Core implementation guide, which transcribes the official texts; the small lists are maintained by hand and reviewed yearly. Codes marked as apibox codes are not official.\n\nDocs: https://apibox.io.vn/docs/vn-catalogs/",
    "operationId": "vnCatalogsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-catalogs/"
    },
    "parameters": [
     {
      "name": "catalog",
      "in": "path",
      "required": true,
      "description": "`ethnic`, `religion`, `nationality`, `occupation`, `education`, `marital_status`, `blood_type`, `gender`, `id_document` or `relationship`; none lists the catalogs.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "code",
      "in": "path",
      "required": true,
      "description": "One code (path `/ethnic/08` or `?code=`); nationalities accept alpha-2, alpha-3 or numeric.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search by name, accents optional.",
      "schema": {
       "type": "string"
      },
      "example": "mong"
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "Occupations: level 1–4.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "parent",
      "in": "query",
      "required": false,
      "description": "Occupations: children of this code.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum items (1–1000).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "catalog": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "code_system": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "query": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "aliases": {
              "type": "array"
             },
             "official": {
              "type": "boolean"
             }
            }
           }
          }
         }
        },
        "example": {
         "catalog": "ethnic",
         "name_vi": "Dân tộc",
         "name_en": "Ethnic groups",
         "code_system": "QĐ 121-TCTK/PPCĐ (Tổng cục Thống kê, 02/03/1979): 01–54; 55 người nước ngoài, 99 không rõ are technical codes",
         "source": "HL7 Vietnam VN Core FHIR IG (https://vncore-ig.pages.dev/core), version 0.10.0",
         "reviewed": "2026-11-11",
         "query": "mong",
         "count": 1,
         "items": [
          {
           "code": "08",
           "name_vi": "HMông",
           "name_en": "H'Mong",
           "aliases": [
            "Mông",
            "H'Mông",
            "Hmong",
            "Mèo"
           ],
           "official": true
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-admission-score": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "University Admission Score (VN)",
    "description": "The admission score API applies the 2026 admission regulation (Thông tư 06/2026/TT-BGDĐT). Send the subject block (`A00`, `A01`, `B00`, `C00`, `D01`… or your own `subjects`) with `scores`, or a ready `total`, plus the priority area (`area=KV1`, `KV2-NT`, `KV2`, `KV3`) and beneficiary group (`group=UT1`, `UT2`, or the object code 01–06). Area priority is 0.75 / 0.50 / 0.25 / 0, groups 2.00 / 1.00, and for totals of 22.5 or more the priority shrinks: [(30 − total) / 7.5] × level, rounded to 0.01. Area priority only counts in the graduation year and the next one (`graduation_year`).\n\nBonus points (`bonus`: thuong up to 3, xet_thuong and khuyen_khich up to 1.5) are capped at 10% of the scale and the final score at 30. `method=hoc_ba` takes yearly averages of grades 10–12 per subject; `weights` (e.g. `{\"toan\": 2}`) handles weighted combinations on a 40-point scale, with priority converted proportionally. `ielts` converts a band into the English score with an EXAMPLE table, or your school's `ielts_table`; `gpa10` alone converts a 10-point GPA to the 4-point scale and letter; `list=blocks` lists the combinations.\n\nEvery answer names the regulation and articles used. Each university publishes its own conversion tables and bonus rules: pass them as parameters; cut-off scores are not included.\n\nWith `mode=graduation` it computes the THPT graduation score of Thông tư 24/2024/TT-BGDĐT (amended by TT 13/2026): [(sum of exam scores / number of subjects + bonus / 4) + weighted average of grades 10–12 (1-2-3)] / 2 + priority, rounded to 2 decimals, with the ≤ 1.0 failing mark, the ≥ 5.0 pass rule, exempted subjects left out, the exam average needed to pass, and the pre-2025 formula via `year`.\n\nDocs: https://apibox.io.vn/docs/vn-admission-score/",
    "operationId": "vnAdmissionScoreGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-admission-score/"
    },
    "parameters": [
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`graduation`: THPT graduation score (điểm xét tốt nghiệp) instead of the admission score.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "block",
      "in": "query",
      "required": false,
      "description": "Subject combination code (`A00`, `D01`…); `list=blocks` lists them.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "subjects",
      "in": "query",
      "required": false,
      "description": "Custom subjects instead of a block (`[\"toan\",\"van\",\"tin\"]`).",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "scores",
      "in": "query",
      "required": false,
      "description": "Scores on 10: object `{\"toan\": 8.5}` or array in block order; hoc_ba: arrays of yearly averages; graduation: the exam scores `{\"toan\": 7, \"van\": 8, …}` or an array.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "total",
      "in": "query",
      "required": false,
      "description": "Ready 3-subject total on 30 (instead of scores).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "area",
      "in": "query",
      "required": false,
      "description": "Priority area `KV1`, `KV2-NT`, `KV2`, `KV3`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Beneficiary group `UT1`, `UT2` or object `01`–`06`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "graduation_year",
      "in": "query",
      "required": false,
      "description": "THPT graduation year (area priority lasts 2 years).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "`exam` (THPT exam) or `hoc_ba` (transcript).",
      "schema": {
       "type": "string",
       "default": "exam"
      }
     },
     {
      "name": "bonus",
      "in": "query",
      "required": false,
      "description": "Bonus points `{\"thuong\": 1, \"khuyen_khich\": 0.5}` or a number; graduation: điểm khuyến khích 0–2.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "weights",
      "in": "query",
      "required": false,
      "description": "Subject coefficients, e.g. `{\"toan\": 2}`.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "ielts",
      "in": "query",
      "required": false,
      "description": "IELTS band to replace English (or `ielts_use=bonus` with `ielts_bonus`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "ielts_table",
      "in": "query",
      "required": false,
      "description": "School table `[[band, score], …]`; default is an example.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "priority_basis",
      "in": "query",
      "required": false,
      "description": "`subjects` or `with_bonus` for the 22.5 threshold.",
      "schema": {
       "type": "string",
       "default": "subjects"
      }
     },
     {
      "name": "gpa10",
      "in": "query",
      "required": false,
      "description": "Alone: convert a 10-point GPA to 4-point and letter; graduation: yearly average of grade 10.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gpa11",
      "in": "query",
      "required": false,
      "description": "Graduation: yearly average of grade 11.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gpa12",
      "in": "query",
      "required": false,
      "description": "Graduation: yearly average of grade 12 (alone enough before 2025).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gpa_years",
      "in": "query",
      "required": false,
      "description": "Graduation: ready weighted average of grades 10–12 instead of gpa10 / 11 / 12.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "priority",
      "in": "query",
      "required": false,
      "description": "Graduation: priority group `2` (0.25), `3` (0.5) or the points.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "exempt",
      "in": "query",
      "required": false,
      "description": "Graduation: exempted subjects, e.g. `anh` (left out of the exam average).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Graduation: exam year; before 2025 uses the TT 15/2020 formula (needs gpa12).",
      "schema": {
       "type": "number",
       "default": 2026
      }
     },
     {
      "name": "gdtx",
      "in": "query",
      "required": false,
      "description": "Graduation: continuing education (GDTX) candidate, old GDTX formula before 2025.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "block": {
           "type": "string"
          },
          "subjects": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "subject": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "score": {
              "type": "number"
             },
             "weight": {
              "type": "number"
             }
            }
           }
          },
          "subject_total": {
           "type": "number"
          },
          "scale": {
           "type": "number"
          },
          "subject_total_30": {
           "type": "number"
          },
          "priority": {
           "type": "object",
           "properties": {
            "area": {
             "type": "string"
            },
            "area_points": {
             "type": "number"
            },
            "group": {
             "type": "string"
            },
            "group_points": {
             "type": "number"
            },
            "level_30": {
             "type": "number"
            },
            "reduced": {
             "type": "boolean"
            },
            "basis": {
             "type": "string"
            },
            "points_30": {
             "type": "number"
            },
            "points": {
             "type": "number"
            },
            "formula": {
             "type": "string"
            }
           }
          },
          "bonus": {
           "type": "object",
           "properties": {
            "parts": {
             "type": "object",
             "properties": {}
            },
            "points_30": {
             "type": "number"
            },
            "points": {
             "type": "number"
            },
            "cap_30": {
             "type": "number"
            }
           }
          },
          "admission_score_30": {
           "type": "number"
          },
          "admission_score": {
           "type": "number"
          },
          "meets_minimum_15": {
           "type": "boolean"
          },
          "warnings": {
           "type": "array"
          },
          "regulation": {
           "type": "string"
          },
          "issued": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "articles": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "University Admission Score (VN)",
    "description": "The admission score API applies the 2026 admission regulation (Thông tư 06/2026/TT-BGDĐT). Send the subject block (`A00`, `A01`, `B00`, `C00`, `D01`… or your own `subjects`) with `scores`, or a ready `total`, plus the priority area (`area=KV1`, `KV2-NT`, `KV2`, `KV3`) and beneficiary group (`group=UT1`, `UT2`, or the object code 01–06). Area priority is 0.75 / 0.50 / 0.25 / 0, groups 2.00 / 1.00, and for totals of 22.5 or more the priority shrinks: [(30 − total) / 7.5] × level, rounded to 0.01. Area priority only counts in the graduation year and the next one (`graduation_year`).\n\nBonus points (`bonus`: thuong up to 3, xet_thuong and khuyen_khich up to 1.5) are capped at 10% of the scale and the final score at 30. `method=hoc_ba` takes yearly averages of grades 10–12 per subject; `weights` (e.g. `{\"toan\": 2}`) handles weighted combinations on a 40-point scale, with priority converted proportionally. `ielts` converts a band into the English score with an EXAMPLE table, or your school's `ielts_table`; `gpa10` alone converts a 10-point GPA to the 4-point scale and letter; `list=blocks` lists the combinations.\n\nEvery answer names the regulation and articles used. Each university publishes its own conversion tables and bonus rules: pass them as parameters; cut-off scores are not included.\n\nWith `mode=graduation` it computes the THPT graduation score of Thông tư 24/2024/TT-BGDĐT (amended by TT 13/2026): [(sum of exam scores / number of subjects + bonus / 4) + weighted average of grades 10–12 (1-2-3)] / 2 + priority, rounded to 2 decimals, with the ≤ 1.0 failing mark, the ≥ 5.0 pass rule, exempted subjects left out, the exam average needed to pass, and the pre-2025 formula via `year`.\n\nDocs: https://apibox.io.vn/docs/vn-admission-score/",
    "operationId": "vnAdmissionScorePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-admission-score/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "mode": {
          "type": "string",
          "description": "`graduation`: THPT graduation score (điểm xét tốt nghiệp) instead of the admission score."
         },
         "block": {
          "type": "string",
          "description": "Subject combination code (`A00`, `D01`…); `list=blocks` lists them."
         },
         "subjects": {
          "type": "array",
          "items": {},
          "description": "Custom subjects instead of a block (`[\"toan\",\"van\",\"tin\"]`)."
         },
         "scores": {
          "type": "object",
          "description": "Scores on 10: object `{\"toan\": 8.5}` or array in block order; hoc_ba: arrays of yearly averages; graduation: the exam scores `{\"toan\": 7, \"van\": 8, …}` or an array."
         },
         "total": {
          "type": "number",
          "description": "Ready 3-subject total on 30 (instead of scores)."
         },
         "area": {
          "type": "string",
          "description": "Priority area `KV1`, `KV2-NT`, `KV2`, `KV3`."
         },
         "group": {
          "type": "string",
          "description": "Beneficiary group `UT1`, `UT2` or object `01`–`06`."
         },
         "graduation_year": {
          "type": "number",
          "description": "THPT graduation year (area priority lasts 2 years)."
         },
         "method": {
          "type": "string",
          "default": "exam",
          "description": "`exam` (THPT exam) or `hoc_ba` (transcript)."
         },
         "bonus": {
          "type": "object",
          "description": "Bonus points `{\"thuong\": 1, \"khuyen_khich\": 0.5}` or a number; graduation: điểm khuyến khích 0–2."
         },
         "weights": {
          "type": "object",
          "description": "Subject coefficients, e.g. `{\"toan\": 2}`."
         },
         "ielts": {
          "type": "number",
          "description": "IELTS band to replace English (or `ielts_use=bonus` with `ielts_bonus`)."
         },
         "ielts_table": {
          "type": "array",
          "items": {},
          "description": "School table `[[band, score], …]`; default is an example."
         },
         "priority_basis": {
          "type": "string",
          "default": "subjects",
          "description": "`subjects` or `with_bonus` for the 22.5 threshold."
         },
         "gpa10": {
          "type": "number",
          "description": "Alone: convert a 10-point GPA to 4-point and letter; graduation: yearly average of grade 10."
         },
         "gpa11": {
          "type": "number",
          "description": "Graduation: yearly average of grade 11."
         },
         "gpa12": {
          "type": "number",
          "description": "Graduation: yearly average of grade 12 (alone enough before 2025)."
         },
         "gpa_years": {
          "type": "number",
          "description": "Graduation: ready weighted average of grades 10–12 instead of gpa10 / 11 / 12."
         },
         "priority": {
          "type": "string",
          "description": "Graduation: priority group `2` (0.25), `3` (0.5) or the points."
         },
         "exempt": {
          "type": "string",
          "description": "Graduation: exempted subjects, e.g. `anh` (left out of the exam average)."
         },
         "year": {
          "type": "number",
          "default": 2026,
          "description": "Graduation: exam year; before 2025 uses the TT 15/2020 formula (needs gpa12)."
         },
         "gdtx": {
          "type": "boolean",
          "default": false,
          "description": "Graduation: continuing education (GDTX) candidate, old GDTX formula before 2025."
         }
        }
       },
       "example": {
        "block": "A00",
        "scores": {
         "toan": 9,
         "ly": 8.75,
         "hoa": 9.25
        },
        "area": "KV1",
        "group": "UT2"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "block": {
           "type": "string"
          },
          "subjects": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "subject": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "score": {
              "type": "number"
             },
             "weight": {
              "type": "number"
             }
            }
           }
          },
          "subject_total": {
           "type": "number"
          },
          "scale": {
           "type": "number"
          },
          "subject_total_30": {
           "type": "number"
          },
          "priority": {
           "type": "object",
           "properties": {
            "area": {
             "type": "string"
            },
            "area_points": {
             "type": "number"
            },
            "group": {
             "type": "string"
            },
            "group_points": {
             "type": "number"
            },
            "level_30": {
             "type": "number"
            },
            "reduced": {
             "type": "boolean"
            },
            "basis": {
             "type": "string"
            },
            "points_30": {
             "type": "number"
            },
            "points": {
             "type": "number"
            },
            "formula": {
             "type": "string"
            }
           }
          },
          "bonus": {
           "type": "object",
           "properties": {
            "parts": {
             "type": "object",
             "properties": {}
            },
            "points_30": {
             "type": "number"
            },
            "points": {
             "type": "number"
            },
            "cap_30": {
             "type": "number"
            }
           }
          },
          "admission_score_30": {
           "type": "number"
          },
          "admission_score": {
           "type": "number"
          },
          "meets_minimum_15": {
           "type": "boolean"
          },
          "warnings": {
           "type": "array"
          },
          "regulation": {
           "type": "string"
          },
          "issued": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "articles": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "method": "exam",
         "block": "A00",
         "subjects": [
          {
           "subject": "toan",
           "name_vi": "Toán",
           "score": 9,
           "weight": 1
          },
          {
           "subject": "ly",
           "name_vi": "Vật lí",
           "score": 8.75,
           "weight": 1
          },
          {
           "subject": "hoa",
           "name_vi": "Hoá học",
           "score": 9.25,
           "weight": 1
          }
         ],
         "subject_total": 27,
         "scale": 30,
         "subject_total_30": 27,
         "priority": {
          "area": "KV1",
          "area_points": 0.75,
          "group": "UT2",
          "group_points": 1,
          "level_30": 1.75,
          "reduced": true,
          "basis": "subjects",
          "points_30": 0.7,
          "points": 0.7,
          "formula": "total ≥ 22.5: [(30 − total)/7.5] × level, rounded to 0.01"
         },
         "bonus": {
          "parts": {},
          "points_30": 0,
          "points": 0,
          "cap_30": 3
         },
         "admission_score_30": 27.7,
         "admission_score": 27.7,
         "meets_minimum_15": true,
         "warnings": [],
         "regulation": "06/2026/TT-BGDĐT",
         "issued": "2026-02-15",
         "effective_from": "2026-02-15",
         "articles": "Điều 2 (k.20), Điều 6 (k.2, 3, 5), Điều 7, Phụ lục I–II",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-marketplace-fees": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Marketplace Seller Fees (VN)",
    "description": "The marketplace fee API computes what a Vietnamese seller really keeps from an order on Shopee, TikTok Shop or Lazada. Send `platform`, `price`, `cost` and the product `category` in plain words (`son môi`, `áo thun`, `laptop`) or your own `fixed_fee_rate`: the API finds the category rate (TikTok Shop: the official level-3 table valid from 03/07/2026 for standard shops and 03/08/2026 for Mall; Shopee: the level-1 ranges since 23/05/2026 and 29/05/2026, upper bound by default), then adds the transaction fee (6% on price after seller discounts plus buyer-paid shipping), per-order fees (3,000 đ), optional programmes (`voucher_xtra`, `piship`, Lazada `freeship_max`, capped per item), `affiliate_rate`, `ads_rate` and `other_costs`.\n\nHousehold and individual sellers also see the tax the platform withholds under Decree 117/2025/ND-CP (goods 1% VAT + 0.5% PIT; services 5% + 2%; transport and goods-linked services 3% + 1.5%), refundable when yearly revenue stays under 1 billion VND; companies are not withheld (`seller_type=company`). The answer has the fee lines, payout, profit and margin at your price, the break-even price, and with `target_margin` the price that reaches it. `GET ?platform=tiktok&categories=son môi` only looks up a category rate.\n\nRates are hand-entered from the platforms' public fee pages and notices, with the table version and review date in every answer; a weekly job hashes those pages to flag changes. Platforms change fees often and Lazada publishes its category table only in Seller Center: every rate can be overridden.\n\nDocs: https://apibox.io.vn/docs/vn-marketplace-fees/",
    "operationId": "vnMarketplaceFeesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-marketplace-fees/"
    },
    "parameters": [
     {
      "name": "platform",
      "in": "query",
      "required": true,
      "description": "`shopee`, `tiktok` or `lazada` (none: overview of rates).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "price",
      "in": "query",
      "required": false,
      "description": "Selling price per unit, VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cost",
      "in": "query",
      "required": false,
      "description": "Cost per unit, VND (for profit, break-even, target price).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Product category in words (Shopee, TikTok Shop).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fixed_fee_rate",
      "in": "query",
      "required": false,
      "description": "Your category fee / commission in % (overrides the table).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "shop_type",
      "in": "query",
      "required": false,
      "description": "`normal` or `mall` (Shopee Mall, TikTok Shop Mall, LazMall).",
      "schema": {
       "type": "string",
       "default": "normal"
      }
     },
     {
      "name": "quantity",
      "in": "query",
      "required": false,
      "description": "Units in the order.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "seller_discount",
      "in": "query",
      "required": false,
      "description": "Discount funded by the shop for the order, VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "buyer_shipping",
      "in": "query",
      "required": false,
      "description": "Shipping paid by the buyer (in the transaction-fee base).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "voucher_xtra",
      "in": "query",
      "required": false,
      "description": "Join Voucher Xtra (Shopee, TikTok Shop); a number sets the rate.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "piship",
      "in": "query",
      "required": false,
      "description": "Shopee PiShip shipping package.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "freeship_max",
      "in": "query",
      "required": false,
      "description": "Lazada Freeship Max; a number sets the rate.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "affiliate_rate",
      "in": "query",
      "required": false,
      "description": "Affiliate commission %.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "ads_rate",
      "in": "query",
      "required": false,
      "description": "Advertising cost as % of sales.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "other_costs",
      "in": "query",
      "required": false,
      "description": "Other costs per order (packaging…), VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seller_type",
      "in": "query",
      "required": false,
      "description": "`household`, `individual` (tax withheld) or `company`.",
      "schema": {
       "type": "string",
       "default": "household"
      }
     },
     {
      "name": "tax_category",
      "in": "query",
      "required": false,
      "description": "`goods`, `services` or `goods_services`.",
      "schema": {
       "type": "string",
       "default": "goods"
      }
     },
     {
      "name": "target_margin",
      "in": "query",
      "required": false,
      "description": "Wanted profit margin % of net sales: returns suggested_price.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "categories",
      "in": "query",
      "required": false,
      "description": "GET only: look up category rates (`son môi`, or `1` for the list).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "platform": {
           "type": "string"
          },
          "platform_name": {
           "type": "string"
          },
          "shop_type": {
           "type": "string"
          },
          "category": {
           "type": "object",
           "properties": {
            "level": {
             "type": "number"
            },
            "path": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "rate": {
             "type": "number"
            },
            "range": {},
            "alternatives": {
             "type": "array"
            }
           }
          },
          "rates": {
           "type": "object",
           "properties": {
            "fixed_fee": {
             "type": "number"
            },
            "transaction_fee": {
             "type": "number"
            },
            "programmes": {
             "type": "array"
            },
            "per_order": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "affiliate": {
             "type": "number"
            },
            "ads": {
             "type": "number"
            },
            "effective": {
             "type": "object",
             "properties": {
              "commission": {
               "type": "object"
              },
              "transaction": {
               "type": "string"
              }
             }
            }
           }
          },
          "tax": {
           "type": "object",
           "properties": {
            "seller_type": {
             "type": "string"
            },
            "withheld": {
             "type": "boolean"
            },
            "category": {
             "type": "string"
            },
            "vat_rate": {
             "type": "number"
            },
            "pit_rate": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "reviewed": {
             "type": "string"
            }
           }
          },
          "at_price": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "units": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "seller_discount": {
             "type": "number"
            },
            "net_sales": {
             "type": "number"
            },
            "buyer_shipping": {
             "type": "number"
            },
            "fees": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "fee_total": {
             "type": "number"
            },
            "fee_percent": {
             "type": "number"
            },
            "tax_withheld": {
             "type": "object",
             "properties": {
              "vat": {
               "type": "number"
              },
              "pit": {
               "type": "number"
              },
              "total": {
               "type": "number"
              }
             }
            },
            "payout": {
             "type": "number"
            },
            "cost": {
             "type": "number"
            },
            "profit": {
             "type": "number"
            },
            "margin_percent": {
             "type": "number"
            }
           }
          },
          "break_even_price": {
           "type": "number"
          },
          "target_margin": {
           "type": "number"
          },
          "suggested_price": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          },
          "fee_table_version": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Marketplace Seller Fees (VN)",
    "description": "The marketplace fee API computes what a Vietnamese seller really keeps from an order on Shopee, TikTok Shop or Lazada. Send `platform`, `price`, `cost` and the product `category` in plain words (`son môi`, `áo thun`, `laptop`) or your own `fixed_fee_rate`: the API finds the category rate (TikTok Shop: the official level-3 table valid from 03/07/2026 for standard shops and 03/08/2026 for Mall; Shopee: the level-1 ranges since 23/05/2026 and 29/05/2026, upper bound by default), then adds the transaction fee (6% on price after seller discounts plus buyer-paid shipping), per-order fees (3,000 đ), optional programmes (`voucher_xtra`, `piship`, Lazada `freeship_max`, capped per item), `affiliate_rate`, `ads_rate` and `other_costs`.\n\nHousehold and individual sellers also see the tax the platform withholds under Decree 117/2025/ND-CP (goods 1% VAT + 0.5% PIT; services 5% + 2%; transport and goods-linked services 3% + 1.5%), refundable when yearly revenue stays under 1 billion VND; companies are not withheld (`seller_type=company`). The answer has the fee lines, payout, profit and margin at your price, the break-even price, and with `target_margin` the price that reaches it. `GET ?platform=tiktok&categories=son môi` only looks up a category rate.\n\nRates are hand-entered from the platforms' public fee pages and notices, with the table version and review date in every answer; a weekly job hashes those pages to flag changes. Platforms change fees often and Lazada publishes its category table only in Seller Center: every rate can be overridden.\n\nDocs: https://apibox.io.vn/docs/vn-marketplace-fees/",
    "operationId": "vnMarketplaceFeesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-marketplace-fees/"
    },
    "parameters": [
     {
      "name": "categories",
      "in": "query",
      "required": false,
      "description": "GET only: look up category rates (`son môi`, or `1` for the list).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "platform": {
          "type": "string",
          "description": "`shopee`, `tiktok` or `lazada` (none: overview of rates)."
         },
         "price": {
          "type": "number",
          "description": "Selling price per unit, VND."
         },
         "cost": {
          "type": "number",
          "description": "Cost per unit, VND (for profit, break-even, target price)."
         },
         "category": {
          "type": "string",
          "description": "Product category in words (Shopee, TikTok Shop)."
         },
         "fixed_fee_rate": {
          "type": "number",
          "description": "Your category fee / commission in % (overrides the table)."
         },
         "shop_type": {
          "type": "string",
          "default": "normal",
          "description": "`normal` or `mall` (Shopee Mall, TikTok Shop Mall, LazMall)."
         },
         "quantity": {
          "type": "number",
          "default": 1,
          "description": "Units in the order."
         },
         "seller_discount": {
          "type": "number",
          "description": "Discount funded by the shop for the order, VND."
         },
         "buyer_shipping": {
          "type": "number",
          "description": "Shipping paid by the buyer (in the transaction-fee base)."
         },
         "voucher_xtra": {
          "type": "boolean",
          "description": "Join Voucher Xtra (Shopee, TikTok Shop); a number sets the rate."
         },
         "piship": {
          "type": "boolean",
          "description": "Shopee PiShip shipping package."
         },
         "freeship_max": {
          "type": "boolean",
          "description": "Lazada Freeship Max; a number sets the rate."
         },
         "affiliate_rate": {
          "type": "number",
          "description": "Affiliate commission %."
         },
         "ads_rate": {
          "type": "number",
          "description": "Advertising cost as % of sales."
         },
         "other_costs": {
          "type": "number",
          "description": "Other costs per order (packaging…), VND."
         },
         "seller_type": {
          "type": "string",
          "default": "household",
          "description": "`household`, `individual` (tax withheld) or `company`."
         },
         "tax_category": {
          "type": "string",
          "default": "goods",
          "description": "`goods`, `services` or `goods_services`."
         },
         "target_margin": {
          "type": "number",
          "description": "Wanted profit margin % of net sales: returns suggested_price."
         }
        },
        "required": [
         "platform"
        ]
       },
       "example": {
        "platform": "tiktok",
        "price": 250000,
        "cost": 120000,
        "category": "son môi",
        "target_margin": 20
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "platform": {
           "type": "string"
          },
          "platform_name": {
           "type": "string"
          },
          "shop_type": {
           "type": "string"
          },
          "category": {
           "type": "object",
           "properties": {
            "level": {
             "type": "number"
            },
            "path": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "rate": {
             "type": "number"
            },
            "range": {},
            "alternatives": {
             "type": "array"
            }
           }
          },
          "rates": {
           "type": "object",
           "properties": {
            "fixed_fee": {
             "type": "number"
            },
            "transaction_fee": {
             "type": "number"
            },
            "programmes": {
             "type": "array"
            },
            "per_order": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "affiliate": {
             "type": "number"
            },
            "ads": {
             "type": "number"
            },
            "effective": {
             "type": "object",
             "properties": {
              "commission": {
               "type": "object"
              },
              "transaction": {
               "type": "string"
              }
             }
            }
           }
          },
          "tax": {
           "type": "object",
           "properties": {
            "seller_type": {
             "type": "string"
            },
            "withheld": {
             "type": "boolean"
            },
            "category": {
             "type": "string"
            },
            "vat_rate": {
             "type": "number"
            },
            "pit_rate": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "reviewed": {
             "type": "string"
            }
           }
          },
          "at_price": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "units": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "seller_discount": {
             "type": "number"
            },
            "net_sales": {
             "type": "number"
            },
            "buyer_shipping": {
             "type": "number"
            },
            "fees": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "fee_total": {
             "type": "number"
            },
            "fee_percent": {
             "type": "number"
            },
            "tax_withheld": {
             "type": "object",
             "properties": {
              "vat": {
               "type": "number"
              },
              "pit": {
               "type": "number"
              },
              "total": {
               "type": "number"
              }
             }
            },
            "payout": {
             "type": "number"
            },
            "cost": {
             "type": "number"
            },
            "profit": {
             "type": "number"
            },
            "margin_percent": {
             "type": "number"
            }
           }
          },
          "break_even_price": {
           "type": "number"
          },
          "target_margin": {
           "type": "number"
          },
          "suggested_price": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          },
          "fee_table_version": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence": {
           "type": "string"
          }
         }
        },
        "example": {
         "platform": "tiktok",
         "platform_name": "TikTok Shop",
         "shop_type": "normal",
         "category": {
          "level": 3,
          "path": [
           "Chăm sóc sắc đẹp & Chăm sóc cá nhân",
           "Trang điểm",
           "Son môi & Son bóng"
          ],
          "rate": 15.5,
          "range": null,
          "alternatives": []
         },
         "rates": {
          "fixed_fee": 15.5,
          "transaction_fee": 6,
          "programmes": [],
          "per_order": [
           {
            "code": "order_processing",
            "name_vi": "Phí xử lý đơn hàng",
            "amount": 3000
           }
          ],
          "affiliate": 0,
          "ads": 0,
          "effective": {
           "commission": {
            "normal": "2026-07-03",
            "mall": "2026-08-03"
           },
           "transaction": "2026-05-09"
          }
         },
         "tax": {
          "seller_type": "household",
          "withheld": true,
          "category": "goods",
          "vat_rate": 1,
          "pit_rate": 0.5,
          "decree": "117/2025/NĐ-CP",
          "effective_from": "2025-07-01",
          "reviewed": "2026-11-11"
         },
         "at_price": {
          "price": 250000,
          "units": 1,
          "gross": 250000,
          "seller_discount": 0,
          "net_sales": 250000,
          "buyer_shipping": 0,
          "fees": [
           {
            "code": "commission",
            "name_vi": "Phí hoa hồng nền tảng",
            "rate": 15.5,
            "base": 250000,
            "amount": 38750
           },
           {
            "code": "transaction_fee",
            "name_vi": "Phí giao dịch",
            "rate": 6,
            "base": 250000,
            "amount": 15000
           },
           {
            "code": "order_processing",
            "name_vi": "Phí xử lý đơn hàng",
            "amount": 3000
           }
          ],
          "fee_total": 56750,
          "fee_percent": 22.7,
          "tax_withheld": {
           "vat": 2500,
           "pit": 1250,
           "total": 3750
          },
          "payout": 189500,
          "cost": 120000,
          "profit": 69500,
          "margin_percent": 27.8
         },
         "break_even_price": 159740,
         "target_margin": 20,
         "suggested_price": 215789,
         "warnings": [],
         "fee_table_version": "2026-11",
         "reviewed": "2026-11-11",
         "review_cadence": "monthly"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/xml-convert": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "XML ↔ JSON / TOML / INI",
    "description": "Send a document in `xml`, `json`, `toml` or `ini` (or as the raw body with `from`) and pick `to`: `json`, `xml`, `toml`, `ini`, `validate`, `pretty` or `minify`. XML to JSON keeps attributes under a prefix (`@_` by default, `attribute_prefix=none` for none), puts mixed text in `#text`, and can force arrays for repeated elements (`array_tags=item,line` or `always_array=true`), keep the element order (`preserve_order=true`), strip namespace prefixes (`remove_ns=true`) and keep CDATA or comments. Values stay strings unless `parse_values=true`, so tax codes and invoice numbers such as `0101234567` keep their leading zeros.\n\nJSON to XML turns keys starting with the prefix into attributes, arrays into repeated elements and wraps the result in `root` when needed; the output is checked again and a warning is returned if a key is not a valid element name. `validate` reports the first error with its line and column, plus the root element, namespaces and element count; `pretty` / `minify` re-indent XML (or JSON) keeping comments, CDATA and processing instructions.\n\nSafety: entity expansion is limited (no \"billion laughs\"), external entities (SYSTEM / PUBLIC) are never loaded, nesting is capped at 256 levels and documents at 5 MB. TOML support covers TOML 1.0 except arbitrary-precision integers (dates and times become strings, inf / nan become strings); INI supports sections, `;` / `#` comments, quoted values, `key[]` arrays and optional dotted sections.\n\nDocs: https://apibox.io.vn/docs/xml-convert/",
    "operationId": "xmlConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/xml-convert/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "XML document (or send `json`, `toml`, `ini`, `input` + `from`, or the raw body)."
         },
         "json": {
          "type": "object",
          "description": "JSON value (object or JSON string) to convert."
         },
         "toml": {
          "type": "string",
          "description": "TOML document."
         },
         "ini": {
          "type": "string",
          "description": "INI document."
         },
         "from": {
          "type": "string",
          "description": "`xml`, `json`, `toml` or `ini` (detected when omitted)."
         },
         "to": {
          "type": "string",
          "default": "json",
          "description": "`json`, `xml`, `toml`, `ini`, `validate`, `pretty` or `minify` (default `json`, or `xml` for JSON input)."
         },
         "attribute_prefix": {
          "type": "string",
          "default": "@_",
          "description": "Prefix of attribute keys; `none` for no prefix."
         },
         "attributes": {
          "type": "boolean",
          "default": true,
          "description": "`false` drops attributes."
         },
         "text_node_name": {
          "type": "string",
          "default": "#text",
          "description": "Key of the text of elements that also have attributes or children."
         },
         "array_tags": {
          "type": "string",
          "description": "Comma-separated element names always returned as arrays."
         },
         "always_array": {
          "type": "boolean",
          "default": false,
          "description": "Every element below the root becomes an array."
         },
         "parse_values": {
          "type": "boolean",
          "default": false,
          "description": "Convert numbers and booleans (XML, INI). Leading zeros are kept as strings."
         },
         "preserve_order": {
          "type": "boolean",
          "default": false,
          "description": "Ordered array output (exact element order, mixed content)."
         },
         "remove_ns": {
          "type": "boolean",
          "default": false,
          "description": "Remove namespace prefixes (`inv:Total` → `Total`)."
         },
         "keep_cdata": {
          "type": "boolean",
          "default": false,
          "description": "Keep CDATA sections under `#cdata`."
         },
         "keep_comments": {
          "type": "boolean",
          "default": false,
          "description": "Keep comments under `#comment`."
         },
         "root": {
          "type": "string",
          "default": "root",
          "description": "JSON to XML: name of the wrapping root element."
         },
         "indent": {
          "type": "number",
          "default": 2,
          "description": "Indentation for XML / JSON output (0 = one line)."
         },
         "declaration": {
          "type": "boolean",
          "default": true,
          "description": "JSON to XML: add `<?xml version=\"1.0\" encoding=\"UTF-8\"?>`."
         },
         "nested_sections": {
          "type": "boolean",
          "default": false,
          "description": "INI: `[a.b]` becomes nested objects."
         }
        }
       },
       "example": {
        "xml": "<invoice id=\"HD001\"><buyer>Công ty A</buyer><item><name>Pen</name><qty>2</qty></item><item><name>Book</name><qty>1</qty></item></invoice>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "root": {
           "type": "string"
          },
          "json": {
           "type": "object",
           "properties": {
            "invoice": {
             "type": "object",
             "properties": {
              "buyer": {
               "type": "string"
              },
              "item": {
               "type": "array"
              },
              "@_id": {
               "type": "string"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "from": "xml",
         "to": "json",
         "root": "invoice",
         "json": {
          "invoice": {
           "buyer": "Công ty A",
           "item": [
            {
             "name": "Pen",
             "qty": "2"
            },
            {
             "name": "Book",
             "qty": "1"
            }
           ],
           "@_id": "HD001"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/file-type": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "File type detector",
    "description": "Upload a file (multipart, raw body or `file_base64`) or give a `url` and the API identifies what the bytes really are, without trusting the extension: images (JPEG, PNG, WebP, AVIF, HEIC, raw photos…), PDF, Office documents (DOCX / XLSX / PPTX told apart by their ZIP entries, legacy DOC / XLS / PPT by their OLE2 streams, ODF, EPUB), archives (ZIP, RAR, 7z, gzip, bzip2, xz, zstd, tar, ISO…), audio and video containers, executables (Windows PE with architecture and DLL / .NET flags, ELF, Mach-O, APK, JAR, DEX, WebAssembly, scripts with a shebang, LNK shortcuts, MSI, DEB / RPM), fonts, SQLite and many data formats; text files are classified as SVG, HTML, XML, JSON, CSV, PEM and so on.\n\nThe answer gives the MIME type, canonical extension, kind and details, then compares it with the file name (`filename`, or the uploaded name) and the declared `content_type`. Warnings have a severity and the overall `risk` is the highest one: executables hidden behind a document or image extension, VBA macros (especially in a file named .docx / .xlsx), double extensions (`invoice.pdf.exe`), right-to-left override characters in names, SVG / HTML with scripts, PDF with JavaScript or Launch actions, archives containing executables.\n\nOnly the first 64 KB are inspected (plus the ZIP central directory for uploads), so a URL is fetched with a 64 KB cap. The file is not stored. This is a content-type check, not an antivirus: a \"none\" risk does not prove a file is harmless.\n\nDocs: https://apibox.io.vn/docs/file-type/",
    "operationId": "fileTypeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/file-type/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the file (first 64 KB are read).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "filename",
      "in": "query",
      "required": false,
      "description": "File name to compare with (default: uploaded name or URL path).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "content_type",
      "in": "query",
      "required": false,
      "description": "Declared MIME type to compare with (default: upload / response Content-Type).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "file_name": {
           "type": "string"
          },
          "size_bytes": {
           "type": "number"
          },
          "bytes_inspected": {
           "type": "number"
          },
          "type": {
           "type": "object",
           "properties": {
            "extension": {
             "type": "string"
            },
            "mime": {
             "type": "string"
            },
            "kind": {
             "type": "string"
            },
            "description": {
             "type": "string"
            },
            "executable": {
             "type": "boolean"
            },
            "details": {
             "type": "object",
             "properties": {
              "entries": {
               "type": "number"
              },
              "entries_listed": {
               "type": "string"
              },
              "macros": {
               "type": "boolean"
              }
             }
            }
           }
          },
          "extension": {
           "type": "string"
          },
          "extension_matches": {
           "type": "boolean"
          },
          "declared_content_type": {},
          "content_type_matches": {},
          "expected_extensions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "risk": {
           "type": "string"
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "File type detector",
    "description": "Upload a file (multipart, raw body or `file_base64`) or give a `url` and the API identifies what the bytes really are, without trusting the extension: images (JPEG, PNG, WebP, AVIF, HEIC, raw photos…), PDF, Office documents (DOCX / XLSX / PPTX told apart by their ZIP entries, legacy DOC / XLS / PPT by their OLE2 streams, ODF, EPUB), archives (ZIP, RAR, 7z, gzip, bzip2, xz, zstd, tar, ISO…), audio and video containers, executables (Windows PE with architecture and DLL / .NET flags, ELF, Mach-O, APK, JAR, DEX, WebAssembly, scripts with a shebang, LNK shortcuts, MSI, DEB / RPM), fonts, SQLite and many data formats; text files are classified as SVG, HTML, XML, JSON, CSV, PEM and so on.\n\nThe answer gives the MIME type, canonical extension, kind and details, then compares it with the file name (`filename`, or the uploaded name) and the declared `content_type`. Warnings have a severity and the overall `risk` is the highest one: executables hidden behind a document or image extension, VBA macros (especially in a file named .docx / .xlsx), double extensions (`invoice.pdf.exe`), right-to-left override characters in names, SVG / HTML with scripts, PDF with JavaScript or Launch actions, archives containing executables.\n\nOnly the first 64 KB are inspected (plus the ZIP central directory for uploads), so a URL is fetched with a 64 KB cap. The file is not stored. This is a content-type check, not an antivirus: a \"none\" risk does not prove a file is harmless.\n\nDocs: https://apibox.io.vn/docs/file-type/",
    "operationId": "fileTypePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/file-type/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the file (first 64 KB are read)."
         },
         "filename": {
          "type": "string",
          "description": "File name to compare with (default: uploaded name or URL path)."
         },
         "content_type": {
          "type": "string",
          "description": "Declared MIME type to compare with (default: upload / response Content-Type)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The file (multipart, raw body or `file_base64`)."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the file (first 64 KB are read)."
         },
         "filename": {
          "type": "string",
          "description": "File name to compare with (default: uploaded name or URL path)."
         },
         "content_type": {
          "type": "string",
          "description": "Declared MIME type to compare with (default: upload / response Content-Type)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "file_name": {
           "type": "string"
          },
          "size_bytes": {
           "type": "number"
          },
          "bytes_inspected": {
           "type": "number"
          },
          "type": {
           "type": "object",
           "properties": {
            "extension": {
             "type": "string"
            },
            "mime": {
             "type": "string"
            },
            "kind": {
             "type": "string"
            },
            "description": {
             "type": "string"
            },
            "executable": {
             "type": "boolean"
            },
            "details": {
             "type": "object",
             "properties": {
              "entries": {
               "type": "number"
              },
              "entries_listed": {
               "type": "string"
              },
              "macros": {
               "type": "boolean"
              }
             }
            }
           }
          },
          "extension": {
           "type": "string"
          },
          "extension_matches": {
           "type": "boolean"
          },
          "declared_content_type": {},
          "content_type_matches": {},
          "expected_extensions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "risk": {
           "type": "string"
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "source": "upload",
         "file_name": "contract.docx",
         "size_bytes": 401,
         "bytes_inspected": 401,
         "type": {
          "extension": "docm",
          "mime": "application/vnd.ms-word.document.macroEnabled.12",
          "kind": "document",
          "description": "Word document with macros",
          "executable": false,
          "details": {
           "entries": 3,
           "entries_listed": "all",
           "macros": true
          }
         },
         "extension": "docx",
         "extension_matches": false,
         "declared_content_type": null,
         "content_type_matches": null,
         "expected_extensions": [
          "docm",
          "dotm"
         ],
         "risk": "high",
         "warnings": [
          {
           "code": "macros",
           "severity": "high",
           "message": "The file contains VBA macros but is named .docx (macro-free format)"
          },
          {
           "code": "extension_mismatch",
           "severity": "low",
           "message": "The name ends in .docx but the content is Word document with macros (.docm)"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-to-types": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "JSON to types",
    "description": "Paste a JSON sample in `json` (or several in `samples`) and choose `lang`: `typescript`, `zod`, `json-schema`, `go`, `python` (dataclasses), `pydantic` (v2), a comma-separated list or `all`. Samples are merged field by field: a field missing from some objects becomes optional, mixed kinds become unions, `null` makes a field nullable, integers and decimals merge into a number, and a top-level array of objects is read as a list of records of one type.\n\nNested objects get their own named types from the key (array items are singularised: `items` → `Item`, `addresses` → `Address`), identical shapes share one type, and strings are tagged with a format when every sample matches: RFC 3339 date-time (→ `time.Time`, `datetime`, `z.string().datetime()`), date, time, UUID, e-mail, URL. With `enums=true` short string fields with repeated values become literal unions / enums. Keys that are not valid identifiers are quoted (TypeScript, Zod), tagged (Go `json:\"…\"`) or aliased (Pydantic `Field(alias=…)`).\n\nThe generator is our own (no quicktype): up to 100 samples, 200,000 values and 64 levels of nesting. `code` holds the first language, `output` every language requested. Python output uses `X | None` syntax (Python 3.10+).\n\nDocs: https://apibox.io.vn/docs/json-to-types/",
    "operationId": "jsonToTypesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-to-types/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "json": {
          "type": "object",
          "description": "One JSON sample (any JSON value, or a JSON string)."
         },
         "samples": {
          "type": "array",
          "items": {},
          "description": "Several samples of the same type (up to 100), merged."
         },
         "lang": {
          "type": "string",
          "default": "typescript",
          "description": "`typescript`, `zod`, `json-schema`, `go`, `python`, `pydantic`, a comma list or `all`."
         },
         "name": {
          "type": "string",
          "default": "Root",
          "description": "Name of the root type."
         },
         "detect_dates": {
          "type": "boolean",
          "default": true,
          "description": "Detect date-time / date / time strings."
         },
         "enums": {
          "type": "boolean",
          "default": false,
          "description": "Turn short repeated string values into literal unions / enums."
         }
        }
       },
       "example": {
        "json": {
         "id": 1,
         "name": "An",
         "created_at": "2026-11-10T08:30:00Z",
         "tags": [
          "vip"
         ],
         "address": {
          "city": "Hà Nội",
          "zip": null
         }
        },
        "lang": "typescript",
        "name": "Customer"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "root": {
           "type": "string"
          },
          "samples": {
           "type": "number"
          },
          "types": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "languages": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "code": {
           "type": "string"
          },
          "output": {
           "type": "object",
           "properties": {
            "typescript": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "root": "Customer",
         "samples": 1,
         "types": [
          "Customer",
          "Address"
         ],
         "languages": [
          "typescript"
         ],
         "code": "export interface Customer {\n  id: number;\n  name: string;\n  /** format: date-time */\n  created_at: string;\n  tags: string[];\n  address: Address;\n}\n\nexport interface Address {\n  city: string;\n  zip: null;\n}\n",
         "output": {
          "typescript": "(same as code)"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/math-eval": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Math expression evaluator",
    "description": "Send an expression in `expr` (GET or POST) or a batch in `expressions` (up to 100, sharing variables: `a = 5`, then `a * 2`). The evaluator is mathjs with a restricted function set: arithmetic, powers and roots, logarithms, rounding, trigonometry, gcd / lcm, factorial and combinations, statistics (mean, median, std, variance, quantile…), matrices (det, inv, transpose, dot, cross), comparisons and logic, complex numbers, constants and units with conversion (`100 km/h to m/s`, `5 cm + 2 inch to mm`, `10 kg * 9.81 m/s^2 to N`). You can define functions (`f(x) = x^2 + 1`) and pass variables in `scope` (numbers, arrays or strings such as `\"42 km\"`).\n\n`number=bignumber` computes with 64 significant digits (`precision` 16–256), `number=fraction` gives exact fractions (`1/3 + 1/6` → `1/2`). Each result comes as a formatted string (`digits` significant digits, 15 by default), a JSON `value`, its `type` and the LaTeX of the expression for display.\n\nSafety: import, createUnit, evaluate, parse, simplify, derivative and other meta functions are disabled, property access to constructors is blocked by mathjs, expressions are limited to 2,000 characters, matrices and ranges to 100,000 elements, factorial to 100,000 and exact powers to exponent 10,000; a batch stops after 2 seconds.\n\nDocs: https://apibox.io.vn/docs/math-eval/",
    "operationId": "mathEvalGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/math-eval/"
    },
    "parameters": [
     {
      "name": "expr",
      "in": "query",
      "required": false,
      "description": "One expression (max 2,000 characters).",
      "schema": {
       "type": "string"
      },
      "example": "5 cm + 2 inch to mm"
     },
     {
      "name": "number",
      "in": "query",
      "required": false,
      "description": "`number` (double), `bignumber` or `fraction`.",
      "schema": {
       "type": "string",
       "default": "number"
      }
     },
     {
      "name": "precision",
      "in": "query",
      "required": false,
      "description": "Significant digits of bignumber mode (16–256).",
      "schema": {
       "type": "number",
       "default": 64
      }
     },
     {
      "name": "digits",
      "in": "query",
      "required": false,
      "description": "Significant digits of the formatted result.",
      "schema": {
       "type": "number",
       "default": 15
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "expression": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "value": {
           "type": "object",
           "properties": {
            "value": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            }
           }
          },
          "type": {
           "type": "string"
          },
          "tex": {
           "type": "string"
          },
          "number": {
           "type": "string"
          },
          "ms": {
           "type": "number"
          }
         }
        },
        "example": {
         "expression": "5 cm + 2 inch to mm",
         "result": "100.8 mm",
         "value": {
          "value": 100.8,
          "unit": "mm"
         },
         "type": "Unit",
         "tex": "5~\\mathrm{cm}+2~\\mathrm{inch}\\rightarrow\\mathrm{mm}",
         "number": "number",
         "ms": 6
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Math expression evaluator",
    "description": "Send an expression in `expr` (GET or POST) or a batch in `expressions` (up to 100, sharing variables: `a = 5`, then `a * 2`). The evaluator is mathjs with a restricted function set: arithmetic, powers and roots, logarithms, rounding, trigonometry, gcd / lcm, factorial and combinations, statistics (mean, median, std, variance, quantile…), matrices (det, inv, transpose, dot, cross), comparisons and logic, complex numbers, constants and units with conversion (`100 km/h to m/s`, `5 cm + 2 inch to mm`, `10 kg * 9.81 m/s^2 to N`). You can define functions (`f(x) = x^2 + 1`) and pass variables in `scope` (numbers, arrays or strings such as `\"42 km\"`).\n\n`number=bignumber` computes with 64 significant digits (`precision` 16–256), `number=fraction` gives exact fractions (`1/3 + 1/6` → `1/2`). Each result comes as a formatted string (`digits` significant digits, 15 by default), a JSON `value`, its `type` and the LaTeX of the expression for display.\n\nSafety: import, createUnit, evaluate, parse, simplify, derivative and other meta functions are disabled, property access to constructors is blocked by mathjs, expressions are limited to 2,000 characters, matrices and ranges to 100,000 elements, factorial to 100,000 and exact powers to exponent 10,000; a batch stops after 2 seconds.\n\nDocs: https://apibox.io.vn/docs/math-eval/",
    "operationId": "mathEvalPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/math-eval/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "expr": {
          "type": "string",
          "description": "One expression (max 2,000 characters)."
         },
         "expressions": {
          "type": "array",
          "items": {},
          "description": "Batch of expressions evaluated in order with shared variables (max 100)."
         },
         "scope": {
          "type": "object",
          "description": "Variables: `{\"price\": 120000, \"d\": \"42 km\"}`."
         },
         "number": {
          "type": "string",
          "default": "number",
          "description": "`number` (double), `bignumber` or `fraction`."
         },
         "precision": {
          "type": "number",
          "default": 64,
          "description": "Significant digits of bignumber mode (16–256)."
         },
         "digits": {
          "type": "number",
          "default": 15,
          "description": "Significant digits of the formatted result."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "expression": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "value": {
           "type": "object",
           "properties": {
            "value": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            }
           }
          },
          "type": {
           "type": "string"
          },
          "tex": {
           "type": "string"
          },
          "number": {
           "type": "string"
          },
          "ms": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/holidays": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "World public holidays",
    "description": "Give a `country` (ISO code, optionally with a subdivision: `US-CA`, `DE-BY`, `GB-SCT`) and get its holidays for a `year`: date, end date for multi-day holidays, start and end instants in the country time zone, local name, English name, Vietnamese name when the data has one, type (`public`, `bank`, `school`, `optional`, `observance`) and whether it is a substitute day. Filter with `types=public`, choose the name language with `lang`, and list subdivisions with `list=states`; without `country` the API lists every supported country.\n\nOther modes: `date=2026-12-25` tells whether a day is a holiday, a weekend or a business day; `next=5` returns the next holidays from today (or `from`); `from` + `to` counts business days (both dates included) and lists the holidays in the range; `add=10` + `from` adds business days. Weekends follow CLDR per country (Friday–Saturday in Saudi Arabia, Sunday only in India…) or `weekend=6,0`; days off are holidays of type `public` and `bank` (`business_types` to change), half-day holidays such as Christmas Eve afternoon do not close the day.\n\nRules come from the open date-holidays project (CC BY-SA 4.0, attribution returned in every response), including Easter, lunar, Hebrew and Islamic calendars, and are refreshed weekly. Islamic dates are calculated and may differ by a day from moon sightings. For Vietnam use /v1/vn-holidays, which follows the Labour Code and the official yearly schedules.\n\nDocs: https://apibox.io.vn/docs/holidays/",
    "operationId": "holidaysGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/holidays/"
    },
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "ISO 3166 code, optionally with subdivision (`US`, `US-CA`, `DE-BY`). Omit to list countries.",
      "schema": {
       "type": "string"
      },
      "example": "US"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Year (1900–2200, default: current year).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of `name` (`en`, `vi`, `de`, …; default: the country language).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "types",
      "in": "query",
      "required": false,
      "description": "Comma list of `public`, `bank`, `school`, `optional`, `observance` (default: all).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Check one day (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "next",
      "in": "query",
      "required": false,
      "description": "Return the next N holidays (1–100) from today or `from`.",
      "schema": {
       "type": "number"
      },
      "example": 2
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Start date (with `to`, `add` or `next`).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "End date: count business days from `from` to `to` (max 10 years).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "add",
      "in": "query",
      "required": false,
      "description": "Add N business days to `from` (negative to go back).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "weekend",
      "in": "query",
      "required": false,
      "description": "Weekend days, 0 = Sunday … 6 = Saturday (default: CLDR for the country).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "business_types",
      "in": "query",
      "required": false,
      "description": "Holiday types that close business days.",
      "schema": {
       "type": "string",
       "default": "public,bank"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`states`: list subdivisions and regions.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "country": {
           "type": "string"
          },
          "country_name": {
           "type": "string"
          },
          "country_name_vi": {
           "type": "string"
          },
          "timezone": {
           "type": "string"
          },
          "languages": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "weekend_days": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "from": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "holidays": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "end_date": {
              "type": "string"
             },
             "days": {
              "type": "number"
             },
             "start": {
              "type": "string"
             },
             "end": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "rule": {
              "type": "string"
             },
             "days_until": {
              "type": "number"
             }
            }
           }
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "country": "US",
         "country_name": "United States of America",
         "country_name_vi": "Hoa Kỳ",
         "timezone": "America/New_York",
         "languages": [
          "en-us",
          "en"
         ],
         "weekend_days": [
          "saturday",
          "sunday"
         ],
         "from": "2026-11-11",
         "count": 2,
         "holidays": [
          {
           "date": "2026-11-11",
           "end_date": "2026-11-11",
           "days": 1,
           "start": "2026-11-11T05:00:00.000Z",
           "end": "2026-11-12T05:00:00.000Z",
           "name": "Veterans Day",
           "name_en": "Veterans Day",
           "type": "public",
           "rule": "11-11",
           "days_until": 0
          },
          {
           "date": "2026-11-26",
           "end_date": "2026-11-26",
           "days": 1,
           "start": "2026-11-26T05:00:00.000Z",
           "end": "2026-11-27T05:00:00.000Z",
           "name": "Thanksgiving Day",
           "name_en": "Thanksgiving Day",
           "type": "public",
           "rule": "4th thursday in November",
           "days_until": 15
          }
         ],
         "attribution": "Holiday data: date-holidays by commenthol and contributors (https://github.com/commenthol/date-holidays), licensed CC BY-SA 4.0; data version 2026-11-08"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/countries": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Country data",
    "description": "Look up one country by ISO 3166-1 alpha-2, alpha-3 or numeric code (`/v1/countries/VN`, `code=VNM`, `code=704`) or search the 250 countries and territories: `q` matches names in English, Vietnamese (with or without accents: \"Hàn Quốc\", \"han quoc\", \"Đức\") and the native language plus common aliases; `calling_code` finds countries by dialling code or by the start of a full phone number (`+1 876…` → Jamaica, `+1` → US, Canada); `currency`, `language`, `continent` (code or name in English / Vietnamese) and `timezone` filter the list.\n\nEach country has its codes, English, Vietnamese and native names, aliases, capital, continent (with Vietnamese name), calling codes, currencies (ISO 4217 code, name, symbol, decimals), languages (ISO 639-1 with native names), flag emoji, country-code TLD and IANA time zones. Without filters the whole list is returned in a compact form (`full=true` for every detail).\n\nData comes from countries-list and i18n-iso-countries (MIT) and the IANA time zone database (public domain), with common Vietnamese names reviewed by hand, and is refreshed weekly. Flags are emoji only (no image hotlinking).\n\nDocs: https://apibox.io.vn/docs/countries/",
    "operationId": "countriesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/countries/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "ISO alpha-2, alpha-3 or numeric code (`/v1/countries/VN` also works).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search by name (English, Vietnamese with or without accents, native).",
      "schema": {
       "type": "string"
      },
      "example": "Hàn Quốc"
     },
     {
      "name": "calling_code",
      "in": "query",
      "required": false,
      "description": "Dialling code or full phone number (`+84`, `1876`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "currency",
      "in": "query",
      "required": false,
      "description": "ISO 4217 currency code (`EUR`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "language",
      "in": "query",
      "required": false,
      "description": "ISO 639-1 language code (`fr`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "continent",
      "in": "query",
      "required": false,
      "description": "`AS`, `EU`, `AF`, `NA`, `SA`, `OC`, `AN` or a name (`Asia`, `châu Á`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "timezone",
      "in": "query",
      "required": false,
      "description": "IANA time zone (`Europe/Berlin`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "full",
      "in": "query",
      "required": false,
      "description": "Full details in lists (currency and language objects, aliases).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum results (1–300; 50 when filtering).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "filters": {
           "type": "object",
           "properties": {
            "q": {
             "type": "string"
            }
           }
          },
          "countries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "alpha2": {
              "type": "string"
             },
             "alpha3": {
              "type": "string"
             },
             "numeric": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "native": {
              "type": "string"
             },
             "flag": {
              "type": "string"
             },
             "aliases": {
              "type": "array"
             },
             "capital": {
              "type": "string"
             },
             "continent": {
              "type": "string"
             },
             "continent_name": {
              "type": "string"
             },
             "continent_name_vi": {
              "type": "string"
             },
             "calling_codes": {
              "type": "array"
             },
             "currencies": {
              "type": "array"
             },
             "languages": {
              "type": "array"
             },
             "tld": {
              "type": "array"
             },
             "timezones": {
              "type": "array"
             },
             "score": {
              "type": "number"
             }
            }
           }
          },
          "source": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          }
         }
        },
        "example": {
         "count": 1,
         "filters": {
          "q": "Hàn Quốc"
         },
         "countries": [
          {
           "alpha2": "KR",
           "alpha3": "KOR",
           "numeric": "410",
           "name": "South Korea",
           "name_vi": "Hàn Quốc",
           "native": "대한민국",
           "flag": "🇰🇷",
           "aliases": [
            "Korea, Republic of",
            "Republic of Korea",
            "Nam Hàn",
            "Đại Hàn Dân Quốc"
           ],
           "capital": "Seoul",
           "continent": "AS",
           "continent_name": "Asia",
           "continent_name_vi": "Châu Á",
           "calling_codes": [
            "+82"
           ],
           "currencies": [
            {
             "code": "KRW",
             "name": "South Korean Won",
             "native": "대한민국 원",
             "symbol": "₩",
             "symbol_native": "₩",
             "numeric": "410",
             "decimals": 0
            }
           ],
           "languages": [
            {
             "code": "ko",
             "name": "Korean",
             "native": "한국어"
            }
           ],
           "tld": [
            ".kr"
           ],
           "timezones": [
            "Asia/Seoul"
           ],
           "score": 100
          }
         ],
         "source": "Data: countries-list (MIT), i18n-iso-countries (MIT), IANA tz database (public domain)",
         "updated": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-geo": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Coordinates to Ward (Vietnam)",
    "description": "Send `lat` and `lng` (WGS 84, as given by phones and GPS) and get the province (34 units) and the phường / xã / đặc khu (3,321 units) that contain the point after the 1 July 2025 reorganisation, with the same GSO codes, names and postal codes as /v1/vn-provinces. `distance=1` adds the distance to the ward boundary; `ward=<code>` with a point tells whether the point is inside that ward (geofencing, attendance check-in), and `ward=<code>` alone returns its bounding box, centroid, area and, with `geometry=1`, its simplified boundary as GeoJSON.\n\nFor batches, POST `points` as `[[lat, lng], …]` or `[{\"lat\": …, \"lng\": …}]` (up to 1000 points per request). A point just outside every ward (on a beach, a river bank, a few metres off a simplified edge) is matched to the nearest ward within `max_distance` metres (default 250) and flagged `inside: false` with its `distance_m`; farther away (open sea, neighbouring countries) the answer is `found: false` with the nearest ward for information.\n\nBoundaries come from the GIS add-on of the open dataset ThangLeQuoc/vietnamese-provinces-database (MIT), derived from the official reference map sapnhap.bando.com.vn, simplified to about 30 m while keeping shared edges consistent (no gaps or overlaps between neighbours). Points within a few dozen metres of a boundary can therefore land in the neighbouring ward: the answer is marked `approximate` and is not a cadastral or legal determination. No house-number geocoding.\n\nDocs: https://apibox.io.vn/docs/vn-geo/",
    "operationId": "vnGeoGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-geo/"
    },
    "parameters": [
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude in decimal degrees (WGS 84). Or `latlng=21.0288,105.8525`, or the pair in the path `/v1/vn-geo/21.0288,105.8525`.",
      "schema": {
       "type": "number"
      },
      "example": 10.7725
     },
     {
      "name": "lng",
      "in": "query",
      "required": false,
      "description": "Longitude in decimal degrees (`lon` also accepted).",
      "schema": {
       "type": "number"
      },
      "example": 106.698
     },
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "Ward code (5 digits). With a point: is the point inside this ward? Alone: bbox, centroid, area of the ward.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "geometry",
      "in": "query",
      "required": false,
      "description": "With `ward` alone: add the simplified boundary as a GeoJSON MultiPolygon.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "distance",
      "in": "query",
      "required": false,
      "description": "Add `boundary_distance_m`: distance from the point to the edge of its ward.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "max_distance",
      "in": "query",
      "required": false,
      "description": "Snap points outside every ward to the nearest one within this many metres (0–50000).",
      "schema": {
       "type": "number",
       "default": 250
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "lat": {
           "type": "number"
          },
          "lng": {
           "type": "number"
          },
          "found": {
           "type": "boolean"
          },
          "inside": {
           "type": "boolean"
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "full_name": {
             "type": "string"
            }
           }
          },
          "ward": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "full_name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "type_en": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            }
           }
          },
          "approximate": {
           "type": "boolean"
          },
          "precision_m": {
           "type": "number"
          },
          "data": {
           "type": "object",
           "properties": {
            "admin_version": {
             "type": "string"
            },
            "built_at": {
             "type": "string"
            },
            "legal_basis": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "lat": 10.7725,
         "lng": 106.698,
         "found": true,
         "inside": true,
         "province": {
          "code": "79",
          "name": "Hồ Chí Minh",
          "full_name": "Thành phố Hồ Chí Minh"
         },
         "ward": {
          "code": "26743",
          "name": "Bến Thành",
          "full_name": "Phường Bến Thành",
          "type": "Phường",
          "type_en": "ward",
          "postal_code": "71009"
         },
         "approximate": true,
         "precision_m": 30,
         "data": {
          "admin_version": "v5.2.0",
          "built_at": "2026-11-11",
          "legal_basis": "Nghị quyết 202/2025/QH15 (34 provinces) and the UBTVQH resolutions on ward-level units, effective 1/7/2025; latest change in the dataset: 388/NQ-UBTVQH16",
          "source": "ThangLeQuoc/vietnamese-provinces-database GIS add-on (MIT), derived from sapnhap.bando.com.vn (NXB Tài nguyên Môi trường và Bản đồ Việt Nam)"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Coordinates to Ward (Vietnam)",
    "description": "Send `lat` and `lng` (WGS 84, as given by phones and GPS) and get the province (34 units) and the phường / xã / đặc khu (3,321 units) that contain the point after the 1 July 2025 reorganisation, with the same GSO codes, names and postal codes as /v1/vn-provinces. `distance=1` adds the distance to the ward boundary; `ward=<code>` with a point tells whether the point is inside that ward (geofencing, attendance check-in), and `ward=<code>` alone returns its bounding box, centroid, area and, with `geometry=1`, its simplified boundary as GeoJSON.\n\nFor batches, POST `points` as `[[lat, lng], …]` or `[{\"lat\": …, \"lng\": …}]` (up to 1000 points per request). A point just outside every ward (on a beach, a river bank, a few metres off a simplified edge) is matched to the nearest ward within `max_distance` metres (default 250) and flagged `inside: false` with its `distance_m`; farther away (open sea, neighbouring countries) the answer is `found: false` with the nearest ward for information.\n\nBoundaries come from the GIS add-on of the open dataset ThangLeQuoc/vietnamese-provinces-database (MIT), derived from the official reference map sapnhap.bando.com.vn, simplified to about 30 m while keeping shared edges consistent (no gaps or overlaps between neighbours). Points within a few dozen metres of a boundary can therefore land in the neighbouring ward: the answer is marked `approximate` and is not a cadastral or legal determination. No house-number geocoding.\n\nDocs: https://apibox.io.vn/docs/vn-geo/",
    "operationId": "vnGeoPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-geo/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "lat": {
          "type": "number",
          "description": "Latitude in decimal degrees (WGS 84). Or `latlng=21.0288,105.8525`, or the pair in the path `/v1/vn-geo/21.0288,105.8525`."
         },
         "lng": {
          "type": "number",
          "description": "Longitude in decimal degrees (`lon` also accepted)."
         },
         "points": {
          "type": "array",
          "items": {},
          "description": "Batch: up to 1000 points as `[[lat, lng], …]`, `[{\"lat\",\"lng\"}]` or `\"lat,lng;lat,lng\"`."
         },
         "ward": {
          "type": "string",
          "description": "Ward code (5 digits). With a point: is the point inside this ward? Alone: bbox, centroid, area of the ward."
         },
         "geometry": {
          "type": "boolean",
          "default": false,
          "description": "With `ward` alone: add the simplified boundary as a GeoJSON MultiPolygon."
         },
         "distance": {
          "type": "boolean",
          "default": false,
          "description": "Add `boundary_distance_m`: distance from the point to the edge of its ward."
         },
         "max_distance": {
          "type": "number",
          "default": 250,
          "description": "Snap points outside every ward to the nearest one within this many metres (0–50000)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "lat": {
           "type": "number"
          },
          "lng": {
           "type": "number"
          },
          "found": {
           "type": "boolean"
          },
          "inside": {
           "type": "boolean"
          },
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "full_name": {
             "type": "string"
            }
           }
          },
          "ward": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "full_name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "type_en": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            }
           }
          },
          "approximate": {
           "type": "boolean"
          },
          "precision_m": {
           "type": "number"
          },
          "data": {
           "type": "object",
           "properties": {
            "admin_version": {
             "type": "string"
            },
            "built_at": {
             "type": "string"
            },
            "legal_basis": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pdf-sign-verify": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "PDF Signature Verifier",
    "description": "Upload a signed PDF (contract, e-invoice, official letter, report) and get every signature and document timestamp it contains. For each one the API checks the integrity of the signed bytes (the message digest of the /ByteRange), the CMS / PKCS#7 signature with the signer certificate, and whether bytes were added after it (`modified_after_signing`: later revisions are normal for a second signature or LTV data, but worth looking at). `document_unchanged_since_last_signature` tells whether the last signature covers the whole file.\n\nThe signer certificate is decoded: name, organisation, tax code (MST) or citizen ID (CCCD / CMND) from the subject, issuing CA, serial number, validity and whether it was valid at the signing time. The signing time comes from an RFC 3161 timestamp when there is one (its imprint and signature are checked), otherwise from the signed attributes or the time claimed in the PDF. The chain is built from the certificates in the signature plus the root and CA certificates published by the Vietnam National Electronic Authentication Centre (NEAC, rootca.gov.vn: VNPT-CA, Viettel-CA, BkavCA, FPT-CA, MISA-CA and every licensed public CA) and the Government specialised CA (Ban Cơ yếu Chính phủ); every link is verified cryptographically, and `trusted_root` is true when it ends at one of these roots.\n\nRevocation is not checked (no OCSP / CRL request): the CRL and OCSP URLs of the certificate are returned so you can check them yourself. The result is a technical check, not a legal validation of the document. Supported: adbe.pkcs7.detached, ETSI.CAdES.detached, adbe.pkcs7.sha1 and ETSI.RFC3161 document timestamps; RSA and ECDSA.\n\nDocs: https://apibox.io.vn/docs/pdf-sign-verify/",
    "operationId": "pdfSignVerifyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-sign-verify/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the PDF, instead of uploading it."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The signed PDF (multipart, raw body or `file_base64`), within the file size of your plan."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the PDF, instead of uploading it."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "signed": {
           "type": "boolean"
          },
          "signature_count": {
           "type": "number"
          },
          "timestamp_count": {
           "type": "number"
          },
          "all_valid": {
           "type": "boolean"
          },
          "all_trusted": {
           "type": "boolean"
          },
          "document_unchanged_since_last_signature": {
           "type": "boolean"
          },
          "has_ltv_data": {
           "type": "boolean"
          },
          "file_size": {
           "type": "number"
          },
          "signatures": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "sub_filter": {
              "type": "string"
             },
             "reason": {
              "type": "string"
             },
             "location": {
              "type": "string"
             },
             "claimed_signing_time": {
              "type": "string"
             },
             "covers_whole_file": {
              "type": "boolean"
             },
             "modified_after_signing": {
              "type": "boolean"
             },
             "integrity_valid": {
              "type": "boolean"
             },
             "signature_valid": {
              "type": "boolean"
             },
             "digest_algorithm": {
              "type": "string"
             },
             "signing_time": {
              "type": "string"
             },
             "signing_time_source": {
              "type": "string"
             },
             "timestamp": {
              "type": "object"
             },
             "certificate": {
              "type": "object"
             },
             "chain": {
              "type": "array"
             },
             "chain_complete": {
              "type": "boolean"
             },
             "trusted_root": {
              "type": "boolean"
             },
             "trusted_root_name": {
              "type": "string"
             },
             "certificates_valid_at_signing": {
              "type": "boolean"
             },
             "valid": {
              "type": "boolean"
             }
            }
           }
          },
          "revocation_checked": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "signed": true,
         "signature_count": 1,
         "timestamp_count": 0,
         "all_valid": true,
         "all_trusted": true,
         "document_unchanged_since_last_signature": true,
         "has_ltv_data": false,
         "file_size": 222785,
         "signatures": [
          {
           "index": 1,
           "type": "signature",
           "sub_filter": "adbe.pkcs7.detached",
           "reason": "CHÍNH PHỦ<cp@chinhphu.vn> đã ký lên văn bản này!",
           "location": "Hà Nội",
           "claimed_signing_time": "2026-11-10T07:20:38.000Z",
           "covers_whole_file": true,
           "modified_after_signing": false,
           "integrity_valid": true,
           "signature_valid": true,
           "digest_algorithm": "SHA-256",
           "signing_time": "2026-11-10T07:20:39.000Z",
           "signing_time_source": "timestamp",
           "timestamp": {
            "time": "2026-11-10T07:20:39.000Z",
            "tsa": "Máy chủ cấp dấu thời gian CPNET",
            "serial_number": "42198483DA95DD67",
            "imprint_valid": true,
            "signature_valid": true
           },
           "certificate": {
            "common_name": "CHÍNH PHỦ",
            "organization": "CHÍNH PHỦ",
            "tax_code": null,
            "citizen_id": null,
            "issuer_common_name": "CA phục vụ các cơ quan Nhà nước G2",
            "serial_number": "75E92DD9AD56BD4D",
            "not_before": "2025-11-04T07:09:12.000Z",
            "not_after": "2030-11-03T07:09:12.000Z",
            "valid_at_signing": true,
            "expired": false,
            "key": {
             "algorithm": "RSA",
             "bits": 3072
            },
            "revocation_urls": {
             "crl": [
              "http://ca.gov.vn/pki/pub/crl/cpcag2.crl"
             ],
             "ocsp": [
              "http://ocsp.ca.gov.vn"
             ],
             "ca_issuers": [
              "http://ca.gov.vn/pki/pub/crt/cpcag2.crt"
             ]
            }
           },
           "chain": [
            {
             "subject": "CHÍNH PHỦ",
             "issuer": "CA phục vụ các cơ quan Nhà nước G2",
             "signature_verified_by_issuer": true,
             "in_ca_list": false,
             "trust_anchor": false
            },
            {
             "subject": "CA phục vụ các cơ quan Nhà nước G2",
             "issuer": "RootCA chuyên dùng Chính phủ G2",
             "signature_verified_by_issuer": true,
             "in_ca_list": true,
             "trust_anchor": false,
             "ca": "ban-co-yeu-chinh-phu"
            },
            {
             "subject": "RootCA chuyên dùng Chính phủ G2",
             "issuer": "RootCA chuyên dùng Chính phủ G2",
             "signature_verified_by_issuer": true,
             "in_ca_list": true,
             "trust_anchor": true,
             "ca": "ban-co-yeu-chinh-phu"
            }
           ],
           "chain_complete": true,
           "trusted_root": true,
           "trusted_root_name": "RootCA chuyên dùng Chính phủ G2",
           "certificates_valid_at_signing": true,
           "valid": true
          }
         ],
         "revocation_checked": false
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/chart-image": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Chart Image",
    "description": "Describe the chart in JSON and get an image: `{\"type\":\"bar\",\"data\":{\"labels\":[…],\"datasets\":[{\"label\":\"…\",\"data\":[…]}]},\"options\":{\"title\":\"…\"}}`. Types: `bar`, `horizontal-bar` (or Chart.js `indexAxis: \"y\"`), `line`, `area`, `pie`, `doughnut`, `scatter` (points `{x, y}`) and `sparkline`. Several datasets are grouped (or `stacked: true`), a dataset of a bar chart can be drawn as a `line`, gaps (`null`) break lines, and `tension` smooths them. Options: `title`, `subtitle`, `legend` (`top`, `bottom`, `right`, `false`), `x_label` / `y_label`, `min` / `max`, `values` (data labels), `prefix` / `suffix` (`\" ₫\"`, `\"%\"`), `locale` (`vi` writes 1.234,5 and 12 tr / 3 tỷ on axes), `theme` (`light` / `dark`), `font_size` and colours per dataset (`color`, `backgroundColor`, an array for one colour per bar). The usual Chart.js keys (`plugins.title`, `plugins.legend`, `scales.y.min`, `scales.x.stacked`…) are understood, so most QuickChart-style configs work as they are.\n\nBecause it answers GET with the config URL-encoded in `c`, the URL can be put straight into `<img src>`, an e-mail, a Slack / Zalo message or a Markdown / PDF report. PNG (default) and JPEG are drawn by our own renderer with the Be Vietnam Pro font, so Vietnamese text looks the same everywhere; `scale=2` gives a sharp image on retina screens. SVG keeps the text as vector outlines by default (exact rendering without fonts), `svg_text=text` writes real `<text>` elements instead.\n\nSize: `width` × `height` up to 2000 px and 4 megapixels with `scale`, up to 20 datasets and 10,000 points. The colours follow a colour-blind-checked palette; the renderer is our own code (not QuickChart or Chart.js).\n\nDocs: https://apibox.io.vn/docs/chart-image/",
    "operationId": "chartImageGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/chart-image/"
    },
    "parameters": [
     {
      "name": "c",
      "in": "query",
      "required": true,
      "description": "Chart config (JSON; URL-encoded in GET): `type`, `data.labels`, `data.datasets`, `options`. `chart` is an alias.",
      "schema": {
       "type": "object"
      },
      "example": {
       "type": "bar",
       "data": {
        "labels": [
         "T1",
         "T2",
         "T3"
        ],
        "datasets": [
         {
          "label": "Doanh thu",
          "data": [
           12,
           19,
           7
          ]
         }
        ]
       }
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`png`, `svg`, `jpeg` or `json` (PNG as base64 + SVG).",
      "schema": {
       "type": "string",
       "default": "png"
      }
     },
     {
      "name": "width",
      "in": "query",
      "required": false,
      "description": "Width in pixels (50–2000).",
      "schema": {
       "type": "number",
       "default": 600
      }
     },
     {
      "name": "height",
      "in": "query",
      "required": false,
      "description": "Height in pixels (30–2000).",
      "schema": {
       "type": "number",
       "default": 400
      }
     },
     {
      "name": "scale",
      "in": "query",
      "required": false,
      "description": "Pixel ratio of PNG / JPEG (1–4), e.g. 2 for retina screens.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "theme",
      "in": "query",
      "required": false,
      "description": "`light` or `dark` (also `options.theme`).",
      "schema": {
       "type": "string",
       "default": "light"
      }
     },
     {
      "name": "locale",
      "in": "query",
      "required": false,
      "description": "`vi` for Vietnamese number format (1.234,5; 12 tr; 3 tỷ).",
      "schema": {
       "type": "string",
       "default": "en"
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour (`#fff`, `transparent`…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "svg_text",
      "in": "query",
      "required": false,
      "description": "SVG only: `paths` (text as outlines) or `text` (`<text>` elements).",
      "schema": {
       "type": "string",
       "default": "paths"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/png": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/png"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Chart Image",
    "description": "Describe the chart in JSON and get an image: `{\"type\":\"bar\",\"data\":{\"labels\":[…],\"datasets\":[{\"label\":\"…\",\"data\":[…]}]},\"options\":{\"title\":\"…\"}}`. Types: `bar`, `horizontal-bar` (or Chart.js `indexAxis: \"y\"`), `line`, `area`, `pie`, `doughnut`, `scatter` (points `{x, y}`) and `sparkline`. Several datasets are grouped (or `stacked: true`), a dataset of a bar chart can be drawn as a `line`, gaps (`null`) break lines, and `tension` smooths them. Options: `title`, `subtitle`, `legend` (`top`, `bottom`, `right`, `false`), `x_label` / `y_label`, `min` / `max`, `values` (data labels), `prefix` / `suffix` (`\" ₫\"`, `\"%\"`), `locale` (`vi` writes 1.234,5 and 12 tr / 3 tỷ on axes), `theme` (`light` / `dark`), `font_size` and colours per dataset (`color`, `backgroundColor`, an array for one colour per bar). The usual Chart.js keys (`plugins.title`, `plugins.legend`, `scales.y.min`, `scales.x.stacked`…) are understood, so most QuickChart-style configs work as they are.\n\nBecause it answers GET with the config URL-encoded in `c`, the URL can be put straight into `<img src>`, an e-mail, a Slack / Zalo message or a Markdown / PDF report. PNG (default) and JPEG are drawn by our own renderer with the Be Vietnam Pro font, so Vietnamese text looks the same everywhere; `scale=2` gives a sharp image on retina screens. SVG keeps the text as vector outlines by default (exact rendering without fonts), `svg_text=text` writes real `<text>` elements instead.\n\nSize: `width` × `height` up to 2000 px and 4 megapixels with `scale`, up to 20 datasets and 10,000 points. The colours follow a colour-blind-checked palette; the renderer is our own code (not QuickChart or Chart.js).\n\nDocs: https://apibox.io.vn/docs/chart-image/",
    "operationId": "chartImagePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/chart-image/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "c": {
          "type": "object",
          "description": "Chart config (JSON; URL-encoded in GET): `type`, `data.labels`, `data.datasets`, `options`. `chart` is an alias."
         },
         "format": {
          "type": "string",
          "default": "png",
          "description": "`png`, `svg`, `jpeg` or `json` (PNG as base64 + SVG)."
         },
         "width": {
          "type": "number",
          "default": 600,
          "description": "Width in pixels (50–2000)."
         },
         "height": {
          "type": "number",
          "default": 400,
          "description": "Height in pixels (30–2000)."
         },
         "scale": {
          "type": "number",
          "default": 1,
          "description": "Pixel ratio of PNG / JPEG (1–4), e.g. 2 for retina screens."
         },
         "theme": {
          "type": "string",
          "default": "light",
          "description": "`light` or `dark` (also `options.theme`)."
         },
         "locale": {
          "type": "string",
          "default": "en",
          "description": "`vi` for Vietnamese number format (1.234,5; 12 tr; 3 tỷ)."
         },
         "background": {
          "type": "string",
          "description": "Background colour (`#fff`, `transparent`…)."
         },
         "svg_text": {
          "type": "string",
          "default": "paths",
          "description": "SVG only: `paths` (text as outlines) or `text` (`<text>` elements)."
         }
        },
        "required": [
         "c"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/png": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/png"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/barcode-read": {
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Barcode Reader",
    "description": "Upload a photo or a scan and get all the barcodes found in it, with their format, decoded text, corner positions and orientation. Linear codes: EAN-13, EAN-8, UPC-A, UPC-E, ISBN, Code 128 (shipping labels), Code 39, Code 93, Codabar, ITF / ITF-14 and GS1 DataBar. Matrix codes: QR, Micro QR, rMQR, DataMatrix (medicines, electronic parts), PDF417 (tickets, ID documents), Aztec and MaxiCode. Rotated, mirrored and inverted (light on dark) codes are tried automatically; `formats=ean13,code128` limits the search (faster, fewer false hits) and `max` caps the number of codes.\n\nRetail codes come with the GTIN-14 and the GS1 prefix country (893 = Vietnam), the same table as /v1/gtin-check. QR codes are classified (URL, Wi-Fi, vCard…) and VietQR payment codes are decoded into bank, account and amount. Binary payloads are returned in base64.\n\nDecoding uses zxing-cpp compiled to WebAssembly (zxing-wasm, MIT / Apache-2.0), running inside our servers: images are not sent to any third party nor stored. Images over 2400 px are scaled down first; limit 30 megapixels within the file size of your plan. Sharp, well-lit photos where the code is at least ~2 px per bar read best.\n\nDocs: https://apibox.io.vn/docs/barcode-read/",
    "operationId": "barcodeReadPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/barcode-read/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "formats": {
          "type": "string",
          "description": "Comma-separated formats to look for: `ean13, ean8, upca, upce, code128, code39, code93, codabar, itf, databar, qr, microqr, datamatrix, pdf417, aztec, maxicode`, or `linear`, `matrix`, `retail`. Default: all."
         },
         "max": {
          "type": "number",
          "default": 20,
          "description": "Maximum number of codes returned (1–50)."
         },
         "fast": {
          "type": "boolean",
          "default": false,
          "description": "Skip the slower \"try harder\" pass (good for clean, computer-generated images)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "PNG or JPEG image (multipart, raw body or `file_base64`)."
         },
         "formats": {
          "type": "string",
          "description": "Comma-separated formats to look for: `ean13, ean8, upca, upce, code128, code39, code93, codabar, itf, databar, qr, microqr, datamatrix, pdf417, aztec, maxicode`, or `linear`, `matrix`, `retail`. Default: all."
         },
         "max": {
          "type": "number",
          "default": 20,
          "description": "Maximum number of codes returned (1–50)."
         },
         "fast": {
          "type": "boolean",
          "default": false,
          "description": "Skip the slower \"try harder\" pass (good for clean, computer-generated images)."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "found": {
           "type": "boolean"
          },
          "count": {
           "type": "number"
          },
          "barcodes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "format": {
              "type": "string"
             },
             "symbology": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "content_type": {
              "type": "string"
             },
             "position": {
              "type": "object"
             },
             "orientation": {
              "type": "number"
             },
             "is_mirrored": {
              "type": "boolean"
             },
             "is_inverted": {
              "type": "boolean"
             },
             "gtin": {
              "type": "object"
             }
            }
           }
          },
          "image": {
           "type": "object",
           "properties": {
            "format": {
             "type": "string"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "decoder": {
           "type": "string"
          }
         }
        },
        "example": {
         "found": true,
         "count": 1,
         "barcodes": [
          {
           "format": "EAN13",
           "symbology": "EANUPC",
           "text": "8934588012228",
           "content_type": "Text",
           "position": {
            "top_left": {
             "x": 33,
             "y": 0
            },
            "top_right": {
             "x": 317,
             "y": 0
            },
            "bottom_right": {
             "x": 317,
             "y": 149
            },
            "bottom_left": {
             "x": 33,
             "y": 149
            }
           },
           "orientation": 0,
           "is_mirrored": false,
           "is_inverted": false,
           "gtin": {
            "gtin14": "08934588012228",
            "gs1_prefix": {
             "prefix": "893",
             "name": "GS1 Vietnam",
             "country_code": "VN"
            }
           }
          }
         ],
         "image": {
          "format": "png",
          "width": 339,
          "height": 165
         },
         "decoder": "zxing-cpp (zxing-wasm)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-vat": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam VAT calculator",
    "description": "Send one `amount` or a list of invoice `lines` and the API adds VAT to prices before tax (`mode=exclusive`) or splits VAT out of prices that include it (`mode=inclusive`). Rates are 0%, 5%, 10%, 8% or exempt (KCT); with `rate=auto` (default) the line gets 8% when the invoice `date` falls in a reduction period and the goods are not excluded, else 10%. VAT is rounded to whole đồng per line (or once per rate group with `rounding=total`), and the totals are grouped by rate like on an e-invoice.\n\nThe 8% reduction (Nghị quyết 204/2025/QH15, Nghị định 174/2025/NĐ-CP, 1/7/2025 – 31/12/2026) excludes telecom, finance, banking, securities, insurance, real-estate business, metals and fabricated metal products, mining products except coal (Phụ lục I), goods and services subject to excise tax except gasoline (Phụ lục II) and IT goods (Phụ lục III). Give a `category` (e.g. `telecom`, `metals`, `goods`) or an `hs_code` and each line says whether it qualifies and why. HS matching is indicative: the appendices use product codes, so borderline goods are flagged “check”. Earlier periods since 2022 are known too.\n\n`method=direct` computes VAT for businesses on the direct method: 1% distribution, 5% services, 3% production / transport, 2% other (Luật Thuế GTGT 48/2024), minus 20% during the reduction, with the note to print on the invoice.\n\nDocs: https://apibox.io.vn/docs/vn-vat/",
    "operationId": "vnVatGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vat/"
    },
    "parameters": [
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "One amount (VND): price before VAT, or with VAT when `mode=inclusive`; revenue for `method=direct`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`exclusive` (add VAT) or `inclusive` (split VAT out).",
      "schema": {
       "type": "string",
       "default": "exclusive"
      }
     },
     {
      "name": "rate",
      "in": "query",
      "required": false,
      "description": "`auto`, `0`, `5`, `8`, `10` or `exempt`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Goods group: telecom, finance, banking, securities, insurance, real_estate, metals, metal_products, mining, excise_goods, excise_services, it, coal, gasoline, chemicals, goods, services.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hs_code",
      "in": "query",
      "required": false,
      "description": "HS code (2–10 digits) for an indicative exclusion check.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Invoice date (default today, Vietnam time).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "rounding",
      "in": "query",
      "required": false,
      "description": "`line` or `total`.",
      "schema": {
       "type": "string",
       "default": "line"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "`credit` (khấu trừ) or `direct` (trực tiếp, with `sector`: distribution, services, production, other).",
      "schema": {
       "type": "string",
       "default": "credit"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "rounding": {
           "type": "string"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "rate_percent": {
              "type": "number"
             },
             "rate_label": {
              "type": "string"
             },
             "reduction": {
              "type": "object",
              "properties": {}
             },
             "amount_before_vat": {
              "type": "number"
             },
             "vat": {
              "type": "number"
             },
             "total": {
              "type": "number"
             }
            }
           }
          },
          "vat_groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rate_label": {
              "type": "string"
             },
             "amount_before_vat": {
              "type": "number"
             },
             "vat": {
              "type": "number"
             },
             "total": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "amount_before_vat": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "reduction_period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam VAT calculator",
    "description": "Send one `amount` or a list of invoice `lines` and the API adds VAT to prices before tax (`mode=exclusive`) or splits VAT out of prices that include it (`mode=inclusive`). Rates are 0%, 5%, 10%, 8% or exempt (KCT); with `rate=auto` (default) the line gets 8% when the invoice `date` falls in a reduction period and the goods are not excluded, else 10%. VAT is rounded to whole đồng per line (or once per rate group with `rounding=total`), and the totals are grouped by rate like on an e-invoice.\n\nThe 8% reduction (Nghị quyết 204/2025/QH15, Nghị định 174/2025/NĐ-CP, 1/7/2025 – 31/12/2026) excludes telecom, finance, banking, securities, insurance, real-estate business, metals and fabricated metal products, mining products except coal (Phụ lục I), goods and services subject to excise tax except gasoline (Phụ lục II) and IT goods (Phụ lục III). Give a `category` (e.g. `telecom`, `metals`, `goods`) or an `hs_code` and each line says whether it qualifies and why. HS matching is indicative: the appendices use product codes, so borderline goods are flagged “check”. Earlier periods since 2022 are known too.\n\n`method=direct` computes VAT for businesses on the direct method: 1% distribution, 5% services, 3% production / transport, 2% other (Luật Thuế GTGT 48/2024), minus 20% during the reduction, with the note to print on the invoice.\n\nDocs: https://apibox.io.vn/docs/vn-vat/",
    "operationId": "vnVatPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vat/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "amount": {
          "type": "number",
          "description": "One amount (VND): price before VAT, or with VAT when `mode=inclusive`; revenue for `method=direct`."
         },
         "lines": {
          "type": "array",
          "items": {},
          "description": "Invoice lines: `[{\"name\":\"…\",\"amount\":2000000,\"rate\":\"auto\",\"category\":\"goods\",\"hs_code\":\"9403\"}]` (or `quantity` + `unit_price` + `discount`)."
         },
         "mode": {
          "type": "string",
          "default": "exclusive",
          "description": "`exclusive` (add VAT) or `inclusive` (split VAT out)."
         },
         "rate": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `0`, `5`, `8`, `10` or `exempt`."
         },
         "category": {
          "type": "string",
          "description": "Goods group: telecom, finance, banking, securities, insurance, real_estate, metals, metal_products, mining, excise_goods, excise_services, it, coal, gasoline, chemicals, goods, services."
         },
         "hs_code": {
          "type": "string",
          "description": "HS code (2–10 digits) for an indicative exclusion check."
         },
         "date": {
          "type": "string",
          "description": "Invoice date (default today, Vietnam time)."
         },
         "rounding": {
          "type": "string",
          "default": "line",
          "description": "`line` or `total`."
         },
         "method": {
          "type": "string",
          "default": "credit",
          "description": "`credit` (khấu trừ) or `direct` (trực tiếp, with `sector`: distribution, services, production, other)."
         }
        }
       },
       "example": {
        "lines": [
         {
          "name": "Bàn làm việc",
          "amount": 2000000,
          "category": "goods"
         },
         {
          "name": "Cước internet",
          "amount": 500000,
          "category": "telecom"
         }
        ],
        "date": "2026-11-11"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "rounding": {
           "type": "string"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "rate_percent": {
              "type": "number"
             },
             "rate_label": {
              "type": "string"
             },
             "reduction": {
              "type": "object",
              "properties": {}
             },
             "amount_before_vat": {
              "type": "number"
             },
             "vat": {
              "type": "number"
             },
             "total": {
              "type": "number"
             }
            }
           }
          },
          "vat_groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rate_label": {
              "type": "string"
             },
             "amount_before_vat": {
              "type": "number"
             },
             "vat": {
              "type": "number"
             },
             "total": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "amount_before_vat": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "reduction_period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "method": "credit",
         "mode": "exclusive",
         "date": "2026-11-11",
         "rounding": "line",
         "lines": [
          {
           "no": 1,
           "name": "Bàn làm việc",
           "rate_percent": 8,
           "rate_label": "8%",
           "reduction": {
            "applied": true,
            "eligible": true,
            "reason": "Other goods at 10% is reduced when it is taxed at 10%",
            "basis": "category"
           },
           "amount_before_vat": 2000000,
           "vat": 160000,
           "total": 2160000
          },
          {
           "no": 2,
           "name": "Cước internet",
           "rate_percent": 10,
           "rate_label": "10%",
           "reduction": {
            "applied": false,
            "eligible": false,
            "reason": "Telecommunications is not reduced (NĐ 174/2025/NĐ-CP, Phụ lục I)",
            "basis": "category",
            "group": "Phụ lục I"
           },
           "amount_before_vat": 500000,
           "vat": 50000,
           "total": 550000
          }
         ],
         "vat_groups": [
          {
           "rate_label": "8%",
           "amount_before_vat": 2000000,
           "vat": 160000,
           "total": 2160000
          },
          {
           "rate_label": "10%",
           "amount_before_vat": 500000,
           "vat": 50000,
           "total": 550000
          }
         ],
         "totals": {
          "amount_before_vat": 2500000,
          "vat": 210000,
          "total": 2710000
         },
         "reduction_period": {
          "from": "2025-07-01",
          "to": "2026-12-31",
          "ref": "Nghị quyết 204/2025/QH15; Nghị định 174/2025/NĐ-CP"
         },
         "legal": [
          "Luật Thuế giá trị gia tăng 48/2024/QH15 (Điều 9 thuế suất, Điều 12 phương pháp trực tiếp)",
          "Nghị quyết 204/2025/QH15; Nghị định 174/2025/NĐ-CP"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-pit-annual": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Annual PIT finalisation",
    "description": "Send the taxable salary of the year (`income`) with compulsory `insurance` and the tax `withheld`, or several `incomes` (employers, casual income withheld at 10%), the number of `dependents` (or `dependent_months`), charity and voluntary pension. The API applies the rules of the tax year: for 2024–2025 the 7-bracket table and 11 / 4.4 million deductions; from 2026 the 5-bracket table of Luật Thuế TNCN 109/2025/QH15, 15.5 / 6.2 million deductions (Nghị quyết 110/2025/UBTVQH15), voluntary pension up to 3 million a month and the new medical (≤ 23 million) and education (≤ 24 million) deductions of Nghị định 253/2026/NĐ-CP.\n\nThe answer gives the tax for the year bracket by bracket, the refund or the amount to pay, whether a finalisation is required (no finalisation when you do not ask for a refund; until 2025 also when the extra tax is ≤ 50,000 đ), whether the employer can finalise for you, and the deadlines (31/3 for employers, end of April for individuals, moved to the next working day when it is a holiday).\n\nResident employees only; business, capital and property income are out of scope. It is an estimate for planning, not tax advice.\n\nDocs: https://apibox.io.vn/docs/vn-pit-annual/",
    "operationId": "vnPitAnnualGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pit-annual/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Tax year 2024–2027 (default last year).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "income",
      "in": "query",
      "required": false,
      "description": "Taxable salary of the year (one employer).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "insurance",
      "in": "query",
      "required": false,
      "description": "Compulsory insurance paid by the employee in the year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "withheld",
      "in": "query",
      "required": false,
      "description": "Tax already withheld.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "dependents",
      "in": "query",
      "required": false,
      "description": "Dependants for the whole year (or `dependent_months` in total).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "charity",
      "in": "query",
      "required": false,
      "description": "Charity contributions to approved funds.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "voluntary_pension",
      "in": "query",
      "required": false,
      "description": "Voluntary pension / life insurance (capped).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "medical",
      "in": "query",
      "required": false,
      "description": "Medical costs in the health-insurance list (2026+, ≤ 23 million).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "education",
      "in": "query",
      "required": false,
      "description": "Domestic education costs (2026+, ≤ 24 million).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "result": {
           "type": "string"
          },
          "tax_due": {
           "type": "number"
          },
          "withheld": {
           "type": "number"
          },
          "refund": {
           "type": "number"
          },
          "deductions": {
           "type": "object",
           "properties": {
            "personal": {
             "type": "number"
            },
            "personal_months": {
             "type": "number"
            },
            "dependents": {
             "type": "number"
            },
            "dependent_months": {
             "type": "number"
            },
            "insurance": {
             "type": "number"
            },
            "voluntary_pension": {
             "type": "number"
            },
            "charity": {
             "type": "number"
            },
            "medical": {
             "type": "number"
            },
            "education": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "taxable_income": {
           "type": "number"
          },
          "brackets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "number"
             },
             "to": {
              "type": "number"
             },
             "rate_percent": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "tax": {
              "type": "number"
             }
            }
           }
          },
          "finalisation": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "can_authorise_employer": {
             "type": "boolean"
            },
            "form": {
             "type": "string"
            },
            "deadline_individual": {
             "type": "string"
            },
            "deadline_employer": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Annual PIT finalisation",
    "description": "Send the taxable salary of the year (`income`) with compulsory `insurance` and the tax `withheld`, or several `incomes` (employers, casual income withheld at 10%), the number of `dependents` (or `dependent_months`), charity and voluntary pension. The API applies the rules of the tax year: for 2024–2025 the 7-bracket table and 11 / 4.4 million deductions; from 2026 the 5-bracket table of Luật Thuế TNCN 109/2025/QH15, 15.5 / 6.2 million deductions (Nghị quyết 110/2025/UBTVQH15), voluntary pension up to 3 million a month and the new medical (≤ 23 million) and education (≤ 24 million) deductions of Nghị định 253/2026/NĐ-CP.\n\nThe answer gives the tax for the year bracket by bracket, the refund or the amount to pay, whether a finalisation is required (no finalisation when you do not ask for a refund; until 2025 also when the extra tax is ≤ 50,000 đ), whether the employer can finalise for you, and the deadlines (31/3 for employers, end of April for individuals, moved to the next working day when it is a holiday).\n\nResident employees only; business, capital and property income are out of scope. It is an estimate for planning, not tax advice.\n\nDocs: https://apibox.io.vn/docs/vn-pit-annual/",
    "operationId": "vnPitAnnualPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pit-annual/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "year": {
          "type": "number",
          "description": "Tax year 2024–2027 (default last year)."
         },
         "income": {
          "type": "number",
          "description": "Taxable salary of the year (one employer)."
         },
         "insurance": {
          "type": "number",
          "description": "Compulsory insurance paid by the employee in the year."
         },
         "withheld": {
          "type": "number",
          "description": "Tax already withheld."
         },
         "incomes": {
          "type": "array",
          "items": {},
          "description": "Several sources: `[{\"name\":\"A\",\"income\":300000000,\"insurance\":31500000,\"withheld\":5000000},{\"kind\":\"casual\",\"income\":60000000,\"withheld\":6000000}]`; the first is the current employer."
         },
         "dependents": {
          "type": "number",
          "description": "Dependants for the whole year (or `dependent_months` in total)."
         },
         "charity": {
          "type": "number",
          "description": "Charity contributions to approved funds."
         },
         "voluntary_pension": {
          "type": "number",
          "description": "Voluntary pension / life insurance (capped)."
         },
         "medical": {
          "type": "number",
          "description": "Medical costs in the health-insurance list (2026+, ≤ 23 million)."
         },
         "education": {
          "type": "number",
          "description": "Domestic education costs (2026+, ≤ 24 million)."
         }
        }
       },
       "example": {
        "year": 2026,
        "income": 360000000,
        "insurance": 37800000,
        "dependents": 1,
        "withheld": 10000000
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "result": {
           "type": "string"
          },
          "tax_due": {
           "type": "number"
          },
          "withheld": {
           "type": "number"
          },
          "refund": {
           "type": "number"
          },
          "deductions": {
           "type": "object",
           "properties": {
            "personal": {
             "type": "number"
            },
            "personal_months": {
             "type": "number"
            },
            "dependents": {
             "type": "number"
            },
            "dependent_months": {
             "type": "number"
            },
            "insurance": {
             "type": "number"
            },
            "voluntary_pension": {
             "type": "number"
            },
            "charity": {
             "type": "number"
            },
            "medical": {
             "type": "number"
            },
            "education": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "taxable_income": {
           "type": "number"
          },
          "brackets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "number"
             },
             "to": {
              "type": "number"
             },
             "rate_percent": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "tax": {
              "type": "number"
             }
            }
           }
          },
          "finalisation": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "can_authorise_employer": {
             "type": "boolean"
            },
            "form": {
             "type": "string"
            },
            "deadline_individual": {
             "type": "string"
            },
            "deadline_employer": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "result": "refund",
         "tax_due": 3090000,
         "withheld": 10000000,
         "refund": 6910000,
         "deductions": {
          "personal": 186000000,
          "personal_months": 12,
          "dependents": 74400000,
          "dependent_months": 12,
          "insurance": 37800000,
          "voluntary_pension": 0,
          "charity": 0,
          "medical": 0,
          "education": 0,
          "total": 298200000
         },
         "taxable_income": 61800000,
         "brackets": [
          {
           "from": 0,
           "to": 120000000,
           "rate_percent": 5,
           "amount": 61800000,
           "tax": 3090000
          }
         ],
         "finalisation": {
          "required": true,
          "can_authorise_employer": true,
          "form": "Tờ khai 02/QTT-TNCN (+ phụ lục 02-1/BK-QTT-TNCN for dependants)",
          "deadline_individual": "2027-05-04",
          "deadline_employer": "2027-03-31"
         },
         "legal": [
          "Luật Thuế TNCN 109/2025/QH15 (biểu 5 bậc, áp dụng từ kỳ tính thuế 2026)",
          "Nghị quyết 110/2025/UBTVQH15 (giảm trừ 15,5 / 6,2 triệu đồng)",
          "Nghị định 253/2026/NĐ-CP Điều 49, 51 (giảm trừ y tế, giáo dục; quyết toán)",
          "Nghị định 252/2026/NĐ-CP Điều 10 (thời hạn quyết toán)"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-cit": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam corporate income tax",
    "description": "Send the year’s `revenue`, the previous year’s revenue (`prior_year_revenue`, which decides the rate) and the `taxable_income` (or `profit` with `non_deductible`, `exempt_income`, `losses_carried_forward`). The API applies Luật Thuế TNDN 67/2025/QH15 and Nghị định 320/2025/NĐ-CP: 15% when total revenue of the previous year is ≤ 3 billion, 17% up to 50 billion, else 20%, and 20% for subsidiaries / related companies whose related party does not qualify (`related_party_not_eligible=true`). Small enterprises that cannot determine costs can use `method=revenue` (0.3% – 4% of revenue by sector).\n\nFor tax years 2026 and 2027 the 30% reduction for enterprises with revenue ≤ 10 billion (Nghị quyết 43/2026/QH16, Nghị định 398/2026/NĐ-CP) is applied after any incentive (`incentive_reduction`).\n\nSend the four `provisional` payments to check the 80% rule (Nghị định 252/2026/NĐ-CP Điều 24): the minimum, the shortfall, and the late interest at 0.03% a day from the day after the Q4 deadline to the payment date. Quarterly and final deadlines are moved to the next working day when they fall on a weekend or holiday.\n\nDocs: https://apibox.io.vn/docs/vn-cit/",
    "operationId": "vnCitGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-cit/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Tax year 2025–2030 (default this year).",
      "schema": {
       "type": "number"
      },
      "example": 2026
     },
     {
      "name": "revenue",
      "in": "query",
      "required": true,
      "description": "Total revenue of the year (VND).",
      "schema": {
       "type": "number"
      },
      "example": 2500000000
     },
     {
      "name": "prior_year_revenue",
      "in": "query",
      "required": false,
      "description": "Total revenue of the previous year (default = revenue).",
      "schema": {
       "type": "number"
      },
      "example": 2500000000
     },
     {
      "name": "taxable_income",
      "in": "query",
      "required": false,
      "description": "Taxable income, or send `profit` with `non_deductible`, `exempt_income`, `losses_carried_forward`.",
      "schema": {
       "type": "number"
      },
      "example": 400000000
     },
     {
      "name": "related_party_not_eligible",
      "in": "query",
      "required": false,
      "description": "Subsidiary / related company whose related party does not qualify for 15% / 17%.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "`income` or `revenue` (% of revenue, ≤ 3 billion, with `sector`).",
      "schema": {
       "type": "string",
       "default": "income"
      }
     },
     {
      "name": "incentive_reduction",
      "in": "query",
      "required": false,
      "description": "Tax incentive amount deducted before the 30% reduction.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "payment_date",
      "in": "query",
      "required": false,
      "description": "Date the shortfall is paid (default the final deadline).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "revenue": {
           "type": "number"
          },
          "prior_year_revenue": {
           "type": "number"
          },
          "rate_percent": {
           "type": "number"
          },
          "rate_tier": {
           "type": "string"
          },
          "taxable_income": {
           "type": "number"
          },
          "tax_before_reductions": {
           "type": "number"
          },
          "incentive_reduction": {
           "type": "number"
          },
          "reduction_30_percent": {
           "type": "number"
          },
          "tax_payable": {
           "type": "number"
          },
          "effective_rate_percent": {
           "type": "number"
          },
          "provisional": {
           "type": "object",
           "properties": {
            "minimum_total_80_percent": {
             "type": "number"
            },
            "suggested_per_quarter": {
             "type": "number"
            },
            "deadlines": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "final_return_deadline": {
           "type": "string"
          },
          "payment_codes": {
           "type": "object",
           "properties": {
            "sub_item": {
             "type": "string"
            },
            "late_interest_sub_item": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "method": "income",
         "revenue": 2500000000,
         "prior_year_revenue": 2500000000,
         "rate_percent": 15,
         "rate_tier": "revenue_up_to_3_billion",
         "taxable_income": 400000000,
         "tax_before_reductions": 60000000,
         "incentive_reduction": 0,
         "reduction_30_percent": 18000000,
         "tax_payable": 42000000,
         "effective_rate_percent": 1.68,
         "provisional": {
          "minimum_total_80_percent": 33600000,
          "suggested_per_quarter": 8400000,
          "deadlines": [
           {
            "quarter": 1,
            "deadline": "2026-05-04"
           },
           {
            "quarter": 2,
            "deadline": "2026-07-31"
           },
           {
            "quarter": 3,
            "deadline": "2026-11-02"
           },
           {
            "quarter": 4,
            "deadline": "2027-02-01"
           }
          ]
         },
         "final_return_deadline": "2027-03-31",
         "payment_codes": {
          "sub_item": "1052",
          "late_interest_sub_item": "4918"
         },
         "legal": [
          "Luật Thuế thu nhập doanh nghiệp 67/2025/QH15",
          "Nghị định 320/2025/NĐ-CP Điều 11, 12",
          "Nghị quyết 43/2026/QH16; Nghị định 398/2026/NĐ-CP Điều 3 (giảm 30% thuế TNDN năm 2026, 2027, doanh thu ≤ 10 tỷ đồng)"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam corporate income tax",
    "description": "Send the year’s `revenue`, the previous year’s revenue (`prior_year_revenue`, which decides the rate) and the `taxable_income` (or `profit` with `non_deductible`, `exempt_income`, `losses_carried_forward`). The API applies Luật Thuế TNDN 67/2025/QH15 and Nghị định 320/2025/NĐ-CP: 15% when total revenue of the previous year is ≤ 3 billion, 17% up to 50 billion, else 20%, and 20% for subsidiaries / related companies whose related party does not qualify (`related_party_not_eligible=true`). Small enterprises that cannot determine costs can use `method=revenue` (0.3% – 4% of revenue by sector).\n\nFor tax years 2026 and 2027 the 30% reduction for enterprises with revenue ≤ 10 billion (Nghị quyết 43/2026/QH16, Nghị định 398/2026/NĐ-CP) is applied after any incentive (`incentive_reduction`).\n\nSend the four `provisional` payments to check the 80% rule (Nghị định 252/2026/NĐ-CP Điều 24): the minimum, the shortfall, and the late interest at 0.03% a day from the day after the Q4 deadline to the payment date. Quarterly and final deadlines are moved to the next working day when they fall on a weekend or holiday.\n\nDocs: https://apibox.io.vn/docs/vn-cit/",
    "operationId": "vnCitPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-cit/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "year": {
          "type": "number",
          "description": "Tax year 2025–2030 (default this year)."
         },
         "revenue": {
          "type": "number",
          "description": "Total revenue of the year (VND)."
         },
         "prior_year_revenue": {
          "type": "number",
          "description": "Total revenue of the previous year (default = revenue)."
         },
         "taxable_income": {
          "type": "number",
          "description": "Taxable income, or send `profit` with `non_deductible`, `exempt_income`, `losses_carried_forward`."
         },
         "related_party_not_eligible": {
          "type": "boolean",
          "description": "Subsidiary / related company whose related party does not qualify for 15% / 17%."
         },
         "method": {
          "type": "string",
          "default": "income",
          "description": "`income` or `revenue` (% of revenue, ≤ 3 billion, with `sector`)."
         },
         "incentive_reduction": {
          "type": "number",
          "description": "Tax incentive amount deducted before the 30% reduction."
         },
         "provisional": {
          "type": "array",
          "items": {},
          "description": "Provisional payments of Q1–Q4, e.g. `[10000000,10000000,10000000,10000000]`."
         },
         "payment_date": {
          "type": "string",
          "description": "Date the shortfall is paid (default the final deadline)."
         }
        },
        "required": [
         "revenue"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "revenue": {
           "type": "number"
          },
          "prior_year_revenue": {
           "type": "number"
          },
          "rate_percent": {
           "type": "number"
          },
          "rate_tier": {
           "type": "string"
          },
          "taxable_income": {
           "type": "number"
          },
          "tax_before_reductions": {
           "type": "number"
          },
          "incentive_reduction": {
           "type": "number"
          },
          "reduction_30_percent": {
           "type": "number"
          },
          "tax_payable": {
           "type": "number"
          },
          "effective_rate_percent": {
           "type": "number"
          },
          "provisional": {
           "type": "object",
           "properties": {
            "minimum_total_80_percent": {
             "type": "number"
            },
            "suggested_per_quarter": {
             "type": "number"
            },
            "deadlines": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "final_return_deadline": {
           "type": "string"
          },
          "payment_codes": {
           "type": "object",
           "properties": {
            "sub_item": {
             "type": "string"
            },
            "late_interest_sub_item": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-fct": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Foreign contractor tax",
    "description": "Pick the `activity` (services, royalties, loan interest, construction with or without materials, transport, machinery lease, goods supply, digital platform purchases…) and the contract `amount` with its `basis`: `net` (the foreign party must receive this amount after Vietnamese taxes), `gross` (taxes included) or `excl_vat` (price without VAT, contractor bears CIT). The API returns the VAT and CIT to withhold, the gross-up and what each side pays.\n\nRates follow the 2025–2026 rules that replaced TT 103/2014: CIT as a % of revenue from Nghị định 320/2025/NĐ-CP Điều 12.3 (services 5%, hotel / casino management 10%, goods 1%, royalties 10%, interest 5%, construction / transport / other 2%, securities 0.1%, capital transfer 2%…), VAT as a % of revenue from Luật 48/2024 and TT 69/2025 (services 5%, construction with materials / transport 3%, other 2%). Because TT 20/2026 includes the VAT paid on the contractor’s behalf in the CIT base, a net contract grosses up as Net / (1 − VAT% − CIT%). `legacy_tt103=true` shows the old sequential method for contracts signed before 12/3/2026.\n\nFor foreign e-commerce and digital suppliers (online advertising, SaaS), the answer applies the normal VAT rate and 5% CIT and reminds that from 1/7/2026 buyers on the credit method must withhold (Nghị định 252/2026/NĐ-CP). Treaty relief is not applied.\n\nDocs: https://apibox.io.vn/docs/vn-fct/",
    "operationId": "vnFctGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fct/"
    },
    "parameters": [
     {
      "name": "activity",
      "in": "query",
      "required": false,
      "description": "services, hotel_restaurant_casino_management, goods_supply, goods_with_services_not_separable, royalties, aircraft_ship_lease, machinery_lease, loan_interest, securities_transfer, outward_reinsurance, derivatives, capital_transfer, construction_with_materials, construction_without_materials, transport, digital_platform, other.",
      "schema": {
       "type": "string",
       "default": "services"
      },
      "example": "services"
     },
     {
      "name": "amount",
      "in": "query",
      "required": true,
      "description": "Contract amount.",
      "schema": {
       "type": "number"
      },
      "example": 100000000
     },
     {
      "name": "basis",
      "in": "query",
      "required": false,
      "description": "`net`, `gross` or `excl_vat`.",
      "schema": {
       "type": "string",
       "default": "net"
      },
      "example": "net"
     },
     {
      "name": "vat_rate",
      "in": "query",
      "required": false,
      "description": "Override the VAT % (e.g. 0 when the service is not subject to VAT).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cit_rate",
      "in": "query",
      "required": false,
      "description": "Override the CIT %.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "legacy_tt103",
      "in": "query",
      "required": false,
      "description": "Old TT 103/2014 sequential gross-up.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "currency",
      "in": "query",
      "required": false,
      "description": "Non-VND amounts are rounded to 2 decimals.",
      "schema": {
       "type": "string",
       "default": "VND"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "activity": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "basis": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "vat_rate_percent": {
           "type": "number"
          },
          "cit_rate_percent": {
           "type": "number"
          },
          "gross": {
           "type": "number"
          },
          "vat_base": {
           "type": "number"
          },
          "cit_base": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "cit": {
           "type": "number"
          },
          "total_tax": {
           "type": "number"
          },
          "contractor_receives": {
           "type": "number"
          },
          "vietnamese_party_pays": {
           "type": "object",
           "properties": {
            "to_contractor": {
             "type": "number"
            },
            "to_state_budget": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "effective_rate_percent": {
           "type": "number"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "activity": "services",
         "name_vi": "Dịch vụ (tư vấn, quản lý, quảng cáo, xử lý dữ liệu, cho thuê không kèm người điều khiển…)",
         "name_en": "Services (consulting, management, advertising, data processing…)",
         "basis": "net",
         "method": "current",
         "vat_rate_percent": 5,
         "cit_rate_percent": 5,
         "gross": 111111111,
         "vat_base": 111111111,
         "cit_base": 111111111,
         "vat": 5555556,
         "cit": 5555555,
         "total_tax": 11111111,
         "contractor_receives": 100000000,
         "vietnamese_party_pays": {
          "to_contractor": 100000000,
          "to_state_budget": 11111111,
          "total": 111111111
         },
         "effective_rate_percent": 10,
         "legal": [
          "Thông tư 69/2025/TT-BTC Điều 9 (GTGT nhà thầu)",
          "Nghị định 320/2025/NĐ-CP (NĐ 320/2025 Điều 12.3.a)",
          "Thông tư 20/2026/TT-BTC Điều 7 (TNDN nhà thầu)",
          "Thông tư 89/2026/TT-BTC (khai thuế; bãi bỏ TT 103/2014 từ 01/7/2026)"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Foreign contractor tax",
    "description": "Pick the `activity` (services, royalties, loan interest, construction with or without materials, transport, machinery lease, goods supply, digital platform purchases…) and the contract `amount` with its `basis`: `net` (the foreign party must receive this amount after Vietnamese taxes), `gross` (taxes included) or `excl_vat` (price without VAT, contractor bears CIT). The API returns the VAT and CIT to withhold, the gross-up and what each side pays.\n\nRates follow the 2025–2026 rules that replaced TT 103/2014: CIT as a % of revenue from Nghị định 320/2025/NĐ-CP Điều 12.3 (services 5%, hotel / casino management 10%, goods 1%, royalties 10%, interest 5%, construction / transport / other 2%, securities 0.1%, capital transfer 2%…), VAT as a % of revenue from Luật 48/2024 and TT 69/2025 (services 5%, construction with materials / transport 3%, other 2%). Because TT 20/2026 includes the VAT paid on the contractor’s behalf in the CIT base, a net contract grosses up as Net / (1 − VAT% − CIT%). `legacy_tt103=true` shows the old sequential method for contracts signed before 12/3/2026.\n\nFor foreign e-commerce and digital suppliers (online advertising, SaaS), the answer applies the normal VAT rate and 5% CIT and reminds that from 1/7/2026 buyers on the credit method must withhold (Nghị định 252/2026/NĐ-CP). Treaty relief is not applied.\n\nDocs: https://apibox.io.vn/docs/vn-fct/",
    "operationId": "vnFctPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fct/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "activity": {
          "type": "string",
          "default": "services",
          "description": "services, hotel_restaurant_casino_management, goods_supply, goods_with_services_not_separable, royalties, aircraft_ship_lease, machinery_lease, loan_interest, securities_transfer, outward_reinsurance, derivatives, capital_transfer, construction_with_materials, construction_without_materials, transport, digital_platform, other."
         },
         "amount": {
          "type": "number",
          "description": "Contract amount."
         },
         "basis": {
          "type": "string",
          "default": "net",
          "description": "`net`, `gross` or `excl_vat`."
         },
         "vat_rate": {
          "type": "number",
          "description": "Override the VAT % (e.g. 0 when the service is not subject to VAT)."
         },
         "cit_rate": {
          "type": "number",
          "description": "Override the CIT %."
         },
         "legacy_tt103": {
          "type": "boolean",
          "description": "Old TT 103/2014 sequential gross-up."
         },
         "currency": {
          "type": "string",
          "default": "VND",
          "description": "Non-VND amounts are rounded to 2 decimals."
         }
        },
        "required": [
         "amount"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "activity": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "basis": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "vat_rate_percent": {
           "type": "number"
          },
          "cit_rate_percent": {
           "type": "number"
          },
          "gross": {
           "type": "number"
          },
          "vat_base": {
           "type": "number"
          },
          "cit_base": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "cit": {
           "type": "number"
          },
          "total_tax": {
           "type": "number"
          },
          "contractor_receives": {
           "type": "number"
          },
          "vietnamese_party_pays": {
           "type": "object",
           "properties": {
            "to_contractor": {
             "type": "number"
            },
            "to_state_budget": {
             "type": "number"
            },
            "total": {
             "type": "number"
            }
           }
          },
          "effective_rate_percent": {
           "type": "number"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-late-interest": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Late payment interest",
    "description": "Send the `amount`, the `due_date` (deadline) and either the `paid_date`, a list of partial `payments` or a `to` date, and choose the `kind`: `tax` (tiền chậm nộp thuế: 0.05% a day from 2015, 0.03% from 1/7/2016, kept by Luật Quản lý thuế 38/2019 and 108/2025), `social_insurance` (BHXH, BHYT, BHTN: 0.03% a day from 1/7/2025, Luật BHXH 2024 Điều 40), `fine` (administrative fines: 0.05% a day), `civil` (Bộ luật Dân sự Điều 357: agreed rate up to 20% a year, or 10% a year), `loan_overdue` (150% of the loan rate) or `custom`.\n\nDays are counted like the tax authority does: from the day after the deadline to the day before the money is paid, weekends and holidays included (`include_payment_day=true` counts the payment day too). The period is split when the legal rate changes or a partial payment reduces the balance, and each segment shows its days, balance, rate and legal reference.\n\nIf a deadline falls on a day off it moves to the next working day: send that date as `due_date`. Exemptions and extensions decided by the tax office are not applied.\n\nDocs: https://apibox.io.vn/docs/vn-late-interest/",
    "operationId": "vnLateInterestGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-late-interest/"
    },
    "parameters": [
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "description": "`tax`, `social_insurance`, `fine`, `civil`, `loan_overdue` or `custom`.",
      "schema": {
       "type": "string",
       "default": "tax"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": true,
      "description": "Amount paid late (VND).",
      "schema": {
       "type": "number"
      },
      "example": 100000000
     },
     {
      "name": "due_date",
      "in": "query",
      "required": true,
      "description": "Deadline (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      },
      "example": "2026-07-20"
     },
     {
      "name": "paid_date",
      "in": "query",
      "required": false,
      "description": "Date the whole balance was paid.",
      "schema": {
       "type": "string"
      },
      "example": "2026-08-15"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Compute up to and including this date (default today when unpaid).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "rate_percent_per_year",
      "in": "query",
      "required": false,
      "description": "Agreed / loan rate for `civil`, `loan_overdue`, `custom`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rate_percent_per_day",
      "in": "query",
      "required": false,
      "description": "Custom daily rate (e.g. BHXH periods before 7/2025).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "include_payment_day",
      "in": "query",
      "required": false,
      "description": "Count the payment day too.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "kind": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "due_date": {
           "type": "string"
          },
          "calculated_to": {
           "type": "string"
          },
          "days_late": {
           "type": "number"
          },
          "interest": {
           "type": "number"
          },
          "outstanding_principal": {
           "type": "number"
          },
          "total_still_due": {
           "type": "number"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             },
             "days": {
              "type": "number"
             },
             "balance": {
              "type": "number"
             },
             "rate_percent_per_day": {
              "type": "number"
             },
             "interest": {
              "type": "number"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "payments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "amount": {
              "type": "string"
             },
             "balance_after": {
              "type": "number"
             }
            }
           }
          },
          "day_count": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "kind": "tax",
         "name_vi": "Tiền chậm nộp thuế, khoản thu khác do cơ quan thuế, hải quan quản lý",
         "name_en": "Late payment interest on tax",
         "amount": 100000000,
         "due_date": "2026-07-20",
         "calculated_to": "2026-08-14",
         "days_late": 25,
         "interest": 750000,
         "outstanding_principal": 0,
         "total_still_due": 750000,
         "segments": [
          {
           "from": "2026-07-21",
           "to": "2026-08-14",
           "days": 25,
           "balance": 100000000,
           "rate_percent_per_day": 0.03,
           "interest": 750000,
           "ref": "Luật Quản lý thuế 108/2025/QH15 Điều 16 khoản 2; Nghị định 252/2026/NĐ-CP Điều 26: 0,03%/ngày"
          }
         ],
         "payments": [
          {
           "date": "2026-08-15",
           "amount": "remaining balance",
           "balance_after": 0
          }
         ],
         "day_count": "day after due date → day before payment (inclusive)",
         "legal": [
          "Luật Quản lý thuế 108/2025/QH15 Điều 16 khoản 2; Nghị định 252/2026/NĐ-CP Điều 26: 0,03%/ngày"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Late payment interest",
    "description": "Send the `amount`, the `due_date` (deadline) and either the `paid_date`, a list of partial `payments` or a `to` date, and choose the `kind`: `tax` (tiền chậm nộp thuế: 0.05% a day from 2015, 0.03% from 1/7/2016, kept by Luật Quản lý thuế 38/2019 and 108/2025), `social_insurance` (BHXH, BHYT, BHTN: 0.03% a day from 1/7/2025, Luật BHXH 2024 Điều 40), `fine` (administrative fines: 0.05% a day), `civil` (Bộ luật Dân sự Điều 357: agreed rate up to 20% a year, or 10% a year), `loan_overdue` (150% of the loan rate) or `custom`.\n\nDays are counted like the tax authority does: from the day after the deadline to the day before the money is paid, weekends and holidays included (`include_payment_day=true` counts the payment day too). The period is split when the legal rate changes or a partial payment reduces the balance, and each segment shows its days, balance, rate and legal reference.\n\nIf a deadline falls on a day off it moves to the next working day: send that date as `due_date`. Exemptions and extensions decided by the tax office are not applied.\n\nDocs: https://apibox.io.vn/docs/vn-late-interest/",
    "operationId": "vnLateInterestPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-late-interest/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "kind": {
          "type": "string",
          "default": "tax",
          "description": "`tax`, `social_insurance`, `fine`, `civil`, `loan_overdue` or `custom`."
         },
         "amount": {
          "type": "number",
          "description": "Amount paid late (VND)."
         },
         "due_date": {
          "type": "string",
          "description": "Deadline (YYYY-MM-DD)."
         },
         "paid_date": {
          "type": "string",
          "description": "Date the whole balance was paid."
         },
         "payments": {
          "type": "array",
          "items": {},
          "description": "Partial payments: `[{\"date\":\"2026-04-10\",\"amount\":50000000}]`."
         },
         "to": {
          "type": "string",
          "description": "Compute up to and including this date (default today when unpaid)."
         },
         "rate_percent_per_year": {
          "type": "number",
          "description": "Agreed / loan rate for `civil`, `loan_overdue`, `custom`."
         },
         "rate_percent_per_day": {
          "type": "number",
          "description": "Custom daily rate (e.g. BHXH periods before 7/2025)."
         },
         "include_payment_day": {
          "type": "boolean",
          "description": "Count the payment day too."
         }
        },
        "required": [
         "amount",
         "due_date"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "kind": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "due_date": {
           "type": "string"
          },
          "calculated_to": {
           "type": "string"
          },
          "days_late": {
           "type": "number"
          },
          "interest": {
           "type": "number"
          },
          "outstanding_principal": {
           "type": "number"
          },
          "total_still_due": {
           "type": "number"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             },
             "days": {
              "type": "number"
             },
             "balance": {
              "type": "number"
             },
             "rate_percent_per_day": {
              "type": "number"
             },
             "interest": {
              "type": "number"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "payments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "amount": {
              "type": "string"
             },
             "balance_after": {
              "type": "number"
             }
            }
           }
          },
          "day_count": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-depreciation": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Fixed-asset depreciation",
    "description": "Send the asset `cost`, the `method` (`straight_line`, `declining_balance`, `units_of_production`) and the `useful_life_years`, or an `asset_group` code from the useful-life frame of Thông tư 45/2013/TT-BTC Phụ lục I (A1 power generators … D1 road vehicles … G1 permanent buildings, K other intangibles: 56 rows with min / max years). Without `cost`, the endpoint lists the frame (`q` filters by code or name).\n\nDeclining balance uses the coefficient 1.5 (≤ 4 years), 2.0 (> 4 – 6 years) or 2.5 (> 6 years) and switches to straight line when the declining charge falls to the remaining value divided by the remaining years, exactly as the circular’s worked example. Units of production takes `total_units` and the output of each period. With a `start_date`, calendar-year amounts are prorated by days, as depreciation starts on the day the asset is put into use.\n\nTax checks: life outside the frame, the yearly amount that is not deductible for CIT when the life is shorter than the minimum (Nghị định 320/2025/NĐ-CP Điều 10.6), assets below 30 million (tools, not fixed assets) and the 1.6-billion cap for cars of up to 9 seats (`car_9_seats=true`). TT 45/2013 is still in force in November 2026; a replacement draft targets 1/1/2027.\n\nDocs: https://apibox.io.vn/docs/vn-depreciation/",
    "operationId": "vnDepreciationGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-depreciation/"
    },
    "parameters": [
     {
      "name": "cost",
      "in": "query",
      "required": false,
      "description": "Cost (nguyên giá). Omit to list the useful-life frame.",
      "schema": {
       "type": "number"
      },
      "example": 50000000
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "`straight_line`, `declining_balance` or `units_of_production`.",
      "schema": {
       "type": "string",
       "default": "straight_line"
      },
      "example": "declining_balance"
     },
     {
      "name": "useful_life_years",
      "in": "query",
      "required": false,
      "description": "Useful life in years (or `useful_life_months`; default the frame maximum of `asset_group`).",
      "schema": {
       "type": "number"
      },
      "example": 5
     },
     {
      "name": "asset_group",
      "in": "query",
      "required": false,
      "description": "Frame code such as A1, B12, D1, G1, K.",
      "schema": {
       "type": "string"
      },
      "example": "B12"
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Date put into use, for calendar-year amounts.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "total_units",
      "in": "query",
      "required": false,
      "description": "Design output (units of production).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "acceleration",
      "in": "query",
      "required": false,
      "description": "Straight-line acceleration factor 1–2.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "car_9_seats",
      "in": "query",
      "required": false,
      "description": "Passenger car of up to 9 seats (1.6-billion CIT cap).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Filter the frame list (without cost).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "cost": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "useful_life_years": {
           "type": "number"
          },
          "start_date": {},
          "monthly_first_year": {
           "type": "number"
          },
          "schedule": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "number"
             },
             "opening": {
              "type": "number"
             },
             "depreciation": {
              "type": "number"
             },
             "accumulated": {
              "type": "number"
             },
             "closing": {
              "type": "number"
             },
             "rate_percent": {
              "type": "number"
             },
             "method": {
              "type": "string"
             }
            }
           }
          },
          "frame_check": {
           "type": "object",
           "properties": {
            "asset_group": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            },
            "name_en": {
             "type": "string"
            },
            "min_years": {
             "type": "number"
            },
            "max_years": {
             "type": "number"
            },
            "useful_life_years": {
             "type": "number"
            },
            "within_frame": {
             "type": "boolean"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "cost": 50000000,
         "method": "declining_balance",
         "useful_life_years": 5,
         "start_date": null,
         "monthly_first_year": 1666667,
         "schedule": [
          {
           "year": 1,
           "opening": 50000000,
           "depreciation": 20000000,
           "accumulated": 20000000,
           "closing": 30000000,
           "rate_percent": 40,
           "method": "declining_balance"
          },
          {
           "year": 2,
           "opening": 30000000,
           "depreciation": 12000000,
           "accumulated": 32000000,
           "closing": 18000000,
           "rate_percent": 40,
           "method": "declining_balance"
          },
          {
           "year": 3,
           "opening": 18000000,
           "depreciation": 7200000,
           "accumulated": 39200000,
           "closing": 10800000,
           "rate_percent": 40,
           "method": "declining_balance"
          },
          {
           "year": 4,
           "opening": 10800000,
           "depreciation": 5400000,
           "accumulated": 44600000,
           "closing": 5400000,
           "rate_percent": 50,
           "method": "straight_line"
          },
          {
           "year": 5,
           "opening": 5400000,
           "depreciation": 5400000,
           "accumulated": 50000000,
           "closing": 0,
           "rate_percent": 100,
           "method": "straight_line"
          }
         ],
         "frame_check": {
          "asset_group": "B12",
          "name_vi": "Máy móc, thiết bị dùng trong ngành may mặc",
          "name_en": "Garment machinery",
          "min_years": 5,
          "max_years": 10,
          "useful_life_years": 5,
          "within_frame": true
         },
         "legal": [
          "Thông tư 45/2013/TT-BTC (sửa đổi bởi TT 147/2016, TT 28/2017, TT 30/2025)",
          "TT 45/2013/TT-BTC Phụ lục 2 mục II (số dư giảm dần có điều chỉnh)",
          "Nghị định 320/2025/NĐ-CP Điều 10 khoản 6 (khấu hao không được trừ khi tính thuế TNDN)"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Fixed-asset depreciation",
    "description": "Send the asset `cost`, the `method` (`straight_line`, `declining_balance`, `units_of_production`) and the `useful_life_years`, or an `asset_group` code from the useful-life frame of Thông tư 45/2013/TT-BTC Phụ lục I (A1 power generators … D1 road vehicles … G1 permanent buildings, K other intangibles: 56 rows with min / max years). Without `cost`, the endpoint lists the frame (`q` filters by code or name).\n\nDeclining balance uses the coefficient 1.5 (≤ 4 years), 2.0 (> 4 – 6 years) or 2.5 (> 6 years) and switches to straight line when the declining charge falls to the remaining value divided by the remaining years, exactly as the circular’s worked example. Units of production takes `total_units` and the output of each period. With a `start_date`, calendar-year amounts are prorated by days, as depreciation starts on the day the asset is put into use.\n\nTax checks: life outside the frame, the yearly amount that is not deductible for CIT when the life is shorter than the minimum (Nghị định 320/2025/NĐ-CP Điều 10.6), assets below 30 million (tools, not fixed assets) and the 1.6-billion cap for cars of up to 9 seats (`car_9_seats=true`). TT 45/2013 is still in force in November 2026; a replacement draft targets 1/1/2027.\n\nDocs: https://apibox.io.vn/docs/vn-depreciation/",
    "operationId": "vnDepreciationPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-depreciation/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Filter the frame list (without cost).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "cost": {
          "type": "number",
          "description": "Cost (nguyên giá). Omit to list the useful-life frame."
         },
         "method": {
          "type": "string",
          "default": "straight_line",
          "description": "`straight_line`, `declining_balance` or `units_of_production`."
         },
         "useful_life_years": {
          "type": "number",
          "description": "Useful life in years (or `useful_life_months`; default the frame maximum of `asset_group`)."
         },
         "asset_group": {
          "type": "string",
          "description": "Frame code such as A1, B12, D1, G1, K."
         },
         "start_date": {
          "type": "string",
          "description": "Date put into use, for calendar-year amounts."
         },
         "total_units": {
          "type": "number",
          "description": "Design output (units of production)."
         },
         "units": {
          "type": "array",
          "items": {},
          "description": "Output per period, e.g. `[300,300,400]`."
         },
         "acceleration": {
          "type": "number",
          "description": "Straight-line acceleration factor 1–2."
         },
         "car_9_seats": {
          "type": "boolean",
          "description": "Passenger car of up to 9 seats (1.6-billion CIT cap)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "cost": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "useful_life_years": {
           "type": "number"
          },
          "start_date": {},
          "monthly_first_year": {
           "type": "number"
          },
          "schedule": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "number"
             },
             "opening": {
              "type": "number"
             },
             "depreciation": {
              "type": "number"
             },
             "accumulated": {
              "type": "number"
             },
             "closing": {
              "type": "number"
             },
             "rate_percent": {
              "type": "number"
             },
             "method": {
              "type": "string"
             }
            }
           }
          },
          "frame_check": {
           "type": "object",
           "properties": {
            "asset_group": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            },
            "name_en": {
             "type": "string"
            },
            "min_years": {
             "type": "number"
            },
            "max_years": {
             "type": "number"
            },
            "useful_life_years": {
             "type": "number"
            },
            "within_frame": {
             "type": "boolean"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-budget-codes": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "State-budget codes (chương, tiểu mục)",
    "description": "Paying tax in Vietnam needs two codes from the state-budget index (mục lục ngân sách nhà nước): the chapter (chương) of the payer, e.g. 554 / 854 for private companies or 557 / 857 for households and individuals, and the sub-item (tiểu mục) of the revenue, e.g. 1001 PIT on salaries, 1052 CIT, 1701 domestic VAT, 2801 registration fee. This endpoint holds the 35 chapters taxpayers use and 215 tax, fee, fine and late-interest sub-items of Thông tư 130/2025/TT-BTC (from 1/1/2026), as amended by Thông tư 123/2026/TT-BTC (21/8/2026, e.g. new crypto-asset codes 1016 / 1059).\n\nLook up one `code` (a pre-2025 district chapter such as 757 points to its new 857), search with `q` in Vietnamese with or without accents (“thue tncn”, “trước bạ”) or English, or filter by `tax` (pit, cit, vat, excise, import, env, resource, land, registration, licence, late_interest, fine, fee). Each tax sub-item links to the sub-item for its late-payment interest (Mục 4900).\n\nThe licence fee (lệ phí môn bài, 2862–2864) is marked abolished from 1/1/2026; the codes remain only to pay older debts. English names are our translation.\n\nDocs: https://apibox.io.vn/docs/vn-budget-codes/",
    "operationId": "vnBudgetCodesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-budget-codes/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "A chapter (3 digits) or mục / tiểu mục (4 digits); also `/v1/vn-budget-codes/1001`.",
      "schema": {
       "type": "string"
      },
      "example": "1001"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search text (Vietnamese with or without accents, or English).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "tax",
      "in": "query",
      "required": false,
      "description": "pit, cit, vat, excise, import, export, env, resource, land, registration, licence, late_interest, fine, fee, other.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`all`, `chapter` or `sub_item`.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "active_only",
      "in": "query",
      "required": false,
      "description": "Hide abolished items.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results (1–500).",
      "schema": {
       "type": "number",
       "default": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "kind": {
           "type": "string"
          },
          "muc": {
           "type": "string"
          },
          "muc_name_vi": {
           "type": "string"
          },
          "tax": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "name_en": {
           "type": "string"
          },
          "late_interest_code": {
           "type": "string"
          },
          "late_interest": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "kind": {
             "type": "string"
            },
            "muc": {
             "type": "string"
            },
            "muc_name_vi": {
             "type": "string"
            },
            "tax": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            },
            "name_en": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "code": "1001",
         "kind": "sub_item",
         "muc": "1000",
         "muc_name_vi": "Thuế thu nhập cá nhân",
         "tax": "pit",
         "status": "active",
         "name_vi": "Thuế thu nhập từ tiền lương, tiền công",
         "name_en": "Tax on income from salaries and wages",
         "late_interest_code": "4917",
         "late_interest": {
          "code": "4917",
          "kind": "sub_item",
          "muc": "4900",
          "muc_name_vi": "Các khoản thu khác",
          "tax": "late_interest",
          "status": "active",
          "name_vi": "Tiền chậm nộp thuế thu nhập cá nhân (không bao gồm tiền chậm nộp thuế thu nhập cá nhân từ hoạt động giao dịch, chuyển nhượng, kinh doanh tài sản mã hoá)",
          "name_en": "Late-payment interest on PIT (excl. crypto-asset PIT)"
         },
         "legal": [
          "Thông tư 130/2025/TT-BTC (hiệu lực 01/01/2026)",
          "Thông tư 123/2026/TT-BTC (sửa đổi, hiệu lực 21/8/2026)"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-overtime": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Overtime pay calculator",
    "description": "Send the `monthly_salary` (pay for normal hours, without overtime, bonuses and unrelated allowances) or the `hourly_wage`, and the hours: simple totals (`workday_ot_hours`, `weekly_off_ot_hours`, `holiday_ot_hours`, the `*_night_ot_hours` and regular `night_hours`) or dated `entries` (the day type is taken from the public-holiday calendar when not given). The API applies Bộ luật Lao động 2019 Điều 98 and Nghị định 145/2020/NĐ-CP Điều 55–57: 150% on working days, 200% on the weekly day off, 300% on holidays, +30% for night work (22:00–06:00), and for overtime at night +20% of the day-time rate of that day (so 200% / 210% / 270% / 390%). Daily-paid workers (`daily_paid=true`) also get the holiday’s own pay.\n\nCaps are checked (≤ 50% of normal daily hours on a working day, 12 h on a day off, 40 h a month, 200 or 300 h a year with `ytd_ot_hours`) and the PIT-exempt part is split out: until 2025 only the premium above normal pay was exempt; from tax year 2026 the whole overtime and night pay within the legal limits is exempt (Luật Thuế TNCN 109/2025, Nghị định 253/2026/NĐ-CP Điều 26), and pay for hours above the caps is taxable.\n\nDocs: https://apibox.io.vn/docs/vn-overtime/",
    "operationId": "vnOvertimeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-overtime/"
    },
    "parameters": [
     {
      "name": "monthly_salary",
      "in": "query",
      "required": false,
      "description": "Salary for normal hours (or `hourly_wage`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "working_days_per_month",
      "in": "query",
      "required": false,
      "description": "Normal working days used to get the hourly wage.",
      "schema": {
       "type": "number",
       "default": 26
      }
     },
     {
      "name": "hours_per_day",
      "in": "query",
      "required": false,
      "description": "Normal hours per day.",
      "schema": {
       "type": "number",
       "default": 8
      }
     },
     {
      "name": "workday_ot_hours",
      "in": "query",
      "required": false,
      "description": "Overtime on working days (also `weekly_off_ot_hours`, `holiday_ot_hours`, `workday_night_ot_hours`, `weekly_off_night_ot_hours`, `holiday_night_ot_hours`, `night_hours`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "ytd_ot_hours",
      "in": "query",
      "required": false,
      "description": "Overtime hours already worked this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "annual_cap",
      "in": "query",
      "required": false,
      "description": "200 or 300.",
      "schema": {
       "type": "number",
       "default": 200
      }
     },
     {
      "name": "daily_paid",
      "in": "query",
      "required": false,
      "description": "Daily-paid worker (adds the holiday’s own pay).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "tax_year",
      "in": "query",
      "required": false,
      "description": "Tax year for the PIT split (default from the dates or this year).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "hourly_wage": {
           "type": "number"
          },
          "hourly_basis": {
           "type": "string"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {},
             "type": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "hours": {
              "type": "number"
             },
             "percent": {
              "type": "number"
             },
             "pay": {
              "type": "number"
             },
             "normal_pay": {
              "type": "number"
             },
             "premium": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "overtime_hours": {
             "type": "number"
            },
            "night_hours": {
             "type": "number"
            },
            "pay": {
             "type": "number"
            },
            "overtime_pay": {
             "type": "number"
            },
            "night_work_pay": {
             "type": "number"
            },
            "premium_above_normal": {
             "type": "number"
            }
           }
          },
          "caps": {
           "type": "object",
           "properties": {
            "daily_workday_hours": {
             "type": "number"
            },
            "daily_day_off_hours": {
             "type": "number"
            },
            "monthly": {
             "type": "number"
            },
            "annual": {
             "type": "number"
            },
            "ytd_before": {
             "type": "number"
            },
            "excess_hours": {
             "type": "number"
            },
            "compliant": {
             "type": "boolean"
            }
           }
          },
          "pit": {
           "type": "object",
           "properties": {
            "tax_year": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "exempt": {
             "type": "number"
            },
            "taxable": {
             "type": "number"
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Overtime pay calculator",
    "description": "Send the `monthly_salary` (pay for normal hours, without overtime, bonuses and unrelated allowances) or the `hourly_wage`, and the hours: simple totals (`workday_ot_hours`, `weekly_off_ot_hours`, `holiday_ot_hours`, the `*_night_ot_hours` and regular `night_hours`) or dated `entries` (the day type is taken from the public-holiday calendar when not given). The API applies Bộ luật Lao động 2019 Điều 98 and Nghị định 145/2020/NĐ-CP Điều 55–57: 150% on working days, 200% on the weekly day off, 300% on holidays, +30% for night work (22:00–06:00), and for overtime at night +20% of the day-time rate of that day (so 200% / 210% / 270% / 390%). Daily-paid workers (`daily_paid=true`) also get the holiday’s own pay.\n\nCaps are checked (≤ 50% of normal daily hours on a working day, 12 h on a day off, 40 h a month, 200 or 300 h a year with `ytd_ot_hours`) and the PIT-exempt part is split out: until 2025 only the premium above normal pay was exempt; from tax year 2026 the whole overtime and night pay within the legal limits is exempt (Luật Thuế TNCN 109/2025, Nghị định 253/2026/NĐ-CP Điều 26), and pay for hours above the caps is taxable.\n\nDocs: https://apibox.io.vn/docs/vn-overtime/",
    "operationId": "vnOvertimePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-overtime/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "monthly_salary": {
          "type": "number",
          "description": "Salary for normal hours (or `hourly_wage`)."
         },
         "working_days_per_month": {
          "type": "number",
          "default": 26,
          "description": "Normal working days used to get the hourly wage."
         },
         "hours_per_day": {
          "type": "number",
          "default": 8,
          "description": "Normal hours per day."
         },
         "workday_ot_hours": {
          "type": "number",
          "description": "Overtime on working days (also `weekly_off_ot_hours`, `holiday_ot_hours`, `workday_night_ot_hours`, `weekly_off_night_ot_hours`, `holiday_night_ot_hours`, `night_hours`)."
         },
         "entries": {
          "type": "array",
          "items": {},
          "description": "Per day: `[{\"date\":\"2026-09-02\",\"ot_hours\":4,\"ot_night_hours\":0,\"night_hours\":0,\"type\":\"holiday\"}]`."
         },
         "ytd_ot_hours": {
          "type": "number",
          "description": "Overtime hours already worked this year."
         },
         "annual_cap": {
          "type": "number",
          "default": 200,
          "description": "200 or 300."
         },
         "daily_paid": {
          "type": "boolean",
          "description": "Daily-paid worker (adds the holiday’s own pay)."
         },
         "tax_year": {
          "type": "number",
          "description": "Tax year for the PIT split (default from the dates or this year)."
         }
        }
       },
       "example": {
        "monthly_salary": 10400000,
        "workday_ot_hours": 20,
        "weekly_off_ot_hours": 8,
        "holiday_night_ot_hours": 2,
        "tax_year": 2026
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "hourly_wage": {
           "type": "number"
          },
          "hourly_basis": {
           "type": "string"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {},
             "type": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "hours": {
              "type": "number"
             },
             "percent": {
              "type": "number"
             },
             "pay": {
              "type": "number"
             },
             "normal_pay": {
              "type": "number"
             },
             "premium": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "overtime_hours": {
             "type": "number"
            },
            "night_hours": {
             "type": "number"
            },
            "pay": {
             "type": "number"
            },
            "overtime_pay": {
             "type": "number"
            },
            "night_work_pay": {
             "type": "number"
            },
            "premium_above_normal": {
             "type": "number"
            }
           }
          },
          "caps": {
           "type": "object",
           "properties": {
            "daily_workday_hours": {
             "type": "number"
            },
            "daily_day_off_hours": {
             "type": "number"
            },
            "monthly": {
             "type": "number"
            },
            "annual": {
             "type": "number"
            },
            "ytd_before": {
             "type": "number"
            },
            "excess_hours": {
             "type": "number"
            },
            "compliant": {
             "type": "boolean"
            }
           }
          },
          "pit": {
           "type": "object",
           "properties": {
            "tax_year": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "exempt": {
             "type": "number"
            },
            "taxable": {
             "type": "number"
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "hourly_wage": 50000,
         "hourly_basis": "monthly_salary / (26 days × 8 h)",
         "lines": [
          {
           "date": null,
           "type": "workday",
           "kind": "overtime",
           "hours": 20,
           "percent": 150,
           "pay": 1500000,
           "normal_pay": 1000000,
           "premium": 500000
          },
          {
           "date": null,
           "type": "weekly_off",
           "kind": "overtime",
           "hours": 8,
           "percent": 200,
           "pay": 800000,
           "normal_pay": 400000,
           "premium": 400000
          },
          {
           "date": null,
           "type": "holiday",
           "kind": "night_overtime",
           "hours": 2,
           "percent": 390,
           "pay": 390000,
           "normal_pay": 100000,
           "premium": 290000
          }
         ],
         "totals": {
          "overtime_hours": 30,
          "night_hours": 0,
          "pay": 2690000,
          "overtime_pay": 2690000,
          "night_work_pay": 0,
          "premium_above_normal": 1190000
         },
         "caps": {
          "daily_workday_hours": 4,
          "daily_day_off_hours": 12,
          "monthly": 40,
          "annual": 200,
          "ytd_before": 0,
          "excess_hours": 0,
          "compliant": true
         },
         "pit": {
          "tax_year": 2026,
          "rule": "whole_pay_within_limits",
          "exempt": 2690000,
          "taxable": 0
         },
         "warnings": [],
         "legal": [
          "Bộ luật Lao động 45/2019/QH14 Điều 98, 106, 107",
          "Nghị định 145/2020/NĐ-CP Điều 55–61",
          "Luật Thuế TNCN 109/2025/QH15 Điều 4 khoản 8; Nghị định 253/2026/NĐ-CP Điều 26"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-annual-leave": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Annual leave calculator",
    "description": "Send the `start_date` with the employer, the `work_type` (`normal` 12 days; `heavy` 14 days for minors, disabled workers and heavy / toxic / dangerous work; `very_heavy` 16 days) and the `year`, or an `end_date` when the contract ends. The API adds 1 day for every 5 full years of service (Bộ luật Lao động 2019 Điều 114) and pro-rates the year when fewer than 12 months are worked: (annual days + seniority days) / 12 × months, where a part month counts when at least half of it is worked (Nghị định 145/2020/NĐ-CP Điều 66).\n\nWith `days_taken` and `monthly_salary` it returns the days left and the payment for untaken leave on termination: contract salary of the month before termination ÷ normal working days × days (Điều 67.3), and whether that pay is PIT-exempt (from tax year 2026, Nghị định 253/2026/NĐ-CP).\n\nThe decree sets no rounding rule for pro-rated days: the exact value and a half-up rounded value are both returned. Periods that count as work (probation when kept on, sick leave up to 2 months a year, unpaid leave up to 1 month…) are listed in Nghị định 145/2020 Điều 65; send `non_counted_days` to remove other absences.\n\nDocs: https://apibox.io.vn/docs/vn-annual-leave/",
    "operationId": "vnAnnualLeaveGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-annual-leave/"
    },
    "parameters": [
     {
      "name": "start_date",
      "in": "query",
      "required": true,
      "description": "First day of work with this employer.",
      "schema": {
       "type": "string"
      },
      "example": "2020-01-01"
     },
     {
      "name": "end_date",
      "in": "query",
      "required": false,
      "description": "Termination date (for the untaken-leave payment).",
      "schema": {
       "type": "string"
      },
      "example": "2026-06-15"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Year to compute (default the end_date year or this year).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "work_type",
      "in": "query",
      "required": false,
      "description": "`normal`, `heavy` or `very_heavy`.",
      "schema": {
       "type": "string",
       "default": "normal"
      }
     },
     {
      "name": "days_taken",
      "in": "query",
      "required": false,
      "description": "Leave days already taken in the year.",
      "schema": {
       "type": "number"
      },
      "example": 2
     },
     {
      "name": "carried_over_days",
      "in": "query",
      "required": false,
      "description": "Days carried over from earlier years.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "monthly_salary",
      "in": "query",
      "required": false,
      "description": "Contract salary of the month before termination.",
      "schema": {
       "type": "number"
      },
      "example": 13000000
     },
     {
      "name": "working_days_per_month",
      "in": "query",
      "required": false,
      "description": "Normal working days of that month.",
      "schema": {
       "type": "number",
       "default": 26
      }
     },
     {
      "name": "months_worked",
      "in": "query",
      "required": false,
      "description": "Override the months counted in the year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "non_counted_days",
      "in": "query",
      "required": false,
      "description": "Days not counted as work for seniority (e.g. long unpaid leave).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "work_type": {
           "type": "string"
          },
          "work_type_vi": {
           "type": "string"
          },
          "work_type_en": {
           "type": "string"
          },
          "start_date": {
           "type": "string"
          },
          "end_date": {
           "type": "string"
          },
          "service_years": {
           "type": "number"
          },
          "full_years": {
           "type": "number"
          },
          "base_days": {
           "type": "number"
          },
          "seniority_days": {
           "type": "number"
          },
          "entitlement_full_year": {
           "type": "number"
          },
          "months_worked": {
           "type": "number"
          },
          "partial_months": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "month": {
              "type": "number"
             },
             "counted": {
              "type": "boolean"
             },
             "days_in_service": {
              "type": "number"
             }
            }
           }
          },
          "days": {
           "type": "number"
          },
          "days_rounded": {
           "type": "number"
          },
          "days_taken": {
           "type": "number"
          },
          "carried_over_days": {
           "type": "number"
          },
          "days_remaining": {
           "type": "number"
          },
          "untaken_leave_payment": {
           "type": "object",
           "properties": {
            "applies": {
             "type": "boolean"
            },
            "monthly_salary": {
             "type": "number"
            },
            "working_days_per_month": {
             "type": "number"
            },
            "daily_wage": {
             "type": "number"
            },
            "days": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "pit_exempt": {
             "type": "boolean"
            },
            "basis": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "work_type": "normal",
         "work_type_vi": "Làm công việc trong điều kiện bình thường",
         "work_type_en": "Normal working conditions",
         "start_date": "2020-01-01",
         "end_date": "2026-06-15",
         "service_years": 6.46,
         "full_years": 6,
         "base_days": 12,
         "seniority_days": 1,
         "entitlement_full_year": 13,
         "months_worked": 6,
         "partial_months": [
          {
           "month": 6,
           "counted": true,
           "days_in_service": 15
          }
         ],
         "days": 6.5,
         "days_rounded": 7,
         "days_taken": 2,
         "carried_over_days": 0,
         "days_remaining": 5,
         "untaken_leave_payment": {
          "applies": true,
          "monthly_salary": 13000000,
          "working_days_per_month": 26,
          "daily_wage": 500000,
          "days": 5,
          "amount": 2500000,
          "pit_exempt": true,
          "basis": "Contract salary of the month before termination ÷ normal working days (NĐ 145/2020 Điều 67.3)"
         },
         "legal": [
          "Bộ luật Lao động 45/2019/QH14 Điều 113, 114",
          "Nghị định 145/2020/NĐ-CP Điều 65, 66, 67"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Annual leave calculator",
    "description": "Send the `start_date` with the employer, the `work_type` (`normal` 12 days; `heavy` 14 days for minors, disabled workers and heavy / toxic / dangerous work; `very_heavy` 16 days) and the `year`, or an `end_date` when the contract ends. The API adds 1 day for every 5 full years of service (Bộ luật Lao động 2019 Điều 114) and pro-rates the year when fewer than 12 months are worked: (annual days + seniority days) / 12 × months, where a part month counts when at least half of it is worked (Nghị định 145/2020/NĐ-CP Điều 66).\n\nWith `days_taken` and `monthly_salary` it returns the days left and the payment for untaken leave on termination: contract salary of the month before termination ÷ normal working days × days (Điều 67.3), and whether that pay is PIT-exempt (from tax year 2026, Nghị định 253/2026/NĐ-CP).\n\nThe decree sets no rounding rule for pro-rated days: the exact value and a half-up rounded value are both returned. Periods that count as work (probation when kept on, sick leave up to 2 months a year, unpaid leave up to 1 month…) are listed in Nghị định 145/2020 Điều 65; send `non_counted_days` to remove other absences.\n\nDocs: https://apibox.io.vn/docs/vn-annual-leave/",
    "operationId": "vnAnnualLeavePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-annual-leave/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "start_date": {
          "type": "string",
          "description": "First day of work with this employer."
         },
         "end_date": {
          "type": "string",
          "description": "Termination date (for the untaken-leave payment)."
         },
         "year": {
          "type": "number",
          "description": "Year to compute (default the end_date year or this year)."
         },
         "work_type": {
          "type": "string",
          "default": "normal",
          "description": "`normal`, `heavy` or `very_heavy`."
         },
         "days_taken": {
          "type": "number",
          "description": "Leave days already taken in the year."
         },
         "carried_over_days": {
          "type": "number",
          "description": "Days carried over from earlier years."
         },
         "monthly_salary": {
          "type": "number",
          "description": "Contract salary of the month before termination."
         },
         "working_days_per_month": {
          "type": "number",
          "default": 26,
          "description": "Normal working days of that month."
         },
         "months_worked": {
          "type": "number",
          "description": "Override the months counted in the year."
         },
         "non_counted_days": {
          "type": "number",
          "description": "Days not counted as work for seniority (e.g. long unpaid leave)."
         }
        },
        "required": [
         "start_date"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "work_type": {
           "type": "string"
          },
          "work_type_vi": {
           "type": "string"
          },
          "work_type_en": {
           "type": "string"
          },
          "start_date": {
           "type": "string"
          },
          "end_date": {
           "type": "string"
          },
          "service_years": {
           "type": "number"
          },
          "full_years": {
           "type": "number"
          },
          "base_days": {
           "type": "number"
          },
          "seniority_days": {
           "type": "number"
          },
          "entitlement_full_year": {
           "type": "number"
          },
          "months_worked": {
           "type": "number"
          },
          "partial_months": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "month": {
              "type": "number"
             },
             "counted": {
              "type": "boolean"
             },
             "days_in_service": {
              "type": "number"
             }
            }
           }
          },
          "days": {
           "type": "number"
          },
          "days_rounded": {
           "type": "number"
          },
          "days_taken": {
           "type": "number"
          },
          "carried_over_days": {
           "type": "number"
          },
          "days_remaining": {
           "type": "number"
          },
          "untaken_leave_payment": {
           "type": "object",
           "properties": {
            "applies": {
             "type": "boolean"
            },
            "monthly_salary": {
             "type": "number"
            },
            "working_days_per_month": {
             "type": "number"
            },
            "daily_wage": {
             "type": "number"
            },
            "days": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "pit_exempt": {
             "type": "boolean"
            },
            "basis": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-notary-fee": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam notary fee & transfer cost",
    "description": "Computes the official notarisation fee (phí công chứng) of Thông tư 257/2016/TT-BTC as amended by TT 111/2017/TT-BTC: the tiered scale on the contract value for transfers, sales, gifts, mortgages, loans, estate divisions and commercial contracts (capped at 70 million đ), the lease scale on the total rent (capped at 8 million đ), auction sales, and the fixed fees for wills, powers of attorney, amendments and cancellations. When the agreed price is below the state price, the state price is used, as the circular requires. Extra copies, notarised translations, certified copies and signature certifications can be added.\n\nFor a transfer, sale or gift of a house or land the response also lists the full transfer cost: personal income tax of 2% of the price (Luật Thuế TNCN 109/2025/QH15), registration fee of 0.5% on the contract price or the provincial land-price table if higher (NĐ 10/2022/NĐ-CP), exemptions between close relatives, the 10% registration-fee reduction for VNeID online declarations until 28/2/2027 (TT 117/2026/TT-BTC) and a slot for the provincial certificate and appraisal fees. Each line shows who pays by default.\n\nOnly official fees are computed: notary offices may add a service charge (thù lao) within the provincial ceiling. Every response names the legal basis and the review date.\n\nDocs: https://apibox.io.vn/docs/vn-notary-fee/",
    "operationId": "vnNotaryFeeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-notary-fee/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Contract: `transfer`, `sale`, `gift`, `mortgage`, `loan`, `inheritance`, `lease`, `auction_sale`, `will`, `authorization_contract`, `authorization_letter`, `amendment`, `cancellation`, `other`…",
      "schema": {
       "type": "string",
       "default": "transfer"
      },
      "example": "transfer"
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "Contract value in VND (total rent for leases). Required for value-based contracts.",
      "schema": {
       "type": "number"
      },
      "example": 3000000000
     },
     {
      "name": "state_value",
      "in": "query",
      "required": false,
      "description": "Value by the state price table, used when higher than the agreed value.",
      "schema": {
       "type": "number"
      },
      "example": 3500000000
     },
     {
      "name": "relatives",
      "in": "query",
      "required": false,
      "description": "Transfer between close relatives: income tax and registration fee exempt.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "sole_home",
      "in": "query",
      "required": false,
      "description": "Seller’s only house / residential land (income tax exempt).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "vneid_online",
      "in": "query",
      "required": false,
      "description": "Registration fee declared online on VNeID (10% off, 15/8/2026–28/2/2027).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "land_registration_fees",
      "in": "query",
      "required": false,
      "description": "Provincial certificate + appraisal fees to include in the total.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "copies, copy_pages, translation_pages, translation_copies, certify_pages, certify_copies, signatures",
      "in": "query",
      "required": false,
      "description": "Extra copies, notarised translations, certified copies and signature certifications.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "type_vi": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "fee_base": {
           "type": "number"
          },
          "fee_base_note": {
           "type": "string"
          },
          "notary_fee": {
           "type": "number"
          },
          "total_notary_fees": {
           "type": "number"
          },
          "legal": {
           "type": "object",
           "properties": {
            "schedule": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            }
           }
          },
          "transfer_cost": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            },
            "total_is_complete": {
             "type": "boolean"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "type": "transfer",
         "type_vi": "Chuyển nhượng quyền sử dụng đất (kể cả có nhà, tài sản gắn liền)",
         "value": 3000000000,
         "fee_base": 3500000000,
         "fee_base_note": "The agreed value is below the state price, so the state price is used (TT 257/2016/TT-BTC Điều 4 khoản 2 điểm d)",
         "notary_fee": 2450000,
         "total_notary_fees": 2450000,
         "legal": {
          "schedule": "Thông tư 257/2016/TT-BTC, sửa đổi bởi Thông tư 111/2017/TT-BTC",
          "effective_from": "2017-01-01"
         },
         "transfer_cost": {
          "price": 3000000000,
          "items": [
           {
            "item": "Notary fee",
            "item_vi": "Phí công chứng",
            "amount": 2450000,
            "payer": "agreed (usually the buyer)",
            "ref": "TT 257/2016/TT-BTC Điều 4 khoản 2 điểm a1"
           },
           {
            "item": "Personal income tax 2% of the transfer price",
            "item_vi": "Thuế TNCN 2% giá chuyển nhượng",
            "amount": 60000000,
            "payer": "seller (unless agreed otherwise)",
            "ref": "Luật Thuế TNCN 109/2025/QH15 Điều 14 (from 1/7/2026; 2% as before)"
           },
           {
            "item": "Registration fee 0.5%",
            "item_vi": "Lệ phí trước bạ 0,5%",
            "amount": 17500000,
            "payer": "buyer / receiver",
            "ref": "NĐ 10/2022/NĐ-CP Điều 7, Điều 8 khoản 1"
           },
           {
            "item": "Certificate fee and dossier appraisal fee (provincial)",
            "item_vi": "Lệ phí cấp giấy chứng nhận, phí thẩm định hồ sơ (theo tỉnh)",
            "amount": null,
            "payer": "buyer / receiver",
            "ref": "TT 85/2019/TT-BTC (set by each provincial People’s Council)"
           }
          ],
          "total": 79950000,
          "total_is_complete": false
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam notary fee & transfer cost",
    "description": "Computes the official notarisation fee (phí công chứng) of Thông tư 257/2016/TT-BTC as amended by TT 111/2017/TT-BTC: the tiered scale on the contract value for transfers, sales, gifts, mortgages, loans, estate divisions and commercial contracts (capped at 70 million đ), the lease scale on the total rent (capped at 8 million đ), auction sales, and the fixed fees for wills, powers of attorney, amendments and cancellations. When the agreed price is below the state price, the state price is used, as the circular requires. Extra copies, notarised translations, certified copies and signature certifications can be added.\n\nFor a transfer, sale or gift of a house or land the response also lists the full transfer cost: personal income tax of 2% of the price (Luật Thuế TNCN 109/2025/QH15), registration fee of 0.5% on the contract price or the provincial land-price table if higher (NĐ 10/2022/NĐ-CP), exemptions between close relatives, the 10% registration-fee reduction for VNeID online declarations until 28/2/2027 (TT 117/2026/TT-BTC) and a slot for the provincial certificate and appraisal fees. Each line shows who pays by default.\n\nOnly official fees are computed: notary offices may add a service charge (thù lao) within the provincial ceiling. Every response names the legal basis and the review date.\n\nDocs: https://apibox.io.vn/docs/vn-notary-fee/",
    "operationId": "vnNotaryFeePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-notary-fee/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "default": "transfer",
          "description": "Contract: `transfer`, `sale`, `gift`, `mortgage`, `loan`, `inheritance`, `lease`, `auction_sale`, `will`, `authorization_contract`, `authorization_letter`, `amendment`, `cancellation`, `other`…"
         },
         "value": {
          "type": "number",
          "description": "Contract value in VND (total rent for leases). Required for value-based contracts."
         },
         "state_value": {
          "type": "number",
          "description": "Value by the state price table, used when higher than the agreed value."
         },
         "relatives": {
          "type": "boolean",
          "description": "Transfer between close relatives: income tax and registration fee exempt."
         },
         "sole_home": {
          "type": "boolean",
          "description": "Seller’s only house / residential land (income tax exempt)."
         },
         "vneid_online": {
          "type": "boolean",
          "description": "Registration fee declared online on VNeID (10% off, 15/8/2026–28/2/2027)."
         },
         "land_registration_fees": {
          "type": "number",
          "description": "Provincial certificate + appraisal fees to include in the total."
         },
         "copies, copy_pages, translation_pages, translation_copies, certify_pages, certify_copies, signatures": {
          "type": "number",
          "description": "Extra copies, notarised translations, certified copies and signature certifications."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "type_vi": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "fee_base": {
           "type": "number"
          },
          "fee_base_note": {
           "type": "string"
          },
          "notary_fee": {
           "type": "number"
          },
          "total_notary_fees": {
           "type": "number"
          },
          "legal": {
           "type": "object",
           "properties": {
            "schedule": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            }
           }
          },
          "transfer_cost": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            },
            "total_is_complete": {
             "type": "boolean"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-vehicle-fees": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam vehicle fees",
    "description": "Returns the yearly running costs fixed by law for a vehicle: the road-use fee collected at inspection (phí sử dụng đường bộ, NĐ 364/2025/NĐ-CP from 1/1/2026, periods of 1, 3, 6, 12, 24 or 36 months, rows by seats, gross weight and business use), the compulsory third-party insurance premium (bảo hiểm TNDS bắt buộc, NĐ 67/2023/NĐ-CP, with VAT, taxi and driving-school surcharges) and the inspection cost (maximum prices of QĐ 1838/QĐ-BXD from 26/10/2026, clean-energy rates, plus the 40,000 đ certificate fee of TT 156/2025/TT-BTC).\n\nSend `price` (and `province`) to get the on-road cost (giá lăn bánh): the registration fee and the plate fee are computed by /v1/vn-registration-fee and added to the recurring items.\n\nInspection prices are ceilings, insurers may adjust premiums by up to 15%, and motorbikes pay no national road fee. Each item names its decree and the review date.\n\nDocs: https://apibox.io.vn/docs/vn-vehicle-fees/",
    "operationId": "vnVehicleFeesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vehicle-fees/"
    },
    "parameters": [
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`car` (passenger car / bus), `pickup`, `truck`, `tractor`, `motorbike`.",
      "schema": {
       "type": "string",
       "default": "car"
      },
      "example": "car"
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Registered seats including the driver.",
      "schema": {
       "type": "number",
       "default": 5
      },
      "example": 5
     },
     {
      "name": "use",
      "in": "query",
      "required": false,
      "description": "`private`, `commercial`, `taxi`, `training`, `public_bus`, `ambulance`.",
      "schema": {
       "type": "string",
       "default": "private"
      }
     },
     {
      "name": "months",
      "in": "query",
      "required": false,
      "description": "Road-fee period: 1, 3, 6, 12, 24 or 36.",
      "schema": {
       "type": "number",
       "default": 12
      },
      "example": 12
     },
     {
      "name": "gross_weight_kg",
      "in": "query",
      "required": false,
      "description": "Gross weight (trucks, tractors, pick-ups).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "payload_tonnes",
      "in": "query",
      "required": false,
      "description": "Payload in tonnes for the truck insurance rows.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "axles",
      "in": "query",
      "required": false,
      "description": "Number of axles (truck inspection price).",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "clean_energy",
      "in": "query",
      "required": false,
      "description": "Electric / clean-energy vehicle (lower inspection price, EV registration fee).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "engine_cc",
      "in": "query",
      "required": false,
      "description": "Motorbike engine size (≤ 50 cc cheaper insurance).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "price",
      "in": "query",
      "required": false,
      "description": "Vehicle price: adds the on-road cost.",
      "schema": {
       "type": "number"
      },
      "example": 700000000
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province for the registration and plate fees.",
      "schema": {
       "type": "string"
      },
      "example": "Ha Noi"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle": {
           "type": "string"
          },
          "vehicle_vi": {
           "type": "string"
          },
          "use": {
           "type": "string"
          },
          "seats": {
           "type": "number"
          },
          "road_fee": {
           "type": "object",
           "properties": {
            "row": {
             "type": "number"
            },
            "monthly": {
             "type": "number"
            },
            "months": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "exempt": {
             "type": "boolean"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "insurance": {
           "type": "object",
           "properties": {
            "premium": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "years": {
             "type": "number"
            },
            "category": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "inspection": {
           "type": "object",
           "properties": {
            "category": {
             "type": "string"
            },
            "max_price_before_vat": {
             "type": "number"
            },
            "clean_energy": {
             "type": "boolean"
            },
            "certificate_fee": {
             "type": "number"
            },
            "total_before_vat": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "total_recurring": {
           "type": "number"
          },
          "on_road": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "province": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              }
             }
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "vehicle": "car",
         "vehicle_vi": "Ô tô chở người",
         "use": "private",
         "seats": 5,
         "road_fee": {
          "row": 1,
          "monthly": 130000,
          "months": 12,
          "amount": 1560000,
          "exempt": false,
          "ref": "NĐ 364/2025/NĐ-CP Phụ lục I (from 1/1/2026)"
         },
         "insurance": {
          "premium": 437000,
          "vat": 43700,
          "total": 480700,
          "years": 1,
          "category": "non-commercial, 5 seats",
          "ref": "NĐ 67/2023/NĐ-CP Phụ lục I"
         },
         "inspection": {
          "category": "Passenger car up to 8 seats (excl. driver)",
          "max_price_before_vat": 281800,
          "clean_energy": false,
          "certificate_fee": 40000,
          "total_before_vat": 321800,
          "ref": "QĐ 1838/QĐ-BXD (26/10/2026) maximum prices; certificate fee TT 156/2025/TT-BTC"
         },
         "total_recurring": 2362500,
         "on_road": {
          "price": 700000000,
          "province": {
           "code": "01",
           "name": "Thành phố Hà Nội"
          },
          "items": [
           {
            "item": "Registration fee (lệ phí trước bạ) 10%",
            "item_vi": "Lệ phí trước bạ 10%",
            "amount": 70000000,
            "ref": "NĐ 10/2022/NĐ-CP Điều 8 khoản 5 (mức chung 10%); no higher provincial resolution on record"
           },
           {
            "item": "Registration and plate fee (area I)",
            "item_vi": "Lệ phí đăng ký, cấp biển số (khu vực I)",
            "amount": 14000000,
            "ref": "TT 155/2025/TT-BTC"
           },
           {
            "item": "Road-use fee, 12 month(s)",
            "item_vi": "Phí sử dụng đường bộ 12 tháng",
            "amount": 1560000,
            "ref": "NĐ 364/2025/NĐ-CP"
           },
           {
            "item": "Compulsory third-party insurance, 1 year (incl. 10% VAT)",
            "item_vi": "Bảo hiểm TNDS bắt buộc 1 năm (gồm VAT 10%)",
            "amount": 480700,
            "ref": "NĐ 67/2023/NĐ-CP"
           },
           {
            "item": "Periodic inspection (maximum price before VAT + certificate fee)",
            "item_vi": "Kiểm định định kỳ (giá tối đa chưa VAT + lệ phí cấp giấy chứng nhận)",
            "amount": 321800,
            "ref": "QĐ 1838/QĐ-BXD; TT 156/2025/TT-BTC"
           }
          ],
          "total": 786362500
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam vehicle fees",
    "description": "Returns the yearly running costs fixed by law for a vehicle: the road-use fee collected at inspection (phí sử dụng đường bộ, NĐ 364/2025/NĐ-CP from 1/1/2026, periods of 1, 3, 6, 12, 24 or 36 months, rows by seats, gross weight and business use), the compulsory third-party insurance premium (bảo hiểm TNDS bắt buộc, NĐ 67/2023/NĐ-CP, with VAT, taxi and driving-school surcharges) and the inspection cost (maximum prices of QĐ 1838/QĐ-BXD from 26/10/2026, clean-energy rates, plus the 40,000 đ certificate fee of TT 156/2025/TT-BTC).\n\nSend `price` (and `province`) to get the on-road cost (giá lăn bánh): the registration fee and the plate fee are computed by /v1/vn-registration-fee and added to the recurring items.\n\nInspection prices are ceilings, insurers may adjust premiums by up to 15%, and motorbikes pay no national road fee. Each item names its decree and the review date.\n\nDocs: https://apibox.io.vn/docs/vn-vehicle-fees/",
    "operationId": "vnVehicleFeesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vehicle-fees/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "vehicle": {
          "type": "string",
          "default": "car",
          "description": "`car` (passenger car / bus), `pickup`, `truck`, `tractor`, `motorbike`."
         },
         "seats": {
          "type": "number",
          "default": 5,
          "description": "Registered seats including the driver."
         },
         "use": {
          "type": "string",
          "default": "private",
          "description": "`private`, `commercial`, `taxi`, `training`, `public_bus`, `ambulance`."
         },
         "months": {
          "type": "number",
          "default": 12,
          "description": "Road-fee period: 1, 3, 6, 12, 24 or 36."
         },
         "gross_weight_kg": {
          "type": "number",
          "description": "Gross weight (trucks, tractors, pick-ups)."
         },
         "payload_tonnes": {
          "type": "number",
          "description": "Payload in tonnes for the truck insurance rows."
         },
         "axles": {
          "type": "number",
          "default": 2,
          "description": "Number of axles (truck inspection price)."
         },
         "clean_energy": {
          "type": "boolean",
          "description": "Electric / clean-energy vehicle (lower inspection price, EV registration fee)."
         },
         "engine_cc": {
          "type": "number",
          "description": "Motorbike engine size (≤ 50 cc cheaper insurance)."
         },
         "price": {
          "type": "number",
          "description": "Vehicle price: adds the on-road cost."
         },
         "province": {
          "type": "string",
          "description": "Province for the registration and plate fees."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle": {
           "type": "string"
          },
          "vehicle_vi": {
           "type": "string"
          },
          "use": {
           "type": "string"
          },
          "seats": {
           "type": "number"
          },
          "road_fee": {
           "type": "object",
           "properties": {
            "row": {
             "type": "number"
            },
            "monthly": {
             "type": "number"
            },
            "months": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "exempt": {
             "type": "boolean"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "insurance": {
           "type": "object",
           "properties": {
            "premium": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "years": {
             "type": "number"
            },
            "category": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "inspection": {
           "type": "object",
           "properties": {
            "category": {
             "type": "string"
            },
            "max_price_before_vat": {
             "type": "number"
            },
            "clean_energy": {
             "type": "boolean"
            },
            "certificate_fee": {
             "type": "number"
            },
            "total_before_vat": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "total_recurring": {
           "type": "number"
          },
          "on_road": {
           "type": "object",
           "properties": {
            "price": {
             "type": "number"
            },
            "province": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              }
             }
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-admin-fees": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam administrative fees",
    "description": "Looks up the national fees (lệ phí, phí) of common procedures from the Ministry of Finance circulars: ordinary passport (TT 28/2026/TT-BTC), identity card replacement and reissue (TT 73/2024/TT-BTC), judicial record certificate (TT 16/2025/TT-BTC), driving licence (TT 154/2025/TT-BTC), enterprise registration and publication (TT 47/2019/TT-BTC), civil-status extracts, certified copies and signature certification (TT 226/2016/TT-BTC), and the end of the licence tax (môn bài) from 2026.\n\nTemporary regimes are applied for the requested `date`: the 50% reduction of TT 64/2025/TT-BTC until 31/12/2026 and the waivers of TT 117/2026/TT-BTC for citizens with a VNeID level-2 account who file online (15/8/2026–28/2/2027). Fees that each province sets since TT 85/2019 (household business, civil status, residence, land certificate, construction permit) are listed as provincial without an amount, because no national amount or cap exists.\n\nSearch with `q` (accents optional), filter by `group`, or get one procedure by `id`. Every entry has its circular and effective date.\n\nDocs: https://apibox.io.vn/docs/vn-admin-fees/",
    "operationId": "vnAdminFeesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-admin-fees/"
    },
    "parameters": [
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "Procedure id, e.g. `passport`, `id_card`, `judicial_record`, `driving_licence`, `business_registration` (also /v1/vn-admin-fees/{id}).",
      "schema": {
       "type": "string"
      },
      "example": "id_card"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search text, accents optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "`immigration`, `identity`, `justice`, `transport`, `business`, `property`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date for temporary regimes (default today, Vietnam time).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "id": {
           "type": "string"
          },
          "vi": {
           "type": "string"
          },
          "en": {
           "type": "string"
          },
          "group": {
           "type": "string"
          },
          "set_by": {
           "type": "string"
          },
          "amounts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "case": {
              "type": "string"
             },
             "case_vi": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          },
          "ref": {
           "type": "string"
          },
          "effective_from": {
           "type": "string"
          },
          "free": {
           "type": "string"
          },
          "amount_on_date": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "case": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          },
          "active_rules": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             },
             "rule": {
              "type": "string"
             },
             "rule_vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "id": "id_card",
         "vi": "Cấp đổi, cấp lại thẻ căn cước",
         "en": "Identity card (căn cước) replacement or reissue",
         "group": "identity",
         "set_by": "national",
         "amounts": [
          {
           "case": "switch from a CCCD card to the căn cước card",
           "case_vi": "đổi thẻ CCCD sang thẻ căn cước",
           "amount": 30000
          },
          {
           "case": "replacement (cấp đổi)",
           "case_vi": "cấp đổi",
           "amount": 50000
          },
          {
           "case": "reissue (cấp lại, e.g. lost)",
           "case_vi": "cấp lại",
           "amount": 70000
          }
         ],
         "ref": "Thông tư 73/2024/TT-BTC",
         "effective_from": "2024-10-21",
         "free": "First issue and the mandatory renewals at ages 14, 25, 40, 60 are free (Luật Căn cước 2023).",
         "amount_on_date": [
          {
           "case": "switch from a CCCD card to the căn cước card",
           "amount": 15000
          },
          {
           "case": "replacement (cấp đổi)",
           "amount": 25000
          },
          {
           "case": "reissue (cấp lại, e.g. lost)",
           "amount": 35000
          }
         ],
         "active_rules": [
          {
           "from": "2025-07-01",
           "to": "2026-12-31",
           "rule": "50% of the amounts",
           "rule_vi": "Thu bằng 50% mức thu",
           "ref": "TT 64/2025/TT-BTC"
          },
          {
           "from": "2026-08-15",
           "to": "2027-02-28",
           "rule": "Exempt when filed online by a citizen with a VNeID level-2 account (replacement and reissue)",
           "rule_vi": "Miễn khi công dân có tài khoản định danh điện tử mức 2 nộp hồ sơ trực tuyến",
           "ref": "TT 117/2026/TT-BTC (NQ 66.22/2026/NQ-CP)"
          }
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-sale-calendar": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam sale calendar",
    "description": "Lists the shopping and marketing anchors of a year in Vietnam: double-day sales (1.1 to 12.12, with 11.11 and 12.12, the National E-commerce Day), mid-month and payday sales, Valentine’s Day, 8/3, Mother’s and Father’s Day, 1/6, Vietnamese Family Day, back-to-school, 20/10, Halloween, 20/11, Black Friday and Cyber Monday, Online Friday, Christmas, and the lunar dates computed with the Vietnamese lunar calendar: Tết and its shopping season, ông Công ông Táo, God of Wealth day, Rằm tháng Giêng, Vu Lan and Mid-Autumn.\n\nEach event has its weekday, the industries it matters for and a suggested campaign start (lead days before). `format=ics` returns a calendar file to import into Google Calendar or Outlook; `kinds`, `from` and `to` filter the list.\n\nOnline Friday is announced each year by the Ministry of Industry and Trade; unannounced years use the first Friday of December and are marked estimated. Marketplaces announce their own campaign schedules around these anchors.\n\nDocs: https://apibox.io.vn/docs/vn-sale-calendar/",
    "operationId": "vnSaleCalendarGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sale-calendar/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Year (default: current year).",
      "schema": {
       "type": "number"
      },
      "example": 2027
     },
     {
      "name": "kinds",
      "in": "query",
      "required": false,
      "description": "Comma list: `double_day`, `mid_month`, `payday`, `holiday`, `season`, `global_sale`, `national_sale`, `lunar`, `tet`.",
      "schema": {
       "type": "string"
      },
      "example": "tet,national_sale"
     },
     {
      "name": "all",
      "in": "query",
      "required": false,
      "description": "Include the monthly mid-month and payday sales.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "from, to",
      "in": "query",
      "required": false,
      "description": "Date range (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `ics`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Event titles in the ICS file: `vi` or `en`.",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "events": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "industries": {
              "type": "array"
             },
             "lead_days": {
              "type": "number"
             },
             "weekday": {
              "type": "string"
             },
             "campaign_start": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "estimated": {
              "type": "boolean"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2027,
         "count": 5,
         "events": [
          {
           "date": "2027-01-07",
           "name": "Tết 2027 shopping season starts",
           "name_vi": "Bắt đầu mùa mua sắm Tết 2027",
           "kind": "tet",
           "industries": [
            "gift baskets",
            "F&B",
            "fashion",
            "home decor"
           ],
           "lead_days": 30,
           "weekday": "Thursday",
           "campaign_start": "2026-12-08"
          },
          {
           "date": "2027-01-30",
           "name": "Kitchen Gods Day (ông Công ông Táo)",
           "name_vi": "Ông Công ông Táo (23 tháng Chạp)",
           "kind": "tet",
           "industries": [
            "offerings",
            "F&B"
           ],
           "lead_days": 7,
           "weekday": "Saturday",
           "campaign_start": "2027-01-23"
          },
          {
           "date": "2027-02-05",
           "name": "Lunar New Year’s Eve (Giao thừa)",
           "name_vi": "Giao thừa Tết Nguyên đán",
           "kind": "tet",
           "industries": [
            "offerings",
            "F&B"
           ],
           "lead_days": 7,
           "weekday": "Friday",
           "campaign_start": "2027-01-29"
          },
          {
           "date": "2027-02-06",
           "name": "Lunar New Year (Tết 2027)",
           "name_vi": "Tết Nguyên đán 2027",
           "kind": "tet",
           "industries": [
            "gift baskets",
            "F&B",
            "fashion",
            "travel"
           ],
           "lead_days": 45,
           "note": "Most marketplaces slow down deliveries from about 7 days before Tết",
           "weekday": "Saturday",
           "campaign_start": "2026-12-23"
          },
          {
           "date": "2027-12-03",
           "name": "Online Friday (Vietnam Online Shopping Day)",
           "name_vi": "Ngày mua sắm trực tuyến Việt Nam – Online Friday",
           "kind": "national_sale",
           "industries": [
            "all marketplaces",
            "Vietnamese brands"
           ],
           "lead_days": 21,
           "estimated": true,
           "note": "Date announced by Bộ Công Thương each year; estimate = first Friday of December",
           "weekday": "Friday",
           "campaign_start": "2027-11-12"
          }
         ],
         "note": "Marketplace campaign dates (Shopee, Lazada, TikTok Shop, Tiki) follow these anchors but each platform announces its own schedule. Online Friday is announced yearly by Bộ Công Thương."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-vn2000": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "VN-2000 ↔ WGS84 converter",
    "description": "Converts coordinates between the Vietnamese national system VN-2000 and WGS84: plane coordinates x (northing), y (easting) in the 3° transverse Mercator zone of a province (k0 = 0.9999, the system printed on land-use certificates) or 6° UTM zones, VN-2000 latitude / longitude, WGS84 latitude / longitude (GPS, Google Maps) and WGS84 UTM. The datum shift uses the official seven parameters of TT 973/2001/TT-TCĐC and QĐ 05/2007/QĐ-BTNMT (EPSG:6960); the projection uses the Krüger series, accurate to the millimetre.\n\nPass `province` (any of the 63 former provinces or the 34 current ones) and the central meridian of TT 973/2001 is used; for a merged province the response warns when its former provinces have different meridians, because cadastral records keep the meridian of the former province. Or pass `meridian` directly (105.75 or 105°45').\n\nWith three or more points the parcel area and perimeter are computed on the projection plane, as cadastral maps do. `format=geojson` returns a GeoJSON polygon ready for Google Maps or QGIS. Accuracy between datums is about 1 m: fine for maps, not for legal surveys.\n\nDocs: https://apibox.io.vn/docs/vn-vn2000/",
    "operationId": "vnVn2000Get",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vn2000/"
    },
    "parameters": [
     {
      "name": "points",
      "in": "query",
      "required": true,
      "description": "Points: array of [x, y] or [lat, lon], or one pair per line (as printed on the certificate). Single point: x + y or lat + lon.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "`vn2000` (plane x, y), `vn2000_geo`, `wgs84`, `utm`, `vn2000_utm`.",
      "schema": {
       "type": "string",
       "default": "vn2000"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Target system (same values).",
      "schema": {
       "type": "string",
       "default": "wgs84"
      }
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province for the central meridian (63 former or 34 current names).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "meridian",
      "in": "query",
      "required": false,
      "description": "Central meridian, e.g. 105.75 or 105°45'.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "zone_width",
      "in": "query",
      "required": false,
      "description": "3 (k0 0.9999) or 6 (k0 0.9996).",
      "schema": {
       "type": "number",
       "default": 3
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `geojson`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "meridian": {
           "type": "string"
          },
          "meridian_deg": {
           "type": "number"
          },
          "zone_width": {
           "type": "number"
          },
          "k0": {
           "type": "number"
          },
          "province": {
           "type": "object",
           "properties": {
            "former_province": {
             "type": "string"
            },
            "province_since_2025": {
             "type": "string"
            },
            "meridian": {
             "type": "string"
            },
            "meridian_deg": {
             "type": "number"
            },
            "warning": {
             "type": "string"
            }
           }
          },
          "count": {
           "type": "number"
          },
          "points": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "wgs84": {
              "type": "object",
              "properties": {}
             },
             "vn2000_geo": {
              "type": "object",
              "properties": {}
             },
             "vn2000": {
              "type": "object",
              "properties": {}
             },
             "result": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "polygon": {
           "type": "object",
           "properties": {
            "area_m2": {
             "type": "number"
            },
            "perimeter_m": {
             "type": "number"
            },
            "plane": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "object",
           "properties": {
            "system": {
             "type": "string"
            },
            "projection": {
             "type": "string"
            },
            "transform": {
             "type": "string"
            }
           }
          },
          "accuracy": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "VN-2000 ↔ WGS84 converter",
    "description": "Converts coordinates between the Vietnamese national system VN-2000 and WGS84: plane coordinates x (northing), y (easting) in the 3° transverse Mercator zone of a province (k0 = 0.9999, the system printed on land-use certificates) or 6° UTM zones, VN-2000 latitude / longitude, WGS84 latitude / longitude (GPS, Google Maps) and WGS84 UTM. The datum shift uses the official seven parameters of TT 973/2001/TT-TCĐC and QĐ 05/2007/QĐ-BTNMT (EPSG:6960); the projection uses the Krüger series, accurate to the millimetre.\n\nPass `province` (any of the 63 former provinces or the 34 current ones) and the central meridian of TT 973/2001 is used; for a merged province the response warns when its former provinces have different meridians, because cadastral records keep the meridian of the former province. Or pass `meridian` directly (105.75 or 105°45').\n\nWith three or more points the parcel area and perimeter are computed on the projection plane, as cadastral maps do. `format=geojson` returns a GeoJSON polygon ready for Google Maps or QGIS. Accuracy between datums is about 1 m: fine for maps, not for legal surveys.\n\nDocs: https://apibox.io.vn/docs/vn-vn2000/",
    "operationId": "vnVn2000Post",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vn2000/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "points": {
          "type": "array",
          "items": {},
          "description": "Points: array of [x, y] or [lat, lon], or one pair per line (as printed on the certificate). Single point: x + y or lat + lon."
         },
         "from": {
          "type": "string",
          "default": "vn2000",
          "description": "`vn2000` (plane x, y), `vn2000_geo`, `wgs84`, `utm`, `vn2000_utm`."
         },
         "to": {
          "type": "string",
          "default": "wgs84",
          "description": "Target system (same values)."
         },
         "province": {
          "type": "string",
          "description": "Province for the central meridian (63 former or 34 current names)."
         },
         "meridian": {
          "type": "string",
          "description": "Central meridian, e.g. 105.75 or 105°45'."
         },
         "zone_width": {
          "type": "number",
          "default": 3,
          "description": "3 (k0 0.9999) or 6 (k0 0.9996)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `geojson`."
         }
        },
        "required": [
         "points"
        ]
       },
       "example": {
        "points": [
         [
          1192000,
          600000
         ],
         [
          1192000,
          600020
         ],
         [
          1191980,
          600020
         ],
         [
          1191980,
          600000
         ]
        ],
        "province": "Hồ Chí Minh"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "meridian": {
           "type": "string"
          },
          "meridian_deg": {
           "type": "number"
          },
          "zone_width": {
           "type": "number"
          },
          "k0": {
           "type": "number"
          },
          "province": {
           "type": "object",
           "properties": {
            "former_province": {
             "type": "string"
            },
            "province_since_2025": {
             "type": "string"
            },
            "meridian": {
             "type": "string"
            },
            "meridian_deg": {
             "type": "number"
            },
            "warning": {
             "type": "string"
            }
           }
          },
          "count": {
           "type": "number"
          },
          "points": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "wgs84": {
              "type": "object",
              "properties": {}
             },
             "vn2000_geo": {
              "type": "object",
              "properties": {}
             },
             "vn2000": {
              "type": "object",
              "properties": {}
             },
             "result": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "polygon": {
           "type": "object",
           "properties": {
            "area_m2": {
             "type": "number"
            },
            "perimeter_m": {
             "type": "number"
            },
            "plane": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "object",
           "properties": {
            "system": {
             "type": "string"
            },
            "projection": {
             "type": "string"
            },
            "transform": {
             "type": "string"
            }
           }
          },
          "accuracy": {
           "type": "string"
          }
         }
        },
        "example": {
         "from": "vn2000",
         "to": "wgs84",
         "meridian": "105°45'",
         "meridian_deg": 105.75,
         "zone_width": 3,
         "k0": 0.9999,
         "province": {
          "former_province": "Hồ Chí Minh",
          "province_since_2025": "Hồ Chí Minh",
          "meridian": "105°45'",
          "meridian_deg": 105.75,
          "warning": "Since 1/7/2025 Hồ Chí Minh also includes Bình Dương (105°45'), Bà Rịa - Vũng Tàu (107°45'); cadastral records keep the meridian of the former province where the parcel lies."
         },
         "count": 4,
         "points": [
          {
           "wgs84": {
            "lat": 10.77752619,
            "lon": 106.66618296
           },
           "vn2000_geo": {
            "lat": 10.77854448,
            "lon": 106.66439662
           },
           "vn2000": {
            "x": 1192000,
            "y": 600000
           },
           "result": {
            "lat": 10.77752619,
            "lon": 106.66618296
           }
          },
          {
           "wgs84": {
            "lat": 10.77752565,
            "lon": 106.66636582
           },
           "vn2000_geo": {
            "lat": 10.77854394,
            "lon": 106.66457948
           },
           "vn2000": {
            "x": 1192000,
            "y": 600020
           },
           "result": {
            "lat": 10.77752565,
            "lon": 106.66636582
           }
          }
         ],
         "polygon": {
          "area_m2": 400,
          "perimeter_m": 80,
          "plane": "VN-2000 TM 3°, meridian 105°45', k0 0.9999"
         },
         "legal": {
          "system": "VN-2000, QĐ 83/2000/QĐ-TTg",
          "projection": "TT 973/2001/TT-TCĐC (k0 0.9999 for 3° zones, 0.9996 for 6°)",
          "transform": "7 parameters of TT 973/2001 / QĐ 05/2007/QĐ-BTNMT (EPSG:6960, coordinate frame)"
         },
         "accuracy": "About 1 m between VN-2000 and WGS84 (national 7-parameter set; local parameter sets of a province can be more accurate). Not a substitute for a licensed survey in cadastral dossiers."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-build-cost": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "House building cost estimator",
    "description": "Contractors in Vietnam price houses per square metre of converted area: the floors count 100%, and the foundation, basement, roof, yard and voids are weighted by usual coefficients (strip foundation 50% of the ground floor, pile caps 40%, flat concrete roof 50%, tile roof on trusses 70%, basement 150–250% by depth, yard 50%…). The API builds that table from the plot size, floors, foundation, roof and optional areas, and multiplies it by a unit price.\n\nThere is no official coefficient table, so each one is a labelled default you can override with `coefficients`, and the unit prices are editable presets (shell only, basic, standard, premium turnkey) or your own `unit_price`. The result splits the cost into the shell and the finishing part and lists what is not included (piling, demolition, permits, furniture).\n\nUse it for a first budget; a contractor’s quote depends on the design, the site and the materials chosen.\n\nDocs: https://apibox.io.vn/docs/vn-build-cost/",
    "operationId": "vnBuildCostGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-build-cost/"
    },
    "parameters": [
     {
      "name": "width, length",
      "in": "query",
      "required": false,
      "description": "Plot / ground-floor size in metres (or `floor_area`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "floor_area",
      "in": "query",
      "required": false,
      "description": "Ground-floor area in m².",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Number of floors including the ground floor.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 3
     },
     {
      "name": "foundation",
      "in": "query",
      "required": false,
      "description": "`single`, `strip`, `pile`, `raft`.",
      "schema": {
       "type": "string",
       "default": "strip"
      },
      "example": "strip"
     },
     {
      "name": "roof",
      "in": "query",
      "required": false,
      "description": "`metal`, `concrete`, `tile_steel`, `tile_concrete`, `none`.",
      "schema": {
       "type": "string",
       "default": "concrete"
      },
      "example": "concrete"
     },
     {
      "name": "basement_depth, mezzanine_area, stair_tower_area, terrace_area, balcony_area, yard_area, void_area, upper_floor_area, roof_area",
      "in": "query",
      "required": false,
      "description": "Optional parts (m², basement depth in m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "package",
      "in": "query",
      "required": false,
      "description": "Price preset: `rough`, `basic`, `standard`, `premium`.",
      "schema": {
       "type": "string",
       "default": "standard"
      },
      "example": "standard"
     },
     {
      "name": "unit_price",
      "in": "query",
      "required": false,
      "description": "Your price per converted m² (overrides the preset).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "coefficients",
      "in": "query",
      "required": false,
      "description": "Overrides, e.g. {\"foundation.pile\": 0.5, \"roof.metal\": 0.25, \"yard\": 0.7}.",
      "schema": {
       "type": "object"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "footprint_m2": {
           "type": "number"
          },
          "floors": {
           "type": "number"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "part": {
              "type": "string"
             },
             "part_vi": {
              "type": "string"
             },
             "area_m2": {
              "type": "number"
             },
             "coefficient": {
              "type": "number"
             },
             "converted_m2": {
              "type": "number"
             },
             "basis": {
              "type": "string"
             }
            }
           }
          },
          "converted_area_m2": {
           "type": "number"
          },
          "cost": {
           "type": "object",
           "properties": {
            "package": {
             "type": "string"
            },
            "package_vi": {
             "type": "string"
            },
            "unit_price": {
             "type": "number"
            },
            "unit_price_source": {
             "type": "string"
            },
            "total": {
             "type": "number"
            },
            "rough_part": {
             "type": "number"
            },
            "finishing_part": {
             "type": "number"
            }
           }
          },
          "excluded": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "footprint_m2": 100,
         "floors": 3,
         "rows": [
          {
           "part": "Foundation",
           "part_vi": "Móng",
           "area_m2": 100,
           "coefficient": 0.5,
           "converted_m2": 50,
           "basis": "Strip foundation (móng băng) 50%"
          },
          {
           "part": "Ground floor",
           "part_vi": "Tầng trệt",
           "area_m2": 100,
           "coefficient": 1,
           "converted_m2": 100,
           "basis": "Each floor, mezzanine, stair tower, balcony 100%"
          },
          {
           "part": "Floor 2",
           "part_vi": "Tầng 2",
           "area_m2": 100,
           "coefficient": 1,
           "converted_m2": 100,
           "basis": "Each floor, mezzanine, stair tower, balcony 100%"
          },
          {
           "part": "Floor 3",
           "part_vi": "Tầng 3",
           "area_m2": 100,
           "coefficient": 1,
           "converted_m2": 100,
           "basis": "Each floor, mezzanine, stair tower, balcony 100%"
          },
          {
           "part": "Roof (concrete)",
           "part_vi": "Mái (concrete)",
           "area_m2": 100,
           "coefficient": 0.5,
           "converted_m2": 50,
           "basis": "Flat concrete roof (mái BTCT) 50%"
          }
         ],
         "converted_area_m2": 400,
         "cost": {
          "package": "standard",
          "package_vi": "Trọn gói khá",
          "unit_price": 6500000,
          "unit_price_source": "preset (editable default, not an official price)",
          "total": 2600000000,
          "rough_part": 1520000000,
          "finishing_part": 1080000000
         },
         "excluded": [
          "piling (ép cọc / khoan nhồi), billed per metre",
          "demolition and soil disposal",
          "permit, design and supervision fees",
          "furniture, air conditioners, appliances",
          "difficult access or night work surcharges"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "House building cost estimator",
    "description": "Contractors in Vietnam price houses per square metre of converted area: the floors count 100%, and the foundation, basement, roof, yard and voids are weighted by usual coefficients (strip foundation 50% of the ground floor, pile caps 40%, flat concrete roof 50%, tile roof on trusses 70%, basement 150–250% by depth, yard 50%…). The API builds that table from the plot size, floors, foundation, roof and optional areas, and multiplies it by a unit price.\n\nThere is no official coefficient table, so each one is a labelled default you can override with `coefficients`, and the unit prices are editable presets (shell only, basic, standard, premium turnkey) or your own `unit_price`. The result splits the cost into the shell and the finishing part and lists what is not included (piling, demolition, permits, furniture).\n\nUse it for a first budget; a contractor’s quote depends on the design, the site and the materials chosen.\n\nDocs: https://apibox.io.vn/docs/vn-build-cost/",
    "operationId": "vnBuildCostPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-build-cost/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "width, length": {
          "type": "number",
          "description": "Plot / ground-floor size in metres (or `floor_area`)."
         },
         "floor_area": {
          "type": "number",
          "description": "Ground-floor area in m²."
         },
         "floors": {
          "type": "number",
          "default": 1,
          "description": "Number of floors including the ground floor."
         },
         "foundation": {
          "type": "string",
          "default": "strip",
          "description": "`single`, `strip`, `pile`, `raft`."
         },
         "roof": {
          "type": "string",
          "default": "concrete",
          "description": "`metal`, `concrete`, `tile_steel`, `tile_concrete`, `none`."
         },
         "basement_depth, mezzanine_area, stair_tower_area, terrace_area, balcony_area, yard_area, void_area, upper_floor_area, roof_area": {
          "type": "number",
          "description": "Optional parts (m², basement depth in m)."
         },
         "package": {
          "type": "string",
          "default": "standard",
          "description": "Price preset: `rough`, `basic`, `standard`, `premium`."
         },
         "unit_price": {
          "type": "number",
          "description": "Your price per converted m² (overrides the preset)."
         },
         "coefficients": {
          "type": "object",
          "description": "Overrides, e.g. {\"foundation.pile\": 0.5, \"roof.metal\": 0.25, \"yard\": 0.7}."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "footprint_m2": {
           "type": "number"
          },
          "floors": {
           "type": "number"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "part": {
              "type": "string"
             },
             "part_vi": {
              "type": "string"
             },
             "area_m2": {
              "type": "number"
             },
             "coefficient": {
              "type": "number"
             },
             "converted_m2": {
              "type": "number"
             },
             "basis": {
              "type": "string"
             }
            }
           }
          },
          "converted_area_m2": {
           "type": "number"
          },
          "cost": {
           "type": "object",
           "properties": {
            "package": {
             "type": "string"
            },
            "package_vi": {
             "type": "string"
            },
            "unit_price": {
             "type": "number"
            },
            "unit_price_source": {
             "type": "string"
            },
            "total": {
             "type": "number"
            },
            "rough_part": {
             "type": "number"
            },
            "finishing_part": {
             "type": "number"
            }
           }
          },
          "excluded": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-house-direction": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "House direction by birth year",
    "description": "Implements the Eight Mansions school (Bát trạch) used in Vietnamese real estate: from the lunar birth year and the sex it returns the life palace (cung phi: Khảm, Khôn, Chấn, Tốn, Càn, Đoài, Cấn, Ly), its element and East / West group, and the eight directions with their stars: Sinh khí, Thiên y, Diên niên and Phục vị (good), Họa hại, Ngũ quỷ, Lục sát and Tuyệt mệnh (bad), each with its compass range.\n\nSend a solar `birth_date` and the lunar year is computed (people born before Tết belong to the previous year). Add `facing` (degrees or a direction) to check a door, house or desk, and `partner_year` to compare a couple’s palaces and find their common good directions.\n\nThis is folk belief, given as cultural reference: it has no scientific basis. The formula is the common one (men: (2 − year) mod 9, women: (year − 5) mod 9, 5 → Khôn for men, Cấn for women).\n\nDocs: https://apibox.io.vn/docs/vn-house-direction/",
    "operationId": "vnHouseDirectionGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-house-direction/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Lunar birth year (or send birth_date).",
      "schema": {
       "type": "number"
      },
      "example": 1990
     },
     {
      "name": "birth_date",
      "in": "query",
      "required": false,
      "description": "Solar birth date YYYY-MM-DD; the lunar year is computed.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sex",
      "in": "query",
      "required": true,
      "description": "`male` / `female` (or nam / nữ).",
      "schema": {
       "type": "string"
      },
      "example": "male"
     },
     {
      "name": "facing",
      "in": "query",
      "required": false,
      "description": "Direction to check: degrees (0 = north) or N, NE, Đông Nam…",
      "schema": {
       "type": "string"
      },
      "example": "135"
     },
     {
      "name": "partner_year / partner_birth_date, partner_sex",
      "in": "query",
      "required": false,
      "description": "Partner for couple compatibility.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "lunar_year": {
           "type": "number"
          },
          "can_chi": {
           "type": "string"
          },
          "sex": {
           "type": "string"
          },
          "palace": {
           "type": "string"
          },
          "element": {
           "type": "string"
          },
          "group": {
           "type": "string"
          },
          "group_en": {
           "type": "string"
          },
          "directions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "star": {
              "type": "string"
             },
             "star_en": {
              "type": "string"
             },
             "good": {
              "type": "boolean"
             },
             "direction": {
              "type": "string"
             },
             "direction_vi": {
              "type": "string"
             },
             "direction_en": {
              "type": "string"
             },
             "degrees": {
              "type": "array"
             },
             "meaning_vi": {
              "type": "string"
             }
            }
           }
          },
          "good_directions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "bad_directions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "facing": {
           "type": "object",
           "properties": {
            "direction": {
             "type": "string"
            },
            "direction_vi": {
             "type": "string"
            },
            "star": {
             "type": "string"
            },
            "star_en": {
             "type": "string"
            },
            "good": {
             "type": "boolean"
            },
            "meaning_vi": {
             "type": "string"
            }
           }
          },
          "school": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "lunar_year": 1990,
         "can_chi": "Canh Ngọ",
         "sex": "male",
         "palace": "Khảm",
         "element": "Thủy",
         "group": "Đông tứ mệnh",
         "group_en": "East group",
         "directions": [
          {
           "star": "Sinh khí",
           "star_en": "Vitality",
           "good": true,
           "direction": "SE",
           "direction_vi": "Đông Nam",
           "direction_en": "South-east",
           "degrees": [
            112.5,
            157.5
           ],
           "meaning_vi": "tốt nhất: tài lộc, danh tiếng"
          },
          {
           "star": "Thiên y",
           "star_en": "Heavenly doctor",
           "good": true,
           "direction": "E",
           "direction_vi": "Đông",
           "direction_en": "East",
           "degrees": [
            67.5,
            112.5
           ],
           "meaning_vi": "sức khỏe, quý nhân"
          },
          {
           "star": "Tuyệt mệnh",
           "star_en": "Total loss",
           "good": false,
           "direction": "SW",
           "direction_vi": "Tây Nam",
           "direction_en": "South-west",
           "degrees": [
            202.5,
            247.5
           ],
           "meaning_vi": "xấu nhất: bệnh tật, phá sản"
          }
         ],
         "good_directions": [
          "Đông Nam",
          "Đông",
          "Nam",
          "Bắc"
         ],
         "bad_directions": [
          "Tây",
          "Đông Bắc",
          "Tây Bắc",
          "Tây Nam"
         ],
         "facing": {
          "direction": "SE",
          "direction_vi": "Đông Nam",
          "star": "Sinh khí",
          "star_en": "Vitality",
          "good": true,
          "meaning_vi": "tốt nhất: tài lộc, danh tiếng"
         },
         "school": "Bát trạch (Eight Mansions), cung phi by lunar birth year; the house direction is the direction the main door faces",
         "disclaimer": "Folk belief (phong thủy), for cultural reference only; it has no scientific basis."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-school-grade": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "School grade calculator (TT 22)",
    "description": "Applies the assessment rules of Thông tư 22/2021/TT-BGDĐT (lower and upper secondary, grades 6–12): the semester average of each scored subject (ΣĐĐGtx + 2 × mid-term + 3 × final) / (number of regular scores + 5), the year average (semester I + 2 × semester II) / 3, rounded to one decimal, and Đạt / Chưa đạt for comment-assessed subjects. Send the component scores or the averages you already have.\n\nThe learning result of each semester and of the year is rated Tốt, Khá, Đạt or Chưa đạt with the thresholds of Điều 9 (6.5 / 8.0 for at least six subjects, 5.0 / 6.5, 3.5…), including the rule that raises a result lowered by two or more levels because of a single subject. With the conduct rating and absences, the API decides promotion, summer conduct training or re-tests (and lists the subjects to re-test) and the Học sinh Giỏi / Xuất sắc awards. The number of regular scores is checked against the periods per year.\n\nFormulas and thresholds are unchanged by TT 89/2026/TT-BGDĐT (from 1/12/2026), which changes test organisation and re-test timing. Primary school (TT 27/2020) is not covered.\n\nDocs: https://apibox.io.vn/docs/vn-school-grade/",
    "operationId": "vnSchoolGradePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-school-grade/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "subjects": {
          "type": "array",
          "items": {},
          "description": "Subjects: {name, type: \"score\" | \"comment\", periods?, hk1, hk2}; a semester is an average (8.5 / \"Đ\") or {regular: [...], mid, final}."
         },
         "conduct": {
          "type": "string",
          "description": "Year conduct rating: Tốt, Khá, Đạt, Chưa đạt (for promotion and awards)."
         },
         "absences": {
          "type": "number",
          "description": "Days of absence in the year (more than 45: repeat the year)."
         }
        },
        "required": [
         "subjects"
        ]
       },
       "example": {
        "subjects": [
         {
          "name": "Toán",
          "periods": 140,
          "hk1": {
           "regular": [
            8,
            9,
            7,
            8
           ],
           "mid": 8,
           "final": 9
          },
          "hk2": 9.1
         },
         {
          "name": "Ngữ văn",
          "hk1": 7.5,
          "hk2": 8.2
         },
         {
          "name": "Tiếng Anh",
          "hk1": 9,
          "hk2": 9.1
         },
         {
          "name": "GDCD",
          "hk1": 8.5,
          "hk2": 9
         },
         {
          "name": "KHTN",
          "hk1": 8,
          "hk2": 8.4
         },
         {
          "name": "Lịch sử và Địa lý",
          "hk1": 7.8,
          "hk2": 8.6
         },
         {
          "name": "Thể dục",
          "type": "comment",
          "hk1": "Đ",
          "hk2": "Đ"
         }
        ],
        "conduct": "Tốt",
        "absences": 2
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "subjects": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "hk1": {},
             "hk2": {},
             "year": {},
             "details": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "learning": {
           "type": "object",
           "properties": {
            "hk1": {
             "type": "object",
             "properties": {
              "rating": {
               "type": "string"
              },
              "rating_en": {
               "type": "string"
              },
              "level": {
               "type": "number"
              }
             }
            },
            "hk2": {
             "type": "object",
             "properties": {
              "rating": {
               "type": "string"
              },
              "rating_en": {
               "type": "string"
              },
              "level": {
               "type": "number"
              }
             }
            },
            "year": {
             "type": "object",
             "properties": {
              "rating": {
               "type": "string"
              },
              "rating_en": {
               "type": "string"
              },
              "level": {
               "type": "number"
              }
             }
            }
           }
          },
          "conduct": {
           "type": "string"
          },
          "promotion": {
           "type": "object",
           "properties": {
            "decision": {
             "type": "string"
            },
            "decision_vi": {
             "type": "string"
            }
           }
          },
          "award": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "title_en": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "object",
           "properties": {
            "circular": {
             "type": "string"
            },
            "scope": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "subjects": [
          {
           "name": "Toán",
           "type": "score",
           "hk1": 8.3,
           "hk2": 9.1,
           "year": 8.8,
           "details": {
            "hk1": {
             "regular": [
              8,
              9,
              7,
              8
             ],
             "mid": 8,
             "final": 9,
             "formula": "(8 + 9 + 7 + 8 + 2×8 + 3×9) / 9"
            },
            "hk2": {
             "given_average": 9.1
            }
           }
          },
          {
           "name": "Ngữ văn",
           "type": "score",
           "hk1": 7.5,
           "hk2": 8.2,
           "year": 8,
           "details": {
            "hk1": {
             "given_average": 7.5
            },
            "hk2": {
             "given_average": 8.2
            }
           }
          },
          {
           "name": "Thể dục",
           "type": "comment",
           "hk1": "Đạt",
           "hk2": "Đạt",
           "year": "Đạt",
           "details": {
            "hk1": {
             "given": "Đ"
            },
            "hk2": {
             "given": "Đ"
            }
           }
          }
         ],
         "learning": {
          "hk1": {
           "rating": "Khá",
           "rating_en": "Good",
           "level": 2
          },
          "hk2": {
           "rating": "Tốt",
           "rating_en": "Very good",
           "level": 3
          },
          "year": {
           "rating": "Tốt",
           "rating_en": "Very good",
           "level": 3
          }
         },
         "conduct": "Tốt",
         "promotion": {
          "decision": "promoted",
          "decision_vi": "Được lên lớp"
         },
         "award": {
          "title": "Học sinh Giỏi",
          "title_en": "Good student",
          "note": "Xuất sắc needs ≥ 6 subjects with a year average ≥ 9.0 (has 1)"
         },
         "legal": {
          "circular": "Thông tư 22/2021/TT-BGDĐT, sửa đổi bởi TT 10/2025/TT-BGDĐT và TT 89/2026/TT-BGDĐT",
          "scope": "Lower and upper secondary (grades 6–12); primary school uses TT 27/2020/TT-BGDĐT"
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-majors": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam university major codes",
    "description": "Searches the national catalogue of higher-education majors: Thông tư 09/2022/TT-BGDĐT (7-digit codes: 7 = bachelor, 8 = master, 9 = doctorate, with 3-digit fields and 5-digit groups), used for admissions until 31/12/2026, and Thông tư 74/2026/TT-BGDĐT (one 6-digit code for all levels, 2-digit fields, 4-digit groups), in force from 12/10/2026 for admissions from 1/1/2027.\n\nLook up a code (old or new) to get its name, field and group and the matching code in the other catalogue: the old → new mapping follows Phụ lục II of TT 74/2026 (for example the seven foreign-language teacher majors merge into 140238 Sư phạm tiếng nước ngoài), the unchanged codes keep their last six digits. Or search by name, accents optional, filtered by catalogue, level, kind or field.\n\nTT 09/2022 is parsed from the Official Gazette PDF; TT 74/2026 was published only as a scan and was transcribed and reviewed by hand, so report any difference with the official text.\n\nDocs: https://apibox.io.vn/docs/vn-majors/",
    "operationId": "vnMajorsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-majors/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Old (TT 09) or new (TT 74) code, 2–7 digits (also /v1/vn-majors/{code}).",
      "schema": {
       "type": "string"
      },
      "example": "7480201"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name search, accents optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "catalogue",
      "in": "query",
      "required": false,
      "description": "`tt09`, `tt74` or `all`.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "TT 09 level: 7 (bachelor), 8 (master), 9 (doctorate).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "description": "`major`, `group`, `field` or `all`.",
      "schema": {
       "type": "string",
       "default": "major"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results (1–200).",
      "schema": {
       "type": "number",
       "default": 30
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "tt09": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "catalogue": {
             "type": "string"
            },
            "kind": {
             "type": "string"
            },
            "level": {
             "type": "string"
            },
            "level_en": {
             "type": "string"
            },
            "field": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              }
             }
            },
            "group": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              }
             }
            },
            "new_codes": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "sources": {
           "type": "object",
           "properties": {
            "tt09": {
             "type": "string"
            },
            "tt74": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "query": "7480201",
         "tt09": {
          "code": "7480201",
          "name": "Công nghệ thông tin",
          "catalogue": "TT 09/2022",
          "kind": "major",
          "level": "Đại học",
          "level_en": "Bachelor",
          "field": {
           "code": "748",
           "name": "Máy tính và công nghệ thông tin"
          },
          "group": {
           "code": "74802",
           "name": "Công nghệ thông tin"
          },
          "new_codes": [
           {
            "code": "480201",
            "name": "Công nghệ thông tin",
            "catalogue": "TT 74/2026",
            "kind": "major",
            "field": {
             "code": "48",
             "name": "Máy tính và công nghệ thông tin"
            },
            "group": {
             "code": "4802",
             "name": "Công nghệ thông tin"
            }
           }
          ]
         },
         "sources": {
          "tt09": "Thông tư 09/2022/TT-BGDĐT, Phụ lục I (https://static.dav.edu.vn/files/2024/06/14/tt09-06-06-2022-danh-muc-nganh-dao-tao.pdf)",
          "tt74": "Thông tư 74/2026/TT-BGDĐT, Phụ lục I–II (https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/9/74-bgddt.signed.pdf), transcribed 2026-11-11"
         },
         "data_version": "f73cfa51a5e8",
         "note": "TT 09/2022 codes apply to admissions until 31/12/2026; TT 74/2026 (in force from 12/10/2026) applies from 1/1/2027. Old codes stay in the catalogue as history."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-bank-notify": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Bank Notification Parser (Vietnam)",
    "description": "Send the text of a \"biến động số dư\" SMS, push or e-mail notification from a Vietnamese bank (Vietcombank, VietinBank, BIDV, Agribank, Techcombank, MB, ACB, VPBank, TPBank, Sacombank…) and get the bank, direction (`in` / `out`), amount, balance after the transaction, time (ISO, Vietnam time), the account masked to its last 4 digits, the transfer content (nội dung chuyển khoản) as written and normalised (upper case, no accents, like banks send it) and the bank reference (FT…, Ref). The parser works on keywords and number formats rather than one fixed template per bank, so unknown or changed templates still give partial results with a `confidence` and `warnings`.\n\nExtract your order code from the content with `prefix` (e.g. `DH` finds DH1234, \"DH 1234\", \"DH-1234\") or a `pattern` (regular expression, up to 100 characters). Send `orders` (`[{\"code\": \"DH1234\", \"amount\": 500000}]`) to match the payment: by code first, then by a unique amount, with `status` matched / underpaid / overpaid and the difference. Batch up to 100 messages with `messages`; the unmatched orders are listed.\n\nThis is the core of a self-hosted \"auto-confirm bank transfer\" flow (SMS forwarded from an Android phone, a mail hook, a bank notification webhook). Nothing is stored or logged; the account number is masked in the answer.\n\nDocs: https://apibox.io.vn/docs/vn-bank-notify/",
    "operationId": "vnBankNotifyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bank-notify/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The notification text (max 2,000 characters). Or `messages`: array of up to 100 texts.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "prefix",
      "in": "query",
      "required": false,
      "description": "Order code prefix to extract from the content, e.g. `DH` (letters / digits, max 12).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pattern",
      "in": "query",
      "required": false,
      "description": "Regular expression for the order code instead of `prefix` (max 100 characters, no nested quantifiers).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "bank",
      "in": "query",
      "required": false,
      "description": "Bank when the text does not name it (VietQR code VCB, ICB, BIDV, MB…, name or BIN).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expected_amount",
      "in": "query",
      "required": false,
      "description": "Single expected amount (without `orders`): status matched / underpaid / overpaid.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "bank": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "bin": {
             "type": "string"
            },
            "short_name": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "direction": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "signed_amount": {
           "type": "number"
          },
          "currency": {
           "type": "string"
          },
          "amount_text": {
           "type": "string"
          },
          "balance": {
           "type": "number"
          },
          "account_masked": {
           "type": "string"
          },
          "account_last4": {
           "type": "string"
          },
          "time": {
           "type": "string"
          },
          "time_text": {
           "type": "string"
          },
          "content": {
           "type": "string"
          },
          "content_normalized": {
           "type": "string"
          },
          "reference": {},
          "order_code": {
           "type": "string"
          },
          "confidence": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Bank Notification Parser (Vietnam)",
    "description": "Send the text of a \"biến động số dư\" SMS, push or e-mail notification from a Vietnamese bank (Vietcombank, VietinBank, BIDV, Agribank, Techcombank, MB, ACB, VPBank, TPBank, Sacombank…) and get the bank, direction (`in` / `out`), amount, balance after the transaction, time (ISO, Vietnam time), the account masked to its last 4 digits, the transfer content (nội dung chuyển khoản) as written and normalised (upper case, no accents, like banks send it) and the bank reference (FT…, Ref). The parser works on keywords and number formats rather than one fixed template per bank, so unknown or changed templates still give partial results with a `confidence` and `warnings`.\n\nExtract your order code from the content with `prefix` (e.g. `DH` finds DH1234, \"DH 1234\", \"DH-1234\") or a `pattern` (regular expression, up to 100 characters). Send `orders` (`[{\"code\": \"DH1234\", \"amount\": 500000}]`) to match the payment: by code first, then by a unique amount, with `status` matched / underpaid / overpaid and the difference. Batch up to 100 messages with `messages`; the unmatched orders are listed.\n\nThis is the core of a self-hosted \"auto-confirm bank transfer\" flow (SMS forwarded from an Android phone, a mail hook, a bank notification webhook). Nothing is stored or logged; the account number is masked in the answer.\n\nDocs: https://apibox.io.vn/docs/vn-bank-notify/",
    "operationId": "vnBankNotifyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bank-notify/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The notification text (max 2,000 characters). Or `messages`: array of up to 100 texts."
         },
         "prefix": {
          "type": "string",
          "description": "Order code prefix to extract from the content, e.g. `DH` (letters / digits, max 12)."
         },
         "pattern": {
          "type": "string",
          "description": "Regular expression for the order code instead of `prefix` (max 100 characters, no nested quantifiers)."
         },
         "bank": {
          "type": "string",
          "description": "Bank when the text does not name it (VietQR code VCB, ICB, BIDV, MB…, name or BIN)."
         },
         "orders": {
          "type": "array",
          "items": {},
          "description": "Expected payments `[{\"code\", \"amount\", \"id\"?}]` (max 1,000) to match against."
         },
         "expected_amount": {
          "type": "number",
          "description": "Single expected amount (without `orders`): status matched / underpaid / overpaid."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "MBBank: TK 07xxx123|GD: +350,000VND 10/11/26 09:15 |SD: 2,350,000VND|ND: DH777 chuyen khoan",
        "prefix": "DH"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "bank": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "bin": {
             "type": "string"
            },
            "short_name": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "direction": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "signed_amount": {
           "type": "number"
          },
          "currency": {
           "type": "string"
          },
          "amount_text": {
           "type": "string"
          },
          "balance": {
           "type": "number"
          },
          "account_masked": {
           "type": "string"
          },
          "account_last4": {
           "type": "string"
          },
          "time": {
           "type": "string"
          },
          "time_text": {
           "type": "string"
          },
          "content": {
           "type": "string"
          },
          "content_normalized": {
           "type": "string"
          },
          "reference": {},
          "order_code": {
           "type": "string"
          },
          "confidence": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "bank": {
          "code": "MB",
          "bin": "970422",
          "short_name": "MBBank",
          "name": "Ngân hàng TMCP Quân đội"
         },
         "direction": "in",
         "amount": 350000,
         "signed_amount": 350000,
         "currency": "VND",
         "amount_text": "GD: +350,000VND",
         "balance": 2350000,
         "account_masked": "****7123",
         "account_last4": "7123",
         "time": "2026-11-10T09:15:00+07:00",
         "time_text": "10/11/26 09:15",
         "content": "DH777 chuyen khoan",
         "content_normalized": "DH777 CHUYEN KHOAN",
         "reference": null,
         "order_code": "DH777",
         "confidence": 1,
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-order-extract": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Order Extractor (chat / comments)",
    "description": "Send the text of a Facebook / Zalo / livestream comment or chat message and get a structured order: the customer phone (normalised, E.164, network), name (after \"tên:\", \"người nhận\", or a title such as chị / anh), the delivery address resolved to the current ward and province by the same engine as /v1/address-parse (old 3-level addresses are converted to the post-07/2025 units), the items with quantity, size and colour, the payment method (COD, bank transfer, already paid) and delivery notes (\"giao giờ hành chính\", \"gọi trước\").\n\nWithout a catalog the API reads product codes (A12 x2, MS05 sl 3, #23) and free text (\"2 áo đen size M\"). With `catalog` (`[{\"sku\", \"name\", \"aliases\"?, \"price\"?}]`, up to 500) it matches SKUs, names and aliases (accents and case ignored, partial names allowed) and computes line totals. Every field carries a `confidence`; `is_order` tells whether the message looks like an order.\n\nRule-based, no AI model and no storage: results are fast and predictable, but messy text can be misread, so keep a human check for low-confidence fields. Normalise teencode first with /v1/vn-teencode for very informal messages. Batch up to 100 messages with `messages`.\n\nDocs: https://apibox.io.vn/docs/vn-order-extract/",
    "operationId": "vnOrderExtractGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-order-extract/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The message or comment (max 3,000 characters). Or `messages`: array of up to 100.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "is_order": {
           "type": "boolean"
          },
          "customer": {
           "type": "object",
           "properties": {
            "name": {},
            "phone": {
             "type": "object",
             "properties": {
              "number": {
               "type": "string"
              },
              "e164": {
               "type": "string"
              },
              "network": {
               "type": "string"
              },
              "type": {
               "type": "string"
              }
             }
            },
            "other_phones": {
             "type": "array"
            }
           }
          },
          "address": {
           "type": "object",
           "properties": {
            "text": {
             "type": "string"
            },
            "matched": {
             "type": "boolean"
            },
            "ambiguous": {
             "type": "boolean"
            },
            "format": {
             "type": "string"
            },
            "ward": {
             "type": "string"
            },
            "ward_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            },
            "full_address": {
             "type": "string"
            },
            "converted_from": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "change": {
               "type": "string"
              },
              "district": {
               "type": "string"
              },
              "district_code": {
               "type": "string"
              },
              "province": {
               "type": "string"
              },
              "province_code": {
               "type": "string"
              }
             }
            }
           }
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "sku": {},
             "name": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "size": {
              "type": "string"
             },
             "color": {},
             "unit_price": {},
             "line_total": {},
             "matched": {
              "type": "string"
             },
             "confidence": {
              "type": "number"
             }
            }
           }
          },
          "total": {},
          "payment": {
           "type": "string"
          },
          "notes": {
           "type": "array"
          },
          "confidence": {
           "type": "object",
           "properties": {
            "phone": {
             "type": "number"
            },
            "payment": {
             "type": "number"
            },
            "address": {
             "type": "number"
            },
            "items": {
             "type": "number"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Order Extractor (chat / comments)",
    "description": "Send the text of a Facebook / Zalo / livestream comment or chat message and get a structured order: the customer phone (normalised, E.164, network), name (after \"tên:\", \"người nhận\", or a title such as chị / anh), the delivery address resolved to the current ward and province by the same engine as /v1/address-parse (old 3-level addresses are converted to the post-07/2025 units), the items with quantity, size and colour, the payment method (COD, bank transfer, already paid) and delivery notes (\"giao giờ hành chính\", \"gọi trước\").\n\nWithout a catalog the API reads product codes (A12 x2, MS05 sl 3, #23) and free text (\"2 áo đen size M\"). With `catalog` (`[{\"sku\", \"name\", \"aliases\"?, \"price\"?}]`, up to 500) it matches SKUs, names and aliases (accents and case ignored, partial names allowed) and computes line totals. Every field carries a `confidence`; `is_order` tells whether the message looks like an order.\n\nRule-based, no AI model and no storage: results are fast and predictable, but messy text can be misread, so keep a human check for low-confidence fields. Normalise teencode first with /v1/vn-teencode for very informal messages. Batch up to 100 messages with `messages`.\n\nDocs: https://apibox.io.vn/docs/vn-order-extract/",
    "operationId": "vnOrderExtractPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-order-extract/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The message or comment (max 3,000 characters). Or `messages`: array of up to 100."
         },
         "catalog": {
          "type": "array",
          "items": {},
          "description": "Your products `[{\"sku\", \"name\", \"aliases\"?: [...], \"price\"?}]` (max 500) for SKU / name matching and totals."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "chốt 2 áo đen size M + 1 quần L, ship 12 Lê Lợi P. Bến Thành, Q1, TPHCM, 0909 123 456, COD"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "is_order": {
           "type": "boolean"
          },
          "customer": {
           "type": "object",
           "properties": {
            "name": {},
            "phone": {
             "type": "object",
             "properties": {
              "number": {
               "type": "string"
              },
              "e164": {
               "type": "string"
              },
              "network": {
               "type": "string"
              },
              "type": {
               "type": "string"
              }
             }
            },
            "other_phones": {
             "type": "array"
            }
           }
          },
          "address": {
           "type": "object",
           "properties": {
            "text": {
             "type": "string"
            },
            "matched": {
             "type": "boolean"
            },
            "ambiguous": {
             "type": "boolean"
            },
            "format": {
             "type": "string"
            },
            "ward": {
             "type": "string"
            },
            "ward_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            },
            "full_address": {
             "type": "string"
            },
            "converted_from": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "change": {
               "type": "string"
              },
              "district": {
               "type": "string"
              },
              "district_code": {
               "type": "string"
              },
              "province": {
               "type": "string"
              },
              "province_code": {
               "type": "string"
              }
             }
            }
           }
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "sku": {},
             "name": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "size": {
              "type": "string"
             },
             "color": {},
             "unit_price": {},
             "line_total": {},
             "matched": {
              "type": "string"
             },
             "confidence": {
              "type": "number"
             }
            }
           }
          },
          "total": {},
          "payment": {
           "type": "string"
          },
          "notes": {
           "type": "array"
          },
          "confidence": {
           "type": "object",
           "properties": {
            "phone": {
             "type": "number"
            },
            "payment": {
             "type": "number"
            },
            "address": {
             "type": "number"
            },
            "items": {
             "type": "number"
            }
           }
          }
         }
        },
        "example": {
         "is_order": true,
         "customer": {
          "name": null,
          "phone": {
           "number": "0909123456",
           "e164": "+84909123456",
           "network": "MobiFone",
           "type": "mobile"
          },
          "other_phones": []
         },
         "address": {
          "text": "12 Lê Lợi P. Bến Thành, Q1, TPHCM",
          "matched": true,
          "ambiguous": false,
          "format": "old (before 07/2025)",
          "ward": "Phường Bến Thành",
          "ward_code": "26743",
          "province": "Thành phố Hồ Chí Minh",
          "province_code": "79",
          "postal_code": "71009",
          "full_address": "12 Lê Lợi, Phường Bến Thành, Thành phố Hồ Chí Minh",
          "converted_from": {
           "code": "26743",
           "name": "Phường Bến Thành",
           "change": "Nhập toàn bộ",
           "district": "Quận 1",
           "district_code": "760",
           "province": "Thành phố Hồ Chí Minh",
           "province_code": "79"
          }
         },
         "items": [
          {
           "sku": null,
           "name": "áo đen",
           "text": "2 áo đen size M",
           "quantity": 2,
           "size": "M",
           "color": "đen",
           "unit_price": null,
           "line_total": null,
           "matched": "free_text",
           "confidence": 0.45
          },
          {
           "sku": null,
           "name": "quần",
           "text": "1 quần L",
           "quantity": 1,
           "size": "L",
           "color": null,
           "unit_price": null,
           "line_total": null,
           "matched": "free_text",
           "confidence": 0.45
          }
         ],
         "total": null,
         "payment": "cod",
         "notes": [],
         "confidence": {
          "phone": 0.95,
          "payment": 0.85,
          "address": 0.9,
          "items": 0.45
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-bank-statement": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Bank Statement Normaliser (Vietnam)",
    "description": "Upload the statement (sao kê) exported from internet banking as XLSX or CSV, or send its rows as JSON. The API finds the header row among the bank's title lines, recognises the columns in Vietnamese or English (ngày giao dịch, số tham chiếu, ghi nợ / ghi có or a signed amount, số dư, nội dung / diễn giải, đối ứng…), detects the bank and the account number from the title, and returns every transaction in one schema: date, debit, credit, signed amount, balance, description, reference, counterparty and the order code found with `prefix` / `pattern`. Total and opening / closing balance rows are recognised and skipped.\n\nThe running balance is checked in both export orders (oldest or newest first): each balance must equal the previous one plus the credit minus the debit; mismatching rows are listed, as well as the opening and closing balances. Send `expected` (`[{\"code\", \"amount\"}]`, up to 5,000) to reconcile: each credit is matched by code, then by a unique amount, and the answer lists matched, under- / over-paid and missing payments, plus credits that match nothing.\n\nOld binary .xls files and PDF statements are not read (save as .xlsx or CSV; /v1/pdf-text extracts text from PDFs). Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/vn-bank-statement/",
    "operationId": "vnBankStatementPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bank-statement/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "expected": {
          "type": "array",
          "items": {},
          "description": "Payments to reconcile `[{\"code\", \"amount\", \"id\"?}]` (max 5,000)."
         },
         "prefix": {
          "type": "string",
          "description": "Order code prefix to extract from descriptions (e.g. `DH`), or `pattern` (regex)."
         },
         "sheet": {
          "type": "string",
          "description": "Sheet name in a workbook (default: the first visible sheet)."
         },
         "bank": {
          "type": "string",
          "description": "Bank code or name when the file does not show it."
         },
         "limit": {
          "type": "number",
          "default": 10000,
          "description": "Maximum transactions returned (totals and checks use all rows)."
         }
        }
       },
       "example": {
        "csv": "Ngày giao dịch,Số tham chiếu,Nội dung,Ghi nợ,Ghi có,Số dư\n10/11/2026,FT001,CT DEN DH1001 NGUYEN VAN A,,\"500,000\",\"10,500,000\"\n10/11/2026,FT002,Phi SMS,\"11,000\",,\"10,489,000\"\n11/11/2026,FT003,DH1002 TRAN THI B,,\"1,200,000\",\"11,689,000\"",
        "prefix": "DH",
        "expected": [
         {
          "code": "DH1001",
          "amount": 500000
         },
         {
          "code": "DH1002",
          "amount": 1250000
         },
         {
          "code": "DH1003",
          "amount": 99000
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The statement: .xlsx or .csv (multipart `file`, raw body or `file_base64`). Or `csv` text, or `rows` (array of objects / arrays)."
         },
         "expected": {
          "type": "array",
          "items": {},
          "description": "Payments to reconcile `[{\"code\", \"amount\", \"id\"?}]` (max 5,000)."
         },
         "prefix": {
          "type": "string",
          "description": "Order code prefix to extract from descriptions (e.g. `DH`), or `pattern` (regex)."
         },
         "sheet": {
          "type": "string",
          "description": "Sheet name in a workbook (default: the first visible sheet)."
         },
         "bank": {
          "type": "string",
          "description": "Bank code or name when the file does not show it."
         },
         "limit": {
          "type": "number",
          "default": 10000,
          "description": "Maximum transactions returned (totals and checks use all rows)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "sheet": {},
          "bank": {},
          "account": {},
          "header_row": {
           "type": "number"
          },
          "columns": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "reference": {
             "type": "string"
            },
            "description": {
             "type": "string"
            },
            "debit": {
             "type": "string"
            },
            "credit": {
             "type": "string"
            },
            "balance": {
             "type": "string"
            }
           }
          },
          "count": {
           "type": "number"
          },
          "period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "debit": {
             "type": "number"
            },
            "credit": {
             "type": "number"
            },
            "net": {
             "type": "number"
            }
           }
          },
          "balance_check": {
           "type": "object",
           "properties": {
            "order": {
             "type": "string"
            },
            "ok": {
             "type": "boolean"
            },
            "rows_with_balance": {
             "type": "number"
            },
            "opening_balance": {
             "type": "number"
            },
            "closing_balance": {
             "type": "number"
            },
            "errors": {
             "type": "array"
            }
           }
          },
          "reconciliation": {
           "type": "object",
           "properties": {
            "matched": {
             "type": "number"
            },
            "amount_mismatch": {
             "type": "number"
            },
            "missing": {
             "type": "number"
            },
            "matches": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "missing_payments": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "unexpected_credits": {
             "type": "array"
            }
           }
          },
          "transactions": {
           "type": "array",
           "items": {}
          },
          "truncated": {
           "type": "boolean"
          },
          "skipped_rows": {
           "type": "array"
          },
          "privacy": {
           "type": "string"
          }
         }
        },
        "example": {
         "source": "csv",
         "sheet": null,
         "bank": null,
         "account": null,
         "header_row": 1,
         "columns": {
          "date": "Ngày giao dịch",
          "reference": "Số tham chiếu",
          "description": "Nội dung",
          "debit": "Ghi nợ",
          "credit": "Ghi có",
          "balance": "Số dư"
         },
         "count": 3,
         "period": {
          "from": "2026-11-10",
          "to": "2026-11-11"
         },
         "totals": {
          "debit": 11000,
          "credit": 1700000,
          "net": 1689000
         },
         "balance_check": {
          "order": "ascending",
          "ok": true,
          "rows_with_balance": 3,
          "opening_balance": 10000000,
          "closing_balance": 11689000,
          "errors": []
         },
         "reconciliation": {
          "matched": 1,
          "amount_mismatch": 1,
          "missing": 1,
          "matches": [
           {
            "row": 2,
            "date": "2026-11-10",
            "amount": 500000,
            "description": "CT DEN DH1001 NGUYEN VAN A",
            "id": "DH1001",
            "code": "DH1001",
            "expected_amount": 500000,
            "matched_by": "code",
            "status": "matched",
            "difference": 0
           },
           {
            "row": 4,
            "date": "2026-11-11",
            "amount": 1200000,
            "description": "DH1002 TRAN THI B",
            "id": "DH1002",
            "code": "DH1002",
            "expected_amount": 1250000,
            "matched_by": "code",
            "status": "underpaid",
            "difference": -50000
           }
          ],
          "missing_payments": [
           {
            "id": "DH1003",
            "code": "DH1003",
            "amount": 99000
           }
          ],
          "unexpected_credits": []
         },
         "transactions": [
          {
           "row": 2,
           "date": "2026-11-10",
           "datetime": null,
           "value_date": null,
           "debit": 0,
           "credit": 500000,
           "amount": 500000,
           "balance": 10500000,
           "description": "CT DEN DH1001 NGUYEN VAN A",
           "reference": "FT001",
           "counterparty": null,
           "counterparty_account": null,
           "counterparty_bank": null,
           "order_code": "DH1001"
          },
          "…"
         ],
         "truncated": false,
         "skipped_rows": [],
         "privacy": "Processed in memory, not stored or logged."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-pii-redact": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "PII Redaction (Vietnam)",
    "description": "Send a text (support ticket, chat log, contract excerpt, data for an LLM) and get every piece of personal data with its type, position, confidence and reason, plus the redacted text. Detected: e-mail, Vietnamese phone numbers, CCCD (12 digits with a valid province and century code), 9-digit CMND, tax codes (MST, check digit verified), bank account numbers (after STK / tài khoản / a bank name), payment cards (Luhn and card prefix), BHXH and BHYT codes, passport numbers, vehicle plates, dates of birth (after \"ngày sinh\"), IPv4 addresses, person names (after a title such as anh / chị / ông / bà / \"họ tên\", or capitalised words starting with a Vietnamese family name) and addresses (after \"địa chỉ\" / \"thường trú\" or a street address resolved by /v1/address-parse). URLs on request.\n\nModes: `mask` (keep a few characters: 090* * 456, *******3456, N. V. A.), `label` ([PHONE_1], the same value keeps the same number), `remove`, `hash` (HMAC-SHA256 with your `key`, stable tokens for joining data sets) and `pseudonym` (realistic fake values of the same shape, stable for a value and key), or `detect` to only list the spans. Choose types with `types` and the threshold with `min_confidence`.\n\nBuilt for the Personal Data Protection Law 91/2025/QH15 (in force 1 January 2026) and Decree 356/2025/NĐ-CP: `sensitive` marks financial and health identifiers. It is a detection aid, not a compliance guarantee: names and addresses written unusually can be missed. Nothing is stored or logged.\n\nDocs: https://apibox.io.vn/docs/vn-pii-redact/",
    "operationId": "vnPiiRedactGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pii-redact/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The text to scan (max 100,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`mask`, `label`, `remove`, `hash`, `pseudonym` or `detect` (spans only).",
      "schema": {
       "type": "string",
       "default": "mask"
      }
     },
     {
      "name": "types",
      "in": "query",
      "required": false,
      "description": "Comma-separated: email, phone, cccd, cmnd, tax_code, bank_account, card, bhxh, bhyt, passport, plate, dob, ip, person, address, url (default: all but url).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_confidence",
      "in": "query",
      "required": false,
      "description": "Ignore detections below this confidence (0–1).",
      "schema": {
       "type": "number",
       "default": 0.5
      }
     },
     {
      "name": "mask_char",
      "in": "query",
      "required": false,
      "description": "Character used by `mask`.",
      "schema": {
       "type": "string",
       "default": "*"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "redacted": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "by_type": {
           "type": "object",
           "properties": {
            "person": {
             "type": "number"
            },
            "cccd": {
             "type": "number"
            },
            "phone": {
             "type": "number"
            },
            "email": {
             "type": "number"
            },
            "bank_account": {
             "type": "number"
            }
           }
          },
          "contains_sensitive": {
           "type": "boolean"
          },
          "entities": {
           "type": "array",
           "items": {}
          },
          "legal_basis": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "PII Redaction (Vietnam)",
    "description": "Send a text (support ticket, chat log, contract excerpt, data for an LLM) and get every piece of personal data with its type, position, confidence and reason, plus the redacted text. Detected: e-mail, Vietnamese phone numbers, CCCD (12 digits with a valid province and century code), 9-digit CMND, tax codes (MST, check digit verified), bank account numbers (after STK / tài khoản / a bank name), payment cards (Luhn and card prefix), BHXH and BHYT codes, passport numbers, vehicle plates, dates of birth (after \"ngày sinh\"), IPv4 addresses, person names (after a title such as anh / chị / ông / bà / \"họ tên\", or capitalised words starting with a Vietnamese family name) and addresses (after \"địa chỉ\" / \"thường trú\" or a street address resolved by /v1/address-parse). URLs on request.\n\nModes: `mask` (keep a few characters: 090* * 456, *******3456, N. V. A.), `label` ([PHONE_1], the same value keeps the same number), `remove`, `hash` (HMAC-SHA256 with your `key`, stable tokens for joining data sets) and `pseudonym` (realistic fake values of the same shape, stable for a value and key), or `detect` to only list the spans. Choose types with `types` and the threshold with `min_confidence`.\n\nBuilt for the Personal Data Protection Law 91/2025/QH15 (in force 1 January 2026) and Decree 356/2025/NĐ-CP: `sensitive` marks financial and health identifiers. It is a detection aid, not a compliance guarantee: names and addresses written unusually can be missed. Nothing is stored or logged.\n\nDocs: https://apibox.io.vn/docs/vn-pii-redact/",
    "operationId": "vnPiiRedactPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pii-redact/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The text to scan (max 100,000 characters)."
         },
         "mode": {
          "type": "string",
          "default": "mask",
          "description": "`mask`, `label`, `remove`, `hash`, `pseudonym` or `detect` (spans only)."
         },
         "types": {
          "type": "string",
          "description": "Comma-separated: email, phone, cccd, cmnd, tax_code, bank_account, card, bhxh, bhyt, passport, plate, dob, ip, person, address, url (default: all but url)."
         },
         "key": {
          "type": "string",
          "description": "Secret (8+ characters) for `hash` / `pseudonym`: HMAC-SHA256, stable per key."
         },
         "min_confidence": {
          "type": "number",
          "default": 0.5,
          "description": "Ignore detections below this confidence (0–1)."
         },
         "mask_char": {
          "type": "string",
          "default": "*",
          "description": "Character used by `mask`."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Khách hàng Nguyễn Văn An, CCCD 079203001234, SĐT 0909 123 456, email an.nguyen@gmail.com, STK VCB 0071000123456.",
        "mode": "mask"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "redacted": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "by_type": {
           "type": "object",
           "properties": {
            "person": {
             "type": "number"
            },
            "cccd": {
             "type": "number"
            },
            "phone": {
             "type": "number"
            },
            "email": {
             "type": "number"
            },
            "bank_account": {
             "type": "number"
            }
           }
          },
          "contains_sensitive": {
           "type": "boolean"
          },
          "entities": {
           "type": "array",
           "items": {}
          },
          "legal_basis": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "redacted": "Khách hàng N. V. A., CCCD *********234, SĐT 090* *** 456, email a********@gmail.com, STK VCB *********3456.",
         "mode": "mask",
         "count": 5,
         "by_type": {
          "person": 1,
          "cccd": 1,
          "phone": 1,
          "email": 1,
          "bank_account": 1
         },
         "contains_sensitive": true,
         "entities": [
          {
           "type": "person",
           "text": "Nguyễn Văn An",
           "start": 11,
           "end": 24,
           "confidence": 0.9,
           "sensitive": false,
           "reason": "name after a title or \"tên\"",
           "replacement": "N. V. A."
          },
          {
           "type": "cccd",
           "text": "079203001234",
           "start": 31,
           "end": 43,
           "confidence": 0.98,
           "sensitive": false,
           "reason": "CCCD number (valid province and century codes)",
           "replacement": "*********234"
          },
          {
           "type": "phone",
           "text": "0909 123 456",
           "start": 49,
           "end": 61,
           "confidence": 0.95,
           "sensitive": false,
           "reason": "mobile number (MobiFone)",
           "replacement": "090* *** 456"
          },
          "…"
         ],
         "legal_basis": "Luật Bảo vệ dữ liệu cá nhân 91/2025/QH15 (hiệu lực 01/01/2026), NĐ 356/2025/NĐ-CP",
         "reviewed": "2026-11-11",
         "disclaimer": "Detection aid based on patterns, checksums and context words: names and addresses can be missed or over-matched. It does not by itself make processing compliant."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-teencode": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Teencode Normaliser",
    "description": "Send informal Vietnamese text (\"ko dc j ạ, shop ơiiii, sp nàyyy bn z\") and get standard Vietnamese (\"không được gì ạ, shop ơi, sản phẩm này bao nhiêu vậy\") with the list of changes and their positions. A curated dictionary of about 270 abbreviations covers chat and shopping language (ko / k / hok → không, dc / đc → được, j → gì, z / dz → vậy, ntn → như thế nào, iu → yêu, sp → sản phẩm, sđt → số điện thoại, ck → chuyển khoản…). Ambiguous short forms are only replaced in a clear context: \"k\" after a number stays (50 k), \"bn\" becomes \"bao nhiêu\" before tiền / tuổi or at the end of a question and \"bạn\" otherwise, \"ck\" is \"chuyển khoản\" next to rồi / trước / stk and \"chồng\" next to vk.\n\nLetters repeated three times or more are squeezed (ơiiii → ơi), a doubled final letter only when the result is a real syllable, and the Telex leftover \"dd\" becomes \"đ\" (ddi → đi). Case is kept (KO → KHÔNG, Ko → Không). Emojis can be kept, removed or turned into labels ([cười], [đồng ý]). Add your own abbreviations with `dictionary`; batch up to 200 texts with `texts`.\n\nUseful before search, classification, profanity filtering or order extraction. The text gets no new accents: run /v1/vn-diacritics on text typed without accents.\n\nDocs: https://apibox.io.vn/docs/vn-teencode/",
    "operationId": "vnTeencodeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-teencode/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The text (max 20,000 characters). Or `texts`: array of up to 200.",
      "schema": {
       "type": "string"
      },
      "example": "ko dc j ạ, shop ơiiii, sp nàyyy bn z"
     },
     {
      "name": "emoji",
      "in": "query",
      "required": false,
      "description": "`keep`, `label` ([cười], [đồng ý]…) or `remove`.",
      "schema": {
       "type": "string",
       "default": "keep"
      }
     },
     {
      "name": "squeeze",
      "in": "query",
      "required": false,
      "description": "Squeeze repeated letters (ơiiii → ơi).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "telex",
      "in": "query",
      "required": false,
      "description": "Fix the Telex leftover dd → đ at the start of a word.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "text": {
           "type": "string"
          },
          "changes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             },
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "emojis": {
           "type": "number"
          },
          "dictionary_size": {
           "type": "number"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "ko dc j ạ, shop ơiiii, sp nàyyy bn z",
         "text": "không được gì ạ, shop ơi, sản phẩm này bao nhiêu vậy",
         "changes": [
          {
           "from": "ko",
           "to": "không",
           "start": 0,
           "end": 2,
           "rule": "abbreviation"
          },
          {
           "from": "dc",
           "to": "được",
           "start": 3,
           "end": 5,
           "rule": "abbreviation"
          },
          {
           "from": "j",
           "to": "gì",
           "start": 6,
           "end": 7,
           "rule": "abbreviation"
          },
          {
           "from": "ơiiii",
           "to": "ơi",
           "start": 16,
           "end": 21,
           "rule": "repeated letters"
          },
          {
           "from": "sp",
           "to": "sản phẩm",
           "start": 23,
           "end": 25,
           "rule": "abbreviation (context)"
          },
          {
           "from": "nàyyy",
           "to": "này",
           "start": 26,
           "end": 31,
           "rule": "repeated letters"
          },
          {
           "from": "bn",
           "to": "bao nhiêu",
           "start": 32,
           "end": 34,
           "rule": "abbreviation (context)"
          },
          {
           "from": "z",
           "to": "vậy",
           "start": 35,
           "end": 36,
           "rule": "abbreviation"
          }
         ],
         "count": 8,
         "emojis": 0,
         "dictionary_size": 273,
         "note": "Rule-based: ambiguous short forms (k, v, bn, ck, s, h…) are replaced only in clear contexts. Add diacritics with /v1/vn-diacritics if the text has none."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Teencode Normaliser",
    "description": "Send informal Vietnamese text (\"ko dc j ạ, shop ơiiii, sp nàyyy bn z\") and get standard Vietnamese (\"không được gì ạ, shop ơi, sản phẩm này bao nhiêu vậy\") with the list of changes and their positions. A curated dictionary of about 270 abbreviations covers chat and shopping language (ko / k / hok → không, dc / đc → được, j → gì, z / dz → vậy, ntn → như thế nào, iu → yêu, sp → sản phẩm, sđt → số điện thoại, ck → chuyển khoản…). Ambiguous short forms are only replaced in a clear context: \"k\" after a number stays (50 k), \"bn\" becomes \"bao nhiêu\" before tiền / tuổi or at the end of a question and \"bạn\" otherwise, \"ck\" is \"chuyển khoản\" next to rồi / trước / stk and \"chồng\" next to vk.\n\nLetters repeated three times or more are squeezed (ơiiii → ơi), a doubled final letter only when the result is a real syllable, and the Telex leftover \"dd\" becomes \"đ\" (ddi → đi). Case is kept (KO → KHÔNG, Ko → Không). Emojis can be kept, removed or turned into labels ([cười], [đồng ý]). Add your own abbreviations with `dictionary`; batch up to 200 texts with `texts`.\n\nUseful before search, classification, profanity filtering or order extraction. The text gets no new accents: run /v1/vn-diacritics on text typed without accents.\n\nDocs: https://apibox.io.vn/docs/vn-teencode/",
    "operationId": "vnTeencodePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-teencode/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The text (max 20,000 characters). Or `texts`: array of up to 200."
         },
         "emoji": {
          "type": "string",
          "default": "keep",
          "description": "`keep`, `label` ([cười], [đồng ý]…) or `remove`."
         },
         "dictionary": {
          "type": "object",
          "description": "Your own abbreviations `{\"abbr\": \"replacement\"}` (max 500), applied first."
         },
         "squeeze": {
          "type": "boolean",
          "default": true,
          "description": "Squeeze repeated letters (ơiiii → ơi)."
         },
         "telex": {
          "type": "boolean",
          "default": true,
          "description": "Fix the Telex leftover dd → đ at the start of a word."
         }
        },
        "required": [
         "text"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "text": {
           "type": "string"
          },
          "changes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             },
             "start": {
              "type": "number"
             },
             "end": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "emojis": {
           "type": "number"
          },
          "dictionary_size": {
           "type": "number"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-ad-check": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Ad Wording Checker (Vietnam)",
    "description": "Paste a product title, description, ad copy or livestream script and get every risky phrase with its position, category, severity, the legal reference and a suggested rewording. Categories: absolute claims banned without legal proof by the Advertising Law (Luật Quảng cáo 16/2012/QH13, Article 8.11: \"nhất\", \"duy nhất\", \"tốt nhất\", \"số một\", plus any other \"<word> nhất\"), comparisons with competitors without proof (Article 8.10 as amended by Law 75/2025/QH15, in force 1 January 2026), disease-cure and drug-like claims for food, health supplements and cosmetics, guaranteed results, misleading prices, products banned from advertising (tobacco, e-cigarettes, strong alcohol, breast-milk substitutes for under 24 months), counterfeit cues (fake 1:1, rep, like auth) and off-platform contact or payment that marketplaces forbid.\n\nSet `product_type` (food, supplement, cosmetic, drug, medical_device, medical_service, milk_infant, alcohol…) to adjust severities and list the documents the law requires (cosmetic notification receipt, supplement advertising approval and the mandatory notice \"Thực phẩm này không phải là thuốc…\", checked in the text). Accents are optional (tot nhat matches). `marketplace=false` skips the platform rules; `allow` whitelists phrases you can prove.\n\nThe list is compiled by hand from the laws in force and public platform policies, with a review date in every answer. It flags risks: a flagged phrase can be lawful with supporting documents, and clean output is not legal clearance.\n\nDocs: https://apibox.io.vn/docs/vn-ad-check/",
    "operationId": "vnAdCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ad-check/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "Ad copy, listing or script (max 50,000 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "product_type",
      "in": "query",
      "required": false,
      "description": "general, food, supplement, cosmetic, drug, medical_device, medical_service, milk_infant, alcohol, finance.",
      "schema": {
       "type": "string",
       "default": "general"
      }
     },
     {
      "name": "marketplace",
      "in": "query",
      "required": false,
      "description": "Apply marketplace rules (off-platform contact / payment).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "allow",
      "in": "query",
      "required": false,
      "description": "Comma-separated phrases to ignore (you hold the proof).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "risk": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "categories": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "issues": {
           "type": "array",
           "items": {}
          },
          "requirements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "requirement": {
              "type": "string"
             },
             "legal_ref": {
              "type": "string"
             },
             "present": {
              "type": "boolean"
             }
            }
           }
          },
          "product_type": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "legal_basis": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Ad Wording Checker (Vietnam)",
    "description": "Paste a product title, description, ad copy or livestream script and get every risky phrase with its position, category, severity, the legal reference and a suggested rewording. Categories: absolute claims banned without legal proof by the Advertising Law (Luật Quảng cáo 16/2012/QH13, Article 8.11: \"nhất\", \"duy nhất\", \"tốt nhất\", \"số một\", plus any other \"<word> nhất\"), comparisons with competitors without proof (Article 8.10 as amended by Law 75/2025/QH15, in force 1 January 2026), disease-cure and drug-like claims for food, health supplements and cosmetics, guaranteed results, misleading prices, products banned from advertising (tobacco, e-cigarettes, strong alcohol, breast-milk substitutes for under 24 months), counterfeit cues (fake 1:1, rep, like auth) and off-platform contact or payment that marketplaces forbid.\n\nSet `product_type` (food, supplement, cosmetic, drug, medical_device, medical_service, milk_infant, alcohol…) to adjust severities and list the documents the law requires (cosmetic notification receipt, supplement advertising approval and the mandatory notice \"Thực phẩm này không phải là thuốc…\", checked in the text). Accents are optional (tot nhat matches). `marketplace=false` skips the platform rules; `allow` whitelists phrases you can prove.\n\nThe list is compiled by hand from the laws in force and public platform policies, with a review date in every answer. It flags risks: a flagged phrase can be lawful with supporting documents, and clean output is not legal clearance.\n\nDocs: https://apibox.io.vn/docs/vn-ad-check/",
    "operationId": "vnAdCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ad-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Ad copy, listing or script (max 50,000 characters)."
         },
         "product_type": {
          "type": "string",
          "default": "general",
          "description": "general, food, supplement, cosmetic, drug, medical_device, medical_service, milk_infant, alcohol, finance."
         },
         "marketplace": {
          "type": "boolean",
          "default": true,
          "description": "Apply marketplace rules (off-platform contact / payment)."
         },
         "allow": {
          "type": "string",
          "description": "Comma-separated phrases to ignore (you hold the proof)."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Viên uống trắng da số 1 Việt Nam, chữa khỏi nám sau 7 ngày, cam kết hiệu quả. Inbox zalo để có giá rẻ nhất!",
        "product_type": "supplement"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "risk": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "categories": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "issues": {
           "type": "array",
           "items": {}
          },
          "requirements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "requirement": {
              "type": "string"
             },
             "legal_ref": {
              "type": "string"
             },
             "present": {
              "type": "boolean"
             }
            }
           }
          },
          "product_type": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "legal_basis": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "risk": "high",
         "score": 100,
         "count": 5,
         "categories": [
          "absolute",
          "medical_claim",
          "guarantee",
          "off_platform",
          "misleading_price"
         ],
         "issues": [
          {
           "text": "số 1",
           "start": 19,
           "end": 23,
           "phrase": "số 1",
           "category": "absolute",
           "severity": "high",
           "legal_ref": "Luật Quảng cáo 16/2012/QH13, Điều 8 khoản 11",
           "suggestion": "Chỉ dùng khi có tài liệu hợp pháp chứng minh (kết quả khảo sát, giấy chứng nhận); nếu không, thay bằng mô tả cụ thể: \"được nhiều khách hàng tin dùng\", \"bán hơn 10.000 sản phẩm\""
          },
          {
           "text": "chữa khỏi",
           "start": 34,
           "end": 43,
           "phrase": "chữa khỏi",
           "category": "medical_claim",
           "severity": "high",
           "legal_ref": "Luật An toàn thực phẩm 55/2010/QH12; NĐ 15/2018/NĐ-CP (quảng cáo thực phẩm bảo vệ sức khỏe); Luật Quảng cáo, Điều 19 khoản 1 (sửa đổi bởi Luật 75/2025/QH15)",
           "suggestion": "Không gán công dụng phòng, chữa bệnh cho thực phẩm, thực phẩm bảo vệ sức khỏe, mỹ phẩm; với TPBVSK chỉ dùng nội dung đã được cấp giấy xác nhận quảng cáo, ví dụ \"hỗ trợ…\""
          },
          "…"
         ],
         "requirements": [
          {
           "requirement": "Câu khuyến cáo \"Thực phẩm này không phải là thuốc, không có tác dụng thay thế thuốc chữa bệnh\" và giấy xác nhận nội dung quảng cáo",
           "legal_ref": "Luật An toàn thực phẩm 55/2010/QH12; NĐ 15/2018/NĐ-CP (quảng cáo thực phẩm bảo vệ sức khỏe)",
           "present": false
          }
         ],
         "product_type": "supplement",
         "reviewed": "2026-11-11",
         "legal_basis": "Luật Quảng cáo 16/2012/QH13 sửa đổi bởi Luật 75/2025/QH15 (hiệu lực 01/01/2026); Luật An toàn thực phẩm và NĐ 15/2018/NĐ-CP; Luật Dược; chính sách công khai của các sàn",
         "disclaimer": "Risk hints from a curated word list, not legal advice: a flagged phrase can be lawful with supporting documents, and unlisted wording can still breach the rules."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-sort": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Sort & Collation",
    "description": "Send a list (`items`, or one item per line in `text`) and get it sorted in Vietnamese dictionary order: the letters a ă â b c d đ e ê g h i k l m n o ô ơ p q r s t u ư v x y, then the tones ngang < huyền < hỏi < ngã < sắc < nặng, then case: the same order as Vietnamese dictionaries and the CLDR \"vi\" collation, unlike the byte order of databases (where \"Đ\" sorts after \"Z\") or the long-standing glibc vi_VN bugs. Tones are compared per syllable, so \"hoà\" and \"hòa\" are equal; numbers sort naturally (item 9 before item 10); `ignore_tones` compares letters only; `case_sensitive`, `desc` and `unique` are available.\n\n`by=given_name` sorts personal names the way Vietnamese class and staff lists do (given name, then family name, then middle name: An before Bình whatever the family name); objects are sorted by a `field`. Other actions: `compare` (`a`, `b` → -1 / 0 / 1), `key` (a byte-sortable `sort_key` to store in a database column with binary collation, and an accent-free `search_key`), `group` (by first letter, Đ separate from D, for contact lists) and `normalize` (tone mark placement old / new style: hòa ↔ hoà, thúy ↔ thuý).\n\nUp to 10,000 items per request; pure computation, nothing stored.\n\nDocs: https://apibox.io.vn/docs/vn-sort/",
    "operationId": "vnSortGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sort/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`sort`, `compare` (with `a`, `b`), `key`, `group` or `normalize`.",
      "schema": {
       "type": "string",
       "default": "sort"
      }
     },
     {
      "name": "by",
      "in": "query",
      "required": false,
      "description": "`full`, `given_name` (Tên rồi Họ) or `family_name` for personal names.",
      "schema": {
       "type": "string",
       "default": "full"
      }
     },
     {
      "name": "ignore_tones",
      "in": "query",
      "required": false,
      "description": "Compare letters only (bá = ba).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "numeric",
      "in": "query",
      "required": false,
      "description": "Natural order of numbers (2 before 10).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "field",
      "in": "query",
      "required": false,
      "description": "Property to sort by when items are objects.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "desc",
      "in": "query",
      "required": false,
      "description": "Descending order. Also `case_sensitive`, `unique`; `tone_style` old / new for normalize.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "sorted": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "options": {
           "type": "object",
           "properties": {
            "tones": {
             "type": "boolean"
            },
            "caseSensitive": {
             "type": "boolean"
            },
            "numeric": {
             "type": "boolean"
            },
            "by": {
             "type": "string"
            }
           }
          },
          "collation": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Sort & Collation",
    "description": "Send a list (`items`, or one item per line in `text`) and get it sorted in Vietnamese dictionary order: the letters a ă â b c d đ e ê g h i k l m n o ô ơ p q r s t u ư v x y, then the tones ngang < huyền < hỏi < ngã < sắc < nặng, then case: the same order as Vietnamese dictionaries and the CLDR \"vi\" collation, unlike the byte order of databases (where \"Đ\" sorts after \"Z\") or the long-standing glibc vi_VN bugs. Tones are compared per syllable, so \"hoà\" and \"hòa\" are equal; numbers sort naturally (item 9 before item 10); `ignore_tones` compares letters only; `case_sensitive`, `desc` and `unique` are available.\n\n`by=given_name` sorts personal names the way Vietnamese class and staff lists do (given name, then family name, then middle name: An before Bình whatever the family name); objects are sorted by a `field`. Other actions: `compare` (`a`, `b` → -1 / 0 / 1), `key` (a byte-sortable `sort_key` to store in a database column with binary collation, and an accent-free `search_key`), `group` (by first letter, Đ separate from D, for contact lists) and `normalize` (tone mark placement old / new style: hòa ↔ hoà, thúy ↔ thuý).\n\nUp to 10,000 items per request; pure computation, nothing stored.\n\nDocs: https://apibox.io.vn/docs/vn-sort/",
    "operationId": "vnSortPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sort/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "Strings (or objects with `field`) to sort, max 10,000. Or `text`: one item per line."
         },
         "action": {
          "type": "string",
          "default": "sort",
          "description": "`sort`, `compare` (with `a`, `b`), `key`, `group` or `normalize`."
         },
         "by": {
          "type": "string",
          "default": "full",
          "description": "`full`, `given_name` (Tên rồi Họ) or `family_name` for personal names."
         },
         "ignore_tones": {
          "type": "boolean",
          "default": false,
          "description": "Compare letters only (bá = ba)."
         },
         "numeric": {
          "type": "boolean",
          "default": true,
          "description": "Natural order of numbers (2 before 10)."
         },
         "field": {
          "type": "string",
          "description": "Property to sort by when items are objects."
         },
         "desc": {
          "type": "boolean",
          "default": false,
          "description": "Descending order. Also `case_sensitive`, `unique`; `tone_style` old / new for normalize."
         }
        }
       },
       "example": {
        "items": [
         "Đức",
         "Dũng",
         "anh",
         "ăn",
         "An",
         "bà",
         "ba",
         "bá",
         "item 10",
         "item 9"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "sorted": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "options": {
           "type": "object",
           "properties": {
            "tones": {
             "type": "boolean"
            },
            "caseSensitive": {
             "type": "boolean"
            },
            "numeric": {
             "type": "boolean"
            },
            "by": {
             "type": "string"
            }
           }
          },
          "collation": {
           "type": "string"
          }
         }
        },
        "example": {
         "count": 10,
         "sorted": [
          "An",
          "anh",
          "ăn",
          "ba",
          "bà",
          "bá",
          "Dũng",
          "Đức",
          "item 9",
          "item 10"
         ],
         "options": {
          "tones": true,
          "caseSensitive": false,
          "numeric": true,
          "by": "full"
         },
         "collation": "Vietnamese alphabet a ă â b c d đ e ê g h i k l m n o ô ơ p q r s t u ư v x y; tones ngang < huyền < hỏi < ngã < sắc < nặng"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-hanviet": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Hán-Việt Reader",
    "description": "Send Chinese text (simplified or traditional, up to 1,000 characters) and get the Hán-Việt reading, the pinyin, the traditional and the simplified spelling, and the segments: each word with its reading, pinyin and English glosses. The text is segmented by longest match against about 7,600 Sino-Vietnamese words (愛國 → ái quốc, 銀行 → ngân hàng) and the 125,000 words of CC-CEDICT, so polyphonic characters take the reading of the word they belong to whenever it is known (行動 hành động, 銀行 ngân hàng); other characters take their main reading, and every reading of a single character is listed.\n\nReverse lookup: `reading=ái` lists the characters read \"ái\", main reading first (`ignore_tones=true` to match without tones). `details=true` adds every character with all its Hán-Việt and Hán-Nôm readings, pinyin and variants. Characters with no known reading are listed in `unknown_characters`.\n\nData: Hán-Việt readings from the Unicode Unihan database (kVietnamese, Unicode License) completed with Wiktionary (CC BY-SA 4.0); pinyin from Unihan and CC-CEDICT (CC BY-SA 4.0, mdbg.net); rebuilt weekly. The attribution is included in every answer. Readings are a study aid: classical texts sometimes use a reading other than the main one.\n\nDocs: https://apibox.io.vn/docs/vn-hanviet/",
    "operationId": "vnHanvietGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hanviet/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Chinese text, simplified or traditional (max 1,000 characters).",
      "schema": {
       "type": "string"
      },
      "example": "我爱越南"
     },
     {
      "name": "reading",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: a Hán-Việt syllable (e.g. `ái`); `ignore_tones=true` to match without tones, `limit` (default 100).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "details",
      "in": "query",
      "required": false,
      "description": "Add every character with all readings, pinyin and variants.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "words",
      "in": "query",
      "required": false,
      "description": "Use CC-CEDICT words for segmentation, pinyin and English glosses.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "text": {
           "type": "string"
          },
          "han_viet": {
           "type": "string"
          },
          "pinyin": {
           "type": "string"
          },
          "traditional": {
           "type": "string"
          },
          "simplified": {
           "type": "string"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "han_viet": {
              "type": "string"
             },
             "pinyin": {
              "type": "string"
             },
             "traditional": {
              "type": "string"
             },
             "simplified": {
              "type": "string"
             },
             "source": {
              "type": "string"
             },
             "english": {
              "type": "array"
             },
             "readings": {
              "type": "array"
             }
            }
           }
          },
          "unknown_characters": {
           "type": "array"
          },
          "note": {
           "type": "string"
          },
          "attribution": {
           "type": "object",
           "properties": {
            "sources": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "built_at": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "text": "我爱越南",
         "han_viet": "ngã ái việt nam",
         "pinyin": "wǒ ài yuè nán",
         "traditional": "我愛越南",
         "simplified": "我爱越南",
         "segments": [
          {
           "text": "我",
           "han_viet": "ngã",
           "pinyin": "wǒ",
           "traditional": "我",
           "simplified": "我",
           "source": "character",
           "english": [
            "I; me; my"
           ],
           "readings": [
            "ngã",
            "ngả"
           ]
          },
          {
           "text": "爱",
           "han_viet": "ái",
           "pinyin": "ài",
           "traditional": "愛",
           "simplified": "爱",
           "source": "traditional variant",
           "english": [
            "to love; to be fond of; to like",
            "affection",
            "to be inclined (to do sth); to tend to (happen)"
           ],
           "readings": [
            "ái"
           ]
          },
          {
           "text": "越南",
           "han_viet": "việt nam",
           "pinyin": "yuè nán",
           "traditional": "越南",
           "simplified": "越南",
           "source": "compound",
           "english": [
            "Vietnam"
           ]
          }
         ],
         "unknown_characters": [],
         "note": "Hán-Việt readings of whole words come from Sino-Vietnamese words in Wiktionary; other characters take their main reading, which may not fit the context.",
         "attribution": {
          "sources": [
           {
            "name": "Unicode Unihan database",
            "version": "18.0.0",
            "license": "Unicode License v3",
            "url": "https://www.unicode.org/charts/unihan.html"
           },
           {
            "name": "Wiktionary (Vietnamese entries, via wiktextract / kaikki.org)",
            "license": "CC BY-SA 4.0",
            "url": "https://en.wiktionary.org"
           },
           {
            "name": "CC-CEDICT",
            "version": "2026-11-10",
            "license": "CC BY-SA 4.0",
            "url": "https://www.mdbg.net/chinese/dictionary?page=cedict"
           }
          ],
          "built_at": "2026-11-11"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Hán-Việt Reader",
    "description": "Send Chinese text (simplified or traditional, up to 1,000 characters) and get the Hán-Việt reading, the pinyin, the traditional and the simplified spelling, and the segments: each word with its reading, pinyin and English glosses. The text is segmented by longest match against about 7,600 Sino-Vietnamese words (愛國 → ái quốc, 銀行 → ngân hàng) and the 125,000 words of CC-CEDICT, so polyphonic characters take the reading of the word they belong to whenever it is known (行動 hành động, 銀行 ngân hàng); other characters take their main reading, and every reading of a single character is listed.\n\nReverse lookup: `reading=ái` lists the characters read \"ái\", main reading first (`ignore_tones=true` to match without tones). `details=true` adds every character with all its Hán-Việt and Hán-Nôm readings, pinyin and variants. Characters with no known reading are listed in `unknown_characters`.\n\nData: Hán-Việt readings from the Unicode Unihan database (kVietnamese, Unicode License) completed with Wiktionary (CC BY-SA 4.0); pinyin from Unihan and CC-CEDICT (CC BY-SA 4.0, mdbg.net); rebuilt weekly. The attribution is included in every answer. Readings are a study aid: classical texts sometimes use a reading other than the main one.\n\nDocs: https://apibox.io.vn/docs/vn-hanviet/",
    "operationId": "vnHanvietPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hanviet/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Chinese text, simplified or traditional (max 1,000 characters)."
         },
         "reading": {
          "type": "string",
          "description": "Reverse lookup: a Hán-Việt syllable (e.g. `ái`); `ignore_tones=true` to match without tones, `limit` (default 100)."
         },
         "details": {
          "type": "boolean",
          "default": false,
          "description": "Add every character with all readings, pinyin and variants."
         },
         "words": {
          "type": "boolean",
          "default": true,
          "description": "Use CC-CEDICT words for segmentation, pinyin and English glosses."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "text": {
           "type": "string"
          },
          "han_viet": {
           "type": "string"
          },
          "pinyin": {
           "type": "string"
          },
          "traditional": {
           "type": "string"
          },
          "simplified": {
           "type": "string"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "han_viet": {
              "type": "string"
             },
             "pinyin": {
              "type": "string"
             },
             "traditional": {
              "type": "string"
             },
             "simplified": {
              "type": "string"
             },
             "source": {
              "type": "string"
             },
             "english": {
              "type": "array"
             },
             "readings": {
              "type": "array"
             }
            }
           }
          },
          "unknown_characters": {
           "type": "array"
          },
          "note": {
           "type": "string"
          },
          "attribution": {
           "type": "object",
           "properties": {
            "sources": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "built_at": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/tracking-detect": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Tracking Number Carrier Detector",
    "description": "Send a tracking number (mã vận đơn) and get the likely carrier with a confidence, the official tracking page and, when the carrier supports it, a direct tracking link. Vietnamese carriers: VNPost / EMS (UPU S10 codes ending in VN, check digit verified), SPX Express (SPXVN…), Giao Hàng Tiết Kiệm (S…route codes), Ninja Van, Lazada Logistics, Viettel Post, Giao Hàng Nhanh, J&T Express (12 digits starting with 8), BEST Express and Ahamove. International: UPS (1Z…, check digit), FedEx (12, 15, 18, 22, 32 and 34 digits with their check digits), USPS (IMpb and 20-digit codes), DHL Express (mod 7), DHL eCommerce and UPU S10 codes of other postal operators (with the country of origin and service type).\n\nSeveral carriers use plain digit codes of similar length, so the answer lists every `candidate` sorted by confidence and sets `ambiguous` when more than one is plausible; a failed check digit lowers the confidence to 0.1. Batch up to 100 numbers with `numbers`. The international formats and check digits follow the open tracking_number_data project (MIT).\n\nDetection only: no carrier API is called, so the shipment status is not returned.\n\nDocs: https://apibox.io.vn/docs/tracking-detect/",
    "operationId": "trackingDetectGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/tracking-detect/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "query",
      "required": true,
      "description": "The tracking number (spaces and dashes ignored, max 60 characters). Or `numbers`: array of up to 100.",
      "schema": {
       "type": "string"
      },
      "example": "EB123456785VN"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "valid_format": {
           "type": "boolean"
          },
          "carrier": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "confidence": {
             "type": "number"
            },
            "check_digit": {
             "type": "boolean"
            },
            "tracking_page": {
             "type": "string"
            },
            "tracking_url": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "service": {
             "type": "string"
            },
            "origin_country": {
             "type": "string"
            }
           }
          },
          "candidates": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "ambiguous": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "EB123456785VN",
         "normalized": "EB123456785VN",
         "valid_format": true,
         "carrier": {
          "id": "vnpost",
          "name": "VNPost / EMS Việt Nam",
          "country": "VN",
          "confidence": 0.97,
          "check_digit": true,
          "tracking_page": "https://www.vnpost.vn/tra-cuu-hanh-trinh/buu-pham",
          "tracking_url": "https://www.vnpost.vn/tra-cuu-hanh-trinh/buu-pham?key=EB123456785VN",
          "note": "UPU S10 code issued in Vietnam (check digit verified)",
          "service": "EMS (express)",
          "origin_country": "VN"
         },
         "candidates": [
          "…"
         ],
         "ambiguous": false,
         "note": "Detection from the format only: no carrier API is called, so the shipment status is not known."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Tracking Number Carrier Detector",
    "description": "Send a tracking number (mã vận đơn) and get the likely carrier with a confidence, the official tracking page and, when the carrier supports it, a direct tracking link. Vietnamese carriers: VNPost / EMS (UPU S10 codes ending in VN, check digit verified), SPX Express (SPXVN…), Giao Hàng Tiết Kiệm (S…route codes), Ninja Van, Lazada Logistics, Viettel Post, Giao Hàng Nhanh, J&T Express (12 digits starting with 8), BEST Express and Ahamove. International: UPS (1Z…, check digit), FedEx (12, 15, 18, 22, 32 and 34 digits with their check digits), USPS (IMpb and 20-digit codes), DHL Express (mod 7), DHL eCommerce and UPU S10 codes of other postal operators (with the country of origin and service type).\n\nSeveral carriers use plain digit codes of similar length, so the answer lists every `candidate` sorted by confidence and sets `ambiguous` when more than one is plausible; a failed check digit lowers the confidence to 0.1. Batch up to 100 numbers with `numbers`. The international formats and check digits follow the open tracking_number_data project (MIT).\n\nDetection only: no carrier API is called, so the shipment status is not returned.\n\nDocs: https://apibox.io.vn/docs/tracking-detect/",
    "operationId": "trackingDetectPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/tracking-detect/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "number": {
          "type": "string",
          "description": "The tracking number (spaces and dashes ignored, max 60 characters). Or `numbers`: array of up to 100."
         }
        },
        "required": [
         "number"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "valid_format": {
           "type": "boolean"
          },
          "carrier": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "confidence": {
             "type": "number"
            },
            "check_digit": {
             "type": "boolean"
            },
            "tracking_page": {
             "type": "string"
            },
            "tracking_url": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "service": {
             "type": "string"
            },
            "origin_country": {
             "type": "string"
            }
           }
          },
          "candidates": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "ambiguous": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-quiz-parse": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Vietnamese quiz parser",
    "description": "Send an exam as a Word file (.docx) or plain text written the usual Vietnamese way: questions start with `Câu 1.` / `Câu 1:` (or `1.` when no \"Câu\" is used), options with `A.` `B.` … on separate lines or on one line separated by tabs, and true-false statements with `a)` `b)` …. The parser follows the 2025 THPT exam structure: `PHẦN I` multiple choice, `PHẦN II` true / false statements, `PHẦN III` short answers, and keeps reading passages (\"Đọc đoạn văn sau và trả lời câu hỏi từ 4 đến 5\") as groups.\n\nThe correct answer is found the way teachers mark it: an underlined option letter, red or highlighted text, a bold letter when the others are not, a `*` before the letter, an `Đáp án: B` line under the question, or an answer table at the end (`BẢNG ĐÁP ÁN`, `1.B 2.C …`, a table of numbers and letters, `ĐSĐS` for true-false). Explanations (`Lời giải:`, `Hướng dẫn giải:`) are kept. Images in the Word file come back as data URIs with `[img:img1]` markers in the text; equations (OMML) are read as plain text.\n\n`format` converts the result: `gift` and `moodle_xml` for Moodle, `aiken`, `quizizz_csv` (Quizizz spreadsheet template), `kahoot_csv` (columns of the Kahoot template) and a generic `csv` for Google Sheets / Forms add-ons. Warnings list questions without an answer, duplicate numbers or texts and odd option counts. Files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/vn-quiz-parse/",
    "operationId": "vnQuizParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-quiz-parse/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The exam as plain text instead of a file."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `gift`, `aiken`, `moodle_xml`, `quizizz_csv`, `kahoot_csv` or `csv` (export returned in `output`)."
         },
         "images": {
          "type": "boolean",
          "default": true,
          "description": "`false`: list images without their data URIs."
         },
         "time_seconds": {
          "type": "number",
          "default": 30,
          "description": "Time per question for Quizizz / Kahoot exports."
         }
        }
       },
       "example": {
        "text": "Câu 1. Thủ đô của Việt Nam là\nA. TP. Hồ Chí Minh\t*B. Hà Nội\nC. Đà Nẵng\tD. Huế\nCâu 2. 2 + 2 = ?\nA. 3\nB. 4\nC. 5\nD. 6\nĐáp án: B\nLời giải: 2 + 2 = 4."
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The exam as .docx (or .txt): multipart, raw body or `file_base64`."
         },
         "text": {
          "type": "string",
          "description": "The exam as plain text instead of a file."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `gift`, `aiken`, `moodle_xml`, `quizizz_csv`, `kahoot_csv` or `csv` (export returned in `output`)."
         },
         "images": {
          "type": "boolean",
          "default": true,
          "description": "`false`: list images without their data URIs."
         },
         "time_seconds": {
          "type": "number",
          "default": 30,
          "description": "Time per question for Quizizz / Kahoot exports."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "question_count": {
           "type": "number"
          },
          "by_type": {
           "type": "object",
           "properties": {
            "multiple_choice": {
             "type": "number"
            }
           }
          },
          "answered": {
           "type": "number"
          },
          "sections": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "title": {
              "type": "string"
             },
             "type": {}
            }
           }
          },
          "groups": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "answer_keys": {
           "type": "array"
          },
          "questions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "number": {
              "type": "number"
             },
             "section": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "points": {},
             "stem": {
              "type": "string"
             },
             "options": {
              "type": "array"
             },
             "answer": {
              "type": "array"
             },
             "answer_text": {},
             "answer_source": {
              "type": "string"
             },
             "explanation": {},
             "group": {}
            }
           }
          }
         }
        },
        "example": {
         "question_count": 2,
         "by_type": {
          "multiple_choice": 2
         },
         "answered": 2,
         "sections": [
          {
           "index": 0,
           "title": "",
           "type": null
          }
         ],
         "groups": [],
         "warnings": [],
         "answer_keys": [],
         "questions": [
          {
           "number": 1,
           "section": 0,
           "type": "multiple_choice",
           "points": null,
           "stem": "Thủ đô của Việt Nam là",
           "options": [
            {
             "label": "A",
             "text": "TP. Hồ Chí Minh"
            },
            {
             "label": "B",
             "text": "Hà Nội"
            },
            {
             "label": "C",
             "text": "Đà Nẵng"
            },
            {
             "label": "D",
             "text": "Huế"
            }
           ],
           "answer": [
            "B"
           ],
           "answer_text": null,
           "answer_source": "asterisk",
           "explanation": null,
           "group": null
          },
          {
           "number": 2,
           "section": 0,
           "type": "multiple_choice",
           "points": null,
           "stem": "2 + 2 = ?",
           "options": [
            {
             "label": "A",
             "text": "3"
            },
            {
             "label": "B",
             "text": "4"
            },
            {
             "label": "C",
             "text": "5"
            },
            {
             "label": "D",
             "text": "6"
            }
           ],
           "answer": [
            "B"
           ],
           "answer_text": null,
           "answer_source": "answer_line",
           "explanation": "2 + 2 = 4.",
           "group": null
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-exam-mix": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Exam version mixer",
    "description": "Send the questions returned by `/v1/vn-quiz-parse` (or the Word / text exam itself) and get `versions` exam versions, each with its code (mã đề: random 3-digit codes, `code_start=101` for 101, 102… or your own `codes`), the questions and options in a new order, the mapping back to the original numbering and option letters, and the answer key. `answer_table` lists the answer of every question for every code, ready to print or to load into a grading app.\n\nThe rules teachers expect: questions move only inside their part (PHẦN I, II, III stay in order, numbering restarts in each part when the original does), questions of a reading passage stay together, options such as \"Tất cả đều đúng\" or \"Không có đáp án nào\" keep their place, and a question whose options refer to other letters (\"Cả A và B\") keeps its option order. True-false statements are not shuffled unless `shuffle_statements=true`. The same `seed` always gives the same versions, so a mix can be rebuilt later.\n\n`format=docx` returns a zip with one .docx per code (header with school, title, subject, time and the code; images kept), `dap_an.docx` (answer table) and `dap_an.csv`.\n\nDocs: https://apibox.io.vn/docs/vn-exam-mix/",
    "operationId": "vnExamMixPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-exam-mix/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "questions": {
          "type": "array",
          "items": {},
          "description": "`questions` from /v1/vn-quiz-parse (with `sections`, `groups`, `images` if any)."
         },
         "versions": {
          "type": "number",
          "default": 4,
          "description": "Number of exam versions (1–50)."
         },
         "codes": {
          "type": "array",
          "items": {},
          "description": "Your exam codes, e.g. `[\"101\",\"102\"]` (else random 3-digit codes or `code_start`)."
         },
         "code_start": {
          "type": "number",
          "description": "Sequential codes from this number (101, 102…)."
         },
         "seed": {
          "type": "string",
          "description": "Seed for a reproducible mix (random when omitted, returned)."
         },
         "shuffle_questions": {
          "type": "boolean",
          "default": true,
          "description": "Shuffle questions inside each part."
         },
         "shuffle_options": {
          "type": "boolean",
          "default": true,
          "description": "Shuffle options A–D."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `docx` (zip of .docx exams + answer key) or `docx_base64`."
         },
         "header": {
          "type": "object",
          "description": "Exam header for .docx: `school`, `department`, `title`, `subject`, `time`."
         }
        }
       },
       "example": {
        "text": "Câu 1. Thủ đô của Việt Nam là\nA. TP. Hồ Chí Minh\t*B. Hà Nội\nC. Đà Nẵng\tD. Huế\nCâu 2. 2 + 2 = ?\nA. 3\nB. 4\nC. 5\nD. 6\nĐáp án: B\nLời giải: 2 + 2 = 4.",
        "versions": 2,
        "seed": "demo-2026",
        "code_start": 101
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "questions": {
          "type": "array",
          "items": {},
          "description": "`questions` from /v1/vn-quiz-parse (with `sections`, `groups`, `images` if any)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Or the exam as .docx / text (`text`), parsed like vn-quiz-parse."
         },
         "versions": {
          "type": "number",
          "default": 4,
          "description": "Number of exam versions (1–50)."
         },
         "codes": {
          "type": "array",
          "items": {},
          "description": "Your exam codes, e.g. `[\"101\",\"102\"]` (else random 3-digit codes or `code_start`)."
         },
         "code_start": {
          "type": "number",
          "description": "Sequential codes from this number (101, 102…)."
         },
         "seed": {
          "type": "string",
          "description": "Seed for a reproducible mix (random when omitted, returned)."
         },
         "shuffle_questions": {
          "type": "boolean",
          "default": true,
          "description": "Shuffle questions inside each part."
         },
         "shuffle_options": {
          "type": "boolean",
          "default": true,
          "description": "Shuffle options A–D."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `docx` (zip of .docx exams + answer key) or `docx_base64`."
         },
         "header": {
          "type": "object",
          "description": "Exam header for .docx: `school`, `department`, `title`, `subject`, `time`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "seed": {
           "type": "string"
          },
          "version_count": {
           "type": "number"
          },
          "codes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "question_count": {
           "type": "number"
          },
          "settings": {
           "type": "object",
           "properties": {
            "shuffle_questions": {
             "type": "boolean"
            },
            "shuffle_options": {
             "type": "boolean"
            },
            "shuffle_statements": {
             "type": "boolean"
            },
            "numbering_restarts_per_part": {
             "type": "boolean"
            }
           }
          },
          "answer_table": {
           "type": "array",
           "items": {
            "type": "array",
            "items": {
             "type": "string"
            }
           }
          },
          "versions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "questions": {
              "type": "array"
             },
             "answer_key": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "seed": "demo-2026",
         "version_count": 2,
         "codes": [
          "101",
          "102"
         ],
         "question_count": 2,
         "settings": {
          "shuffle_questions": true,
          "shuffle_options": true,
          "shuffle_statements": false,
          "numbering_restarts_per_part": false
         },
         "answer_table": [
          [
           "Câu",
           "101",
           "102"
          ],
          [
           "1",
           "D",
           "A"
          ],
          [
           "2",
           "D",
           "B"
          ]
         ],
         "versions": [
          {
           "code": "101",
           "questions": [
            {
             "number": 1,
             "original_number": 1,
             "section": 0,
             "type": "multiple_choice",
             "points": null,
             "stem": "Thủ đô của Việt Nam là",
             "options": [
              {
               "label": "A",
               "text": "TP. Hồ Chí Minh",
               "original_label": "A"
              },
              {
               "label": "B",
               "text": "Huế",
               "original_label": "D"
              },
              {
               "label": "C",
               "text": "Đà Nẵng",
               "original_label": "C"
              },
              {
               "label": "D",
               "text": "Hà Nội",
               "original_label": "B"
              }
             ],
             "answer": [
              "D"
             ],
             "answer_text": null,
             "group": null
            },
            {
             "…": "…"
            }
           ],
           "answer_key": "1.D 2.D"
          },
          {
           "code": "102",
           "questions": [
            {
             "…": "…"
            }
           ],
           "answer_key": "1.A 2.B"
          }
         ],
         "note": "Same seed + same questions + same codes = same versions. Options such as \"Tất cả đều đúng\" keep their position; questions whose options refer to other letters (\"Cả A và B\") keep their option order; reading groups stay together."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/docx-template": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Word template filler",
    "description": "Upload a Word document containing tags and send the data as JSON: `{ho_ten}` inserts a value (dotted paths such as `{ben_a.ten}` work), `{#items}…{/items}` repeats content for each element of an array, `{#co_bao_hiem}…{/co_bao_hiem}` shows a block only when the value is true and `{^co_bao_hiem}…{/co_bao_hiem}` when it is false or empty. A loop whose tags sit in a table row repeats the row (invoice and contract lines), one across paragraphs repeats the paragraphs, one inside a paragraph repeats the text in place. `{$index}` numbers the rows.\n\nFilters format values the Vietnamese way: `{luong|money}` gives 15.500.000, `{luong|words}` \"Mười lăm triệu năm trăm nghìn đồng\", `{ngay|date}` 11/11/2026, `{ngay|date_vi}` \"ngày 11 tháng 11 năm 2026\", plus `upper`, `lower`, `trim` and `default:…`. Tags that Word split into several runs while you typed (spell check, formatting changes) are merged first, so they work as typed; formatting of the first character of the tag is kept. Headers, footers and footnotes are filled too; `{{name}}` delimiters are detected automatically.\n\nSend `rows` (an array) instead of `data` to merge many documents at once: you get a zip, file names from `filename` such as `HD_{so_hd}`. `action=tags` lists the tags of a template. The output is .docx (no PDF conversion); files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/docx-template/",
    "operationId": "docxTemplatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/docx-template/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "object",
          "description": "Values for one document (JSON object)."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch merge: an array of objects, returns a zip (max 500)."
         },
         "filename": {
          "type": "string",
          "default": "document",
          "description": "Output name, with tags: `HD_{so_hd}`."
         },
         "output": {
          "type": "string",
          "default": "docx",
          "description": "`docx` (file) or `json` (text preview, tags, missing fields, base64)."
         },
         "action": {
          "type": "string",
          "description": "`tags`: list the tags of the template only."
         },
         "delimiters": {
          "type": "string",
          "description": "`single` `{ }` or `double` `{{ }}` (auto-detected)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "template": {
          "type": "string",
          "format": "binary",
          "description": "The .docx template (multipart `template` or `file`, or `template_base64`)."
         },
         "data": {
          "type": "object",
          "description": "Values for one document (JSON object)."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch merge: an array of objects, returns a zip (max 500)."
         },
         "filename": {
          "type": "string",
          "default": "document",
          "description": "Output name, with tags: `HD_{so_hd}`."
         },
         "output": {
          "type": "string",
          "default": "docx",
          "description": "`docx` (file) or `json` (text preview, tags, missing fields, base64)."
         },
         "action": {
          "type": "string",
          "description": "`tags`: list the tags of the template only."
         },
         "delimiters": {
          "type": "string",
          "description": "`single` `{ }` or `double` `{{ }}` (auto-detected)."
         }
        },
        "required": [
         "template"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "filename": {
           "type": "string"
          },
          "delimiters": {
           "type": "string"
          },
          "tags": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "filters": {
              "type": "array"
             }
            }
           }
          },
          "missing_fields": {
           "type": "array"
          },
          "text": {
           "type": "string"
          },
          "docx_base64": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          }
         }
        },
        "example": {
         "filename": "document.docx",
         "delimiters": "{ }",
         "tags": [
          {
           "name": "so_hd",
           "kind": "variable"
          },
          {
           "name": "ho_ten",
           "kind": "variable",
           "filters": [
            "upper"
           ]
          },
          {
           "name": "luong",
           "kind": "variable",
           "filters": [
            "money"
           ]
          },
          {
           "name": "luong",
           "kind": "variable",
           "filters": [
            "words"
           ]
          },
          {
           "name": "items",
           "kind": "section"
          },
          {
           "name": "$index",
           "kind": "variable"
          },
          {
           "name": "ten",
           "kind": "variable"
          },
          {
           "name": "tien",
           "kind": "variable",
           "filters": [
            "money"
           ]
          }
         ],
         "missing_fields": [],
         "text": "HỢP ĐỒNG LAO ĐỘNG số 12/2026/HĐLĐ\nBên B: Ông/Bà NGUYỄN VĂN AN, lương 15.500.000 đồng (Mười lăm triệu năm trăm nghìn đồng)\nSTT\nNội dung\nSố tiền\n1\nLương cơ bản\n12.000.000",
         "docx_base64": "UEsDBBQAAAgIAAAAAACY9I3b6wAAAM4BAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbH2R…",
         "bytes": 1190
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pdf-form": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "PDF form filler",
    "description": "Upload a fillable PDF (AcroForm) and the API lists its fields: name, type (text, checkbox, radio, dropdown, list box, signature, button), current value, options, maximum length and the page and position of each widget, plus a `template` object you can fill in. Send `values` as `{\"field name\": value}` to fill it: text, `true` / `false` for checkboxes, an option (or its index) for radio groups and dropdowns, an array for list boxes.\n\nAppearances are regenerated with the Be Vietnam Pro font embedded, so Vietnamese diacritics display correctly in every viewer (the standard PDF fonts cannot show them). `flatten=true` burns the values into the page and removes the fields, for a final, non-editable copy. `rows` fills the same form once per object and returns a zip, named with `filename` such as `don_{ho_ten}`.\n\nUnknown field names are ignored and reported (`x-unknown-fields` header, or an error with `strict=true`). XFA-only forms and scanned PDFs without fields cannot be filled; encrypted PDFs are refused. Files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/pdf-form/",
    "operationId": "pdfFormPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-form/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "fields",
          "description": "`fields` (list) or `fill` (default when values / rows are sent)."
         },
         "values": {
          "type": "object",
          "description": "`{\"field name\": value}` to fill one copy."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch fill: array of value objects, returns a zip (max 200)."
         },
         "flatten": {
          "type": "boolean",
          "default": false,
          "description": "Burn values into the page and remove the fields."
         },
         "strict": {
          "type": "boolean",
          "default": false,
          "description": "Fail on unknown field names."
         },
         "output": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf` (file) or `json` (base64 + filled field list)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The PDF form (multipart, raw body or `file_base64`)."
         },
         "action": {
          "type": "string",
          "default": "fields",
          "description": "`fields` (list) or `fill` (default when values / rows are sent)."
         },
         "values": {
          "type": "object",
          "description": "`{\"field name\": value}` to fill one copy."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch fill: array of value objects, returns a zip (max 200)."
         },
         "flatten": {
          "type": "boolean",
          "default": false,
          "description": "Burn values into the page and remove the fields."
         },
         "strict": {
          "type": "boolean",
          "default": false,
          "description": "Fail on unknown field names."
         },
         "output": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf` (file) or `json` (base64 + filled field list)."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "pages": {
           "type": "number"
          },
          "xfa": {
           "type": "boolean"
          },
          "field_count": {
           "type": "number"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "read_only": {
              "type": "boolean"
             },
             "required": {
              "type": "boolean"
             },
             "value": {},
             "max_length": {},
             "multiline": {
              "type": "boolean"
             },
             "widgets": {
              "type": "array"
             },
             "options": {
              "type": "array"
             },
             "editable": {
              "type": "boolean"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "template": {
           "type": "object",
           "properties": {
            "ho_ten": {
             "type": "string"
            },
            "dia_chi": {
             "type": "string"
            },
            "dong_y": {
             "type": "boolean"
            },
            "gioi_tinh": {
             "type": "string"
            },
            "tinh": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "pages": 1,
         "xfa": false,
         "field_count": 5,
         "fields": [
          {
           "name": "ho_ten",
           "type": "text",
           "read_only": false,
           "required": false,
           "value": null,
           "max_length": null,
           "multiline": false,
           "widgets": [
            {
             "page": 1,
             "x": 119.5,
             "y": 749.5,
             "width": 301,
             "height": 23
            }
           ]
          },
          {
           "name": "dong_y",
           "type": "checkbox",
           "read_only": false,
           "required": false,
           "value": false,
           "widgets": [
            {
             "page": 1,
             "x": 119.5,
             "y": 639.5,
             "width": 15,
             "height": 15
            }
           ]
          },
          {
           "name": "gioi_tinh",
           "type": "radio",
           "read_only": false,
           "required": false,
           "value": null,
           "options": [
            "Nam",
            "Nu"
           ],
           "widgets": [
            {
             "page": 1,
             "x": 119.5,
             "y": 609.5,
             "width": 15,
             "height": 15
            },
            {
             "page": 1,
             "x": 159.5,
             "y": 609.5,
             "width": 15,
             "height": 15
            }
           ]
          },
          {
           "name": "tinh",
           "type": "dropdown",
           "read_only": false,
           "required": false,
           "value": null,
           "options": [
            "Hà Nội",
            "TP. Hồ Chí Minh",
            "Đà Nẵng"
           ],
           "editable": false,
           "widgets": [
            {
             "page": 1,
             "x": 119.5,
             "y": 569.5,
             "width": 201,
             "height": 23
            }
           ]
          },
          {
           "…": "…"
          }
         ],
         "template": {
          "ho_ten": "",
          "dia_chi": "",
          "dong_y": false,
          "gioi_tinh": "",
          "tinh": ""
         },
         "note": "Fill with action=fill and values={\"field name\": \"value\"}. Coordinates are PDF points from the bottom-left corner."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/email-parse": {
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "E-mail (.eml) parser",
    "description": "Send a raw message (an .eml file, a `message/rfc822` body or the source as `raw`) and get clean JSON: subject and names decoded from RFC 2047 (Vietnamese included), from / to / cc / bcc / reply-to as name + address, date in ISO 8601, message id, in-reply-to and references for threading, the plain text and HTML bodies (quoted-printable, base64 and legacy charsets decoded) and every attachment with its file name, MIME type, size, content id and content in base64.\n\n`latest_reply` cuts the quoted history from the text (\"On … wrote:\", Gmail Vietnamese \"Vào … đã viết:\", Outlook \"From: / Sent:\" blocks and \">\" lines), which is what a ticketing system wants to store. The Received chain is parsed (from, by, protocol, IP, time), Authentication-Results gives the SPF / DKIM / DMARC verdicts written by the receiving server, DKIM-Signature headers give domain and selector, List-Unsubscribe is returned for newsletters.\n\n`attachments=meta` lists attachments without their content, `none` skips them; files larger than `max_attachment_bytes` (default 5 MB) are listed without content. Parsing uses postal-mime (MIT-0), the library recommended for Cloudflare Email Workers. Messages are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/email-parse/",
    "operationId": "emailParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-parse/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "raw": {
          "type": "string",
          "description": "Or the message source as text."
         },
         "attachments": {
          "type": "string",
          "default": "base64",
          "description": "`base64`, `meta` (no content) or `none`."
         },
         "max_attachment_bytes": {
          "type": "number",
          "default": 5000000,
          "description": "Larger attachments are listed without content."
         },
         "headers": {
          "type": "boolean",
          "default": true,
          "description": "`false`: leave out the full header list."
         },
         "no_html": {
          "type": "boolean",
          "default": false,
          "description": "Leave out the HTML body."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .eml file (multipart, raw `message/rfc822` body or `file_base64`)."
         },
         "raw": {
          "type": "string",
          "description": "Or the message source as text."
         },
         "attachments": {
          "type": "string",
          "default": "base64",
          "description": "`base64`, `meta` (no content) or `none`."
         },
         "max_attachment_bytes": {
          "type": "number",
          "default": 5000000,
          "description": "Larger attachments are listed without content."
         },
         "headers": {
          "type": "boolean",
          "default": true,
          "description": "`false`: leave out the full header list."
         },
         "no_html": {
          "type": "boolean",
          "default": false,
          "description": "Leave out the HTML body."
         }
        }
       }
      },
      "message/rfc822": {
       "schema": {
        "type": "string"
       },
       "example": "From: =?UTF-8?B?Tmd1eeG7hW4gVsSDbiBBbg==?= <an@gmail.com>\nTo: support@example.vn\nSubject: =?UTF-8?Q?H=C3=B3a_=C4=91=C6=A1n_th=C3=A1ng_11?=\nDate: Tue, 10 Nov 2026 09:15:00 +0700\nMessage-ID: <CAF123@mail.gmail.com>\nAuthentication-Results: mx.example.vn; dkim=pass header.d=gmail.com; spf=pass; dmarc=pass\nContent-Type: text/plain; charset=utf-8\n\nChào anh, em gửi hóa đơn.\n\nVào Th 2, 9 thg 11, 2026 lúc 10:00 Hỗ trợ <support@example.vn> đã viết:\n> Anh gửi giúp hóa đơn nhé\n"
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "subject": {
           "type": "string"
          },
          "from": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "address": {
             "type": "string"
            }
           }
          },
          "sender": {},
          "reply_to": {
           "type": "array"
          },
          "to": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {},
             "address": {
              "type": "string"
             }
            }
           }
          },
          "cc": {
           "type": "array"
          },
          "bcc": {
           "type": "array"
          },
          "date": {
           "type": "string"
          },
          "message_id": {
           "type": "string"
          },
          "in_reply_to": {},
          "references": {
           "type": "array"
          },
          "return_path": {},
          "delivered_to": {},
          "text": {
           "type": "string"
          },
          "html": {},
          "latest_reply": {
           "type": "string"
          },
          "attachment_count": {
           "type": "number"
          },
          "attachments": {
           "type": "array"
          },
          "authentication": {
           "type": "object",
           "properties": {
            "results": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "dkim_signatures": {
             "type": "array"
            },
            "received_spf": {
             "type": "array"
            }
           }
          },
          "received": {
           "type": "array"
          },
          "list": {
           "type": "object",
           "properties": {
            "unsubscribe": {},
            "unsubscribe_post": {},
            "id": {}
           }
          },
          "headers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "key": {
              "type": "string"
             },
             "value": {
              "type": "string"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "subject": "Hóa đơn tháng 11",
         "from": {
          "name": "Nguyễn Văn An",
          "address": "an@gmail.com"
         },
         "sender": null,
         "reply_to": [],
         "to": [
          {
           "name": null,
           "address": "support@example.vn"
          }
         ],
         "cc": [],
         "bcc": [],
         "date": "2026-11-10T02:15:00.000Z",
         "message_id": "<CAF123@mail.gmail.com>",
         "in_reply_to": null,
         "references": [],
         "return_path": null,
         "delivered_to": null,
         "text": "Chào anh, em gửi hóa đơn.\n\nVào Th 2, 9 thg 11, 2026 lúc 10:00 Hỗ trợ <support@example.vn> đã viết:\n> Anh gửi giúp hóa đơn nhé\n",
         "html": null,
         "latest_reply": "Chào anh, em gửi hóa đơn.",
         "attachment_count": 0,
         "attachments": [],
         "authentication": {
          "results": [
           {
            "dkim": "pass",
            "spf": "pass",
            "dmarc": "pass"
           }
          ],
          "dkim_signatures": [],
          "received_spf": []
         },
         "received": [],
         "list": {
          "unsubscribe": null,
          "unsubscribe_post": null,
          "id": null
         },
         "headers": [
          {
           "key": "from",
           "value": "=?UTF-8?B?Tmd1eeG7hW4gVsSDbiBBbg==?= <an@gmail.com>"
          },
          {
           "…": "…"
          }
         ],
         "note": "Signatures are listed, not verified (DKIM / SPF results are those written by the receiving server). Nothing is stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-timesheet": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Attendance timesheet",
    "description": "Send the punches exported from a time clock (ZKTeco, Ronald Jack, Wise Eye… as CSV, or JSON) and your shifts. Columns are detected from usual headers (`AC-No.`, `Mã NV`, `Name`, `Họ tên`, `Time`, `Thời gian`, `Ngày` + `Giờ`, several times in one cell) or set with `columns`; dates are read as dd/mm/yyyy unless `date_format=mdy` / `ymd`. Shifts have a start, an end (a night shift ending the next morning is fine), a break and grace minutes for late arrival and early leave.\n\nEach employee-day gets the shift whose start is nearest the first punch, first in and last out, late and early-leave minutes, worked minutes without the break and work units (công), a missing punch flag, overtime after the shift (from `ot_min_minutes`, optionally rounded), and night minutes between 22:00 and 06:00 (Labour Code 2019, Điều 106). On weekly rest days (`rest_days`, Sunday by default) and public holidays (computed by /v1/vn-holidays, or your own `holidays`) all time worked is overtime of that type.\n\nThe summary per employee gives days and units, hours, late / early counts, missing punches, absent workdays, overtime split into workday / rest day / holiday (paid at least 150% / 200% / 300%, Điều 98) and night overtime, with a warning above 40 hours of overtime in a month (Điều 107). Pay rates are not applied, so the result feeds any payroll.\n\nDocs: https://apibox.io.vn/docs/vn-timesheet/",
    "operationId": "vnTimesheetPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-timesheet/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "csv": {
          "type": "string",
          "description": "Attendance log as CSV / TSV text (or `logs` JSON array, or a CSV `file`)."
         },
         "logs": {
          "type": "array",
          "items": {},
          "description": "Rows such as `[{\"employee\":\"1\",\"time\":\"2026-11-02 07:58\"}]`."
         },
         "columns": {
          "type": "object",
          "description": "Column mapping: `employee`, `name`, `datetime` or `date` + `time`."
         },
         "shifts": {
          "type": "array",
          "items": {},
          "description": "Shifts `[{\"code\",\"start\",\"end\",\"break_start\",\"break_end\",\"grace_late\",\"grace_early\"}]` (default 08:00-17:00, break 12-13)."
         },
         "from": {
          "type": "string",
          "description": "Period start (YYYY-MM-DD) for absences and standard workdays."
         },
         "to": {
          "type": "string",
          "description": "Period end (YYYY-MM-DD)."
         },
         "rest_days": {
          "type": "string",
          "default": "0",
          "description": "Weekly rest days, 0 = Sunday … 6 = Saturday, e.g. `6,0`."
         },
         "holidays": {
          "type": "array",
          "items": {},
          "description": "Your holiday dates (default: Vietnamese public holidays), or `none`."
         },
         "ot_min_minutes": {
          "type": "number",
          "default": 30,
          "description": "Minimum overtime counted after a shift."
         },
         "ot_round_minutes": {
          "type": "number",
          "default": 0,
          "description": "Round overtime down to this step (e.g. 15)."
         },
         "date_format": {
          "type": "string",
          "default": "dmy",
          "description": "`dmy`, `mdy` or `ymd` for slash dates."
         }
        }
       },
       "example": {
        "csv": "AC-No.,Name,Time\n1,Nguyễn An,02/11/2026 07:58\n1,Nguyễn An,02/11/2026 17:45\n1,Nguyễn An,03/11/2026 08:12\n1,Nguyễn An,03/11/2026 16:50\n1,Nguyễn An,08/11/2026 08:00\n1,Nguyễn An,08/11/2026 12:00",
        "from": "2026-11-02",
        "to": "2026-11-08"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "standard_workdays": {
             "type": "number"
            },
            "rest_days": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "holidays": {
             "type": "array"
            },
            "holidays_source": {
             "type": "string"
            }
           }
          },
          "shifts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "start": {
              "type": "string"
             },
             "end": {
              "type": "string"
             },
             "break": {
              "type": "string"
             },
             "minutes": {
              "type": "number"
             },
             "grace_late": {
              "type": "number"
             },
             "grace_early": {
              "type": "number"
             },
             "overnight": {
              "type": "boolean"
             }
            }
           }
          },
          "rules": {
           "type": "object",
           "properties": {
            "ot_min_minutes": {
             "type": "number"
            },
            "ot_round_minutes": {
             "type": "number"
            },
            "count_early_ot": {
             "type": "boolean"
            },
            "ot_window_hours": {
             "type": "number"
            },
            "dedupe_minutes": {
             "type": "number"
            },
            "night": {
             "type": "string"
            }
           }
          },
          "punches": {
           "type": "number"
          },
          "employee_count": {
           "type": "number"
          },
          "employees": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "employee": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "work_days": {
              "type": "number"
             },
             "work_units": {
              "type": "number"
             },
             "worked_hours": {
              "type": "number"
             },
             "late_count": {
              "type": "number"
             },
             "late_minutes": {
              "type": "number"
             },
             "early_count": {
              "type": "number"
             },
             "early_minutes": {
              "type": "number"
             },
             "missing_punch_days": {
              "type": "number"
             },
             "absent_days": {
              "type": "number"
             },
             "absent_dates": {
              "type": "array"
             },
             "ot_hours": {
              "type": "object"
             },
             "night_hours": {
              "type": "number"
             },
             "ot_night_hours": {
              "type": "number"
             },
             "ot_limit_warnings": {
              "type": "array"
             }
            }
           }
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "employee": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "date": {
              "type": "string"
             },
             "weekday_vi": {
              "type": "string"
             },
             "day_type": {
              "type": "string"
             },
             "shift": {
              "type": "string"
             },
             "shift_time": {
              "type": "string"
             },
             "punches": {
              "type": "array"
             },
             "first_in": {
              "type": "string"
             },
             "last_out": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "late_minutes": {
              "type": "number"
             },
             "early_minutes": {
              "type": "number"
             },
             "worked_minutes": {
              "type": "number"
             },
             "work_units": {
              "type": "number"
             },
             "ot_minutes": {
              "type": "number"
             },
             "ot_type": {},
             "night_minutes": {
              "type": "number"
             },
             "ot_night_minutes": {
              "type": "number"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "days_truncated": {
           "type": "boolean"
          },
          "legal_basis": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "period": {
          "from": "2026-11-02",
          "to": "2026-11-08",
          "standard_workdays": 6,
          "rest_days": [
           0
          ],
          "holidays": [],
          "holidays_source": "vn-holidays (Labour Code Điều 112; official schedules where announced)"
         },
         "shifts": [
          {
           "code": "HC",
           "start": "08:00",
           "end": "17:00",
           "break": "12:00-13:00",
           "minutes": 480,
           "grace_late": 0,
           "grace_early": 0,
           "overnight": false
          }
         ],
         "rules": {
          "ot_min_minutes": 30,
          "ot_round_minutes": 0,
          "count_early_ot": false,
          "ot_window_hours": 8,
          "dedupe_minutes": 2,
          "night": "22:00-06:00"
         },
         "punches": 6,
         "employee_count": 1,
         "employees": [
          {
           "employee": "1",
           "name": "Nguyễn An",
           "work_days": 2,
           "work_units": 1.95,
           "worked_hours": 15.63,
           "late_count": 1,
           "late_minutes": 12,
           "early_count": 1,
           "early_minutes": 10,
           "missing_punch_days": 0,
           "absent_days": 4,
           "absent_dates": [
            "2026-11-04",
            "2026-11-05",
            "2026-11-06",
            "2026-11-07"
           ],
           "ot_hours": {
            "workday": 0.75,
            "rest_day": 4,
            "holiday": 0,
            "total": 4.75
           },
           "night_hours": 0,
           "ot_night_hours": 0,
           "ot_limit_warnings": []
          }
         ],
         "days": [
          {
           "employee": "1",
           "name": "Nguyễn An",
           "date": "2026-11-03",
           "weekday_vi": "Thứ Ba",
           "day_type": "workday",
           "shift": "HC",
           "shift_time": "08:00-17:00",
           "punches": [
            "2026-11-03 08:12",
            "2026-11-03 16:50"
           ],
           "first_in": "2026-11-03 08:12",
           "last_out": "2026-11-03 16:50",
           "status": "late_and_early",
           "late_minutes": 12,
           "early_minutes": 10,
           "worked_minutes": 458,
           "work_units": 0.95,
           "ot_minutes": 0,
           "ot_type": null,
           "night_minutes": 0,
           "ot_night_minutes": 0
          },
          {
           "employee": "1",
           "name": "Nguyễn An",
           "date": "2026-11-08",
           "weekday_vi": "Chủ nhật",
           "day_type": "rest_day",
           "shift": "HC",
           "shift_time": "08:00-17:00",
           "punches": [
            "2026-11-08 08:00",
            "2026-11-08 12:00"
           ],
           "first_in": "2026-11-08 08:00",
           "last_out": "2026-11-08 12:00",
           "status": "overtime_day",
           "late_minutes": 0,
           "early_minutes": 0,
           "worked_minutes": 0,
           "work_units": 0,
           "ot_minutes": 240,
           "ot_type": "rest_day",
           "night_minutes": 0,
           "ot_night_minutes": 0
          },
          {
           "…": "…"
          }
         ],
         "days_truncated": false,
         "legal_basis": "Bộ luật Lao động 2019: Điều 106 (night work 22:00-06:00), Điều 98 (OT pay 150% / 200% / 300%, night +30%, night OT +20%), Điều 107 (OT max 40 h/month, 200 h/year), Điều 112 (holidays); NĐ 145/2020/NĐ-CP",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-icd10": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese ICD-10 codes",
    "description": "The Ministry of Health list of ICD-10 codes used in Vietnam since 01/07/2026 (Thông tư 06/2026/TT-BYT, appendix \"Danh mục mã bệnh tật, nguyên nhân tử vong theo ICD-10\", 15,844 codes): `code=E11.9` (also `E119` or the path `/v1/vn-icd10/E11.9`) returns the Vietnamese name, its category, the hierarchy (22 chapters, blocks and sub-blocks with their Vietnamese names), sub-codes, the dagger (†) / asterisk (*) mark and the usage rules of columns 24–29 of the appendix: not usable as the main diagnosis, discouraged as main diagnosis, not usable because a more specific 4- or 5-character code exists, cause of death only, female-only and male-only codes.\n\n`q=dai thao duong` searches the Vietnamese names without accents (all words must match, codes by prefix), optionally within a `chapter`. `codes=E11.9,I10,A00` checks up to 1,000 codes at once, as a claims or HIS validation would: unknown codes, codes that need a more specific subdivision, codes that cannot be the main diagnosis, and with `sex=male|female` sex-specific codes. `chapter=IV` or `group=E10-E14` browses the tree.\n\nOnly the Vietnamese texts published in the circular are served (no WHO English descriptions, inclusion / exclusion notes are left out). The data is rebuilt weekly from the appendix PDF when it changes. This is a coding aid, not medical advice.\n\nDocs: https://apibox.io.vn/docs/vn-icd10/",
    "operationId": "vnIcd10Get",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-icd10/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "An ICD-10 code (`E11.9`, `E119`) or a chapter / block (`IV`, `E10-E14`).",
      "schema": {
       "type": "string"
      },
      "example": "E11.9"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search the Vietnamese names (accents optional) or code prefixes.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "codes",
      "in": "query",
      "required": false,
      "description": "Batch check, comma separated or array (max 1,000).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sex",
      "in": "query",
      "required": false,
      "description": "`male` / `female`: warn about sex-specific codes.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "chapter",
      "in": "query",
      "required": false,
      "description": "Browse a chapter (`I`…`XXII`), or limit `q` to it.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Browse a block or sub-block (`E10-E14`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Search results (max 200).",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "code_no_dot": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "kind": {
           "type": "string"
          },
          "mark": {},
          "usable_for_coding": {
           "type": "boolean"
          },
          "main_diagnosis_allowed": {
           "type": "boolean"
          },
          "rules": {
           "type": "array"
          },
          "chapter": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "level": {
             "type": "string"
            },
            "chapter": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            }
           }
          },
          "hierarchy": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "level": {
              "type": "string"
             },
             "chapter": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             }
            }
           }
          },
          "category": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            }
           }
          },
          "source": {
           "type": "string"
          },
          "legal_basis": {
           "type": "string"
          },
          "effective": {
           "type": "string"
          },
          "codes_in_list": {
           "type": "number"
          },
          "data_built": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "code": "E11.9",
         "code_no_dot": "E119",
         "name_vi": "Bệnh đái tháo đường típ 2, không kèm biến chứng",
         "kind": "subcategory",
         "mark": null,
         "usable_for_coding": true,
         "main_diagnosis_allowed": true,
         "rules": [],
         "chapter": {
          "code": "E00-E90",
          "level": "chapter",
          "chapter": "IV",
          "name_vi": "Bệnh nội tiết, dinh dưỡng và chuyển hóa"
         },
         "hierarchy": [
          {
           "code": "E00-E90",
           "level": "chapter",
           "chapter": "IV",
           "name_vi": "Bệnh nội tiết, dinh dưỡng và chuyển hóa"
          },
          {
           "code": "E10-E14",
           "level": "block",
           "name_vi": "Đái tháo đường"
          }
         ],
         "category": {
          "code": "E11",
          "name_vi": "Bệnh đái tháo đường típ 2"
         },
         "source": "Thông tư 06/2026/TT-BYT, Phụ lục: Danh mục mã bệnh tật, nguyên nhân tử vong theo ICD-10",
         "legal_basis": "Thông tư 06/2026/TT-BYT ngày 02/04/2026 của Bộ Y tế (hiệu lực 01/07/2026)",
         "effective": "2026-07-01",
         "codes_in_list": 15844,
         "data_built": "2026-11-11",
         "note": "Vietnamese names as published in the appendix of the circular. Coding rules: QĐ 1849/QĐ-BYT (2026) technical guidance."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese ICD-10 codes",
    "description": "The Ministry of Health list of ICD-10 codes used in Vietnam since 01/07/2026 (Thông tư 06/2026/TT-BYT, appendix \"Danh mục mã bệnh tật, nguyên nhân tử vong theo ICD-10\", 15,844 codes): `code=E11.9` (also `E119` or the path `/v1/vn-icd10/E11.9`) returns the Vietnamese name, its category, the hierarchy (22 chapters, blocks and sub-blocks with their Vietnamese names), sub-codes, the dagger (†) / asterisk (*) mark and the usage rules of columns 24–29 of the appendix: not usable as the main diagnosis, discouraged as main diagnosis, not usable because a more specific 4- or 5-character code exists, cause of death only, female-only and male-only codes.\n\n`q=dai thao duong` searches the Vietnamese names without accents (all words must match, codes by prefix), optionally within a `chapter`. `codes=E11.9,I10,A00` checks up to 1,000 codes at once, as a claims or HIS validation would: unknown codes, codes that need a more specific subdivision, codes that cannot be the main diagnosis, and with `sex=male|female` sex-specific codes. `chapter=IV` or `group=E10-E14` browses the tree.\n\nOnly the Vietnamese texts published in the circular are served (no WHO English descriptions, inclusion / exclusion notes are left out). The data is rebuilt weekly from the appendix PDF when it changes. This is a coding aid, not medical advice.\n\nDocs: https://apibox.io.vn/docs/vn-icd10/",
    "operationId": "vnIcd10Post",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-icd10/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "An ICD-10 code (`E11.9`, `E119`) or a chapter / block (`IV`, `E10-E14`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search the Vietnamese names (accents optional) or code prefixes.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "chapter",
      "in": "query",
      "required": false,
      "description": "Browse a chapter (`I`…`XXII`), or limit `q` to it.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Browse a block or sub-block (`E10-E14`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Search results (max 200).",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "codes": {
          "type": "string",
          "description": "Batch check, comma separated or array (max 1,000)."
         },
         "sex": {
          "type": "string",
          "description": "`male` / `female`: warn about sex-specific codes."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "code_no_dot": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "kind": {
           "type": "string"
          },
          "mark": {},
          "usable_for_coding": {
           "type": "boolean"
          },
          "main_diagnosis_allowed": {
           "type": "boolean"
          },
          "rules": {
           "type": "array"
          },
          "chapter": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "level": {
             "type": "string"
            },
            "chapter": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            }
           }
          },
          "hierarchy": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "level": {
              "type": "string"
             },
             "chapter": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             }
            }
           }
          },
          "category": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            }
           }
          },
          "source": {
           "type": "string"
          },
          "legal_basis": {
           "type": "string"
          },
          "effective": {
           "type": "string"
          },
          "codes_in_list": {
           "type": "number"
          },
          "data_built": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/random-draw": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Provably fair random draw",
    "description": "A draw viewers can check, for livestream minigames, comment giveaways and lucky draws. 1) `action=commit` creates a secret seed (or takes yours) and returns its SHA-256 `commitment`: publish the commitment before the event and freeze the entry list. 2) `action=draw` with the seed, the entries (one per line, or `[{\"name\",\"weight\"}]`) or a number range `min` / `max`, and a public `salt` chosen at draw time (the number of comments, a lottery result…) returns the winners and reserves. 3) Publish the seed: `action=verify` lets anyone recompute the draw and check SHA-256(seed) against the commitment.\n\nWinners are drawn with HMAC-SHA256 keyed by the seed over the salt and the hash of the entry list, rejection sampling (no modulo bias) and a partial Fisher-Yates shuffle, so nobody can change the result after the commitment and the organiser cannot steer it once the salt is public. Duplicated entries are removed by default (`unique_entries=false` keeps them, as extra chances), weights give proportional chances, `reserve` draws backup winners.\n\nThe full algorithm is returned with every draw so it can be reimplemented independently. Prize promotions in Vietnam must still follow the trade promotion rules (registration / notification): this API is only the drawing tool.\n\nDocs: https://apibox.io.vn/docs/random-draw/",
    "operationId": "randomDrawGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/random-draw/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`commit`, `draw` or `verify` (also as path: /v1/random-draw/draw).",
      "schema": {
       "type": "string",
       "default": "commit"
      }
     },
     {
      "name": "seed",
      "in": "query",
      "required": false,
      "description": "Secret seed (generated by commit; at least 16 characters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min",
      "in": "query",
      "required": false,
      "description": "Number range instead of entries (with `max`).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "max",
      "in": "query",
      "required": false,
      "description": "Upper bound of the number range.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "salt",
      "in": "query",
      "required": false,
      "description": "Public value fixed at draw time (comment count, lottery result…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "winners",
      "in": "query",
      "required": false,
      "description": "Number of winners.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "reserve",
      "in": "query",
      "required": false,
      "description": "Backup winners drawn after them.",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "commitment",
      "in": "query",
      "required": false,
      "description": "verify: the published commitment.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "kind": {
           "type": "string"
          },
          "seed": {
           "type": "string"
          },
          "commitment": {
           "type": "string"
          },
          "salt": {
           "type": "string"
          },
          "entries_count": {
           "type": "number"
          },
          "entries_hash": {
           "type": "string"
          },
          "weighted": {
           "type": "boolean"
          },
          "unique_entries": {
           "type": "boolean"
          },
          "winners": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rank": {
              "type": "number"
             },
             "entry": {
              "type": "string"
             },
             "index": {
              "type": "number"
             }
            }
           }
          },
          "reserves": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rank": {
              "type": "number"
             },
             "entry": {
              "type": "string"
             },
             "index": {
              "type": "number"
             }
            }
           }
          },
          "algorithm": {
           "type": "string"
          },
          "drawn_at": {
           "type": "string"
          },
          "verify": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Provably fair random draw",
    "description": "A draw viewers can check, for livestream minigames, comment giveaways and lucky draws. 1) `action=commit` creates a secret seed (or takes yours) and returns its SHA-256 `commitment`: publish the commitment before the event and freeze the entry list. 2) `action=draw` with the seed, the entries (one per line, or `[{\"name\",\"weight\"}]`) or a number range `min` / `max`, and a public `salt` chosen at draw time (the number of comments, a lottery result…) returns the winners and reserves. 3) Publish the seed: `action=verify` lets anyone recompute the draw and check SHA-256(seed) against the commitment.\n\nWinners are drawn with HMAC-SHA256 keyed by the seed over the salt and the hash of the entry list, rejection sampling (no modulo bias) and a partial Fisher-Yates shuffle, so nobody can change the result after the commitment and the organiser cannot steer it once the salt is public. Duplicated entries are removed by default (`unique_entries=false` keeps them, as extra chances), weights give proportional chances, `reserve` draws backup winners.\n\nThe full algorithm is returned with every draw so it can be reimplemented independently. Prize promotions in Vietnam must still follow the trade promotion rules (registration / notification): this API is only the drawing tool.\n\nDocs: https://apibox.io.vn/docs/random-draw/",
    "operationId": "randomDrawPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/random-draw/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "commit",
          "description": "`commit`, `draw` or `verify` (also as path: /v1/random-draw/draw)."
         },
         "seed": {
          "type": "string",
          "description": "Secret seed (generated by commit; at least 16 characters)."
         },
         "entries": {
          "type": "string",
          "description": "One entry per line, or an array of names / `{\"name\",\"weight\"}`."
         },
         "min": {
          "type": "number",
          "default": 1,
          "description": "Number range instead of entries (with `max`)."
         },
         "max": {
          "type": "number",
          "description": "Upper bound of the number range."
         },
         "salt": {
          "type": "string",
          "description": "Public value fixed at draw time (comment count, lottery result…)."
         },
         "winners": {
          "type": "number",
          "default": 1,
          "description": "Number of winners."
         },
         "reserve": {
          "type": "number",
          "default": 0,
          "description": "Backup winners drawn after them."
         },
         "commitment": {
          "type": "string",
          "description": "verify: the published commitment."
         },
         "claimed_winners": {
          "type": "array",
          "items": {},
          "description": "verify: the announced winners, in order."
         }
        }
       },
       "example": {
        "seed": "a3f1c9e07b5d2486a3f1c9e07b5d2486",
        "entries": "Nguyễn An\nTrần Bình\nLê Chi\nPhạm Dũng\nHoàng Em",
        "salt": "1532",
        "winners": 2,
        "reserve": 1
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "kind": {
           "type": "string"
          },
          "seed": {
           "type": "string"
          },
          "commitment": {
           "type": "string"
          },
          "salt": {
           "type": "string"
          },
          "entries_count": {
           "type": "number"
          },
          "entries_hash": {
           "type": "string"
          },
          "weighted": {
           "type": "boolean"
          },
          "unique_entries": {
           "type": "boolean"
          },
          "winners": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rank": {
              "type": "number"
             },
             "entry": {
              "type": "string"
             },
             "index": {
              "type": "number"
             }
            }
           }
          },
          "reserves": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rank": {
              "type": "number"
             },
             "entry": {
              "type": "string"
             },
             "index": {
              "type": "number"
             }
            }
           }
          },
          "algorithm": {
           "type": "string"
          },
          "drawn_at": {
           "type": "string"
          },
          "verify": {
           "type": "string"
          }
         }
        },
        "example": {
         "kind": "list",
         "seed": "a3f1c9e07b5d2486a3f1c9e07b5d2486",
         "commitment": "af24c17ea9f89cc17d2b578b1f965de883c5596b31bb34cdac7077bdc8357696",
         "salt": "1532",
         "entries_count": 5,
         "entries_hash": "4c2ecdb5ece276bb6836ad66df15956d19156d10df68e800ed2f62f6bba74b74",
         "weighted": false,
         "unique_entries": true,
         "winners": [
          {
           "rank": 1,
           "entry": "Hoàng Em",
           "index": 5
          },
          {
           "rank": 2,
           "entry": "Nguyễn An",
           "index": 1
          }
         ],
         "reserves": [
          {
           "rank": 3,
           "entry": "Lê Chi",
           "index": 3
          }
         ],
         "algorithm": "random-draw/v1: entries = trimmed non-empty lines in order (with unique_entries, later case-insensitive duplicates are dropped); entries_hash = SHA-256(entries joined by \"\\n\", each as \"label<TAB>weight\" when weights are used); stream = HMAC-SHA256(key = seed, \"random-draw/v1|\" + salt + \"|\" + entries_hash + \"|\" + counter) as 32-bit big-endian words; index = rejection sampling below n; winners = partial Fisher-Yates (weighted: cumulative integer weights, removed once drawn).",
         "drawn_at": "2026-11-11T03:18:50.167Z",
         "verify": "POST /v1/random-draw/verify with the same seed, salt, entries (or min / max), winners and the commitment"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-repair": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Repair",
    "description": "Send text that should be JSON but does not parse, typically the answer of a language model, a JavaScript object literal, a Python dict or a log line, and get valid JSON back. The repair (jsonrepair library) quotes unquoted keys and strings, replaces single and typographic quotes, removes comments, trailing commas and `...` placeholders, inserts missing commas and colons, converts `True` / `False` / `None` and `undefined` / `NaN`, unwraps JSONP and MongoDB calls (`ObjectId(\"…\")`), joins `\"a\" + \"b\"`, escapes raw line breaks and closes strings, brackets and braces of truncated output.\n\nLLM answers are cut down to the JSON first: the first Markdown code block, or the text between the first `{` / `[` and the last `}` / `]`. Several top-level values (NDJSON, JSON lines) become an array, and JSON that was encoded as a JSON string is decoded. The response gives the repaired text (`format` keep, pretty or minify), the parsed `data`, the list of `fixes` with the position of their first occurrence, and, for inputs up to 20,000 characters, the exact character `changes`.\n\nPass a JSON Schema as `schema` to validate the repaired data in the same call (draft 2020-12). Valid JSON is returned unchanged with `valid_input: true`. Text that cannot be turned into JSON (for example only closing brackets) returns 422 with the position of the problem. Up to 5 MB; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/json-repair/",
    "operationId": "jsonRepairGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-repair/"
    },
    "parameters": [
     {
      "name": "json",
      "in": "query",
      "required": true,
      "description": "The broken JSON text (or send it as a text/plain body).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`keep` (layout of the input), `pretty` or `minify`.",
      "schema": {
       "type": "string",
       "default": "keep"
      }
     },
     {
      "name": "indent",
      "in": "query",
      "required": false,
      "description": "Indentation for format=pretty (0-8).",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "parse",
      "in": "query",
      "required": false,
      "description": "`false` leaves out the parsed `data`.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "unescape",
      "in": "query",
      "required": false,
      "description": "Decode JSON that was sent as a JSON string (\"{\\\"a\\\":1}\").",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid_input": {
           "type": "boolean"
          },
          "changed": {
           "type": "boolean"
          },
          "repaired": {
           "type": "string"
          },
          "fixes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "position": {
              "type": "number"
             },
             "count": {
              "type": "number"
             }
            }
           }
          },
          "changes": {
           "type": "array",
           "items": {}
          },
          "data": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "age": {
             "type": "number"
            },
            "tags": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "vip": {
             "type": "boolean"
            },
            "note": {}
           }
          },
          "type": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Repair",
    "description": "Send text that should be JSON but does not parse, typically the answer of a language model, a JavaScript object literal, a Python dict or a log line, and get valid JSON back. The repair (jsonrepair library) quotes unquoted keys and strings, replaces single and typographic quotes, removes comments, trailing commas and `...` placeholders, inserts missing commas and colons, converts `True` / `False` / `None` and `undefined` / `NaN`, unwraps JSONP and MongoDB calls (`ObjectId(\"…\")`), joins `\"a\" + \"b\"`, escapes raw line breaks and closes strings, brackets and braces of truncated output.\n\nLLM answers are cut down to the JSON first: the first Markdown code block, or the text between the first `{` / `[` and the last `}` / `]`. Several top-level values (NDJSON, JSON lines) become an array, and JSON that was encoded as a JSON string is decoded. The response gives the repaired text (`format` keep, pretty or minify), the parsed `data`, the list of `fixes` with the position of their first occurrence, and, for inputs up to 20,000 characters, the exact character `changes`.\n\nPass a JSON Schema as `schema` to validate the repaired data in the same call (draft 2020-12). Valid JSON is returned unchanged with `valid_input: true`. Text that cannot be turned into JSON (for example only closing brackets) returns 422 with the position of the problem. Up to 5 MB; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/json-repair/",
    "operationId": "jsonRepairPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-repair/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "json": {
          "type": "string",
          "description": "The broken JSON text (or send it as a text/plain body)."
         },
         "format": {
          "type": "string",
          "default": "keep",
          "description": "`keep` (layout of the input), `pretty` or `minify`."
         },
         "indent": {
          "type": "number",
          "default": 2,
          "description": "Indentation for format=pretty (0-8)."
         },
         "schema": {
          "type": "object",
          "description": "JSON Schema (draft 2020-12) to validate the repaired data."
         },
         "parse": {
          "type": "boolean",
          "default": true,
          "description": "`false` leaves out the parsed `data`."
         },
         "unescape": {
          "type": "boolean",
          "default": true,
          "description": "Decode JSON that was sent as a JSON string (\"{\\\"a\\\":1}\")."
         }
        },
        "required": [
         "json"
        ]
       },
       "example": {
        "json": "```json\n{name: 'Lan', age: 30, tags: ['a', 'b',], vip: True, note: None\n```"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid_input": {
           "type": "boolean"
          },
          "changed": {
           "type": "boolean"
          },
          "repaired": {
           "type": "string"
          },
          "fixes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "position": {
              "type": "number"
             },
             "count": {
              "type": "number"
             }
            }
           }
          },
          "changes": {
           "type": "array",
           "items": {}
          },
          "data": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "age": {
             "type": "number"
            },
            "tags": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "vip": {
             "type": "boolean"
            },
            "note": {}
           }
          },
          "type": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid_input": false,
         "changed": true,
         "repaired": "{\"name\": \"Lan\", \"age\": 30, \"tags\": [\"a\", \"b\"], \"vip\": true, \"note\": null}",
         "fixes": [
          {
           "type": "markdown_fence",
           "message": "Removed Markdown code fences (```json … ```)",
           "position": 0,
           "count": 1
          },
          {
           "type": "unquoted_key",
           "message": "Quoted unquoted object keys",
           "position": 9,
           "count": 5
          },
          {
           "type": "single_quotes",
           "message": "Replaced single-quoted strings with double quotes",
           "position": 15,
           "count": 3
          },
          {
           "type": "trailing_comma",
           "message": "Removed trailing commas",
           "position": 46,
           "count": 1
          },
          {
           "type": "python_constant",
           "message": "Converted Python constants True / False / None to true / false / null",
           "position": 55,
           "count": 2
          },
          {
           "type": "unclosed_bracket",
           "message": "Closed brackets / braces left open (truncated JSON)",
           "position": 71,
           "count": 1
          }
         ],
         "changes": [
          {
           "position": 0,
           "removed": "```json\n",
           "added": ""
          },
          {
           "position": 9,
           "removed": "",
           "added": "\""
          },
          "…"
         ],
         "data": {
          "name": "Lan",
          "age": 30,
          "tags": [
           "a",
           "b"
          ],
          "vip": true,
          "note": null
         },
         "type": "object"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/openapi-tools": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "OpenAPI Validator & Converter",
    "description": "Send an API definition as `spec` (YAML or JSON text, or a JSON object), as a text body, or give its `url`. With `action=validate` (default) the document is checked against the official JSON Schema of its version published by the OpenAPI Initiative (Swagger 2.0, OpenAPI 3.0, 3.1 and 3.2, refreshed weekly) and errors are reduced to the useful ones: for `oneOf` alternatives only the variant you most likely meant is reported, with the JSON pointer of each problem.\n\nA built-in linter adds what the schema cannot see: `$ref` that do not resolve, duplicate `operationId`, path parameters missing from `parameters` or not in the template, path parameters without `required: true`, equivalent paths (`/a/{id}` vs `/a/{name}`), undefined security schemes, operations without a 2xx response, GET with a request body, server URLs ending with a slash, unused components, and missing descriptions, tags, contact or licence (as info). `stats` counts paths, operations by method, schemas and servers.\n\n`action=endpoints` lists every operation (method, path, operationId, summary, tags, parameters, request body content types, response codes, security); `action=convert` turns YAML into JSON and back (`to`); `action=upgrade` converts Swagger 2.0 into OpenAPI 3.0.3 (servers from host / basePath / schemes, `requestBody` from body and formData parameters, `components`, security flows, `$ref` rewriting, `x-nullable`) and validates the result. External `$ref` files are not fetched. Up to 10 MB.\n\nDocs: https://apibox.io.vn/docs/openapi-tools/",
    "operationId": "openapiToolsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/openapi-tools/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the document, instead of `spec`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`validate` (schema + lint + stats), `endpoints`, `convert` (YAML ↔ JSON) or `upgrade` (Swagger 2.0 → OpenAPI 3.0.3).",
      "schema": {
       "type": "string",
       "default": "validate"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "`json` or `yaml` for convert / upgrade (default: the other format for convert, the same for upgrade).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lint",
      "in": "query",
      "required": false,
      "description": "`false` skips the lint rules.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "openapi_version": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "api_version": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "schema_valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "lint": {
           "type": "object",
           "properties": {
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "infos": {
             "type": "number"
            },
            "issues": {
             "type": "array",
             "items": {}
            }
           }
          },
          "stats": {
           "type": "object",
           "properties": {
            "paths": {
             "type": "number"
            },
            "operations": {
             "type": "number"
            },
            "by_method": {
             "type": "object",
             "properties": {
              "GET": {
               "type": "number"
              }
             }
            },
            "tags": {
             "type": "array"
            },
            "schemas": {
             "type": "number"
            },
            "security_schemes": {
             "type": "array"
            },
            "servers": {
             "type": "array"
            },
            "deprecated_operations": {
             "type": "number"
            }
           }
          },
          "schema_used": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "OpenAPI Validator & Converter",
    "description": "Send an API definition as `spec` (YAML or JSON text, or a JSON object), as a text body, or give its `url`. With `action=validate` (default) the document is checked against the official JSON Schema of its version published by the OpenAPI Initiative (Swagger 2.0, OpenAPI 3.0, 3.1 and 3.2, refreshed weekly) and errors are reduced to the useful ones: for `oneOf` alternatives only the variant you most likely meant is reported, with the JSON pointer of each problem.\n\nA built-in linter adds what the schema cannot see: `$ref` that do not resolve, duplicate `operationId`, path parameters missing from `parameters` or not in the template, path parameters without `required: true`, equivalent paths (`/a/{id}` vs `/a/{name}`), undefined security schemes, operations without a 2xx response, GET with a request body, server URLs ending with a slash, unused components, and missing descriptions, tags, contact or licence (as info). `stats` counts paths, operations by method, schemas and servers.\n\n`action=endpoints` lists every operation (method, path, operationId, summary, tags, parameters, request body content types, response codes, security); `action=convert` turns YAML into JSON and back (`to`); `action=upgrade` converts Swagger 2.0 into OpenAPI 3.0.3 (servers from host / basePath / schemes, `requestBody` from body and formData parameters, `components`, security flows, `$ref` rewriting, `x-nullable`) and validates the result. External `$ref` files are not fetched. Up to 10 MB.\n\nDocs: https://apibox.io.vn/docs/openapi-tools/",
    "operationId": "openapiToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/openapi-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "spec": {
          "type": "string",
          "description": "The OpenAPI / Swagger document: YAML or JSON text, or a JSON object. Or a raw text body."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the document, instead of `spec`."
         },
         "action": {
          "type": "string",
          "default": "validate",
          "description": "`validate` (schema + lint + stats), `endpoints`, `convert` (YAML ↔ JSON) or `upgrade` (Swagger 2.0 → OpenAPI 3.0.3)."
         },
         "to": {
          "type": "string",
          "description": "`json` or `yaml` for convert / upgrade (default: the other format for convert, the same for upgrade)."
         },
         "lint": {
          "type": "boolean",
          "default": true,
          "description": "`false` skips the lint rules."
         }
        }
       },
       "example": {
        "spec": "openapi: 3.0.3\ninfo:\n  title: Shop API\n  version: 1.0.0\npaths:\n  /orders/{id}:\n    get:\n      summary: Get an order\n      responses:\n        '200':\n          description: The order\n"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "openapi_version": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "api_version": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "schema_valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "lint": {
           "type": "object",
           "properties": {
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "infos": {
             "type": "number"
            },
            "issues": {
             "type": "array",
             "items": {}
            }
           }
          },
          "stats": {
           "type": "object",
           "properties": {
            "paths": {
             "type": "number"
            },
            "operations": {
             "type": "number"
            },
            "by_method": {
             "type": "object",
             "properties": {
              "GET": {
               "type": "number"
              }
             }
            },
            "tags": {
             "type": "array"
            },
            "schemas": {
             "type": "number"
            },
            "security_schemes": {
             "type": "array"
            },
            "servers": {
             "type": "array"
            },
            "deprecated_operations": {
             "type": "number"
            }
           }
          },
          "schema_used": {
           "type": "string"
          }
         }
        },
        "example": {
         "openapi_version": "3.0.3",
         "format": "yaml",
         "title": "Shop API",
         "api_version": "1.0.0",
         "valid": false,
         "schema_valid": true,
         "errors": [],
         "lint": {
          "errors": 1,
          "warnings": 2,
          "infos": 4,
          "issues": [
           {
            "rule": "servers-defined",
            "severity": "warning",
            "path": "/servers",
            "message": "No servers: clients will use the document location as base URL"
           },
           {
            "rule": "operation-operationId",
            "severity": "warning",
            "path": "/paths/~1orders~1{id}/get",
            "message": "GET /orders/{id} has no operationId"
           },
           {
            "rule": "path-params-defined",
            "severity": "error",
            "path": "/paths/~1orders~1{id}/get",
            "message": "Path parameter {id} of GET /orders/{id} is not defined in parameters"
           },
           "…"
          ]
         },
         "stats": {
          "paths": 1,
          "operations": 1,
          "by_method": {
           "GET": 1
          },
          "tags": [],
          "schemas": 0,
          "security_schemes": [],
          "servers": [],
          "deprecated_operations": 0
         },
         "schema_used": "https://spec.openapis.org/oas/3.0/schema/2024-10-18"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/fuzzy-match": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Fuzzy Match & Dedupe",
    "description": "Three modes. `compare` (`a`, `b`) returns every score between 0 and 1: normalised Levenshtein, Jaro-Winkler, token sort and token set ratio (as rapidfuzz), trigram similarity (as PostgreSQL pg_trgm) and `combined`, their mean, plus the edit distance. `search` (`query`, `choices` up to 10,000) returns the best matches above `threshold` with their index. `dedupe` (`items` up to 5,000) groups near-duplicates into clusters with a representative and returns the deduplicated list; pairs are blocked by shared trigrams, so large lists stay fast.\n\nBefore comparing, strings are normalised: case and Vietnamese accents are folded (Nguyễn = nguyen, đ = d), punctuation becomes spaces and common Vietnamese abbreviations are expanded (TP. = thành phố, Q. = quận, P. = phường, Cty = công ty, CP = cổ phần, TM = thương mại, HCM = Hồ Chí Minh…). Turn these off with `keep_accents`, `case_sensitive` and `abbreviations=false`, and drop noise words with `ignore` (for example \"tnhh, cong ty\").\n\nChoose the score with `algorithm`: `token_set` for names whose word order or extra words vary (company names, product titles), `jaro_winkler` for short strings and typos at the end, `levenshtein` for codes, `trigram` for long texts. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/fuzzy-match/",
    "operationId": "fuzzyMatchGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/fuzzy-match/"
    },
    "parameters": [
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`compare`, `search` or `dedupe` (guessed from the parameters when absent).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "a",
      "in": "query",
      "required": false,
      "description": "compare: first string.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "b",
      "in": "query",
      "required": false,
      "description": "compare: second string.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "query",
      "in": "query",
      "required": false,
      "description": "search: the string to look for.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "algorithm",
      "in": "query",
      "required": false,
      "description": "`combined`, `levenshtein`, `jaro_winkler`, `token_sort`, `token_set` or `trigram` (search and dedupe).",
      "schema": {
       "type": "string",
       "default": "combined"
      }
     },
     {
      "name": "threshold",
      "in": "query",
      "required": false,
      "description": "Minimum score 0-1: 0.5 for search, 0.85 for dedupe by default.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "search: number of matches returned (1-1000).",
      "schema": {
       "type": "number",
       "default": 10
      }
     },
     {
      "name": "keep_accents",
      "in": "query",
      "required": false,
      "description": "Compare with Vietnamese accents (no folding).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "case_sensitive",
      "in": "query",
      "required": false,
      "description": "Upper and lower case differ.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "abbreviations",
      "in": "query",
      "required": false,
      "description": "Expand Vietnamese abbreviations (TP., Q., P., Cty, CP, TM…).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "ignore",
      "in": "query",
      "required": false,
      "description": "Words to drop before comparing, e.g. [\"tnhh\", \"cong ty\"].",
      "schema": {
       "type": "array",
       "items": {}
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "a": {
           "type": "string"
          },
          "b": {
           "type": "string"
          },
          "normalized_a": {
           "type": "string"
          },
          "normalized_b": {
           "type": "string"
          },
          "levenshtein_distance": {
           "type": "number"
          },
          "jaro": {
           "type": "number"
          },
          "indel_ratio": {
           "type": "number"
          },
          "scores": {
           "type": "object",
           "properties": {
            "combined": {
             "type": "number"
            },
            "levenshtein": {
             "type": "number"
            },
            "jaro_winkler": {
             "type": "number"
            },
            "token_sort": {
             "type": "number"
            },
            "token_set": {
             "type": "number"
            },
            "trigram": {
             "type": "number"
            }
           }
          },
          "options": {
           "type": "object",
           "properties": {
            "algorithm": {
             "type": "string"
            },
            "accent_insensitive": {
             "type": "boolean"
            },
            "case_insensitive": {
             "type": "boolean"
            },
            "abbreviations": {
             "type": "boolean"
            },
            "ignore": {
             "type": "array"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Fuzzy Match & Dedupe",
    "description": "Three modes. `compare` (`a`, `b`) returns every score between 0 and 1: normalised Levenshtein, Jaro-Winkler, token sort and token set ratio (as rapidfuzz), trigram similarity (as PostgreSQL pg_trgm) and `combined`, their mean, plus the edit distance. `search` (`query`, `choices` up to 10,000) returns the best matches above `threshold` with their index. `dedupe` (`items` up to 5,000) groups near-duplicates into clusters with a representative and returns the deduplicated list; pairs are blocked by shared trigrams, so large lists stay fast.\n\nBefore comparing, strings are normalised: case and Vietnamese accents are folded (Nguyễn = nguyen, đ = d), punctuation becomes spaces and common Vietnamese abbreviations are expanded (TP. = thành phố, Q. = quận, P. = phường, Cty = công ty, CP = cổ phần, TM = thương mại, HCM = Hồ Chí Minh…). Turn these off with `keep_accents`, `case_sensitive` and `abbreviations=false`, and drop noise words with `ignore` (for example \"tnhh, cong ty\").\n\nChoose the score with `algorithm`: `token_set` for names whose word order or extra words vary (company names, product titles), `jaro_winkler` for short strings and typos at the end, `levenshtein` for codes, `trigram` for long texts. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/fuzzy-match/",
    "operationId": "fuzzyMatchPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/fuzzy-match/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "mode": {
          "type": "string",
          "description": "`compare`, `search` or `dedupe` (guessed from the parameters when absent)."
         },
         "a": {
          "type": "string",
          "description": "compare: first string."
         },
         "b": {
          "type": "string",
          "description": "compare: second string."
         },
         "query": {
          "type": "string",
          "description": "search: the string to look for."
         },
         "choices": {
          "type": "array",
          "items": {},
          "description": "search: list of candidates (JSON array or one per line), up to 10,000."
         },
         "items": {
          "type": "array",
          "items": {},
          "description": "dedupe: list to cluster (JSON array or one per line), up to 5,000."
         },
         "algorithm": {
          "type": "string",
          "default": "combined",
          "description": "`combined`, `levenshtein`, `jaro_winkler`, `token_sort`, `token_set` or `trigram` (search and dedupe)."
         },
         "threshold": {
          "type": "number",
          "description": "Minimum score 0-1: 0.5 for search, 0.85 for dedupe by default."
         },
         "limit": {
          "type": "number",
          "default": 10,
          "description": "search: number of matches returned (1-1000)."
         },
         "keep_accents": {
          "type": "boolean",
          "default": false,
          "description": "Compare with Vietnamese accents (no folding)."
         },
         "case_sensitive": {
          "type": "boolean",
          "default": false,
          "description": "Upper and lower case differ."
         },
         "abbreviations": {
          "type": "boolean",
          "default": true,
          "description": "Expand Vietnamese abbreviations (TP., Q., P., Cty, CP, TM…)."
         },
         "ignore": {
          "type": "array",
          "items": {},
          "description": "Words to drop before comparing, e.g. [\"tnhh\", \"cong ty\"]."
         }
        }
       },
       "example": {
        "a": "Cty TNHH Thương mại ABC, Q.1, TP.HCM",
        "b": "Công ty TNHH TM ABC Quận 1 Hồ Chí Minh"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "a": {
           "type": "string"
          },
          "b": {
           "type": "string"
          },
          "normalized_a": {
           "type": "string"
          },
          "normalized_b": {
           "type": "string"
          },
          "levenshtein_distance": {
           "type": "number"
          },
          "jaro": {
           "type": "number"
          },
          "indel_ratio": {
           "type": "number"
          },
          "scores": {
           "type": "object",
           "properties": {
            "combined": {
             "type": "number"
            },
            "levenshtein": {
             "type": "number"
            },
            "jaro_winkler": {
             "type": "number"
            },
            "token_sort": {
             "type": "number"
            },
            "token_set": {
             "type": "number"
            },
            "trigram": {
             "type": "number"
            }
           }
          },
          "options": {
           "type": "object",
           "properties": {
            "algorithm": {
             "type": "string"
            },
            "accent_insensitive": {
             "type": "boolean"
            },
            "case_insensitive": {
             "type": "boolean"
            },
            "abbreviations": {
             "type": "boolean"
            },
            "ignore": {
             "type": "array"
            }
           }
          }
         }
        },
        "example": {
         "mode": "compare",
         "a": "Cty TNHH Thương mại ABC, Q.1, TP.HCM",
         "b": "Công ty TNHH TM ABC Quận 1 Hồ Chí Minh",
         "normalized_a": "cong ty tnhh thuong mai abc quan 1 thanh pho ho chi minh",
         "normalized_b": "cong ty tnhh thuong mai abc quan 1 ho chi minh",
         "levenshtein_distance": 10,
         "jaro": 0.9151,
         "indel_ratio": 0.902,
         "scores": {
          "combined": 0.9107,
          "levenshtein": 0.8214,
          "jaro_winkler": 0.9491,
          "token_sort": 0.902,
          "token_set": 1,
          "trigram": 0.8723
         },
         "options": {
          "algorithm": "combined",
          "accent_insensitive": true,
          "case_insensitive": true,
          "abbreviations": true,
          "ignore": []
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/domain-parse": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Domain Parser (Public Suffix)",
    "description": "Give a URL, a hostname or an e-mail address as `domain` and get its parts according to the Public Suffix List: `public_suffix` (`com.vn`, `edu.vn`, `co.uk`), the registrable domain (`domain`, eTLD+1, the level at which cookies and sites are scoped), `subdomain`, `domain_without_suffix` and `tld`. Private suffixes run by companies (github.io, workers.dev, blogspot.com…) are recognised: `suffix_type` is `icann`, `private` or `unlisted`, and for private suffixes `domain_icann` gives the domain under the ICANN rules only.\n\nInternationalised domain names are converted both ways (`hostname` in punycode `xn--…`, `hostname_unicode` and `domain_unicode`), hostnames are checked against the length and character rules, IP addresses are detected, and `localhost` or internal names are flagged. POST `domains` (array or one per line, up to 1000) for a batch; `group=true` also groups the inputs by registrable domain, for example to count leads per company website.\n\nThe list is the Public Suffix List (publicsuffix.org, MPL-2.0) compiled in the tldts library; a weekly check compares it with the published list. Purely local: no DNS or WHOIS request. For homoglyph and phishing checks of IDNs use /v1/unicode-check.\n\nDocs: https://apibox.io.vn/docs/domain-parse/",
    "operationId": "domainParseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/domain-parse/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "A URL, hostname or e-mail address. Also accepted in the path: /v1/domain-parse/shop.abc.com.vn.",
      "schema": {
       "type": "string"
      },
      "example": "https://shop.abc.com.vn/san-pham"
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "With `domains`: also group the inputs by registrable domain.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "hostname": {
           "type": "string"
          },
          "hostname_unicode": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "is_ip": {
           "type": "boolean"
          },
          "is_idn": {
           "type": "boolean"
          },
          "is_localhost": {
           "type": "boolean"
          },
          "labels": {
           "type": "number"
          },
          "tld": {
           "type": "string"
          },
          "public_suffix": {
           "type": "string"
          },
          "suffix_type": {
           "type": "string"
          },
          "domain": {
           "type": "string"
          },
          "domain_unicode": {
           "type": "string"
          },
          "domain_without_suffix": {
           "type": "string"
          },
          "subdomain": {
           "type": "string"
          },
          "source": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "https://shop.abc.com.vn/san-pham?id=1",
         "hostname": "shop.abc.com.vn",
         "hostname_unicode": "shop.abc.com.vn",
         "valid": true,
         "is_ip": false,
         "is_idn": false,
         "is_localhost": false,
         "labels": 4,
         "tld": "vn",
         "public_suffix": "com.vn",
         "suffix_type": "icann",
         "domain": "abc.com.vn",
         "domain_unicode": "abc.com.vn",
         "domain_without_suffix": "abc",
         "subdomain": "shop",
         "source": "Public Suffix List (publicsuffix.org, MPL-2.0) via tldts"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Domain Parser (Public Suffix)",
    "description": "Give a URL, a hostname or an e-mail address as `domain` and get its parts according to the Public Suffix List: `public_suffix` (`com.vn`, `edu.vn`, `co.uk`), the registrable domain (`domain`, eTLD+1, the level at which cookies and sites are scoped), `subdomain`, `domain_without_suffix` and `tld`. Private suffixes run by companies (github.io, workers.dev, blogspot.com…) are recognised: `suffix_type` is `icann`, `private` or `unlisted`, and for private suffixes `domain_icann` gives the domain under the ICANN rules only.\n\nInternationalised domain names are converted both ways (`hostname` in punycode `xn--…`, `hostname_unicode` and `domain_unicode`), hostnames are checked against the length and character rules, IP addresses are detected, and `localhost` or internal names are flagged. POST `domains` (array or one per line, up to 1000) for a batch; `group=true` also groups the inputs by registrable domain, for example to count leads per company website.\n\nThe list is the Public Suffix List (publicsuffix.org, MPL-2.0) compiled in the tldts library; a weekly check compares it with the published list. Purely local: no DNS or WHOIS request. For homoglyph and phishing checks of IDNs use /v1/unicode-check.\n\nDocs: https://apibox.io.vn/docs/domain-parse/",
    "operationId": "domainParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/domain-parse/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "domain": {
          "type": "string",
          "description": "A URL, hostname or e-mail address. Also accepted in the path: /v1/domain-parse/shop.abc.com.vn."
         },
         "domains": {
          "type": "array",
          "items": {},
          "description": "Batch: up to 1000 inputs (array, or separated by new lines, commas or spaces)."
         },
         "group": {
          "type": "boolean",
          "default": false,
          "description": "With `domains`: also group the inputs by registrable domain."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "hostname": {
           "type": "string"
          },
          "hostname_unicode": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "is_ip": {
           "type": "boolean"
          },
          "is_idn": {
           "type": "boolean"
          },
          "is_localhost": {
           "type": "boolean"
          },
          "labels": {
           "type": "number"
          },
          "tld": {
           "type": "string"
          },
          "public_suffix": {
           "type": "string"
          },
          "suffix_type": {
           "type": "string"
          },
          "domain": {
           "type": "string"
          },
          "domain_unicode": {
           "type": "string"
          },
          "domain_without_suffix": {
           "type": "string"
          },
          "subdomain": {
           "type": "string"
          },
          "source": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cidr": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "CIDR / Subnet Calculator",
    "description": "Give a network as `cidr` (`192.168.1.0/24`, `10.0.0.1/255.255.255.0`, `2001:db8::/48`) and get the network and broadcast address, netmask and wildcard mask, first / last address and usable host range, total addresses and usable hosts (RFC 3021 /31 and /32 handled), binary mask, class, address type (private, CGNAT, documentation, multicast…), the reverse DNS zone and the previous / next networks of the same size. IPv6 addresses are shown compressed and expanded, with the number of /64 subnets.\n\nOther actions (chosen from the parameters, or with `action`): `contains` checks whether one or many `ip` (addresses or CIDRs) are inside the network; `split` cuts it into subnets by new `prefix`, number of `subnets` or `hosts` per subnet (up to 4096 listed); `range` turns `first-last` into the smallest list of CIDR blocks; `merge` takes a `list` of CIDRs, addresses and ranges (up to 10,000), merges overlapping and adjacent blocks into the minimal set and reports duplicates and overlaps.\n\nPure calculation with 128-bit integers: no lookup, nothing stored. For the owner and location of an address use /v1/ip, for cloud and Tor ranges /v1/ip-intel.\n\nDocs: https://apibox.io.vn/docs/cidr/",
    "operationId": "cidrGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cidr/"
    },
    "parameters": [
     {
      "name": "cidr",
      "in": "query",
      "required": false,
      "description": "Network (`10.0.0.0/8`, `10.1.2.3/255.0.0.0`, `2001:db8::/32`), a single address, or `first-last` for action=range. Also in the path: /v1/cidr/10.0.0.0%2F8.",
      "schema": {
       "type": "string"
      },
      "example": "192.168.10.0/26"
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`info`, `contains`, `split`, `range` or `merge` (guessed from the other parameters when absent).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ip",
      "in": "query",
      "required": false,
      "description": "contains: address(es) or CIDR(s) to test, comma or newline separated (up to 1000).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "prefix",
      "in": "query",
      "required": false,
      "description": "split: new prefix length.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "subnets",
      "in": "query",
      "required": false,
      "description": "split: number of subnets wanted (rounded up to a power of two).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "hosts",
      "in": "query",
      "required": false,
      "description": "split: hosts needed per subnet.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "split: subnets listed (1-4096).",
      "schema": {
       "type": "number",
       "default": 256
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "merge: CIDRs, addresses and ranges a-b (array or separated by new lines, commas, spaces), up to 10,000.",
      "schema": {
       "type": "array",
       "items": {}
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "cidr": {
           "type": "string"
          },
          "version": {
           "type": "number"
          },
          "prefix": {
           "type": "number"
          },
          "network": {
           "type": "string"
          },
          "netmask": {
           "type": "string"
          },
          "wildcard": {
           "type": "string"
          },
          "broadcast": {
           "type": "string"
          },
          "first_address": {
           "type": "string"
          },
          "last_address": {
           "type": "string"
          },
          "first_host": {
           "type": "string"
          },
          "last_host": {
           "type": "string"
          },
          "total_addresses": {
           "type": "number"
          },
          "usable_hosts": {
           "type": "number"
          },
          "netmask_binary": {
           "type": "string"
          },
          "network_hex": {
           "type": "string"
          },
          "integer_range": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "class": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "reverse_zone": {
           "type": "string"
          },
          "previous_network": {
           "type": "string"
          },
          "next_network": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "info",
         "cidr": "192.168.10.0/26",
         "version": 4,
         "prefix": 26,
         "network": "192.168.10.0",
         "netmask": "255.255.255.192",
         "wildcard": "0.0.0.63",
         "broadcast": "192.168.10.63",
         "first_address": "192.168.10.0",
         "last_address": "192.168.10.63",
         "first_host": "192.168.10.1",
         "last_host": "192.168.10.62",
         "total_addresses": 64,
         "usable_hosts": 62,
         "netmask_binary": "11111111.11111111.11111111.11000000",
         "network_hex": "0xc0a80a00",
         "integer_range": [
          3232238080,
          3232238143
         ],
         "class": "C",
         "type": "private",
         "reverse_zone": "10.168.192.in-addr.arpa",
         "previous_network": "192.168.9.192/26",
         "next_network": "192.168.10.64/26"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "CIDR / Subnet Calculator",
    "description": "Give a network as `cidr` (`192.168.1.0/24`, `10.0.0.1/255.255.255.0`, `2001:db8::/48`) and get the network and broadcast address, netmask and wildcard mask, first / last address and usable host range, total addresses and usable hosts (RFC 3021 /31 and /32 handled), binary mask, class, address type (private, CGNAT, documentation, multicast…), the reverse DNS zone and the previous / next networks of the same size. IPv6 addresses are shown compressed and expanded, with the number of /64 subnets.\n\nOther actions (chosen from the parameters, or with `action`): `contains` checks whether one or many `ip` (addresses or CIDRs) are inside the network; `split` cuts it into subnets by new `prefix`, number of `subnets` or `hosts` per subnet (up to 4096 listed); `range` turns `first-last` into the smallest list of CIDR blocks; `merge` takes a `list` of CIDRs, addresses and ranges (up to 10,000), merges overlapping and adjacent blocks into the minimal set and reports duplicates and overlaps.\n\nPure calculation with 128-bit integers: no lookup, nothing stored. For the owner and location of an address use /v1/ip, for cloud and Tor ranges /v1/ip-intel.\n\nDocs: https://apibox.io.vn/docs/cidr/",
    "operationId": "cidrPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cidr/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "cidr": {
          "type": "string",
          "description": "Network (`10.0.0.0/8`, `10.1.2.3/255.0.0.0`, `2001:db8::/32`), a single address, or `first-last` for action=range. Also in the path: /v1/cidr/10.0.0.0%2F8."
         },
         "action": {
          "type": "string",
          "description": "`info`, `contains`, `split`, `range` or `merge` (guessed from the other parameters when absent)."
         },
         "ip": {
          "type": "string",
          "description": "contains: address(es) or CIDR(s) to test, comma or newline separated (up to 1000)."
         },
         "prefix": {
          "type": "number",
          "description": "split: new prefix length."
         },
         "subnets": {
          "type": "number",
          "description": "split: number of subnets wanted (rounded up to a power of two)."
         },
         "hosts": {
          "type": "number",
          "description": "split: hosts needed per subnet."
         },
         "limit": {
          "type": "number",
          "default": 256,
          "description": "split: subnets listed (1-4096)."
         },
         "list": {
          "type": "array",
          "items": {},
          "description": "merge: CIDRs, addresses and ranges a-b (array or separated by new lines, commas, spaces), up to 10,000."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "cidr": {
           "type": "string"
          },
          "version": {
           "type": "number"
          },
          "prefix": {
           "type": "number"
          },
          "network": {
           "type": "string"
          },
          "netmask": {
           "type": "string"
          },
          "wildcard": {
           "type": "string"
          },
          "broadcast": {
           "type": "string"
          },
          "first_address": {
           "type": "string"
          },
          "last_address": {
           "type": "string"
          },
          "first_host": {
           "type": "string"
          },
          "last_host": {
           "type": "string"
          },
          "total_addresses": {
           "type": "number"
          },
          "usable_hosts": {
           "type": "number"
          },
          "netmask_binary": {
           "type": "string"
          },
          "network_hex": {
           "type": "string"
          },
          "integer_range": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "class": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "reverse_zone": {
           "type": "string"
          },
          "previous_network": {
           "type": "string"
          },
          "next_network": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/mac-vendor": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "MAC Address Vendor Lookup",
    "description": "Send a MAC address in any notation (`00:1A:2B:3C:4D:5E`, `00-1a-2b-…`, `001a.2b3c.4d5e`, `001A2B3C4D5E`), an OUI prefix or an EUI-64 and get the organisation the block is registered to, with the IEEE registry (`MA-L` 24-bit OUI, `MA-M` 28-bit, `MA-S` 36-bit, legacy `IAB`, `CID` company IDs), the assigned prefix, the country and address of the registration. The longest matching block wins, so devices of small companies inside an MA-M or MA-S block are named correctly.\n\nThe address bits are decoded: unicast / multicast, broadcast, universally or locally administered, the IEEE 802c SLAP quadrant, and `randomized: true` for locally administered unicast addresses, used by phones, laptops and Wi-Fi privacy features (those identify no manufacturer). For a full MAC the API also gives the four usual notations, the modified EUI-64 interface identifier and the matching IPv6 link-local address. POST `macs` (up to 1000) for a batch.\n\nData: the public listings of the IEEE Registration Authority, refreshed weekly. Blocks bought as \"private\" listings show the name Private. A MAC address can be changed in software, so the vendor is a hint, not a proof of the device type.\n\nDocs: https://apibox.io.vn/docs/mac-vendor/",
    "operationId": "macVendorGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/mac-vendor/"
    },
    "parameters": [
     {
      "name": "mac",
      "in": "query",
      "required": false,
      "description": "MAC address, OUI prefix (6, 7 or 9 hex digits) or EUI-64, any separators. Also in the path: /v1/mac-vendor/00:00:0C:12:34:56.",
      "schema": {
       "type": "string"
      },
      "example": "00:00:0C:12:34:56"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "kind": {
           "type": "string"
          },
          "formats": {
           "type": "object",
           "properties": {
            "colon": {
             "type": "string"
            },
            "hyphen": {
             "type": "string"
            },
            "dot": {
             "type": "string"
            },
            "bare": {
             "type": "string"
            }
           }
          },
          "unicast": {
           "type": "boolean"
          },
          "multicast": {
           "type": "boolean"
          },
          "broadcast": {
           "type": "boolean"
          },
          "universally_administered": {
           "type": "boolean"
          },
          "locally_administered": {
           "type": "boolean"
          },
          "randomized": {
           "type": "boolean"
          },
          "eui64_interface_id": {
           "type": "string"
          },
          "ipv6_link_local": {
           "type": "string"
          },
          "vendor": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "registry": {
             "type": "string"
            },
            "registry_name": {
             "type": "string"
            },
            "assignment": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "address": {
             "type": "string"
            },
            "private": {
             "type": "boolean"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "source": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "00:00:0C:12:34:56",
         "valid": true,
         "kind": "EUI-48",
         "formats": {
          "colon": "00:00:0C:12:34:56",
          "hyphen": "00-00-0C-12-34-56",
          "dot": "0000.0c12.3456",
          "bare": "00000C123456"
         },
         "unicast": true,
         "multicast": false,
         "broadcast": false,
         "universally_administered": true,
         "locally_administered": false,
         "randomized": false,
         "eui64_interface_id": "200:cff:fe12:3456",
         "ipv6_link_local": "fe80::200:cff:fe12:3456",
         "vendor": {
          "name": "Cisco Systems, Inc",
          "registry": "MA-L",
          "registry_name": "MAC Address Block Large (24-bit OUI, 16M addresses)",
          "assignment": "00000C",
          "country": "US",
          "address": "170 WEST TASMAN DRIVE SAN JOSE CA US 95134-1706 US",
          "private": false
         },
         "data_version": "20261111",
         "source": "IEEE Registration Authority public listings (MA-L, MA-M, MA-S, IAB, CID)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "MAC Address Vendor Lookup",
    "description": "Send a MAC address in any notation (`00:1A:2B:3C:4D:5E`, `00-1a-2b-…`, `001a.2b3c.4d5e`, `001A2B3C4D5E`), an OUI prefix or an EUI-64 and get the organisation the block is registered to, with the IEEE registry (`MA-L` 24-bit OUI, `MA-M` 28-bit, `MA-S` 36-bit, legacy `IAB`, `CID` company IDs), the assigned prefix, the country and address of the registration. The longest matching block wins, so devices of small companies inside an MA-M or MA-S block are named correctly.\n\nThe address bits are decoded: unicast / multicast, broadcast, universally or locally administered, the IEEE 802c SLAP quadrant, and `randomized: true` for locally administered unicast addresses, used by phones, laptops and Wi-Fi privacy features (those identify no manufacturer). For a full MAC the API also gives the four usual notations, the modified EUI-64 interface identifier and the matching IPv6 link-local address. POST `macs` (up to 1000) for a batch.\n\nData: the public listings of the IEEE Registration Authority, refreshed weekly. Blocks bought as \"private\" listings show the name Private. A MAC address can be changed in software, so the vendor is a hint, not a proof of the device type.\n\nDocs: https://apibox.io.vn/docs/mac-vendor/",
    "operationId": "macVendorPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/mac-vendor/"
    },
    "parameters": [
     {
      "name": "mac",
      "in": "query",
      "required": false,
      "description": "MAC address, OUI prefix (6, 7 or 9 hex digits) or EUI-64, any separators. Also in the path: /v1/mac-vendor/00:00:0C:12:34:56.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "macs": {
          "type": "array",
          "items": {},
          "description": "Batch: up to 1000 addresses (array or separated by new lines, commas, spaces)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "kind": {
           "type": "string"
          },
          "formats": {
           "type": "object",
           "properties": {
            "colon": {
             "type": "string"
            },
            "hyphen": {
             "type": "string"
            },
            "dot": {
             "type": "string"
            },
            "bare": {
             "type": "string"
            }
           }
          },
          "unicast": {
           "type": "boolean"
          },
          "multicast": {
           "type": "boolean"
          },
          "broadcast": {
           "type": "boolean"
          },
          "universally_administered": {
           "type": "boolean"
          },
          "locally_administered": {
           "type": "boolean"
          },
          "randomized": {
           "type": "boolean"
          },
          "eui64_interface_id": {
           "type": "string"
          },
          "ipv6_link_local": {
           "type": "string"
          },
          "vendor": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "registry": {
             "type": "string"
            },
            "registry_name": {
             "type": "string"
            },
            "assignment": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "address": {
             "type": "string"
            },
            "private": {
             "type": "boolean"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "source": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/freight-codes": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Container, AWB & UN/LOCODE",
    "description": "One endpoint for the codes of freight paperwork. `container` checks an ISO 6346 container number (`CSQU3054383`): owner code, equipment category (U freight container, J detachable equipment, Z trailer / chassis), serial number and the check digit, or computes the check digit when you give 10 characters. `size_type` decodes an ISO 6346 size and type code (`22G1`, `45G1`, `22R1`): length, height and width, type group and detailed type.\n\n`awb` checks an air waybill number (`738-1234 5675`): 3-digit airline prefix, serial and the mod-7 check digit, with the carrier name for about 50 major airlines (the full IATA directory is a paid product, so unknown prefixes are reported as such). `locode` returns a UN/LOCODE entry (`VNSGN`, `VNHPH`, `VNCLI`): name with and without diacritics, country, subdivision, functions (port, rail, road, airport, inland depot, border crossing…), status, IATA code and coordinates. `q` searches names without accents; without `country` it searches the ports, airports, inland depots and border crossings of every country, with `country` every location of that country. `code` detects the kind of code by itself.\n\nUN/LOCODE data: the official UNECE / UN/CEFACT release (CC BY 4.0, attribution in each response), checked weekly for a new release. Container owner codes are not looked up (the BIC register is paid) and no tracking status is given.\n\nDocs: https://apibox.io.vn/docs/freight-codes/",
    "operationId": "freightCodesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/freight-codes/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Any code, its kind is detected: container number, AWB, UN/LOCODE or size-type. Also in the path: /v1/freight-codes/CSQU3054383.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "container",
      "in": "query",
      "required": false,
      "description": "ISO 6346 container number (11 characters, or 10 to compute the check digit).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "size_type",
      "in": "query",
      "required": false,
      "description": "ISO 6346 size and type code, e.g. 22G1, 45G1, 42R1.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "awb",
      "in": "query",
      "required": false,
      "description": "Air waybill number, 11 digits (738-1234 5675).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "locode",
      "in": "query",
      "required": false,
      "description": "UN/LOCODE, 5 characters (VNSGN).",
      "schema": {
       "type": "string"
      },
      "example": "VNHPH"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search UN/LOCODE by name (accents optional) or IATA code.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "With `q`: ISO country code to search all locations of one country.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "function",
      "in": "query",
      "required": false,
      "description": "With `q`: port, rail, road, airport, postal, icd, fixed, inland-port or border.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "With `q`: results returned (1-100).",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "locode": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "formatted": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "name_ascii": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "country_name": {
             "type": "string"
            },
            "subdivision": {
             "type": "string"
            },
            "subdivision_name": {
             "type": "string"
            },
            "functions": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "function_code": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "status_name": {
             "type": "string"
            },
            "iata": {},
            "coordinates": {
             "type": "object",
             "properties": {
              "lat": {
               "type": "number"
              },
              "lng": {
               "type": "number"
              }
             }
            },
            "date": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "locode": {
          "code": "VNHPH",
          "formatted": "VN HPH",
          "name": "Haiphong",
          "name_ascii": "Haiphong",
          "country": "VN",
          "country_name": "VIET NAM",
          "subdivision": "HP",
          "subdivision_name": "Hải Phòng",
          "functions": [
           "port",
           "rail terminal",
           "road terminal",
           "airport"
          ],
          "function_code": "1234----",
          "status": "AI",
          "status_name": "code adopted by international organisation (IATA or ECLAC)",
          "iata": null,
          "coordinates": {
           "lat": 20.85,
           "lng": 106.6833
          },
          "date": "2024-07"
         },
         "data_version": "UN/LOCODE 2025-1",
         "source": "UN/LOCODE, UNECE / UN/CEFACT",
         "licence": "CC BY 4.0",
         "attribution": "UN/LOCODE © United Nations Economic Commission for Europe (UNECE), CC BY 4.0"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Container, AWB & UN/LOCODE",
    "description": "One endpoint for the codes of freight paperwork. `container` checks an ISO 6346 container number (`CSQU3054383`): owner code, equipment category (U freight container, J detachable equipment, Z trailer / chassis), serial number and the check digit, or computes the check digit when you give 10 characters. `size_type` decodes an ISO 6346 size and type code (`22G1`, `45G1`, `22R1`): length, height and width, type group and detailed type.\n\n`awb` checks an air waybill number (`738-1234 5675`): 3-digit airline prefix, serial and the mod-7 check digit, with the carrier name for about 50 major airlines (the full IATA directory is a paid product, so unknown prefixes are reported as such). `locode` returns a UN/LOCODE entry (`VNSGN`, `VNHPH`, `VNCLI`): name with and without diacritics, country, subdivision, functions (port, rail, road, airport, inland depot, border crossing…), status, IATA code and coordinates. `q` searches names without accents; without `country` it searches the ports, airports, inland depots and border crossings of every country, with `country` every location of that country. `code` detects the kind of code by itself.\n\nUN/LOCODE data: the official UNECE / UN/CEFACT release (CC BY 4.0, attribution in each response), checked weekly for a new release. Container owner codes are not looked up (the BIC register is paid) and no tracking status is given.\n\nDocs: https://apibox.io.vn/docs/freight-codes/",
    "operationId": "freightCodesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/freight-codes/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "description": "Any code, its kind is detected: container number, AWB, UN/LOCODE or size-type. Also in the path: /v1/freight-codes/CSQU3054383."
         },
         "container": {
          "type": "string",
          "description": "ISO 6346 container number (11 characters, or 10 to compute the check digit)."
         },
         "size_type": {
          "type": "string",
          "description": "ISO 6346 size and type code, e.g. 22G1, 45G1, 42R1."
         },
         "awb": {
          "type": "string",
          "description": "Air waybill number, 11 digits (738-1234 5675)."
         },
         "locode": {
          "type": "string",
          "description": "UN/LOCODE, 5 characters (VNSGN)."
         },
         "q": {
          "type": "string",
          "description": "Search UN/LOCODE by name (accents optional) or IATA code."
         },
         "country": {
          "type": "string",
          "description": "With `q`: ISO country code to search all locations of one country."
         },
         "function": {
          "type": "string",
          "description": "With `q`: port, rail, road, airport, postal, icd, fixed, inland-port or border."
         },
         "limit": {
          "type": "number",
          "default": 20,
          "description": "With `q`: results returned (1-100)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "locode": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "formatted": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "name_ascii": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "country_name": {
             "type": "string"
            },
            "subdivision": {
             "type": "string"
            },
            "subdivision_name": {
             "type": "string"
            },
            "functions": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "function_code": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "status_name": {
             "type": "string"
            },
            "iata": {},
            "coordinates": {
             "type": "object",
             "properties": {
              "lat": {
               "type": "number"
              },
              "lng": {
               "type": "number"
              }
             }
            },
            "date": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ip-intel": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "IP Intelligence (Cloud, Tor, Bots)",
    "description": "Give an `ip` (IPv4 or IPv6) and learn whether it belongs to a cloud, hosting or CDN network (Amazon Web Services, Google Cloud, Microsoft Azure, Oracle Cloud, Cloudflare, DigitalOcean, Akamai / Linode, Vultr) with the service and region when published, whether it is a current Tor exit node, and whether it is a verified crawler or fetcher: Googlebot and Google special crawlers, Bingbot, Applebot, GPTBot, OAI-SearchBot, ChatGPT-User, DuckDuckBot, PerplexityBot, CCBot. Every matching range is listed in `matches`, most specific first.\n\nAdd the request `ua` (User-Agent) to catch fake bots: when it claims to be one of these crawlers but the IP is outside the crawler's published ranges, `user_agent.genuine` is false and the risk is high. `dns=true` also runs the reverse + forward DNS check recommended by Google and Bing. `risk` gives a suggested level (Tor or fake crawler high, data-centre traffic medium) with the reasons. POST `ips` for up to 1000 addresses.\n\nEvery source is the provider's own published file (ip-ranges.json, cloud.json, Azure Service Tags, googlebot.json, the Tor bulk exit list…), refreshed daily; `sources=true` lists them with their prefix counts. Commercial VPNs and residential proxies publish no ranges and are not detected. For geolocation and ASN use /v1/ip.\n\nDocs: https://apibox.io.vn/docs/ip-intel/",
    "operationId": "ipIntelGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ip-intel/"
    },
    "parameters": [
     {
      "name": "ip",
      "in": "query",
      "required": false,
      "description": "IPv4 or IPv6 address. Also in the path: /v1/ip-intel/66.249.66.1.",
      "schema": {
       "type": "string"
      },
      "example": "66.249.66.1"
     },
     {
      "name": "ua",
      "in": "query",
      "required": false,
      "description": "User-Agent of the request, to check a crawler claim.",
      "schema": {
       "type": "string"
      },
      "example": "Mozilla/5.0 (compatible; Googlebot/2.1)"
     },
     {
      "name": "dns",
      "in": "query",
      "required": false,
      "description": "Also check reverse + forward DNS (max 20 IPs per batch).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "sources",
      "in": "query",
      "required": false,
      "description": "Add the list of data sources with their URLs and prefix counts.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ip": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "version": {
           "type": "number"
          },
          "is_cloud": {
           "type": "boolean"
          },
          "cloud": {},
          "is_tor_exit": {
           "type": "boolean"
          },
          "is_crawler": {
           "type": "boolean"
          },
          "crawler": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "operator": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "cidr": {
             "type": "string"
            },
            "verified_by": {
             "type": "string"
            }
           }
          },
          "google_network": {
           "type": "boolean"
          },
          "user_agent": {
           "type": "object",
           "properties": {
            "claims": {
             "type": "string"
            },
            "genuine": {
             "type": "boolean"
            }
           }
          },
          "risk": {
           "type": "object",
           "properties": {
            "level": {
             "type": "string"
            },
            "reasons": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "cidr": {
              "type": "string"
             },
             "source": {
              "type": "string"
             },
             "provider": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "bot": {
              "type": "string"
             },
             "service": {},
             "region": {}
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "built_at": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "ip": "66.249.66.1",
         "valid": true,
         "version": 4,
         "is_cloud": false,
         "cloud": null,
         "is_tor_exit": false,
         "is_crawler": true,
         "crawler": {
          "name": "Googlebot",
          "operator": "Google",
          "type": "crawler",
          "cidr": "66.249.66.0/27",
          "verified_by": "official IP ranges"
         },
         "google_network": true,
         "user_agent": {
          "claims": "Google crawler",
          "genuine": true
         },
         "risk": {
          "level": "low",
          "reasons": [
           "Verified Googlebot (official IP ranges)"
          ]
         },
         "matches": [
          {
           "cidr": "66.249.66.0/27",
           "source": "googlebot",
           "provider": "Google",
           "category": "crawler",
           "bot": "Googlebot",
           "service": null,
           "region": null
          },
          {
           "cidr": "66.249.64.0/19",
           "source": "google",
           "provider": "Google",
           "category": "network",
           "service": null,
           "region": null
          }
         ],
         "data_version": "202611110259",
         "built_at": "2026-11-11T02:59:02.917Z",
         "note": "Classification from the providers' own published IP range files (refreshed daily). Commercial VPNs and residential proxies publish no ranges and are not detected."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "IP Intelligence (Cloud, Tor, Bots)",
    "description": "Give an `ip` (IPv4 or IPv6) and learn whether it belongs to a cloud, hosting or CDN network (Amazon Web Services, Google Cloud, Microsoft Azure, Oracle Cloud, Cloudflare, DigitalOcean, Akamai / Linode, Vultr) with the service and region when published, whether it is a current Tor exit node, and whether it is a verified crawler or fetcher: Googlebot and Google special crawlers, Bingbot, Applebot, GPTBot, OAI-SearchBot, ChatGPT-User, DuckDuckBot, PerplexityBot, CCBot. Every matching range is listed in `matches`, most specific first.\n\nAdd the request `ua` (User-Agent) to catch fake bots: when it claims to be one of these crawlers but the IP is outside the crawler's published ranges, `user_agent.genuine` is false and the risk is high. `dns=true` also runs the reverse + forward DNS check recommended by Google and Bing. `risk` gives a suggested level (Tor or fake crawler high, data-centre traffic medium) with the reasons. POST `ips` for up to 1000 addresses.\n\nEvery source is the provider's own published file (ip-ranges.json, cloud.json, Azure Service Tags, googlebot.json, the Tor bulk exit list…), refreshed daily; `sources=true` lists them with their prefix counts. Commercial VPNs and residential proxies publish no ranges and are not detected. For geolocation and ASN use /v1/ip.\n\nDocs: https://apibox.io.vn/docs/ip-intel/",
    "operationId": "ipIntelPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ip-intel/"
    },
    "parameters": [
     {
      "name": "ip",
      "in": "query",
      "required": false,
      "description": "IPv4 or IPv6 address. Also in the path: /v1/ip-intel/66.249.66.1.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ips": {
          "type": "array",
          "items": {},
          "description": "Batch: up to 1000 addresses."
         },
         "ua": {
          "type": "string",
          "description": "User-Agent of the request, to check a crawler claim."
         },
         "dns": {
          "type": "boolean",
          "default": false,
          "description": "Also check reverse + forward DNS (max 20 IPs per batch)."
         },
         "sources": {
          "type": "boolean",
          "default": false,
          "description": "Add the list of data sources with their URLs and prefix counts."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ip": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "version": {
           "type": "number"
          },
          "is_cloud": {
           "type": "boolean"
          },
          "cloud": {},
          "is_tor_exit": {
           "type": "boolean"
          },
          "is_crawler": {
           "type": "boolean"
          },
          "crawler": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "operator": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "cidr": {
             "type": "string"
            },
            "verified_by": {
             "type": "string"
            }
           }
          },
          "google_network": {
           "type": "boolean"
          },
          "user_agent": {
           "type": "object",
           "properties": {
            "claims": {
             "type": "string"
            },
            "genuine": {
             "type": "boolean"
            }
           }
          },
          "risk": {
           "type": "object",
           "properties": {
            "level": {
             "type": "string"
            },
            "reasons": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "cidr": {
              "type": "string"
             },
             "source": {
              "type": "string"
             },
             "provider": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "bot": {
              "type": "string"
             },
             "service": {},
             "region": {}
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "built_at": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/geo-tools": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Geo Tools (Distance, Geohash…)",
    "description": "Pick an operation with `op`. `distance` (`from`, `to`) gives the great-circle distance (haversine) and the ellipsoidal distance on WGS 84 (Vincenty, millimetre accuracy) in metres, kilometres, miles and nautical miles, the initial and final bearing, compass direction and midpoint. `destination` gives the point reached from `from` after `distance` metres on a `bearing`. `geohash` encodes a `point` (precision 1-12) or decodes a `geohash` to its centre, bounding box, cell size and 8 neighbours. `polyline` encodes `points` to a Google encoded polyline or decodes a `polyline` (precision 5, or 6 for OSRM / Valhalla), with its length.\n\n`contains` tells whether a `point` or a list of `points` lies inside a GeoJSON `polygon` (Polygon with holes, MultiPolygon, Feature or FeatureCollection, returning the matching features). `measure` gives the area (m², km², ha), perimeter, line length, bounding box and centroid of any GeoJSON. `simplify` reduces a line or polygon with Douglas-Peucker for a `tolerance` in metres. `nearest` sorts up to 10,000 `points` by distance from `from` (with `limit` and `max_distance`).\n\nPoints are `\"lat,lng\"`, `[lat, lng]` or `{\"lat\", \"lng\"}` in WGS 84 degrees; GeoJSON keeps its own `[lng, lat]` order (RFC 7946). Pure calculation, nothing is stored; no routing or geocoding (see /v1/vn-geo for Vietnamese administrative units).\n\nDocs: https://apibox.io.vn/docs/geo-tools/",
    "operationId": "geoToolsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/geo-tools/"
    },
    "parameters": [
     {
      "name": "op",
      "in": "query",
      "required": true,
      "description": "`distance`, `destination`, `geohash`, `polyline`, `contains`, `measure`, `simplify` or `nearest`.",
      "schema": {
       "type": "string"
      },
      "example": "distance"
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "distance / destination / nearest: start point \"lat,lng\".",
      "schema": {
       "type": "string"
      },
      "example": "21.0285,105.8542"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "distance: end point \"lat,lng\".",
      "schema": {
       "type": "string"
      },
      "example": "10.7769,106.7009"
     },
     {
      "name": "bearing",
      "in": "query",
      "required": false,
      "description": "destination: degrees clockwise from north.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "distance",
      "in": "query",
      "required": false,
      "description": "destination: distance in metres.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "point",
      "in": "query",
      "required": false,
      "description": "geohash (encode) / contains: a point \"lat,lng\".",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "geohash",
      "in": "query",
      "required": false,
      "description": "geohash: hash to decode.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "precision",
      "in": "query",
      "required": false,
      "description": "geohash: length 1-12 (default 9); polyline: 5 (default) or 6.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "polyline",
      "in": "query",
      "required": false,
      "description": "polyline: encoded polyline to decode.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "points",
      "in": "query",
      "required": false,
      "description": "polyline (encode) / contains / simplify / nearest: [[lat, lng], …] or \"lat,lng;lat,lng\".",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "tolerance",
      "in": "query",
      "required": false,
      "description": "simplify: tolerance in metres.",
      "schema": {
       "type": "number",
       "default": 10
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "nearest: points returned.",
      "schema": {
       "type": "number",
       "default": 10
      }
     },
     {
      "name": "max_distance",
      "in": "query",
      "required": false,
      "description": "nearest: only points within this many metres.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "op": {
           "type": "string"
          },
          "from": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "to": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "haversine": {
           "type": "object",
           "properties": {
            "meters": {
             "type": "number"
            },
            "kilometers": {
             "type": "number"
            },
            "miles": {
             "type": "number"
            },
            "nautical_miles": {
             "type": "number"
            }
           }
          },
          "vincenty": {
           "type": "object",
           "properties": {
            "meters": {
             "type": "number"
            },
            "kilometers": {
             "type": "number"
            },
            "miles": {
             "type": "number"
            },
            "nautical_miles": {
             "type": "number"
            }
           }
          },
          "initial_bearing": {
           "type": "number"
          },
          "final_bearing": {
           "type": "number"
          },
          "compass": {
           "type": "string"
          },
          "midpoint": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "method": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "op": "distance",
         "from": [
          21.0285,
          105.8542
         ],
         "to": [
          10.7769,
          106.7009
         ],
         "haversine": {
          "meters": 1143505.99,
          "kilometers": 1143.50599,
          "miles": 710.54168,
          "nautical_miles": 617.443839
         },
         "vincenty": {
          "meters": 1138049.892,
          "kilometers": 1138.049892,
          "miles": 707.151418,
          "nautical_miles": 614.497782
         },
         "initial_bearing": 175.3078,
         "final_bearing": 175.5408,
         "compass": "S",
         "midpoint": [
          15.903112,
          106.28837
         ],
         "method": "haversine on a sphere of radius 6371008.8 m; Vincenty inverse formula on the WGS 84 ellipsoid (bearings from Vincenty)",
         "note": "Points are [lat, lng] in WGS 84 degrees; GeoJSON positions are [lng, lat] as in RFC 7946."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Geo Tools (Distance, Geohash…)",
    "description": "Pick an operation with `op`. `distance` (`from`, `to`) gives the great-circle distance (haversine) and the ellipsoidal distance on WGS 84 (Vincenty, millimetre accuracy) in metres, kilometres, miles and nautical miles, the initial and final bearing, compass direction and midpoint. `destination` gives the point reached from `from` after `distance` metres on a `bearing`. `geohash` encodes a `point` (precision 1-12) or decodes a `geohash` to its centre, bounding box, cell size and 8 neighbours. `polyline` encodes `points` to a Google encoded polyline or decodes a `polyline` (precision 5, or 6 for OSRM / Valhalla), with its length.\n\n`contains` tells whether a `point` or a list of `points` lies inside a GeoJSON `polygon` (Polygon with holes, MultiPolygon, Feature or FeatureCollection, returning the matching features). `measure` gives the area (m², km², ha), perimeter, line length, bounding box and centroid of any GeoJSON. `simplify` reduces a line or polygon with Douglas-Peucker for a `tolerance` in metres. `nearest` sorts up to 10,000 `points` by distance from `from` (with `limit` and `max_distance`).\n\nPoints are `\"lat,lng\"`, `[lat, lng]` or `{\"lat\", \"lng\"}` in WGS 84 degrees; GeoJSON keeps its own `[lng, lat]` order (RFC 7946). Pure calculation, nothing is stored; no routing or geocoding (see /v1/vn-geo for Vietnamese administrative units).\n\nDocs: https://apibox.io.vn/docs/geo-tools/",
    "operationId": "geoToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/geo-tools/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "op": {
          "type": "string",
          "description": "`distance`, `destination`, `geohash`, `polyline`, `contains`, `measure`, `simplify` or `nearest`."
         },
         "from": {
          "type": "string",
          "description": "distance / destination / nearest: start point \"lat,lng\"."
         },
         "to": {
          "type": "string",
          "description": "distance: end point \"lat,lng\"."
         },
         "bearing": {
          "type": "number",
          "description": "destination: degrees clockwise from north."
         },
         "distance": {
          "type": "number",
          "description": "destination: distance in metres."
         },
         "point": {
          "type": "string",
          "description": "geohash (encode) / contains: a point \"lat,lng\"."
         },
         "geohash": {
          "type": "string",
          "description": "geohash: hash to decode."
         },
         "precision": {
          "type": "number",
          "description": "geohash: length 1-12 (default 9); polyline: 5 (default) or 6."
         },
         "polyline": {
          "type": "string",
          "description": "polyline: encoded polyline to decode."
         },
         "points": {
          "type": "array",
          "items": {},
          "description": "polyline (encode) / contains / simplify / nearest: [[lat, lng], …] or \"lat,lng;lat,lng\"."
         },
         "polygon": {
          "type": "object",
          "description": "contains: GeoJSON Polygon / MultiPolygon / Feature / FeatureCollection."
         },
         "geojson": {
          "type": "object",
          "description": "measure / simplify: any GeoJSON geometry, Feature or FeatureCollection."
         },
         "tolerance": {
          "type": "number",
          "default": 10,
          "description": "simplify: tolerance in metres."
         },
         "limit": {
          "type": "number",
          "default": 10,
          "description": "nearest: points returned."
         },
         "max_distance": {
          "type": "number",
          "description": "nearest: only points within this many metres."
         }
        },
        "required": [
         "op"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "op": {
           "type": "string"
          },
          "from": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "to": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "haversine": {
           "type": "object",
           "properties": {
            "meters": {
             "type": "number"
            },
            "kilometers": {
             "type": "number"
            },
            "miles": {
             "type": "number"
            },
            "nautical_miles": {
             "type": "number"
            }
           }
          },
          "vincenty": {
           "type": "object",
           "properties": {
            "meters": {
             "type": "number"
            },
            "kilometers": {
             "type": "number"
            },
            "miles": {
             "type": "number"
            },
            "nautical_miles": {
             "type": "number"
            }
           }
          },
          "initial_bearing": {
           "type": "number"
          },
          "final_bearing": {
           "type": "number"
          },
          "compass": {
           "type": "string"
          },
          "midpoint": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "method": {
           "type": "string"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/svg-tools": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "SVG optimise, sanitise & render",
    "description": "Four actions on one SVG (sent as `svg`, an uploaded file, a raw `image/svg+xml` body or a `url`). `optimize` (default) runs svgo with its default preset but keeps ids and `role` attributes, so CSS, scripts and `#anchors` that point into the file keep working; `precision`, `multipass`, `pretty` and `aggressive=true` (pure preset + removeDimensions) are available, and `sanitize=true` cleans the file first. `sanitize` removes everything that can run code or leak data: `<script>`, `on…` event handlers, `javascript:` / `data:` links that are not raster images, `<foreignObject>`, `<iframe>` / `<embed>`, external images and stylesheets (`@import`, `url(https://…)`) unless `allow_external=true`, and animations that rewrite links. The response lists every removed item. `info` reports size, viewBox, element counts, scripts and external references.\n\n`render` turns the SVG into PNG (default) or JPEG with our own renderer written in JavaScript (no headless browser, no resvg): paths with every command including arcs, basic shapes, groups and transforms, nested `svg`, `use` / `symbol`, fills (non-zero / even-odd) and strokes (caps, joins, miter limit, dashes), opacity, linear and radial gradients, `clip-path`, luminance masks, simple `<style>` rules (tag, .class, #id), embedded PNG / JPEG images and text drawn from embedded fonts (Be Vietnam Pro for sans-serif, JetBrains Mono for monospace, STIX Two Math for serif), so Vietnamese text renders correctly. Set `width` and / or `height` (up to 4096 px, 5 megapixels) or `scale`, and `background`.\n\nNot drawn: filters (blur, drop shadow), patterns, markers, `textPath`, external images and web fonts; they are listed in the `x-render-warnings` header (or `warnings` with `format=json`). On our test set the output matches Chrome to within anti-aliasing. Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/svg-tools/",
    "operationId": "svgToolsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/svg-tools/"
    },
    "parameters": [
     {
      "name": "svg",
      "in": "query",
      "required": false,
      "description": "The SVG markup (or send a multipart `file`, a raw `image/svg+xml` body, `file_base64` or a `url`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the SVG (up to 5 MB).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`optimize`, `sanitize`, `render` or `info`.",
      "schema": {
       "type": "string",
       "default": "optimize"
      }
     },
     {
      "name": "precision",
      "in": "query",
      "required": false,
      "description": "optimize: decimals kept in numbers (0–8).",
      "schema": {
       "type": "number",
       "default": 3
      }
     },
     {
      "name": "multipass",
      "in": "query",
      "required": false,
      "description": "optimize: repeat until the file stops shrinking.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "pretty",
      "in": "query",
      "required": false,
      "description": "optimize: indented output.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "aggressive",
      "in": "query",
      "required": false,
      "description": "optimize: plain svgo preset-default (ids cleaned) + removeDimensions + sortAttrs.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "sanitize",
      "in": "query",
      "required": false,
      "description": "optimize: sanitise before optimising.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "allow_external",
      "in": "query",
      "required": false,
      "description": "sanitize: keep http(s) image / stylesheet references.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "width",
      "in": "query",
      "required": false,
      "description": "render: output width in px (≤ 4096); height follows the aspect ratio when omitted.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "height",
      "in": "query",
      "required": false,
      "description": "render: output height in px (≤ 4096).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "scale",
      "in": "query",
      "required": false,
      "description": "render: multiplier on the SVG size when width / height are not set (0.05–16).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "render: background colour (transparent for PNG, white for JPEG by default).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "render: `png` (default), `jpeg` or `json` (PNG as base64 + warnings); optimize / sanitize: `svg` returns the file itself instead of JSON.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "quality",
      "in": "query",
      "required": false,
      "description": "render: JPEG quality (1–100).",
      "schema": {
       "type": "number",
       "default": 90
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "svg": {
           "type": "string"
          },
          "original_bytes": {
           "type": "number"
          },
          "optimized_bytes": {
           "type": "number"
          },
          "saved_bytes": {
           "type": "number"
          },
          "saved_percent": {
           "type": "number"
          },
          "preset": {
           "type": "string"
          },
          "precision": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "SVG optimise, sanitise & render",
    "description": "Four actions on one SVG (sent as `svg`, an uploaded file, a raw `image/svg+xml` body or a `url`). `optimize` (default) runs svgo with its default preset but keeps ids and `role` attributes, so CSS, scripts and `#anchors` that point into the file keep working; `precision`, `multipass`, `pretty` and `aggressive=true` (pure preset + removeDimensions) are available, and `sanitize=true` cleans the file first. `sanitize` removes everything that can run code or leak data: `<script>`, `on…` event handlers, `javascript:` / `data:` links that are not raster images, `<foreignObject>`, `<iframe>` / `<embed>`, external images and stylesheets (`@import`, `url(https://…)`) unless `allow_external=true`, and animations that rewrite links. The response lists every removed item. `info` reports size, viewBox, element counts, scripts and external references.\n\n`render` turns the SVG into PNG (default) or JPEG with our own renderer written in JavaScript (no headless browser, no resvg): paths with every command including arcs, basic shapes, groups and transforms, nested `svg`, `use` / `symbol`, fills (non-zero / even-odd) and strokes (caps, joins, miter limit, dashes), opacity, linear and radial gradients, `clip-path`, luminance masks, simple `<style>` rules (tag, .class, #id), embedded PNG / JPEG images and text drawn from embedded fonts (Be Vietnam Pro for sans-serif, JetBrains Mono for monospace, STIX Two Math for serif), so Vietnamese text renders correctly. Set `width` and / or `height` (up to 4096 px, 5 megapixels) or `scale`, and `background`.\n\nNot drawn: filters (blur, drop shadow), patterns, markers, `textPath`, external images and web fonts; they are listed in the `x-render-warnings` header (or `warnings` with `format=json`). On our test set the output matches Chrome to within anti-aliasing. Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/svg-tools/",
    "operationId": "svgToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/svg-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "svg": {
          "type": "string",
          "description": "The SVG markup (or send a multipart `file`, a raw `image/svg+xml` body, `file_base64` or a `url`)."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the SVG (up to 5 MB)."
         },
         "action": {
          "type": "string",
          "default": "optimize",
          "description": "`optimize`, `sanitize`, `render` or `info`."
         },
         "precision": {
          "type": "number",
          "default": 3,
          "description": "optimize: decimals kept in numbers (0–8)."
         },
         "multipass": {
          "type": "boolean",
          "default": true,
          "description": "optimize: repeat until the file stops shrinking."
         },
         "pretty": {
          "type": "boolean",
          "default": false,
          "description": "optimize: indented output."
         },
         "aggressive": {
          "type": "boolean",
          "default": false,
          "description": "optimize: plain svgo preset-default (ids cleaned) + removeDimensions + sortAttrs."
         },
         "sanitize": {
          "type": "boolean",
          "default": false,
          "description": "optimize: sanitise before optimising."
         },
         "allow_external": {
          "type": "boolean",
          "default": false,
          "description": "sanitize: keep http(s) image / stylesheet references."
         },
         "width": {
          "type": "number",
          "description": "render: output width in px (≤ 4096); height follows the aspect ratio when omitted."
         },
         "height": {
          "type": "number",
          "description": "render: output height in px (≤ 4096)."
         },
         "scale": {
          "type": "number",
          "default": 1,
          "description": "render: multiplier on the SVG size when width / height are not set (0.05–16)."
         },
         "background": {
          "type": "string",
          "description": "render: background colour (transparent for PNG, white for JPEG by default)."
         },
         "format": {
          "type": "string",
          "description": "render: `png` (default), `jpeg` or `json` (PNG as base64 + warnings); optimize / sanitize: `svg` returns the file itself instead of JSON."
         },
         "quality": {
          "type": "number",
          "default": 90,
          "description": "render: JPEG quality (1–100)."
         }
        }
       },
       "example": {
        "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\"><!-- Logo --><metadata>Created by Editor 1.0</metadata><g id=\"logo\"><rect x=\"10.000\" y=\"10.000\" width=\"100.000\" height=\"100.000\" rx=\"20\" fill=\"#0F766E\"/><circle cx=\"60\" cy=\"60\" r=\"30.0000\" fill=\"#ffffff\" fill-opacity=\"1\"/></g></svg>"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "svg": {
          "type": "string",
          "description": "The SVG markup (or send a multipart `file`, a raw `image/svg+xml` body, `file_base64` or a `url`)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "SVG file upload."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the SVG (up to 5 MB)."
         },
         "action": {
          "type": "string",
          "default": "optimize",
          "description": "`optimize`, `sanitize`, `render` or `info`."
         },
         "precision": {
          "type": "number",
          "default": 3,
          "description": "optimize: decimals kept in numbers (0–8)."
         },
         "multipass": {
          "type": "boolean",
          "default": true,
          "description": "optimize: repeat until the file stops shrinking."
         },
         "pretty": {
          "type": "boolean",
          "default": false,
          "description": "optimize: indented output."
         },
         "aggressive": {
          "type": "boolean",
          "default": false,
          "description": "optimize: plain svgo preset-default (ids cleaned) + removeDimensions + sortAttrs."
         },
         "sanitize": {
          "type": "boolean",
          "default": false,
          "description": "optimize: sanitise before optimising."
         },
         "allow_external": {
          "type": "boolean",
          "default": false,
          "description": "sanitize: keep http(s) image / stylesheet references."
         },
         "width": {
          "type": "number",
          "description": "render: output width in px (≤ 4096); height follows the aspect ratio when omitted."
         },
         "height": {
          "type": "number",
          "description": "render: output height in px (≤ 4096)."
         },
         "scale": {
          "type": "number",
          "default": 1,
          "description": "render: multiplier on the SVG size when width / height are not set (0.05–16)."
         },
         "background": {
          "type": "string",
          "description": "render: background colour (transparent for PNG, white for JPEG by default)."
         },
         "format": {
          "type": "string",
          "description": "render: `png` (default), `jpeg` or `json` (PNG as base64 + warnings); optimize / sanitize: `svg` returns the file itself instead of JSON."
         },
         "quality": {
          "type": "number",
          "default": 90,
          "description": "render: JPEG quality (1–100)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "svg": {
           "type": "string"
          },
          "original_bytes": {
           "type": "number"
          },
          "optimized_bytes": {
           "type": "number"
          },
          "saved_bytes": {
           "type": "number"
          },
          "saved_percent": {
           "type": "number"
          },
          "preset": {
           "type": "string"
          },
          "precision": {
           "type": "number"
          }
         }
        },
        "example": {
         "action": "optimize",
         "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\"><g id=\"logo\"><rect width=\"100\" height=\"100\" x=\"10\" y=\"10\" fill=\"#0f766e\" rx=\"20\"/><circle cx=\"60\" cy=\"60\" r=\"30\" fill=\"#fff\"/></g></svg>",
         "original_bytes": 362,
         "optimized_bytes": 223,
         "saved_bytes": 139,
         "saved_percent": 38.4,
         "preset": "preset-default (ids and role kept)",
         "precision": 3
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/image-palette": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Image palette & BlurHash",
    "description": "Upload an image (PNG, JPEG or SVG, as multipart `file`, raw body or `file_base64`) or give a `url`. The image is reduced to a 128 px thumbnail, pixels that are more than half transparent are ignored, and the colours are grouped by median cut and refined with a few k-means rounds. You get up to 16 colours (`colors`, default 6) sorted by share, each with hex, RGB, HSL, the share of the image, the WCAG contrast ratio against white and black and the text colour that reads best on it; plus the average colour, the dominant colour and `is_dark`.\n\nFor lazy-loading placeholders the API also computes a BlurHash (blurhash, MIT; 4×3 components for landscape and 3×4 for portrait images, or `blurhash_x` / `blurhash_y` 1–9) and a ThumbHash (thumbhash, MIT; base64), each with a tiny PNG data URI you can put straight into `src` or a CSS background while the real image loads.\n\nImages up to 25 megapixels; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/image-palette/",
    "operationId": "imagePaletteGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-palette/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the image (up to 15 MB) instead of a file.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "colors",
      "in": "query",
      "required": false,
      "description": "Number of palette colours (1–16).",
      "schema": {
       "type": "number",
       "default": 6
      }
     },
     {
      "name": "blurhash_x",
      "in": "query",
      "required": false,
      "description": "BlurHash horizontal components (1–9; 3 for portrait images).",
      "schema": {
       "type": "number",
       "default": 4
      }
     },
     {
      "name": "blurhash_y",
      "in": "query",
      "required": false,
      "description": "BlurHash vertical components (1–9; 4 for portrait images).",
      "schema": {
       "type": "number",
       "default": 3
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "format": {
           "type": "string"
          },
          "has_transparency": {
           "type": "boolean"
          },
          "average": {
           "type": "object",
           "properties": {
            "hex": {
             "type": "string"
            },
            "rgb": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "hsl": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "text_color": {
             "type": "string"
            },
            "contrast_white": {
             "type": "number"
            },
            "contrast_black": {
             "type": "number"
            }
           }
          },
          "dominant": {
           "type": "object",
           "properties": {
            "hex": {
             "type": "string"
            },
            "rgb": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "hsl": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "share": {
             "type": "number"
            },
            "text_color": {
             "type": "string"
            },
            "contrast_white": {
             "type": "number"
            },
            "contrast_black": {
             "type": "number"
            }
           }
          },
          "palette": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "hex": {
              "type": "string"
             },
             "rgb": {
              "type": "array"
             },
             "hsl": {
              "type": "array"
             },
             "share": {
              "type": "number"
             },
             "text_color": {
              "type": "string"
             },
             "contrast_white": {
              "type": "number"
             },
             "contrast_black": {
              "type": "number"
             }
            }
           }
          },
          "is_dark": {
           "type": "boolean"
          },
          "blurhash": {
           "type": "object",
           "properties": {
            "hash": {
             "type": "string"
            },
            "components": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "placeholder": {
             "type": "string"
            }
           }
          },
          "thumbhash": {
           "type": "object",
           "properties": {
            "base64": {
             "type": "string"
            },
            "placeholder": {
             "type": "string"
            },
            "average": {
             "type": "string"
            }
           }
          },
          "method": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Image palette & BlurHash",
    "description": "Upload an image (PNG, JPEG or SVG, as multipart `file`, raw body or `file_base64`) or give a `url`. The image is reduced to a 128 px thumbnail, pixels that are more than half transparent are ignored, and the colours are grouped by median cut and refined with a few k-means rounds. You get up to 16 colours (`colors`, default 6) sorted by share, each with hex, RGB, HSL, the share of the image, the WCAG contrast ratio against white and black and the text colour that reads best on it; plus the average colour, the dominant colour and `is_dark`.\n\nFor lazy-loading placeholders the API also computes a BlurHash (blurhash, MIT; 4×3 components for landscape and 3×4 for portrait images, or `blurhash_x` / `blurhash_y` 1–9) and a ThumbHash (thumbhash, MIT; base64), each with a tiny PNG data URI you can put straight into `src` or a CSS background while the real image loads.\n\nImages up to 25 megapixels; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/image-palette/",
    "operationId": "imagePalettePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-palette/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the image (up to 15 MB) instead of a file."
         },
         "colors": {
          "type": "number",
          "default": 6,
          "description": "Number of palette colours (1–16)."
         },
         "blurhash_x": {
          "type": "number",
          "default": 4,
          "description": "BlurHash horizontal components (1–9; 3 for portrait images)."
         },
         "blurhash_y": {
          "type": "number",
          "default": 3,
          "description": "BlurHash vertical components (1–9; 4 for portrait images)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Image (PNG, JPEG or SVG): multipart, raw body or `file_base64`."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the image (up to 15 MB) instead of a file."
         },
         "colors": {
          "type": "number",
          "default": 6,
          "description": "Number of palette colours (1–16)."
         },
         "blurhash_x": {
          "type": "number",
          "default": 4,
          "description": "BlurHash horizontal components (1–9; 3 for portrait images)."
         },
         "blurhash_y": {
          "type": "number",
          "default": 3,
          "description": "BlurHash vertical components (1–9; 4 for portrait images)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "format": {
           "type": "string"
          },
          "has_transparency": {
           "type": "boolean"
          },
          "average": {
           "type": "object",
           "properties": {
            "hex": {
             "type": "string"
            },
            "rgb": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "hsl": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "text_color": {
             "type": "string"
            },
            "contrast_white": {
             "type": "number"
            },
            "contrast_black": {
             "type": "number"
            }
           }
          },
          "dominant": {
           "type": "object",
           "properties": {
            "hex": {
             "type": "string"
            },
            "rgb": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "hsl": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "share": {
             "type": "number"
            },
            "text_color": {
             "type": "string"
            },
            "contrast_white": {
             "type": "number"
            },
            "contrast_black": {
             "type": "number"
            }
           }
          },
          "palette": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "hex": {
              "type": "string"
             },
             "rgb": {
              "type": "array"
             },
             "hsl": {
              "type": "array"
             },
             "share": {
              "type": "number"
             },
             "text_color": {
              "type": "string"
             },
             "contrast_white": {
              "type": "number"
             },
             "contrast_black": {
              "type": "number"
             }
            }
           }
          },
          "is_dark": {
           "type": "boolean"
          },
          "blurhash": {
           "type": "object",
           "properties": {
            "hash": {
             "type": "string"
            },
            "components": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "placeholder": {
             "type": "string"
            }
           }
          },
          "thumbhash": {
           "type": "object",
           "properties": {
            "base64": {
             "type": "string"
            },
            "placeholder": {
             "type": "string"
            },
            "average": {
             "type": "string"
            }
           }
          },
          "method": {
           "type": "string"
          }
         }
        },
        "example": {
         "width": 320,
         "height": 200,
         "format": "jpeg",
         "has_transparency": false,
         "average": {
          "hex": "#987b6e",
          "rgb": [
           152,
           123,
           110
          ],
          "hsl": [
           19,
           17,
           51
          ],
          "text_color": "#000000",
          "contrast_white": 3.89,
          "contrast_black": 5.39
         },
         "dominant": {
          "hex": "#13506d",
          "rgb": [
           19,
           80,
           109
          ],
          "hsl": [
           199,
           70,
           25
          ],
          "share": 0.3336,
          "text_color": "#ffffff",
          "contrast_white": 8.76,
          "contrast_black": 2.4
         },
         "palette": [
          {
           "hex": "#13506d",
           "rgb": [
            19,
            80,
            109
           ],
           "hsl": [
            199,
            70,
            25
           ],
           "share": 0.3336,
           "text_color": "#ffffff",
           "contrast_white": 8.76,
           "contrast_black": 2.4
          },
          {
           "hex": "#ea825f",
           "rgb": [
            234,
            130,
            95
           ],
           "hsl": [
            15,
            77,
            65
           ],
           "share": 0.3125,
           "text_color": "#000000",
           "contrast_white": 2.67,
           "contrast_black": 7.86
          },
          {
           "hex": "#cb977f",
           "rgb": [
            203,
            151,
            127
           ],
           "hsl": [
            19,
            42,
            65
           ],
           "share": 0.2989,
           "text_color": "#000000",
           "contrast_white": 2.54,
           "contrast_black": 8.27
          },
          {
           "hex": "#fdd466",
           "rgb": [
            253,
            212,
            102
           ],
           "hsl": [
            44,
            97,
            70
           ],
           "share": 0.0438,
           "text_color": "#000000",
           "contrast_white": 1.42,
           "contrast_black": 14.79
          },
          {
           "hex": "#556f7b",
           "rgb": [
            85,
            111,
            123
           ],
           "hsl": [
            199,
            18,
            41
           ],
           "share": 0.0112,
           "text_color": "#ffffff",
           "contrast_white": 5.32,
           "contrast_black": 3.95
          }
         ],
         "is_dark": false,
         "blurhash": {
          "hash": "L|LCI:a#WXs,}Tj@j@f7RQoJoJWE",
          "components": [
           4,
           3
          ],
          "placeholder": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAUCAIAAABj86gYAAAGfElEQVR4XlXNWXBT1xkH8PPQmb50Ojz1oTN56UMf0lKmaVqcBd…"
         },
         "thumbhash": {
          "base64": "4DgOVJh3eIePeIiDeHd3j3b3eA==",
          "placeholder": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAASCAYAAAA6yNxSAAAJcklEQVR4AQCBAH7/APp1Uf/5dFD/+HJO//dwTP/3b0r/+G9K//…",
          "average": "#997d6f"
         },
         "method": "median cut seeds refined by k-means on a 128 px thumbnail (pixels with alpha < 50% ignored)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/favicon": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Favicon generator",
    "description": "Send a logo as an image (PNG, JPEG or SVG via multipart `file`, raw body, `file_base64` or `url`), as SVG markup in `svg`, or just `text` (1–3 characters, e.g. your initial) with `background`, `color` and `shape` (`square`, `rounded`, `circle`) to draw a letter icon. You get the files a website needs today: `favicon.ico` with 16, 32 and 48 px images (32-bit BMP inside, read by every browser and Windows), `favicon-96x96.png`, `favicon.svg` when the source is vector (sanitised and optimised), `apple-touch-icon.png` 180 px on an opaque background, `android-chrome-192x192.png` and `-512x512.png`, a `maskable-icon-512x512.png` with the logo inside the 80% safe zone, `site.webmanifest`, and the `<link>` / `<meta>` tags to paste into `<head>`.\n\nNon-square images are centred (`fit=contain`) or centre-cropped (`fit=cover`); `padding` (percent) adds a margin. SVG sources are drawn at every size by our renderer, so small icons stay sharp. `name`, `short_name`, `theme_color`, `background_color`, `display` and the URL `path` of the files go into the manifest and the HTML.\n\nThe JSON response holds every file as a data URI; `format=zip` returns a ZIP with all files and `favicon-snippet.html`. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/favicon/",
    "operationId": "faviconGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/favicon/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the logo.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Letter icon: 1–3 characters (used when no image is sent).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Letter icon background colour.",
      "schema": {
       "type": "string",
       "default": "#2563eb"
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Letter colour.",
      "schema": {
       "type": "string",
       "default": "#ffffff"
      }
     },
     {
      "name": "shape",
      "in": "query",
      "required": false,
      "description": "Letter icon shape: `square`, `rounded` or `circle`.",
      "schema": {
       "type": "string",
       "default": "rounded"
      }
     },
     {
      "name": "fit",
      "in": "query",
      "required": false,
      "description": "`contain` (centre a non-square image) or `cover` (centre crop).",
      "schema": {
       "type": "string",
       "default": "contain"
      }
     },
     {
      "name": "padding",
      "in": "query",
      "required": false,
      "description": "Margin around the logo, percent of the icon size (0–40).",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "name",
      "in": "query",
      "required": false,
      "description": "App name for the manifest.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "short_name",
      "in": "query",
      "required": false,
      "description": "Short name (home screen label).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "theme_color",
      "in": "query",
      "required": false,
      "description": "Theme colour (manifest + `<meta name=\"theme-color\">`).",
      "schema": {
       "type": "string",
       "default": "#ffffff"
      }
     },
     {
      "name": "background_color",
      "in": "query",
      "required": false,
      "description": "Splash / maskable background colour.",
      "schema": {
       "type": "string",
       "default": "#ffffff"
      }
     },
     {
      "name": "apple_background",
      "in": "query",
      "required": false,
      "description": "Background of apple-touch-icon (default: background_color).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "path",
      "in": "query",
      "required": false,
      "description": "URL folder of the files in the HTML and manifest.",
      "schema": {
       "type": "string",
       "default": "/"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` (data URIs) or `zip`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "html": {
           "type": "string"
          },
          "manifest": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "short_name": {
             "type": "string"
            },
            "icons": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "theme_color": {
             "type": "string"
            },
            "background_color": {
             "type": "string"
            },
            "display": {
             "type": "string"
            }
           }
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "bytes": {
              "type": "number"
             },
             "data_uri": {
              "type": "string"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Favicon generator",
    "description": "Send a logo as an image (PNG, JPEG or SVG via multipart `file`, raw body, `file_base64` or `url`), as SVG markup in `svg`, or just `text` (1–3 characters, e.g. your initial) with `background`, `color` and `shape` (`square`, `rounded`, `circle`) to draw a letter icon. You get the files a website needs today: `favicon.ico` with 16, 32 and 48 px images (32-bit BMP inside, read by every browser and Windows), `favicon-96x96.png`, `favicon.svg` when the source is vector (sanitised and optimised), `apple-touch-icon.png` 180 px on an opaque background, `android-chrome-192x192.png` and `-512x512.png`, a `maskable-icon-512x512.png` with the logo inside the 80% safe zone, `site.webmanifest`, and the `<link>` / `<meta>` tags to paste into `<head>`.\n\nNon-square images are centred (`fit=contain`) or centre-cropped (`fit=cover`); `padding` (percent) adds a margin. SVG sources are drawn at every size by our renderer, so small icons stay sharp. `name`, `short_name`, `theme_color`, `background_color`, `display` and the URL `path` of the files go into the manifest and the HTML.\n\nThe JSON response holds every file as a data URI; `format=zip` returns a ZIP with all files and `favicon-snippet.html`. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/favicon/",
    "operationId": "faviconPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/favicon/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "svg": {
          "type": "string",
          "description": "SVG markup instead of a file."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the logo."
         },
         "text": {
          "type": "string",
          "description": "Letter icon: 1–3 characters (used when no image is sent)."
         },
         "background": {
          "type": "string",
          "default": "#2563eb",
          "description": "Letter icon background colour."
         },
         "color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Letter colour."
         },
         "shape": {
          "type": "string",
          "default": "rounded",
          "description": "Letter icon shape: `square`, `rounded` or `circle`."
         },
         "fit": {
          "type": "string",
          "default": "contain",
          "description": "`contain` (centre a non-square image) or `cover` (centre crop)."
         },
         "padding": {
          "type": "number",
          "default": 0,
          "description": "Margin around the logo, percent of the icon size (0–40)."
         },
         "name": {
          "type": "string",
          "description": "App name for the manifest."
         },
         "short_name": {
          "type": "string",
          "description": "Short name (home screen label)."
         },
         "theme_color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Theme colour (manifest + `<meta name=\"theme-color\">`)."
         },
         "background_color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Splash / maskable background colour."
         },
         "apple_background": {
          "type": "string",
          "description": "Background of apple-touch-icon (default: background_color)."
         },
         "path": {
          "type": "string",
          "default": "/",
          "description": "URL folder of the files in the HTML and manifest."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (data URIs) or `zip`."
         }
        }
       },
       "example": {
        "text": "A",
        "background": "#2563eb",
        "name": "APIBox Demo",
        "short_name": "Demo",
        "theme_color": "#2563eb"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Logo (PNG, JPEG or SVG): multipart, raw body or `file_base64`."
         },
         "svg": {
          "type": "string",
          "description": "SVG markup instead of a file."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the logo."
         },
         "text": {
          "type": "string",
          "description": "Letter icon: 1–3 characters (used when no image is sent)."
         },
         "background": {
          "type": "string",
          "default": "#2563eb",
          "description": "Letter icon background colour."
         },
         "color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Letter colour."
         },
         "shape": {
          "type": "string",
          "default": "rounded",
          "description": "Letter icon shape: `square`, `rounded` or `circle`."
         },
         "fit": {
          "type": "string",
          "default": "contain",
          "description": "`contain` (centre a non-square image) or `cover` (centre crop)."
         },
         "padding": {
          "type": "number",
          "default": 0,
          "description": "Margin around the logo, percent of the icon size (0–40)."
         },
         "name": {
          "type": "string",
          "description": "App name for the manifest."
         },
         "short_name": {
          "type": "string",
          "description": "Short name (home screen label)."
         },
         "theme_color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Theme colour (manifest + `<meta name=\"theme-color\">`)."
         },
         "background_color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Splash / maskable background colour."
         },
         "apple_background": {
          "type": "string",
          "description": "Background of apple-touch-icon (default: background_color)."
         },
         "path": {
          "type": "string",
          "default": "/",
          "description": "URL folder of the files in the HTML and manifest."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (data URIs) or `zip`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "html": {
           "type": "string"
          },
          "manifest": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "short_name": {
             "type": "string"
            },
            "icons": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "theme_color": {
             "type": "string"
            },
            "background_color": {
             "type": "string"
            },
            "display": {
             "type": "string"
            }
           }
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "bytes": {
              "type": "number"
             },
             "data_uri": {
              "type": "string"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "source": "text",
         "html": "<link rel=\"icon\" type=\"image/png\" href=\"/favicon-96x96.png\" sizes=\"96x96\">\n<link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.svg\">\n<link rel=\"shortcut icon\" href=\"/favicon.ico\">\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\">\n<meta name=\"apple-mobile-web-app-title\" content=\"Demo\">\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<meta name=\"theme-color\" content=\"#2563eb\">",
         "manifest": {
          "name": "APIBox Demo",
          "short_name": "Demo",
          "icons": [
           {
            "src": "/android-chrome-192x192.png",
            "sizes": "192x192",
            "type": "image/png"
           },
           {
            "src": "/android-chrome-512x512.png",
            "sizes": "512x512",
            "type": "image/png"
           },
           {
            "src": "/maskable-icon-512x512.png",
            "sizes": "512x512",
            "type": "image/png",
            "purpose": "maskable"
           }
          ],
          "theme_color": "#2563eb",
          "background_color": "#ffffff",
          "display": "standalone"
         },
         "files": [
          {
           "name": "favicon.ico",
           "type": "image/x-icon",
           "width": 48,
           "height": 48,
           "bytes": 15086,
           "data_uri": "data:image/x-icon;base64,AAABAAMAEBAAAAEAIABoBAAANgAAACAgAAABACAAqBAAAJ4EAAAwMAAAAQAgAKglAABGFQAAKAAAABAAAAAgAAAAAQAgAAA…"
          },
          {
           "name": "favicon-96x96.png",
           "type": "image/png",
           "width": 96,
           "height": 96,
           "bytes": 1573,
           "data_uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4…"
          },
          {
           "name": "favicon.svg",
           "type": "image/svg+xml",
           "bytes": 289,
           "data_uri": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cmVjdCB3aW…"
          },
          {
           "name": "apple-touch-icon.png",
           "type": "image/png",
           "width": 180,
           "height": 180,
           "bytes": 3125,
           "data_uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAIAAACyr5Fl…"
          },
          {
           "name": "android-chrome-192x192.png",
           "type": "image/png",
           "width": 192,
           "height": 192,
           "bytes": 3311,
           "data_uri": "data:image/png;base64,…"
          },
          {
           "name": "android-chrome-512x512.png",
           "type": "image/png",
           "width": 512,
           "height": 512,
           "bytes": 10018,
           "data_uri": "data:image/png;base64,…"
          },
          {
           "name": "maskable-icon-512x512.png",
           "type": "image/png",
           "width": 512,
           "height": 512,
           "bytes": 8552,
           "data_uri": "data:image/png;base64,…"
          },
          {
           "name": "site.webmanifest",
           "type": "application/manifest+json",
           "bytes": 511,
           "data_uri": "data:application/manifest+json;base64,ewogICJuYW1lIjogIkFQSUJveCBEZW1vIiwKICAic2hvcnRfbmFtZSI6ICJEZW1vIiwK…"
          }
         ],
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/math-render": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "LaTeX math renderer",
    "description": "Send a LaTeX formula in `tex` and choose the output: `svg` (default, self-contained: glyphs are vector paths, no font needed), `png` (transparent or `background`, `scale` 2 by default for sharp text), `mathml` (native MathML that current browsers display) or `json` (MathML, an HTML snippet, the SVG, a PNG as base64, the size and the `vertical_align` offset to line the image up with surrounding text). `display=false` gives inline style (smaller fractions, limits beside ∑).\n\nThe LaTeX is parsed by temml (MIT), which covers the usual math of KaTeX: fractions, binomials, roots, scripts, sums and integrals with limits, `\\left…\\right` delimiters, matrices, `cases`, `aligned`, accents, `\\mathbb` / `\\mathcal` / `\\mathbf`, `\\text{}` (Vietnamese works), colours and mhchem `\\ce{}` for chemistry. The MathML is then laid out by our own TeX-like box engine and drawn with the STIX Two Math font (SIL OFL); no MathJax or browser runs on the server. Set `size` (font size in px, default 24), `color` and `padding`.\n\nThe SVG / PNG layout is an approximation of TeX: spacing and stretchy delimiters (which are scaled, not assembled from pieces) can differ slightly from KaTeX or MathJax, and line breaks (`\\\\` outside environments) are ignored. Errors in the LaTeX return 400 with the parser message.\n\nDocs: https://apibox.io.vn/docs/math-render/",
    "operationId": "mathRenderGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/math-render/"
    },
    "parameters": [
     {
      "name": "tex",
      "in": "query",
      "required": true,
      "description": "LaTeX formula, without `$` delimiters (max 5000 characters).",
      "schema": {
       "type": "string"
      },
      "example": "E = mc^2"
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`svg`, `png`, `mathml` or `json`.",
      "schema": {
       "type": "string",
       "default": "svg"
      },
      "example": "json"
     },
     {
      "name": "display",
      "in": "query",
      "required": false,
      "description": "`false` for inline style.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "description": "Font size in px (8–200).",
      "schema": {
       "type": "number",
       "default": 24
      }
     },
     {
      "name": "color",
      "in": "query",
      "required": false,
      "description": "Formula colour.",
      "schema": {
       "type": "string",
       "default": "#000000"
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Background colour (transparent by default).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "padding",
      "in": "query",
      "required": false,
      "description": "Margin in px (default: a quarter of `size`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "scale",
      "in": "query",
      "required": false,
      "description": "PNG pixel ratio (1–8).",
      "schema": {
       "type": "number",
       "default": 2
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "tex": {
           "type": "string"
          },
          "display": {
           "type": "boolean"
          },
          "mathml": {
           "type": "string"
          },
          "html": {
           "type": "string"
          },
          "svg": {
           "type": "string"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "vertical_align": {
           "type": "string"
          },
          "png_base64": {
           "type": "string"
          },
          "png_scale": {
           "type": "number"
          },
          "engine": {
           "type": "string"
          }
         }
        },
        "example": {
         "tex": "E = mc^2",
         "display": true,
         "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\" class=\"tml-display\" style=\"display:block math;\"><mrow><mi>E</mi><mo>=</mo><mi>m</mi><msup><mi>c</mi><mn class=\"tml-sml-pad\">2</mn></msup></mrow></math>",
         "html": "<div style=\"text-align:center\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\" …</math></div>",
         "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"99\" height=\"34\" viewBox=\"0 0 99 34\" role=\"img\">…</svg>",
         "width": 99,
         "height": 34,
         "vertical_align": "-6.29px",
         "png_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMYAAABECAYAAADa40qO…",
         "png_scale": 2,
         "engine": "temml (LaTeX to MathML) + own box layout with STIX Two Math outlines"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "LaTeX math renderer",
    "description": "Send a LaTeX formula in `tex` and choose the output: `svg` (default, self-contained: glyphs are vector paths, no font needed), `png` (transparent or `background`, `scale` 2 by default for sharp text), `mathml` (native MathML that current browsers display) or `json` (MathML, an HTML snippet, the SVG, a PNG as base64, the size and the `vertical_align` offset to line the image up with surrounding text). `display=false` gives inline style (smaller fractions, limits beside ∑).\n\nThe LaTeX is parsed by temml (MIT), which covers the usual math of KaTeX: fractions, binomials, roots, scripts, sums and integrals with limits, `\\left…\\right` delimiters, matrices, `cases`, `aligned`, accents, `\\mathbb` / `\\mathcal` / `\\mathbf`, `\\text{}` (Vietnamese works), colours and mhchem `\\ce{}` for chemistry. The MathML is then laid out by our own TeX-like box engine and drawn with the STIX Two Math font (SIL OFL); no MathJax or browser runs on the server. Set `size` (font size in px, default 24), `color` and `padding`.\n\nThe SVG / PNG layout is an approximation of TeX: spacing and stretchy delimiters (which are scaled, not assembled from pieces) can differ slightly from KaTeX or MathJax, and line breaks (`\\\\` outside environments) are ignored. Errors in the LaTeX return 400 with the parser message.\n\nDocs: https://apibox.io.vn/docs/math-render/",
    "operationId": "mathRenderPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/math-render/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "tex": {
          "type": "string",
          "description": "LaTeX formula, without `$` delimiters (max 5000 characters)."
         },
         "format": {
          "type": "string",
          "default": "svg",
          "description": "`svg`, `png`, `mathml` or `json`."
         },
         "display": {
          "type": "boolean",
          "default": true,
          "description": "`false` for inline style."
         },
         "size": {
          "type": "number",
          "default": 24,
          "description": "Font size in px (8–200)."
         },
         "color": {
          "type": "string",
          "default": "#000000",
          "description": "Formula colour."
         },
         "background": {
          "type": "string",
          "description": "Background colour (transparent by default)."
         },
         "padding": {
          "type": "number",
          "description": "Margin in px (default: a quarter of `size`)."
         },
         "scale": {
          "type": "number",
          "default": 2,
          "description": "PNG pixel ratio (1–8)."
         }
        },
        "required": [
         "tex"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "tex": {
           "type": "string"
          },
          "display": {
           "type": "boolean"
          },
          "mathml": {
           "type": "string"
          },
          "html": {
           "type": "string"
          },
          "svg": {
           "type": "string"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "vertical_align": {
           "type": "string"
          },
          "png_base64": {
           "type": "string"
          },
          "png_scale": {
           "type": "number"
          },
          "engine": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/code-image": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Code screenshot (Carbon style)",
    "description": "Send `code` and get a picture of it in a macOS-style window, ready for a blog post, a slide, a tweet or a Zalo / Slack message. Highlighting uses highlight.js (BSD-3) with 29 grammars registered one by one (JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, Dart, SQL, Bash, Shell, PowerShell, JSON, YAML, HTML / XML, CSS, SCSS, Markdown, Dockerfile, diff, INI / TOML, Lua, plain text) and `language=auto` detection. Themes: `dracula` (default), `monokai`, `one-dark`, `github-dark`, `github-light`, `nord`, `night-owl`, `vscode-dark`, `solarized-light`.\n\nOptions: `title` in the window bar, `window=false` for a plain card, `line_numbers=true` with `first_line`, `highlight_lines=3,5-7`, `font_size`, `line_height`, `tab_size`, outer `padding` with a `background` colour or a diagonal gradient (`background2`), `shadow`, and `max_columns` (longer lines are cut). Text is drawn from JetBrains Mono outlines (SIL OFL), which include Vietnamese, so comments such as `// Tính tổng` render correctly; characters outside the embedded fonts (emoji, CJK) are left blank with a warning.\n\nOutput: `png` (default, `scale` 2 for retina), `svg` (vector, glyphs as paths: identical everywhere) or `json` (SVG + PNG base64). No headless browser is used; up to 400 lines.\n\nDocs: https://apibox.io.vn/docs/code-image/",
    "operationId": "codeImageGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/code-image/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": true,
      "description": "Source code (max 30,000 characters, 400 lines); a raw `text/plain` body also works.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "language",
      "in": "query",
      "required": false,
      "description": "`auto` or one of: javascript, typescript, python, java, c, cpp, csharp, go, rust, php, ruby, swift, kotlin, dart, sql, bash, shell, powershell, json, yaml, xml, css, scss, markdown, dockerfile, diff, ini, lua, plaintext (aliases such as js, ts, py, sh, html work).",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "theme",
      "in": "query",
      "required": false,
      "description": "dracula, monokai, one-dark, github-dark, github-light, nord, night-owl, vscode-dark, solarized-light.",
      "schema": {
       "type": "string",
       "default": "dracula"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`png`, `svg` or `json`.",
      "schema": {
       "type": "string",
       "default": "png"
      }
     },
     {
      "name": "title",
      "in": "query",
      "required": false,
      "description": "Window title, e.g. a file name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "window",
      "in": "query",
      "required": false,
      "description": "Draw the window bar with the three buttons.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "line_numbers",
      "in": "query",
      "required": false,
      "description": "Show line numbers.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "first_line",
      "in": "query",
      "required": false,
      "description": "Number of the first line.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "highlight_lines",
      "in": "query",
      "required": false,
      "description": "Lines to highlight, e.g. `2,4-6`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "font_size",
      "in": "query",
      "required": false,
      "description": "Font size in px (8–40).",
      "schema": {
       "type": "number",
       "default": 14
      }
     },
     {
      "name": "line_height",
      "in": "query",
      "required": false,
      "description": "Line height as a multiple of the font size (1–3).",
      "schema": {
       "type": "number",
       "default": 1.6
      }
     },
     {
      "name": "tab_size",
      "in": "query",
      "required": false,
      "description": "Spaces per tab (1–8).",
      "schema": {
       "type": "number",
       "default": 4
      }
     },
     {
      "name": "padding",
      "in": "query",
      "required": false,
      "description": "Outer margin in px (0–200).",
      "schema": {
       "type": "number",
       "default": 32
      }
     },
     {
      "name": "background",
      "in": "query",
      "required": false,
      "description": "Outer background colour or `transparent`.",
      "schema": {
       "type": "string",
       "default": "#abb8c3"
      }
     },
     {
      "name": "background2",
      "in": "query",
      "required": false,
      "description": "Second colour for a diagonal gradient background.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "shadow",
      "in": "query",
      "required": false,
      "description": "Soft shadow under the window.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "max_columns",
      "in": "query",
      "required": false,
      "description": "Longer lines are cut (20–400).",
      "schema": {
       "type": "number",
       "default": 160
      }
     },
     {
      "name": "scale",
      "in": "query",
      "required": false,
      "description": "PNG pixel ratio (1–4).",
      "schema": {
       "type": "number",
       "default": 2
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "language": {
           "type": "string"
          },
          "theme": {
           "type": "string"
          },
          "lines": {
           "type": "number"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "scale": {
           "type": "number"
          },
          "svg": {
           "type": "string"
          },
          "png_base64": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "themes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Code screenshot (Carbon style)",
    "description": "Send `code` and get a picture of it in a macOS-style window, ready for a blog post, a slide, a tweet or a Zalo / Slack message. Highlighting uses highlight.js (BSD-3) with 29 grammars registered one by one (JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, Dart, SQL, Bash, Shell, PowerShell, JSON, YAML, HTML / XML, CSS, SCSS, Markdown, Dockerfile, diff, INI / TOML, Lua, plain text) and `language=auto` detection. Themes: `dracula` (default), `monokai`, `one-dark`, `github-dark`, `github-light`, `nord`, `night-owl`, `vscode-dark`, `solarized-light`.\n\nOptions: `title` in the window bar, `window=false` for a plain card, `line_numbers=true` with `first_line`, `highlight_lines=3,5-7`, `font_size`, `line_height`, `tab_size`, outer `padding` with a `background` colour or a diagonal gradient (`background2`), `shadow`, and `max_columns` (longer lines are cut). Text is drawn from JetBrains Mono outlines (SIL OFL), which include Vietnamese, so comments such as `// Tính tổng` render correctly; characters outside the embedded fonts (emoji, CJK) are left blank with a warning.\n\nOutput: `png` (default, `scale` 2 for retina), `svg` (vector, glyphs as paths: identical everywhere) or `json` (SVG + PNG base64). No headless browser is used; up to 400 lines.\n\nDocs: https://apibox.io.vn/docs/code-image/",
    "operationId": "codeImagePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/code-image/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "description": "Source code (max 30,000 characters, 400 lines); a raw `text/plain` body also works."
         },
         "language": {
          "type": "string",
          "default": "auto",
          "description": "`auto` or one of: javascript, typescript, python, java, c, cpp, csharp, go, rust, php, ruby, swift, kotlin, dart, sql, bash, shell, powershell, json, yaml, xml, css, scss, markdown, dockerfile, diff, ini, lua, plaintext (aliases such as js, ts, py, sh, html work)."
         },
         "theme": {
          "type": "string",
          "default": "dracula",
          "description": "dracula, monokai, one-dark, github-dark, github-light, nord, night-owl, vscode-dark, solarized-light."
         },
         "format": {
          "type": "string",
          "default": "png",
          "description": "`png`, `svg` or `json`."
         },
         "title": {
          "type": "string",
          "description": "Window title, e.g. a file name."
         },
         "window": {
          "type": "boolean",
          "default": true,
          "description": "Draw the window bar with the three buttons."
         },
         "line_numbers": {
          "type": "boolean",
          "default": false,
          "description": "Show line numbers."
         },
         "first_line": {
          "type": "number",
          "default": 1,
          "description": "Number of the first line."
         },
         "highlight_lines": {
          "type": "string",
          "description": "Lines to highlight, e.g. `2,4-6`."
         },
         "font_size": {
          "type": "number",
          "default": 14,
          "description": "Font size in px (8–40)."
         },
         "line_height": {
          "type": "number",
          "default": 1.6,
          "description": "Line height as a multiple of the font size (1–3)."
         },
         "tab_size": {
          "type": "number",
          "default": 4,
          "description": "Spaces per tab (1–8)."
         },
         "padding": {
          "type": "number",
          "default": 32,
          "description": "Outer margin in px (0–200)."
         },
         "background": {
          "type": "string",
          "default": "#abb8c3",
          "description": "Outer background colour or `transparent`."
         },
         "background2": {
          "type": "string",
          "description": "Second colour for a diagonal gradient background."
         },
         "shadow": {
          "type": "boolean",
          "default": true,
          "description": "Soft shadow under the window."
         },
         "max_columns": {
          "type": "number",
          "default": 160,
          "description": "Longer lines are cut (20–400)."
         },
         "scale": {
          "type": "number",
          "default": 2,
          "description": "PNG pixel ratio (1–4)."
         }
        },
        "required": [
         "code"
        ]
       },
       "example": {
        "code": "const sum = (a, b) => a + b;\nconsole.log(sum(2, 3)); // 5",
        "language": "javascript",
        "format": "json"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "language": {
           "type": "string"
          },
          "theme": {
           "type": "string"
          },
          "lines": {
           "type": "number"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "scale": {
           "type": "number"
          },
          "svg": {
           "type": "string"
          },
          "png_base64": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "themes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "language": "javascript",
         "theme": "dracula",
         "lines": 2,
         "width": 344,
         "height": 178,
         "scale": 2,
         "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"344\" height=\"178\" viewBox=\"0 0 344 178\">…</svg>",
         "png_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArAAAAFkCAIAAABXYZ9F…",
         "warnings": [],
         "themes": [
          "dracula",
          "monokai",
          "one-dark",
          "github-dark",
          "github-light",
          "nord",
          "night-owl",
          "vscode-dark",
          "solarized-light"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ssl-check": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "SSL Certificate Checker",
    "description": "Give a `host` (domain or IP, optional `:port`) and the API opens a TLS connection from our edge and reads the certificates the server presents. It returns the leaf certificate (subject, issuer, serial, validity dates and `days_remaining`, SANs, key type and size, signature algorithm, DV / OV / EV level, key usages, OCSP / CA issuer / CRL URLs, SHA-256 and SHA-1 fingerprints), the chain with each signature checked against the next certificate, the negotiated TLS version, cipher suite, key exchange group and ALPN, and the stapled OCSP status (good / revoked) when the server sends one. With `protocols` (on by default for one host) it also tests whether TLS 1.0, 1.1, 1.2 and 1.3 are accepted.\n\nA summary says whether the certificate is valid for the name, and `warnings` lists problems in plain codes: `expired`, `expires_soon` (within `warn_days`, default 30), `hostname_mismatch`, `self_signed`, `incomplete_chain` (an intermediate the server does not send, detected by fetching the issuer from the AIA URL), `weak_signature_algorithm`, `weak_key`, `legacy_protocol_enabled`, `revoked`. A normal certificate-validating HTTPS request is made as well (`https_request`), which reflects trust in the usual root stores. `hosts` checks up to 10 domains at once and returns a short summary per domain.\n\nHonest limits: our edge runs on Cloudflare Workers, which cannot open raw connections to Cloudflare IP ranges. For sites behind Cloudflare (and when the connection times out) the response says `source: \"certificate_transparency\"`: the certificates listed are the currently valid ones published in Certificate Transparency logs (Cert Spotter, crt.sh) for that name, not necessarily the one served, plus the live HTTPS check. Allowed ports: 443, 8443 and the usual implicit-TLS ports (465, 993, 995, 636…); private and internal addresses are refused.\n\nDocs: https://apibox.io.vn/docs/ssl-check/",
    "operationId": "sslCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ssl-check/"
    },
    "parameters": [
     {
      "name": "host",
      "in": "query",
      "required": true,
      "description": "Domain or IP, optionally with `:port` or as a URL (`https://example.com:8443/`).",
      "schema": {
       "type": "string"
      },
      "example": "github.com"
     },
     {
      "name": "port",
      "in": "query",
      "required": false,
      "description": "TLS port: 443, 8443, 465, 563, 636, 853, 989, 990, 992–995, 2083, 2087, 2096, 5061, 6697, 8883, 9443.",
      "schema": {
       "type": "number",
       "default": 443
      }
     },
     {
      "name": "servername",
      "in": "query",
      "required": false,
      "description": "SNI name to send when it differs from `host` (e.g. checking an IP).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "protocols",
      "in": "query",
      "required": false,
      "description": "Also test TLS 1.0 / 1.1 / 1.2 / 1.3 support (4 short handshakes). Off by default with `hosts`.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "warn_days",
      "in": "query",
      "required": false,
      "description": "`expires_soon` warning threshold in days (1–365).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "ct",
      "in": "query",
      "required": false,
      "description": "Also list the valid certificates found in Certificate Transparency logs.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "hosts",
      "in": "query",
      "required": false,
      "description": "Up to 10 hosts (array or comma-separated) for a bulk check; returns one summary per host.",
      "schema": {
       "type": "array",
       "items": {}
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "host": {
           "type": "string"
          },
          "port": {
           "type": "number"
          },
          "sni": {
           "type": "string"
          },
          "addresses": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "source": {
           "type": "string"
          },
          "tls": {
           "type": "object",
           "properties": {
            "version": {
             "type": "string"
            },
            "cipher": {
             "type": "string"
            },
            "key_exchange_group": {
             "type": "string"
            },
            "alpn": {
             "type": "string"
            },
            "handshake_ms": {
             "type": "number"
            },
            "ocsp_stapling": {
             "type": "object",
             "properties": {
              "stapled": {
               "type": "boolean"
              }
             }
            }
           }
          },
          "protocols": {
           "type": "object",
           "properties": {
            "TLS 1.0": {
             "type": "boolean"
            },
            "TLS 1.1": {
             "type": "boolean"
            },
            "TLS 1.2": {
             "type": "boolean"
            },
            "TLS 1.3": {
             "type": "boolean"
            }
           }
          },
          "summary": {
           "type": "object",
           "properties": {
            "observed": {
             "type": "boolean"
            },
            "valid": {
             "type": "boolean"
            },
            "hostname_match": {
             "type": "boolean"
            },
            "matched_name": {
             "type": "string"
            },
            "days_remaining": {
             "type": "number"
            },
            "expires_at": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "validation_level": {
             "type": "string"
            },
            "chain_length": {
             "type": "number"
            },
            "chain_complete": {},
            "chain_issuer_checked": {}
           }
          },
          "certificate": {
           "type": "object",
           "properties": {
            "subject": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "serial_number": {
             "type": "string"
            },
            "version": {
             "type": "number"
            },
            "not_before": {
             "type": "string"
            },
            "not_after": {
             "type": "string"
            },
            "days_remaining": {
             "type": "number"
            },
            "valid_now": {
             "type": "boolean"
            },
            "validity_days": {
             "type": "number"
            },
            "san": {
             "type": "object",
             "properties": {
              "dns": {
               "type": "array"
              },
              "ip": {
               "type": "array"
              },
              "email": {
               "type": "array"
              },
              "uri": {
               "type": "array"
              }
             }
            },
            "public_key": {
             "type": "object",
             "properties": {
              "algorithm": {
               "type": "string"
              },
              "curve": {
               "type": "string"
              },
              "size": {
               "type": "number"
              }
             }
            },
            "signature_algorithm": {
             "type": "string"
            },
            "is_ca": {
             "type": "boolean"
            },
            "self_signed": {
             "type": "boolean"
            },
            "validation_level": {
             "type": "string"
            },
            "extensions": {
             "type": "object",
             "properties": {
              "key_usage": {
               "type": "array"
              },
              "extended_key_usage": {
               "type": "array"
              },
              "ocsp_urls": {
               "type": "array"
              },
              "ca_issuer_urls": {
               "type": "array"
              },
              "sct_present": {
               "type": "boolean"
              }
             }
            },
            "fingerprints": {
             "type": "object",
             "properties": {
              "sha256": {
               "type": "string"
              },
              "sha1": {
               "type": "string"
              }
             }
            }
           }
          },
          "chain": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "subject": {
              "type": "string"
             },
             "issuer": {
              "type": "string"
             },
             "not_after": {
              "type": "string"
             },
             "days_remaining": {
              "type": "number"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "is_ca": {
              "type": "boolean"
             },
             "self_signed": {
              "type": "boolean"
             },
             "signed_by_next": {}
            }
           }
          },
          "https_request": {
           "type": "object",
           "properties": {
            "url": {
             "type": "string"
            },
            "ok": {
             "type": "boolean"
            },
            "status": {
             "type": "number"
            },
            "ms": {
             "type": "number"
            },
            "error": {},
            "hsts": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "host": "github.com",
         "port": 443,
         "sni": "github.com",
         "addresses": [
          "20.205.243.166"
         ],
         "source": "live_handshake",
         "tls": {
          "version": "TLS 1.3",
          "cipher": "TLS_AES_128_GCM_SHA256",
          "key_exchange_group": "x25519",
          "alpn": "h2",
          "handshake_ms": 162,
          "ocsp_stapling": {
           "stapled": false
          }
         },
         "protocols": {
          "TLS 1.0": false,
          "TLS 1.1": false,
          "TLS 1.2": true,
          "TLS 1.3": true
         },
         "summary": {
          "observed": true,
          "valid": true,
          "hostname_match": true,
          "matched_name": "DNS:github.com",
          "days_remaining": 77,
          "expires_at": "2027-01-27T23:59:59Z",
          "issuer": "Sectigo Limited",
          "validation_level": "DV",
          "chain_length": 3,
          "chain_complete": null,
          "chain_issuer_checked": null
         },
         "certificate": {
          "subject": "CN=github.com",
          "issuer": "C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication CA DV E36",
          "serial_number": "3E:1D:60:26:B4:B0:AE:A2:79:DC:A2:EF:BB:CE:D8:2B",
          "version": 3,
          "not_before": "2026-10-30T00:00:00Z",
          "not_after": "2027-01-27T23:59:59Z",
          "days_remaining": 77,
          "valid_now": true,
          "validity_days": 90,
          "san": {
           "dns": [
            "github.com",
            "www.github.com"
           ],
           "ip": [],
           "email": [],
           "uri": []
          },
          "public_key": {
           "algorithm": "EC",
           "curve": "P-256",
           "size": 256
          },
          "signature_algorithm": "ecdsa-with-SHA256",
          "is_ca": false,
          "self_signed": false,
          "validation_level": "DV",
          "extensions": {
           "key_usage": [
            "digitalSignature"
           ],
           "extended_key_usage": [
            "serverAuth"
           ],
           "ocsp_urls": [
            "http://ocsp.sectigo.com"
           ],
           "ca_issuer_urls": [
            "http://crt.sectigo.com/SectigoPublicServerAuthenticationCADVE36.crt"
           ],
           "sct_present": true
          },
          "fingerprints": {
           "sha256": "7D:C4:D8:5C:F1:E3:10:97:12:25:BC:9A:92:57:67:90:43:A2:43:D7:0A:3C:C2:A9:1C:C5:D3:89:89:2C:27:76",
           "sha1": "E6:52:C8:BD:1C:AF:D0:4A:44:23:9F:A8:DA:B0:C5:9D:EA:CB:79:EE"
          }
         },
         "chain": [
          {
           "index": 0,
           "subject": "CN=github.com",
           "issuer": "C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication CA DV E36",
           "not_after": "2027-01-27T23:59:59Z",
           "days_remaining": 77,
           "signature_algorithm": "ecdsa-with-SHA256",
           "is_ca": false,
           "self_signed": false,
           "signed_by_next": true
          },
          {
           "index": 1,
           "subject": "C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication CA DV E36",
           "issuer": "C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication Root E46",
           "not_after": "2036-03-21T23:59:59Z",
           "days_remaining": 3418,
           "signature_algorithm": "ecdsa-with-SHA384",
           "is_ca": true,
           "self_signed": false,
           "signed_by_next": true
          },
          {
           "index": 2,
           "subject": "C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication Root E46",
           "issuer": "C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust ECC Certification Authority",
           "not_after": "2038-01-18T23:59:59Z",
           "days_remaining": 4086,
           "signature_algorithm": "ecdsa-with-SHA384",
           "is_ca": true,
           "self_signed": false,
           "signed_by_next": null
          }
         ],
         "https_request": {
          "url": "https://github.com/",
          "ok": true,
          "status": 200,
          "ms": 177,
          "error": null,
          "hsts": "max-age=31536000; includeSubdomains; preload"
         },
         "warnings": [],
         "note": "Observed live: the certificates the server presented in a TLS handshake from our edge. …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "SSL Certificate Checker",
    "description": "Give a `host` (domain or IP, optional `:port`) and the API opens a TLS connection from our edge and reads the certificates the server presents. It returns the leaf certificate (subject, issuer, serial, validity dates and `days_remaining`, SANs, key type and size, signature algorithm, DV / OV / EV level, key usages, OCSP / CA issuer / CRL URLs, SHA-256 and SHA-1 fingerprints), the chain with each signature checked against the next certificate, the negotiated TLS version, cipher suite, key exchange group and ALPN, and the stapled OCSP status (good / revoked) when the server sends one. With `protocols` (on by default for one host) it also tests whether TLS 1.0, 1.1, 1.2 and 1.3 are accepted.\n\nA summary says whether the certificate is valid for the name, and `warnings` lists problems in plain codes: `expired`, `expires_soon` (within `warn_days`, default 30), `hostname_mismatch`, `self_signed`, `incomplete_chain` (an intermediate the server does not send, detected by fetching the issuer from the AIA URL), `weak_signature_algorithm`, `weak_key`, `legacy_protocol_enabled`, `revoked`. A normal certificate-validating HTTPS request is made as well (`https_request`), which reflects trust in the usual root stores. `hosts` checks up to 10 domains at once and returns a short summary per domain.\n\nHonest limits: our edge runs on Cloudflare Workers, which cannot open raw connections to Cloudflare IP ranges. For sites behind Cloudflare (and when the connection times out) the response says `source: \"certificate_transparency\"`: the certificates listed are the currently valid ones published in Certificate Transparency logs (Cert Spotter, crt.sh) for that name, not necessarily the one served, plus the live HTTPS check. Allowed ports: 443, 8443 and the usual implicit-TLS ports (465, 993, 995, 636…); private and internal addresses are refused.\n\nDocs: https://apibox.io.vn/docs/ssl-check/",
    "operationId": "sslCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ssl-check/"
    },
    "parameters": [
     {
      "name": "host",
      "in": "query",
      "required": false,
      "description": "Domain or IP, optionally with `:port` or as a URL (`https://example.com:8443/`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "port",
      "in": "query",
      "required": false,
      "description": "TLS port: 443, 8443, 465, 563, 636, 853, 989, 990, 992–995, 2083, 2087, 2096, 5061, 6697, 8883, 9443.",
      "schema": {
       "type": "number",
       "default": 443
      }
     },
     {
      "name": "servername",
      "in": "query",
      "required": false,
      "description": "SNI name to send when it differs from `host` (e.g. checking an IP).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "protocols",
      "in": "query",
      "required": false,
      "description": "Also test TLS 1.0 / 1.1 / 1.2 / 1.3 support (4 short handshakes). Off by default with `hosts`.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "warn_days",
      "in": "query",
      "required": false,
      "description": "`expires_soon` warning threshold in days (1–365).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "ct",
      "in": "query",
      "required": false,
      "description": "Also list the valid certificates found in Certificate Transparency logs.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "hosts": {
          "type": "array",
          "items": {},
          "description": "Up to 10 hosts (array or comma-separated) for a bulk check; returns one summary per host."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "host": {
           "type": "string"
          },
          "port": {
           "type": "number"
          },
          "sni": {
           "type": "string"
          },
          "addresses": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "source": {
           "type": "string"
          },
          "tls": {
           "type": "object",
           "properties": {
            "version": {
             "type": "string"
            },
            "cipher": {
             "type": "string"
            },
            "key_exchange_group": {
             "type": "string"
            },
            "alpn": {
             "type": "string"
            },
            "handshake_ms": {
             "type": "number"
            },
            "ocsp_stapling": {
             "type": "object",
             "properties": {
              "stapled": {
               "type": "boolean"
              }
             }
            }
           }
          },
          "protocols": {
           "type": "object",
           "properties": {
            "TLS 1.0": {
             "type": "boolean"
            },
            "TLS 1.1": {
             "type": "boolean"
            },
            "TLS 1.2": {
             "type": "boolean"
            },
            "TLS 1.3": {
             "type": "boolean"
            }
           }
          },
          "summary": {
           "type": "object",
           "properties": {
            "observed": {
             "type": "boolean"
            },
            "valid": {
             "type": "boolean"
            },
            "hostname_match": {
             "type": "boolean"
            },
            "matched_name": {
             "type": "string"
            },
            "days_remaining": {
             "type": "number"
            },
            "expires_at": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "validation_level": {
             "type": "string"
            },
            "chain_length": {
             "type": "number"
            },
            "chain_complete": {},
            "chain_issuer_checked": {}
           }
          },
          "certificate": {
           "type": "object",
           "properties": {
            "subject": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "serial_number": {
             "type": "string"
            },
            "version": {
             "type": "number"
            },
            "not_before": {
             "type": "string"
            },
            "not_after": {
             "type": "string"
            },
            "days_remaining": {
             "type": "number"
            },
            "valid_now": {
             "type": "boolean"
            },
            "validity_days": {
             "type": "number"
            },
            "san": {
             "type": "object",
             "properties": {
              "dns": {
               "type": "array"
              },
              "ip": {
               "type": "array"
              },
              "email": {
               "type": "array"
              },
              "uri": {
               "type": "array"
              }
             }
            },
            "public_key": {
             "type": "object",
             "properties": {
              "algorithm": {
               "type": "string"
              },
              "curve": {
               "type": "string"
              },
              "size": {
               "type": "number"
              }
             }
            },
            "signature_algorithm": {
             "type": "string"
            },
            "is_ca": {
             "type": "boolean"
            },
            "self_signed": {
             "type": "boolean"
            },
            "validation_level": {
             "type": "string"
            },
            "extensions": {
             "type": "object",
             "properties": {
              "key_usage": {
               "type": "array"
              },
              "extended_key_usage": {
               "type": "array"
              },
              "ocsp_urls": {
               "type": "array"
              },
              "ca_issuer_urls": {
               "type": "array"
              },
              "sct_present": {
               "type": "boolean"
              }
             }
            },
            "fingerprints": {
             "type": "object",
             "properties": {
              "sha256": {
               "type": "string"
              },
              "sha1": {
               "type": "string"
              }
             }
            }
           }
          },
          "chain": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "subject": {
              "type": "string"
             },
             "issuer": {
              "type": "string"
             },
             "not_after": {
              "type": "string"
             },
             "days_remaining": {
              "type": "number"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "is_ca": {
              "type": "boolean"
             },
             "self_signed": {
              "type": "boolean"
             },
             "signed_by_next": {}
            }
           }
          },
          "https_request": {
           "type": "object",
           "properties": {
            "url": {
             "type": "string"
            },
            "ok": {
             "type": "boolean"
            },
            "status": {
             "type": "number"
            },
            "ms": {
             "type": "number"
            },
            "error": {},
            "hsts": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/x509": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "X.509 Certificate & CSR Tool",
    "description": "`action=decode` (default): paste one or more PEM blocks in `pem` (or send a DER file / `der_base64`). Certificates come back with subject and issuer (UTF-8, Vietnamese names included), serial, validity and days remaining, SANs, key algorithm and size, signature algorithm, DV / OV / EV policy, basic constraints, key usage and extended key usage, key identifiers, OCSP / CA issuer / CRL URLs, SCT presence and SHA-256 / SHA-1 fingerprints. CSRs show the subject, requested SANs and extensions and whether their self-signature is valid; public and private keys (PKCS#8, PKCS#1, SEC1) show their type and size; PKCS#7 bundles (.p7b) list their certificates in PEM; CRLs list revoked serials. In a PEM bundle the chain order is checked (each certificate signed by the next one) and `host` tests a host name against the first certificate.\n\n`action=match` tells whether a certificate, a CSR and a private key share the same public key (by SPKI SHA-256), the classic check before installing a certificate. `action=convert` returns each block as base64 DER and as PEM. `action=generate` creates an EC (P-256, P-384) or RSA (2048, 3072, 4096) key pair with WebCrypto and, when you give `cn` / `subject` / `san`, a signed CSR ready for a certificate authority; `self_signed=true` also issues a self-signed certificate for `days` (development, internal services). `private_key` (unencrypted PKCS#8 PEM) builds the CSR from your existing key instead.\n\nNothing is stored or logged: keys and certificates are processed in memory. Generating production keys on your own machine (openssl) is still the safest choice. Encrypted keys and PKCS#12 (.pfx) files are not supported.\n\nDocs: https://apibox.io.vn/docs/x509/",
    "operationId": "x509Get",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/x509/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`decode`, `match`, `convert` or `generate`.",
      "schema": {
       "type": "string",
       "default": "decode"
      }
     },
     {
      "name": "host",
      "in": "query",
      "required": false,
      "description": "decode / match: host name to test against the first certificate (wildcards handled).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "at",
      "in": "query",
      "required": false,
      "description": "decode: ISO date used for `days_remaining` / `valid_now` (default now).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "der_bytes": {
              "type": "number"
             },
             "subject": {
              "type": "string"
             },
             "subject_fields": {
              "type": "object"
             },
             "issuer": {
              "type": "string"
             },
             "serial_number": {
              "type": "string"
             },
             "version": {
              "type": "number"
             },
             "not_before": {
              "type": "string"
             },
             "not_after": {
              "type": "string"
             },
             "days_remaining": {
              "type": "number"
             },
             "valid_now": {
              "type": "boolean"
             },
             "validity_days": {
              "type": "number"
             },
             "san": {
              "type": "object"
             },
             "public_key": {
              "type": "object"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "is_ca": {
              "type": "boolean"
             },
             "self_signed": {
              "type": "boolean"
             },
             "validation_level": {},
             "extensions": {
              "type": "object"
             },
             "fingerprints": {
              "type": "object"
             },
             "spki_sha256": {
              "type": "string"
             }
            }
           }
          },
          "key_match": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "spki_sha256": {
              "type": "string"
             },
             "blocks": {
              "type": "array"
             },
             "types": {
              "type": "array"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "X.509 Certificate & CSR Tool",
    "description": "`action=decode` (default): paste one or more PEM blocks in `pem` (or send a DER file / `der_base64`). Certificates come back with subject and issuer (UTF-8, Vietnamese names included), serial, validity and days remaining, SANs, key algorithm and size, signature algorithm, DV / OV / EV policy, basic constraints, key usage and extended key usage, key identifiers, OCSP / CA issuer / CRL URLs, SCT presence and SHA-256 / SHA-1 fingerprints. CSRs show the subject, requested SANs and extensions and whether their self-signature is valid; public and private keys (PKCS#8, PKCS#1, SEC1) show their type and size; PKCS#7 bundles (.p7b) list their certificates in PEM; CRLs list revoked serials. In a PEM bundle the chain order is checked (each certificate signed by the next one) and `host` tests a host name against the first certificate.\n\n`action=match` tells whether a certificate, a CSR and a private key share the same public key (by SPKI SHA-256), the classic check before installing a certificate. `action=convert` returns each block as base64 DER and as PEM. `action=generate` creates an EC (P-256, P-384) or RSA (2048, 3072, 4096) key pair with WebCrypto and, when you give `cn` / `subject` / `san`, a signed CSR ready for a certificate authority; `self_signed=true` also issues a self-signed certificate for `days` (development, internal services). `private_key` (unencrypted PKCS#8 PEM) builds the CSR from your existing key instead.\n\nNothing is stored or logged: keys and certificates are processed in memory. Generating production keys on your own machine (openssl) is still the safest choice. Encrypted keys and PKCS#12 (.pfx) files are not supported.\n\nDocs: https://apibox.io.vn/docs/x509/",
    "operationId": "x509Post",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/x509/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "decode",
          "description": "`decode`, `match`, `convert` or `generate`."
         },
         "pem": {
          "type": "string",
          "description": "One or more PEM blocks (or base64 DER). Required except for `generate`."
         },
         "host": {
          "type": "string",
          "description": "decode / match: host name to test against the first certificate (wildcards handled)."
         },
         "at": {
          "type": "string",
          "description": "decode: ISO date used for `days_remaining` / `valid_now` (default now)."
         },
         "key_type": {
          "type": "string",
          "default": "ec",
          "description": "generate: `ec` or `rsa`."
         },
         "curve": {
          "type": "string",
          "default": "P-256",
          "description": "generate (EC): `P-256` or `P-384`."
         },
         "bits": {
          "type": "number",
          "default": 2048,
          "description": "generate (RSA): 2048, 3072 or 4096."
         },
         "cn": {
          "type": "string",
          "description": "generate: common name (also `o`, `ou`, `l`, `st`, `c`, `email`, or a `subject` string such as `/C=VN/O=ABC/CN=abc.vn`)."
         },
         "san": {
          "type": "array",
          "items": {},
          "description": "generate: DNS names / IPs / e-mails for the SAN (default: the CN when it is a domain)."
         },
         "self_signed": {
          "type": "boolean",
          "default": false,
          "description": "generate: also issue a self-signed certificate."
         },
         "days": {
          "type": "number",
          "default": 365,
          "description": "generate: validity of the self-signed certificate (1–3650 days)."
         },
         "private_key": {
          "type": "string",
          "description": "generate: existing unencrypted PKCS#8 PEM key to build the CSR with (no new key)."
         }
        }
       },
       "example": {
        "pem": "-----BEGIN CERTIFICATE-----\nMIICATCCAaegAwIBAgIQZ7JpDsbujH4Q+IqANm/6tDAKBggqhkjOPQQDAjA+MQsw\nCQYDVQQGEwJWTjEaMBgGA1UECgwRQ8O0bmcgdHkgVsOtIEThu6UxEzARBgNVBAMM\nCmV4YW1wbGUudm4wHhcNMjYxMTExMDMyMDUzWhcNMjcxMTExMDMyMDUzWjA+MQsw\nCQYDVQQGEwJWTjEaMBgGA1UECgwRQ8O0bmcgdHkgVsOtIEThu6UxEzARBgNVBAMM\nCmV4YW1wbGUudm4wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARqqfLzQSw0vsTJ\nSybOOJ2tX5rVFJCJRh6Wcvb6K1D89M+GEuKtt6JKGDqNLGZ32GW6baSUnQs56CGI\nNgssWh4Vo4GGMIGDMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgWAMB0GA1Ud\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUxdzC6thtbmfWlE+S\nOdJPhYgCErcwJQYDVR0RBB4wHIIKZXhhbXBsZS52boIOd3d3LmV4YW1wbGUudm4w\nCgYIKoZIzj0EAwIDSAAwRQIgAMtCLzFiC2E5JsJ+S6xrFZ23s4FRvkCfBkPQZB7+\n3SoCIQC9mrlvlIb9Rc3aDzs/GMNhn1L6UeveiH1AQNDciaZ8Uw==\n-----END CERTIFICATE-----\n"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "decode",
          "description": "`decode`, `match`, `convert` or `generate`."
         },
         "pem": {
          "type": "string",
          "description": "One or more PEM blocks (or base64 DER). Required except for `generate`."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "A DER or PEM file instead of `pem` (multipart, raw body or `der_base64`)."
         },
         "host": {
          "type": "string",
          "description": "decode / match: host name to test against the first certificate (wildcards handled)."
         },
         "at": {
          "type": "string",
          "description": "decode: ISO date used for `days_remaining` / `valid_now` (default now)."
         },
         "key_type": {
          "type": "string",
          "default": "ec",
          "description": "generate: `ec` or `rsa`."
         },
         "curve": {
          "type": "string",
          "default": "P-256",
          "description": "generate (EC): `P-256` or `P-384`."
         },
         "bits": {
          "type": "number",
          "default": 2048,
          "description": "generate (RSA): 2048, 3072 or 4096."
         },
         "cn": {
          "type": "string",
          "description": "generate: common name (also `o`, `ou`, `l`, `st`, `c`, `email`, or a `subject` string such as `/C=VN/O=ABC/CN=abc.vn`)."
         },
         "san": {
          "type": "array",
          "items": {},
          "description": "generate: DNS names / IPs / e-mails for the SAN (default: the CN when it is a domain)."
         },
         "self_signed": {
          "type": "boolean",
          "default": false,
          "description": "generate: also issue a self-signed certificate."
         },
         "days": {
          "type": "number",
          "default": 365,
          "description": "generate: validity of the self-signed certificate (1–3650 days)."
         },
         "private_key": {
          "type": "string",
          "description": "generate: existing unencrypted PKCS#8 PEM key to build the CSR with (no new key)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "der_bytes": {
              "type": "number"
             },
             "subject": {
              "type": "string"
             },
             "subject_fields": {
              "type": "object"
             },
             "issuer": {
              "type": "string"
             },
             "serial_number": {
              "type": "string"
             },
             "version": {
              "type": "number"
             },
             "not_before": {
              "type": "string"
             },
             "not_after": {
              "type": "string"
             },
             "days_remaining": {
              "type": "number"
             },
             "valid_now": {
              "type": "boolean"
             },
             "validity_days": {
              "type": "number"
             },
             "san": {
              "type": "object"
             },
             "public_key": {
              "type": "object"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "is_ca": {
              "type": "boolean"
             },
             "self_signed": {
              "type": "boolean"
             },
             "validation_level": {},
             "extensions": {
              "type": "object"
             },
             "fingerprints": {
              "type": "object"
             },
             "spki_sha256": {
              "type": "string"
             }
            }
           }
          },
          "key_match": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "spki_sha256": {
              "type": "string"
             },
             "blocks": {
              "type": "array"
             },
             "types": {
              "type": "array"
             }
            }
           }
          }
         }
        },
        "example": {
         "count": 1,
         "items": [
          {
           "type": "certificate",
           "der_bytes": 517,
           "subject": "C=VN, O=Công ty Ví Dụ, CN=example.vn",
           "subject_fields": {
            "C": "VN",
            "O": "Công ty Ví Dụ",
            "CN": "example.vn"
           },
           "issuer": "C=VN, O=Công ty Ví Dụ, CN=example.vn",
           "serial_number": "67:B2:69:0E:C6:EE:8C:7E:10:F8:8A:80:36:6F:FA:B4",
           "version": 3,
           "not_before": "2026-11-11T03:20:53Z",
           "not_after": "2027-11-11T03:20:53Z",
           "days_remaining": 364,
           "valid_now": true,
           "validity_days": 365,
           "san": {
            "dns": [
             "example.vn",
             "www.example.vn"
            ],
            "ip": [],
            "email": [],
            "uri": []
           },
           "public_key": {
            "algorithm": "EC",
            "curve": "P-256",
            "size": 256
           },
           "signature_algorithm": "ecdsa-with-SHA256",
           "is_ca": false,
           "self_signed": true,
           "validation_level": null,
           "extensions": {
            "basic_constraints": {
             "ca": false,
             "path_length": null,
             "critical": true
            },
            "key_usage": [
             "digitalSignature"
            ],
            "extended_key_usage": [
             "serverAuth",
             "clientAuth"
            ],
            "subject_key_id": "C5:DC:C2:EA:D8:6D:6E:67:D6:94:4F:92:39:D2:4F:85:88:02:12:B7"
           },
           "fingerprints": {
            "sha256": "95:73:C4:36:B0:18:EF:21:42:FD:CA:52:58:B7:81:75:7B:EE:A4:F1:5B:AA:83:34:20:0E:B2:C4:A9:7F:D5:06",
            "sha1": "46:26:CA:A3:3B:35:F8:89:B6:81:F5:F9:E3:A1:3B:E5:BE:F7:FF:EB"
           },
           "spki_sha256": "cf57c6d726bb97a98ad7dc4b4595e423cc6b9a432eda486a9ec2286a2f3556d9"
          }
         ],
         "key_match": [
          {
           "spki_sha256": "cf57c6d726bb97a98ad7dc4b4595e423cc6b9a432eda486a9ec2286a2f3556d9",
           "blocks": [
            0
           ],
           "types": [
            "certificate"
           ]
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/form-endpoint": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Form Backend",
    "description": "`POST /v1/form-endpoint` creates a form and returns its public `endpoint_url` (`https://apibox.io.vn/f/{id}`) and a ready HTML snippet. Put that URL in `<form action>` on any static site or landing page: the receiver accepts `application/x-www-form-urlencoded`, `multipart/form-data` (file fields are dropped and noted) and JSON (`fetch` with CORS), up to 128 KB and 100 fields. Browser posts are redirected to your `redirect_url` (or a `_next` field on an allowed origin) or get a bilingual thank-you page; JSON / XHR calls get `{\"ok\": true, \"id\"}`. `_subject` sets the e-mail subject.\n\nSpam protection: a hidden honeypot field (`_gotcha` by default; filled in = silently dropped and counted), an optional Cloudflare Turnstile check with your own secret key (`turnstile_secret`; add the widget to your form), `allowed_origins` (exact origins or `https://*.example.vn`), `required_fields`, and rate limits per form and per IP. Each stored submission is e-mailed to your verified account address (`notify_email`, sharing the daily e-mail caps of uptime monitors) and / or POSTed as JSON to your `webhook_url` (`{\"event\": \"form.submission\", \"form\", \"submission\"}`).\n\n`GET /v1/form-endpoint/{id}/submissions` lists submissions newest first (`limit`, `before` cursor, `since`), `format=csv` exports them for Excel (UTF-8 BOM), `DELETE` removes one or all. `PATCH /v1/form-endpoint/{id}` changes settings (`paused=true` stops accepting). Forms belong to an account; each accepted submission counts one request of the owner’s quota. Plans: Free 2 forms, newest 100 submissions kept per form; Starter 20 forms, 2,000; Pro 100 forms, 10,000.\n\nRetention and stored data: submissions are kept for at most 90 days by default, then deleted by a daily clean-up job (they disappear from the API as soon as they are older than the limit). Set `retention_days` (1–90) on a form to keep them for less; values above 90 are rejected with `400 invalid_parameter`, `null` or an empty value returns to the default. With each submission we store the fields sent, the time, the country (from the network), the referring page and, for spam checks, only a shortened technical trace: the IP address cut to its network (IPv4 `/24`, e.g. `203.0.113.0`; IPv6 `/48`, e.g. `2001:db8:abcd::`) and the browser and operating system (e.g. `Chrome / Windows`) instead of the full user agent. The full IP is used only while the request is processed (rate limit, Turnstile) and is not stored. The webhook and the API return the same shortened values.\n\nPath segments: `id`: `/{id}` (GET, PATCH, POST, DELETE), `/{id}/submissions` (GET list / CSV, DELETE all), `/{id}/submissions/{sid}` (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/form-endpoint/",
    "operationId": "formEndpointGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/form-endpoint/"
    },
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: `json` or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: 1–500 (CSV up to 10,000).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "before",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: cursor (`next_before` of the previous page).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "endpoint_url": {
           "type": "string"
          },
          "allowed_origins": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "redirect_url": {
           "type": "string"
          },
          "honeypot_field": {
           "type": "string"
          },
          "required_fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "turnstile": {
           "type": "boolean"
          },
          "notify_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "retention_days": {
           "type": "number"
          },
          "submission_count": {
           "type": "number"
          },
          "spam_count": {
           "type": "number"
          },
          "last_submission_at": {},
          "created_at": {
           "type": "string"
          },
          "html_example": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Form Backend",
    "description": "`POST /v1/form-endpoint` creates a form and returns its public `endpoint_url` (`https://apibox.io.vn/f/{id}`) and a ready HTML snippet. Put that URL in `<form action>` on any static site or landing page: the receiver accepts `application/x-www-form-urlencoded`, `multipart/form-data` (file fields are dropped and noted) and JSON (`fetch` with CORS), up to 128 KB and 100 fields. Browser posts are redirected to your `redirect_url` (or a `_next` field on an allowed origin) or get a bilingual thank-you page; JSON / XHR calls get `{\"ok\": true, \"id\"}`. `_subject` sets the e-mail subject.\n\nSpam protection: a hidden honeypot field (`_gotcha` by default; filled in = silently dropped and counted), an optional Cloudflare Turnstile check with your own secret key (`turnstile_secret`; add the widget to your form), `allowed_origins` (exact origins or `https://*.example.vn`), `required_fields`, and rate limits per form and per IP. Each stored submission is e-mailed to your verified account address (`notify_email`, sharing the daily e-mail caps of uptime monitors) and / or POSTed as JSON to your `webhook_url` (`{\"event\": \"form.submission\", \"form\", \"submission\"}`).\n\n`GET /v1/form-endpoint/{id}/submissions` lists submissions newest first (`limit`, `before` cursor, `since`), `format=csv` exports them for Excel (UTF-8 BOM), `DELETE` removes one or all. `PATCH /v1/form-endpoint/{id}` changes settings (`paused=true` stops accepting). Forms belong to an account; each accepted submission counts one request of the owner’s quota. Plans: Free 2 forms, newest 100 submissions kept per form; Starter 20 forms, 2,000; Pro 100 forms, 10,000.\n\nRetention and stored data: submissions are kept for at most 90 days by default, then deleted by a daily clean-up job (they disappear from the API as soon as they are older than the limit). Set `retention_days` (1–90) on a form to keep them for less; values above 90 are rejected with `400 invalid_parameter`, `null` or an empty value returns to the default. With each submission we store the fields sent, the time, the country (from the network), the referring page and, for spam checks, only a shortened technical trace: the IP address cut to its network (IPv4 `/24`, e.g. `203.0.113.0`; IPv6 `/48`, e.g. `2001:db8:abcd::`) and the browser and operating system (e.g. `Chrome / Windows`) instead of the full user agent. The full IP is used only while the request is processed (rate limit, Turnstile) and is not stored. The webhook and the API return the same shortened values.\n\nPath segments: `id`: `/{id}` (GET, PATCH, POST, DELETE), `/{id}/submissions` (GET list / CSV, DELETE all), `/{id}/submissions/{sid}` (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/form-endpoint/",
    "operationId": "formEndpointPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/form-endpoint/"
    },
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: `json` or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: 1–500 (CSV up to 10,000).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "before",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: cursor (`next_before` of the previous page).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "allowed_origins": {
          "type": "array",
          "items": {},
          "description": "Origins allowed to post, e.g. `https://example.com`, `https://*.example.vn` (empty = any)."
         },
         "redirect_url": {
          "type": "string",
          "description": "Thank-you page for browser submissions (303 redirect)."
         },
         "honeypot_field": {
          "type": "string",
          "default": "_gotcha",
          "description": "Hidden field name; a filled-in value marks the submission as spam."
         },
         "required_fields": {
          "type": "array",
          "items": {},
          "description": "Fields that must be present and non-empty."
         },
         "turnstile_secret": {
          "type": "string",
          "description": "Your Cloudflare Turnstile secret key; submissions then need a valid `cf-turnstile-response` (empty to remove). Never returned."
         },
         "notify_email": {
          "type": "boolean",
          "default": true,
          "description": "E-mail each submission to the verified account address."
         },
         "webhook_url": {
          "type": "string",
          "description": "URL receiving a JSON POST per submission; empty to remove."
         },
         "paused": {
          "type": "boolean",
          "default": false,
          "description": "Stop accepting submissions."
         },
         "retention_days": {
          "type": "number",
          "default": 90,
          "description": "Days a submission is kept, 1–90 (above 90 → 400 `invalid_parameter`; `null` = default 90)."
         }
        }
       },
       "example": {
        "name": "Liên hệ",
        "allowed_origins": [
         "https://shop.example.com",
         "https://*.example.vn"
        ],
        "redirect_url": "https://shop.example.com/cam-on",
        "required_fields": [
         "email"
        ],
        "webhook_url": "https://hooks.example.net/form"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "endpoint_url": {
           "type": "string"
          },
          "allowed_origins": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "redirect_url": {
           "type": "string"
          },
          "honeypot_field": {
           "type": "string"
          },
          "required_fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "turnstile": {
           "type": "boolean"
          },
          "notify_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "retention_days": {
           "type": "number"
          },
          "submission_count": {
           "type": "number"
          },
          "spam_count": {
           "type": "number"
          },
          "last_submission_at": {},
          "created_at": {
           "type": "string"
          },
          "html_example": {
           "type": "string"
          }
         }
        },
        "example": {
         "id": "0rwawcx0zfofbpnsuu1e",
         "name": "Liên hệ",
         "endpoint_url": "https://apibox.io.vn/f/0rwawcx0zfofbpnsuu1e",
         "allowed_origins": [
          "https://shop.example.com",
          "https://*.example.vn"
         ],
         "redirect_url": "https://shop.example.com/cam-on",
         "honeypot_field": "_gotcha",
         "required_fields": [
          "email"
         ],
         "turnstile": false,
         "notify_email": true,
         "webhook_url": "https://hooks.example.net/form",
         "paused": false,
         "retention_days": 90,
         "submission_count": 0,
         "spam_count": 0,
         "last_submission_at": null,
         "created_at": "2026-11-11T03:21:15.000Z",
         "html_example": "<form action=\"https://apibox.io.vn/f/0rwawcx0zfofbpnsuu1e\" method=\"POST\">\n  <input type=\"email\" name=\"email\" required>\n  <textarea name=\"message\"></textarea>\n  <input type=\"text\" name=\"_gotcha\" style=\"display:none\" tabindex=\"-1\" autocomplete=\"off\">\n  <button type=\"submit\">Send</button>\n</form>"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "patch": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Form Backend",
    "description": "`POST /v1/form-endpoint` creates a form and returns its public `endpoint_url` (`https://apibox.io.vn/f/{id}`) and a ready HTML snippet. Put that URL in `<form action>` on any static site or landing page: the receiver accepts `application/x-www-form-urlencoded`, `multipart/form-data` (file fields are dropped and noted) and JSON (`fetch` with CORS), up to 128 KB and 100 fields. Browser posts are redirected to your `redirect_url` (or a `_next` field on an allowed origin) or get a bilingual thank-you page; JSON / XHR calls get `{\"ok\": true, \"id\"}`. `_subject` sets the e-mail subject.\n\nSpam protection: a hidden honeypot field (`_gotcha` by default; filled in = silently dropped and counted), an optional Cloudflare Turnstile check with your own secret key (`turnstile_secret`; add the widget to your form), `allowed_origins` (exact origins or `https://*.example.vn`), `required_fields`, and rate limits per form and per IP. Each stored submission is e-mailed to your verified account address (`notify_email`, sharing the daily e-mail caps of uptime monitors) and / or POSTed as JSON to your `webhook_url` (`{\"event\": \"form.submission\", \"form\", \"submission\"}`).\n\n`GET /v1/form-endpoint/{id}/submissions` lists submissions newest first (`limit`, `before` cursor, `since`), `format=csv` exports them for Excel (UTF-8 BOM), `DELETE` removes one or all. `PATCH /v1/form-endpoint/{id}` changes settings (`paused=true` stops accepting). Forms belong to an account; each accepted submission counts one request of the owner’s quota. Plans: Free 2 forms, newest 100 submissions kept per form; Starter 20 forms, 2,000; Pro 100 forms, 10,000.\n\nRetention and stored data: submissions are kept for at most 90 days by default, then deleted by a daily clean-up job (they disappear from the API as soon as they are older than the limit). Set `retention_days` (1–90) on a form to keep them for less; values above 90 are rejected with `400 invalid_parameter`, `null` or an empty value returns to the default. With each submission we store the fields sent, the time, the country (from the network), the referring page and, for spam checks, only a shortened technical trace: the IP address cut to its network (IPv4 `/24`, e.g. `203.0.113.0`; IPv6 `/48`, e.g. `2001:db8:abcd::`) and the browser and operating system (e.g. `Chrome / Windows`) instead of the full user agent. The full IP is used only while the request is processed (rate limit, Turnstile) and is not stored. The webhook and the API return the same shortened values.\n\nPath segments: `id`: `/{id}` (GET, PATCH, POST, DELETE), `/{id}/submissions` (GET list / CSV, DELETE all), `/{id}/submissions/{sid}` (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/form-endpoint/",
    "operationId": "formEndpointPatch",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/form-endpoint/"
    },
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: `json` or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: 1–500 (CSV up to 10,000).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "before",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: cursor (`next_before` of the previous page).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "allowed_origins": {
          "type": "array",
          "items": {},
          "description": "Origins allowed to post, e.g. `https://example.com`, `https://*.example.vn` (empty = any)."
         },
         "redirect_url": {
          "type": "string",
          "description": "Thank-you page for browser submissions (303 redirect)."
         },
         "honeypot_field": {
          "type": "string",
          "default": "_gotcha",
          "description": "Hidden field name; a filled-in value marks the submission as spam."
         },
         "required_fields": {
          "type": "array",
          "items": {},
          "description": "Fields that must be present and non-empty."
         },
         "turnstile_secret": {
          "type": "string",
          "description": "Your Cloudflare Turnstile secret key; submissions then need a valid `cf-turnstile-response` (empty to remove). Never returned."
         },
         "notify_email": {
          "type": "boolean",
          "default": true,
          "description": "E-mail each submission to the verified account address."
         },
         "webhook_url": {
          "type": "string",
          "description": "URL receiving a JSON POST per submission; empty to remove."
         },
         "paused": {
          "type": "boolean",
          "default": false,
          "description": "Stop accepting submissions."
         },
         "retention_days": {
          "type": "number",
          "default": 90,
          "description": "Days a submission is kept, 1–90 (above 90 → 400 `invalid_parameter`; `null` = default 90)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "endpoint_url": {
           "type": "string"
          },
          "allowed_origins": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "redirect_url": {
           "type": "string"
          },
          "honeypot_field": {
           "type": "string"
          },
          "required_fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "turnstile": {
           "type": "boolean"
          },
          "notify_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "retention_days": {
           "type": "number"
          },
          "submission_count": {
           "type": "number"
          },
          "spam_count": {
           "type": "number"
          },
          "last_submission_at": {},
          "created_at": {
           "type": "string"
          },
          "html_example": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "delete": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Form Backend",
    "description": "`POST /v1/form-endpoint` creates a form and returns its public `endpoint_url` (`https://apibox.io.vn/f/{id}`) and a ready HTML snippet. Put that URL in `<form action>` on any static site or landing page: the receiver accepts `application/x-www-form-urlencoded`, `multipart/form-data` (file fields are dropped and noted) and JSON (`fetch` with CORS), up to 128 KB and 100 fields. Browser posts are redirected to your `redirect_url` (or a `_next` field on an allowed origin) or get a bilingual thank-you page; JSON / XHR calls get `{\"ok\": true, \"id\"}`. `_subject` sets the e-mail subject.\n\nSpam protection: a hidden honeypot field (`_gotcha` by default; filled in = silently dropped and counted), an optional Cloudflare Turnstile check with your own secret key (`turnstile_secret`; add the widget to your form), `allowed_origins` (exact origins or `https://*.example.vn`), `required_fields`, and rate limits per form and per IP. Each stored submission is e-mailed to your verified account address (`notify_email`, sharing the daily e-mail caps of uptime monitors) and / or POSTed as JSON to your `webhook_url` (`{\"event\": \"form.submission\", \"form\", \"submission\"}`).\n\n`GET /v1/form-endpoint/{id}/submissions` lists submissions newest first (`limit`, `before` cursor, `since`), `format=csv` exports them for Excel (UTF-8 BOM), `DELETE` removes one or all. `PATCH /v1/form-endpoint/{id}` changes settings (`paused=true` stops accepting). Forms belong to an account; each accepted submission counts one request of the owner’s quota. Plans: Free 2 forms, newest 100 submissions kept per form; Starter 20 forms, 2,000; Pro 100 forms, 10,000.\n\nRetention and stored data: submissions are kept for at most 90 days by default, then deleted by a daily clean-up job (they disappear from the API as soon as they are older than the limit). Set `retention_days` (1–90) on a form to keep them for less; values above 90 are rejected with `400 invalid_parameter`, `null` or an empty value returns to the default. With each submission we store the fields sent, the time, the country (from the network), the referring page and, for spam checks, only a shortened technical trace: the IP address cut to its network (IPv4 `/24`, e.g. `203.0.113.0`; IPv6 `/48`, e.g. `2001:db8:abcd::`) and the browser and operating system (e.g. `Chrome / Windows`) instead of the full user agent. The full IP is used only while the request is processed (rate limit, Turnstile) and is not stored. The webhook and the API return the same shortened values.\n\nPath segments: `id`: `/{id}` (GET, PATCH, POST, DELETE), `/{id}/submissions` (GET list / CSV, DELETE all), `/{id}/submissions/{sid}` (GET, DELETE).\n\nDocs: https://apibox.io.vn/docs/form-endpoint/",
    "operationId": "formEndpointDelete",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/form-endpoint/"
    },
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: `json` or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: 1–500 (CSV up to 10,000).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "before",
      "in": "query",
      "required": false,
      "description": "`/{id}/submissions`: cursor (`next_before` of the previous page).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "endpoint_url": {
           "type": "string"
          },
          "allowed_origins": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "redirect_url": {
           "type": "string"
          },
          "honeypot_field": {
           "type": "string"
          },
          "required_fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "turnstile": {
           "type": "boolean"
          },
          "notify_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "retention_days": {
           "type": "number"
          },
          "submission_count": {
           "type": "number"
          },
          "spam_count": {
           "type": "number"
          },
          "last_submission_at": {},
          "created_at": {
           "type": "string"
          },
          "html_example": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/json-store": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Store",
    "description": "`POST /v1/json-store` with `{\"data\": …}` (any JSON value), an optional `name`, `public` and `ttl_seconds` creates a document and returns its id and URL `/v1/json-store/{id}`. `GET` returns it with metadata (`raw=true`: just the document, with an `ETag`), `PUT` (or POST) replaces `data`, `PATCH` applies a JSON Merge Patch (RFC 7386: `null` deletes a key) and `DELETE` removes it. Name, public flag and TTL can be changed without touching the data.\n\nEvery write increases `version`; send `if_version` (or `If-Match: \"v3\"`) to refuse the write when someone else changed the document in between (409 `version_conflict`). Previous versions are kept (`/{id}/versions`, `/{id}/versions/{n}`): 3 on Free, 10 on Starter, 25 on Pro. A document with `public=true` can be read by anyone with `GET /v1/json-store/{id}` and no API key (raw JSON, CORS `*`, served as `application/json` with `nosniff` so it can never act as a web page; such reads are free, cached 10 s and limited per document). Documents with `ttl_seconds` (60 s to 365 days) disappear when they expire.\n\nDocuments belong to an account (API key or signed in). Limits per plan: Free 10 documents of up to 100 KB (5 MB in total with versions), Starter 100 × 512 KB (100 MB), Pro 1,000 × 1 MB (500 MB). Every authenticated call counts one request. Data is stored in our D1 database (strongly consistent: a read right after a write sees it). Do not store secrets or personal data in public documents.\n\nPath segments: `id`: `/{id}` (GET, PUT, POST, PATCH, DELETE), `/{id}/versions`, `/{id}/versions/{n}`.\n\nDocs: https://apibox.io.vn/docs/json-store/",
    "operationId": "jsonStoreGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-store/"
    },
    "parameters": [
     {
      "name": "if_version",
      "in": "query",
      "required": false,
      "description": "PUT / PATCH only if the document is still at this version (or `If-Match: \"v<n>\"`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "raw",
      "in": "query",
      "required": false,
      "description": "GET: return only the document.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "public": {
           "type": "boolean"
          },
          "size": {
           "type": "number"
          },
          "version": {
           "type": "number"
          },
          "expires_at": {},
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "data": {
           "type": "object",
           "properties": {
            "theme": {
             "type": "string"
            },
            "flags": {
             "type": "object",
             "properties": {
              "beta": {
               "type": "boolean"
              },
              "old": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Store",
    "description": "`POST /v1/json-store` with `{\"data\": …}` (any JSON value), an optional `name`, `public` and `ttl_seconds` creates a document and returns its id and URL `/v1/json-store/{id}`. `GET` returns it with metadata (`raw=true`: just the document, with an `ETag`), `PUT` (or POST) replaces `data`, `PATCH` applies a JSON Merge Patch (RFC 7386: `null` deletes a key) and `DELETE` removes it. Name, public flag and TTL can be changed without touching the data.\n\nEvery write increases `version`; send `if_version` (or `If-Match: \"v3\"`) to refuse the write when someone else changed the document in between (409 `version_conflict`). Previous versions are kept (`/{id}/versions`, `/{id}/versions/{n}`): 3 on Free, 10 on Starter, 25 on Pro. A document with `public=true` can be read by anyone with `GET /v1/json-store/{id}` and no API key (raw JSON, CORS `*`, served as `application/json` with `nosniff` so it can never act as a web page; such reads are free, cached 10 s and limited per document). Documents with `ttl_seconds` (60 s to 365 days) disappear when they expire.\n\nDocuments belong to an account (API key or signed in). Limits per plan: Free 10 documents of up to 100 KB (5 MB in total with versions), Starter 100 × 512 KB (100 MB), Pro 1,000 × 1 MB (500 MB). Every authenticated call counts one request. Data is stored in our D1 database (strongly consistent: a read right after a write sees it). Do not store secrets or personal data in public documents.\n\nPath segments: `id`: `/{id}` (GET, PUT, POST, PATCH, DELETE), `/{id}/versions`, `/{id}/versions/{n}`.\n\nDocs: https://apibox.io.vn/docs/json-store/",
    "operationId": "jsonStorePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-store/"
    },
    "parameters": [
     {
      "name": "raw",
      "in": "query",
      "required": false,
      "description": "GET: return only the document.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "object",
          "description": "The JSON document (any JSON value). Required to create; with PATCH it is a merge patch."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "public": {
          "type": "boolean",
          "default": false,
          "description": "Allow GET without an API key (raw JSON)."
         },
         "ttl_seconds": {
          "type": "number",
          "description": "Expire the document after 60 s – 365 days; 0 removes the expiry."
         },
         "if_version": {
          "type": "number",
          "description": "PUT / PATCH only if the document is still at this version (or `If-Match: \"v<n>\"`)."
         }
        },
        "required": [
         "data"
        ]
       },
       "example": {
        "name": "Cấu hình",
        "public": true,
        "data": {
         "theme": "dark",
         "flags": {
          "beta": true,
          "old": 1
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "public": {
           "type": "boolean"
          },
          "size": {
           "type": "number"
          },
          "version": {
           "type": "number"
          },
          "expires_at": {},
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "data": {
           "type": "object",
           "properties": {
            "theme": {
             "type": "string"
            },
            "flags": {
             "type": "object",
             "properties": {
              "beta": {
               "type": "boolean"
              },
              "old": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "id": "js_vb1uxwnz96v8s4nvmydv",
         "name": "Cấu hình",
         "url": "https://apibox.io.vn/v1/json-store/js_vb1uxwnz96v8s4nvmydv",
         "public": true,
         "size": 46,
         "version": 1,
         "expires_at": null,
         "created_at": "2026-11-11T03:21:15.000Z",
         "updated_at": "2026-11-11T03:21:15.000Z",
         "data": {
          "theme": "dark",
          "flags": {
           "beta": true,
           "old": 1
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "put": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Store",
    "description": "`POST /v1/json-store` with `{\"data\": …}` (any JSON value), an optional `name`, `public` and `ttl_seconds` creates a document and returns its id and URL `/v1/json-store/{id}`. `GET` returns it with metadata (`raw=true`: just the document, with an `ETag`), `PUT` (or POST) replaces `data`, `PATCH` applies a JSON Merge Patch (RFC 7386: `null` deletes a key) and `DELETE` removes it. Name, public flag and TTL can be changed without touching the data.\n\nEvery write increases `version`; send `if_version` (or `If-Match: \"v3\"`) to refuse the write when someone else changed the document in between (409 `version_conflict`). Previous versions are kept (`/{id}/versions`, `/{id}/versions/{n}`): 3 on Free, 10 on Starter, 25 on Pro. A document with `public=true` can be read by anyone with `GET /v1/json-store/{id}` and no API key (raw JSON, CORS `*`, served as `application/json` with `nosniff` so it can never act as a web page; such reads are free, cached 10 s and limited per document). Documents with `ttl_seconds` (60 s to 365 days) disappear when they expire.\n\nDocuments belong to an account (API key or signed in). Limits per plan: Free 10 documents of up to 100 KB (5 MB in total with versions), Starter 100 × 512 KB (100 MB), Pro 1,000 × 1 MB (500 MB). Every authenticated call counts one request. Data is stored in our D1 database (strongly consistent: a read right after a write sees it). Do not store secrets or personal data in public documents.\n\nPath segments: `id`: `/{id}` (GET, PUT, POST, PATCH, DELETE), `/{id}/versions`, `/{id}/versions/{n}`.\n\nDocs: https://apibox.io.vn/docs/json-store/",
    "operationId": "jsonStorePut",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-store/"
    },
    "parameters": [
     {
      "name": "raw",
      "in": "query",
      "required": false,
      "description": "GET: return only the document.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "object",
          "description": "The JSON document (any JSON value). Required to create; with PATCH it is a merge patch."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "public": {
          "type": "boolean",
          "default": false,
          "description": "Allow GET without an API key (raw JSON)."
         },
         "ttl_seconds": {
          "type": "number",
          "description": "Expire the document after 60 s – 365 days; 0 removes the expiry."
         },
         "if_version": {
          "type": "number",
          "description": "PUT / PATCH only if the document is still at this version (or `If-Match: \"v<n>\"`)."
         }
        },
        "required": [
         "data"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "public": {
           "type": "boolean"
          },
          "size": {
           "type": "number"
          },
          "version": {
           "type": "number"
          },
          "expires_at": {},
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "data": {
           "type": "object",
           "properties": {
            "theme": {
             "type": "string"
            },
            "flags": {
             "type": "object",
             "properties": {
              "beta": {
               "type": "boolean"
              },
              "old": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "patch": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Store",
    "description": "`POST /v1/json-store` with `{\"data\": …}` (any JSON value), an optional `name`, `public` and `ttl_seconds` creates a document and returns its id and URL `/v1/json-store/{id}`. `GET` returns it with metadata (`raw=true`: just the document, with an `ETag`), `PUT` (or POST) replaces `data`, `PATCH` applies a JSON Merge Patch (RFC 7386: `null` deletes a key) and `DELETE` removes it. Name, public flag and TTL can be changed without touching the data.\n\nEvery write increases `version`; send `if_version` (or `If-Match: \"v3\"`) to refuse the write when someone else changed the document in between (409 `version_conflict`). Previous versions are kept (`/{id}/versions`, `/{id}/versions/{n}`): 3 on Free, 10 on Starter, 25 on Pro. A document with `public=true` can be read by anyone with `GET /v1/json-store/{id}` and no API key (raw JSON, CORS `*`, served as `application/json` with `nosniff` so it can never act as a web page; such reads are free, cached 10 s and limited per document). Documents with `ttl_seconds` (60 s to 365 days) disappear when they expire.\n\nDocuments belong to an account (API key or signed in). Limits per plan: Free 10 documents of up to 100 KB (5 MB in total with versions), Starter 100 × 512 KB (100 MB), Pro 1,000 × 1 MB (500 MB). Every authenticated call counts one request. Data is stored in our D1 database (strongly consistent: a read right after a write sees it). Do not store secrets or personal data in public documents.\n\nPath segments: `id`: `/{id}` (GET, PUT, POST, PATCH, DELETE), `/{id}/versions`, `/{id}/versions/{n}`.\n\nDocs: https://apibox.io.vn/docs/json-store/",
    "operationId": "jsonStorePatch",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-store/"
    },
    "parameters": [
     {
      "name": "raw",
      "in": "query",
      "required": false,
      "description": "GET: return only the document.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "object",
          "description": "The JSON document (any JSON value). Required to create; with PATCH it is a merge patch."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "public": {
          "type": "boolean",
          "default": false,
          "description": "Allow GET without an API key (raw JSON)."
         },
         "ttl_seconds": {
          "type": "number",
          "description": "Expire the document after 60 s – 365 days; 0 removes the expiry."
         },
         "if_version": {
          "type": "number",
          "description": "PUT / PATCH only if the document is still at this version (or `If-Match: \"v<n>\"`)."
         }
        },
        "required": [
         "data"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "public": {
           "type": "boolean"
          },
          "size": {
           "type": "number"
          },
          "version": {
           "type": "number"
          },
          "expires_at": {},
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "data": {
           "type": "object",
           "properties": {
            "theme": {
             "type": "string"
            },
            "flags": {
             "type": "object",
             "properties": {
              "beta": {
               "type": "boolean"
              },
              "old": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "delete": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Store",
    "description": "`POST /v1/json-store` with `{\"data\": …}` (any JSON value), an optional `name`, `public` and `ttl_seconds` creates a document and returns its id and URL `/v1/json-store/{id}`. `GET` returns it with metadata (`raw=true`: just the document, with an `ETag`), `PUT` (or POST) replaces `data`, `PATCH` applies a JSON Merge Patch (RFC 7386: `null` deletes a key) and `DELETE` removes it. Name, public flag and TTL can be changed without touching the data.\n\nEvery write increases `version`; send `if_version` (or `If-Match: \"v3\"`) to refuse the write when someone else changed the document in between (409 `version_conflict`). Previous versions are kept (`/{id}/versions`, `/{id}/versions/{n}`): 3 on Free, 10 on Starter, 25 on Pro. A document with `public=true` can be read by anyone with `GET /v1/json-store/{id}` and no API key (raw JSON, CORS `*`, served as `application/json` with `nosniff` so it can never act as a web page; such reads are free, cached 10 s and limited per document). Documents with `ttl_seconds` (60 s to 365 days) disappear when they expire.\n\nDocuments belong to an account (API key or signed in). Limits per plan: Free 10 documents of up to 100 KB (5 MB in total with versions), Starter 100 × 512 KB (100 MB), Pro 1,000 × 1 MB (500 MB). Every authenticated call counts one request. Data is stored in our D1 database (strongly consistent: a read right after a write sees it). Do not store secrets or personal data in public documents.\n\nPath segments: `id`: `/{id}` (GET, PUT, POST, PATCH, DELETE), `/{id}/versions`, `/{id}/versions/{n}`.\n\nDocs: https://apibox.io.vn/docs/json-store/",
    "operationId": "jsonStoreDelete",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/json-store/"
    },
    "parameters": [
     {
      "name": "if_version",
      "in": "query",
      "required": false,
      "description": "PUT / PATCH only if the document is still at this version (or `If-Match: \"v<n>\"`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "raw",
      "in": "query",
      "required": false,
      "description": "GET: return only the document.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "public": {
           "type": "boolean"
          },
          "size": {
           "type": "number"
          },
          "version": {
           "type": "number"
          },
          "expires_at": {},
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "data": {
           "type": "object",
           "properties": {
            "theme": {
             "type": "string"
            },
            "flags": {
             "type": "object",
             "properties": {
              "beta": {
               "type": "boolean"
              },
              "old": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/tech-detect": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Website Technology Detector",
    "description": "Give a `url` and the API fetches that one page and matches about 170 fingerprints against the response headers, cookie names, `<meta name=\"generator\">`, script and stylesheet URLs and the HTML. It recognises CMS and site builders (WordPress, Drupal, Joomla, Wix, Webflow, Ghost…), e-commerce platforms including the Vietnamese ones (Haravan, Sapo / Bizweb, LadiPage, Nhanh.vn), JavaScript frameworks (Next.js, Nuxt, Angular, SvelteKit, Astro…), analytics and pixels (Google Analytics, Tag Manager, Meta, TikTok, Clarity), chat widgets (Zalo, Messenger, Subiz, Tawk.to), CDN and hosting (Cloudflare, Fastly, CloudFront, Vercel, Netlify), web servers, back-end languages, payment SDKs and captchas.\n\nEach technology comes with a category, a confidence from 0 to 100, the version when the page shows it (for example `WordPress 6.8`, `PHP/8.2`, `ng-version`) and the evidence that matched, so you can check the result yourself. Implied technologies are added (WooCommerce → WordPress → PHP). `categories=ecommerce,cms` keeps only some categories. To analyse a page you already have, POST its `html` and optionally its `headers` instead of a URL.\n\nOnly one page is read (up to 1.5 MB) and JavaScript is not executed, so tools loaded later by a tag manager may be missed. Sites behind a bot challenge only show their CDN. The fingerprint table is our own; Vietnamese payment wallets (VNPAY, MoMo, ZaloPay) are usually only visible as logos and are reported with low confidence.\n\nDocs: https://apibox.io.vn/docs/tech-detect/",
    "operationId": "techDetectGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/tech-detect/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Page to analyse (`https://` is added when missing). Required unless `html` is sent.",
      "schema": {
       "type": "string"
      },
      "example": "https://bitis.com.vn"
     },
     {
      "name": "categories",
      "in": "query",
      "required": false,
      "description": "Comma-separated filter, e.g. `ecommerce,cms,analytics,cdn,framework,chat,payment`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "redirects": {
           "type": "number"
          },
          "response_ms": {
           "type": "number"
          },
          "html_bytes": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "technologies": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "confidence": {
              "type": "number"
             },
             "version": {},
             "website": {
              "type": "string"
             },
             "evidence": {
              "type": "array"
             }
            }
           }
          },
          "categories": {
           "type": "object",
           "properties": {
            "security": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "analytics": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "web-server": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "tag-manager": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ecommerce": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "js-library": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array"
          },
          "method": {
           "type": "string"
          }
         }
        },
        "example": {
         "source": "fetch",
         "url": "https://bitis.com.vn",
         "final_url": "https://bitis.com.vn/",
         "status": 200,
         "redirects": 0,
         "response_ms": 526,
         "html_bytes": 303941,
         "count": 9,
         "technologies": [
          {
           "name": "Google Analytics",
           "category": "analytics",
           "confidence": 100,
           "version": null,
           "website": "https://marketingplatform.google.com/about/analytics",
           "evidence": [
            "url https://www.googletagmanager.com/gtag/js?id=G-M6FR2XMHTB",
            "html: gtag('config', 'G-M6FR2XMHTB'"
           ]
          },
          {
           "name": "OpenResty",
           "category": "web-server",
           "confidence": 100,
           "version": null,
           "website": "https://openresty.org",
           "evidence": [
            "header server: openresty"
           ]
          },
          {
           "name": "Haravan",
           "category": "ecommerce",
           "confidence": 95,
           "version": null,
           "website": "https://haravan.com",
           "evidence": [
            "html: cdn.hstatic.net"
           ]
          },
          {
           "name": "Meta Pixel",
           "category": "analytics",
           "confidence": 95,
           "version": null,
           "website": "https://facebook.com/business/tools/meta-pixel",
           "evidence": [
            "html: connect.facebook.net/en_US/fbevents.js"
           ]
          },
          {
           "name": "Nginx",
           "category": "web-server",
           "confidence": 80,
           "version": null,
           "website": "https://nginx.org",
           "evidence": [
            "implied by OpenResty"
           ]
          }
         ],
         "categories": {
          "security": [
           "Content Security Policy",
           "HSTS"
          ],
          "analytics": [
           "Google Analytics",
           "Meta Pixel"
          ],
          "web-server": [
           "OpenResty",
           "Nginx"
          ],
          "tag-manager": [
           "Google Tag Manager"
          ],
          "ecommerce": [
           "Haravan"
          ],
          "js-library": [
           "jQuery"
          ]
         },
         "notes": [],
         "method": "Fingerprints of 167 technologies matched on the response headers, cookie names, meta generator, script / stylesheet URLs and HTML of one page; JavaScript is not executed. Confidence below 50 means a weak hint (e.g. a payment logo)."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Website Technology Detector",
    "description": "Give a `url` and the API fetches that one page and matches about 170 fingerprints against the response headers, cookie names, `<meta name=\"generator\">`, script and stylesheet URLs and the HTML. It recognises CMS and site builders (WordPress, Drupal, Joomla, Wix, Webflow, Ghost…), e-commerce platforms including the Vietnamese ones (Haravan, Sapo / Bizweb, LadiPage, Nhanh.vn), JavaScript frameworks (Next.js, Nuxt, Angular, SvelteKit, Astro…), analytics and pixels (Google Analytics, Tag Manager, Meta, TikTok, Clarity), chat widgets (Zalo, Messenger, Subiz, Tawk.to), CDN and hosting (Cloudflare, Fastly, CloudFront, Vercel, Netlify), web servers, back-end languages, payment SDKs and captchas.\n\nEach technology comes with a category, a confidence from 0 to 100, the version when the page shows it (for example `WordPress 6.8`, `PHP/8.2`, `ng-version`) and the evidence that matched, so you can check the result yourself. Implied technologies are added (WooCommerce → WordPress → PHP). `categories=ecommerce,cms` keeps only some categories. To analyse a page you already have, POST its `html` and optionally its `headers` instead of a URL.\n\nOnly one page is read (up to 1.5 MB) and JavaScript is not executed, so tools loaded later by a tag manager may be missed. Sites behind a bot challenge only show their CDN. The fingerprint table is our own; Vietnamese payment wallets (VNPAY, MoMo, ZaloPay) are usually only visible as logos and are reported with low confidence.\n\nDocs: https://apibox.io.vn/docs/tech-detect/",
    "operationId": "techDetectPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/tech-detect/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Page to analyse (`https://` is added when missing). Required unless `html` is sent.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "categories",
      "in": "query",
      "required": false,
      "description": "Comma-separated filter, e.g. `ecommerce,cms,analytics,cdn,framework,chat,payment`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "HTML to analyse instead of fetching a URL (max 3,000,000 characters)."
         },
         "headers": {
          "type": "object",
          "description": "With `html`: response headers as an object or \"Name: value\" lines (Set-Cookie included)."
         },
         "cookies": {
          "type": "array",
          "items": {},
          "description": "With `html`: cookie names (array or comma-separated)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "final_url": {
           "type": "string"
          },
          "status": {
           "type": "number"
          },
          "redirects": {
           "type": "number"
          },
          "response_ms": {
           "type": "number"
          },
          "html_bytes": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "technologies": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "confidence": {
              "type": "number"
             },
             "version": {},
             "website": {
              "type": "string"
             },
             "evidence": {
              "type": "array"
             }
            }
           }
          },
          "categories": {
           "type": "object",
           "properties": {
            "security": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "analytics": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "web-server": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "tag-manager": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ecommerce": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "js-library": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array"
          },
          "method": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-streets": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam street names by ward",
    "description": "Street-level address data for the 34 provinces and 3,321 phường / xã / đặc khu in force since 1/7/2025. `ward=<code or name>` lists the streets of one ward (streets first, then ngõ / hẻm / kiệt), `province=<code or name>` lists every street of a province with the wards it runs through, and `q` searches by name: without accents or case (`le loi` finds “Đường Lê Lợi”), ignoring the generic word (đường, phố, ngõ, hẻm), with exact diacritics ranked first. `q` alone searches the whole country and returns, for each name, the provinces where it exists. Filter by `type` (`street`, `alley`, `bridge`, `road` for numbered roads such as QL1A), page with `limit` and `offset`.\n\nEach street comes with its OpenStreetMap road class, its approximate length in the ward, a representative point (lat / lng) and a link to an OSM way. Data comes from OpenStreetMap (Geofabrik extract for Vietnam), rebuilt monthly: named roads are placed in wards by point-in-polygon on the same simplified boundaries as /v1/vn-geo, segment by segment, so a long road appears in every ward it crosses, and a road that only touches a ward is left out.\n\nCoverage is as good as OpenStreetMap: dense in Hà Nội, TP.HCM, Đà Nẵng and other cities (about 118,000 ward / street pairs in total), thin in rural and mountainous communes where many roads have no name in OSM. Data © OpenStreetMap contributors under the ODbL 1.0: every response carries the attribution, and a redistributed copy of the list must keep it and stay under the ODbL. The whole database is a free download, no key needed, at apibox.io.vn/data/vn-streets/ (https://apibox.io.vn/data/vn-streets/) (one gzip JSON file per rebuild, the 3 latest kept, with the licence); each response gives its link in `licence_dump_url`.\n\nDocs: https://apibox.io.vn/docs/vn-streets/",
    "operationId": "vnStreetsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-streets/"
    },
    "parameters": [
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "Ward / commune: 5-digit code (e.g. `00070`) or name (`Phường Hoàn Kiếm`, add `province` when the name exists in several provinces). Also as a path: `/v1/vn-streets/00070`.",
      "schema": {
       "type": "string"
      },
      "example": "00070"
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province code (`01`, `79`) or name (`Hà Nội`, `hcm`). Alone: every street of the province with its wards.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name to search, with or without accents (max 100 characters). Alone: nationwide search.",
      "schema": {
       "type": "string"
      },
      "example": "hang"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`street`, `alley` (ngõ, ngách, hẻm, kiệt), `bridge`, `road` (numbered roads) or `all`.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum results (1–5000; default 50 with `q`, 1000 otherwise).",
      "schema": {
       "type": "number",
       "default": 1000
      },
      "example": 3
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "description": "Skip this many results (paging).",
      "schema": {
       "type": "number",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ward": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            },
            "province": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "offset": {
           "type": "number"
          },
          "count": {
           "type": "number"
          },
          "streets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "name_ascii": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "highway": {
              "type": "string"
             },
             "length_m": {
              "type": "number"
             },
             "lat": {
              "type": "number"
             },
             "lng": {
              "type": "number"
             },
             "osm_way": {
              "type": "string"
             }
            }
           }
          },
          "attribution": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "licence_url": {
           "type": "string"
          },
          "licence_note": {
           "type": "string"
          },
          "licence_dump_url": {
           "type": "string"
          },
          "coverage_note": {
           "type": "string"
          },
          "data": {
           "type": "object",
           "properties": {
            "version": {
             "type": "string"
            },
            "osm_timestamp": {
             "type": "string"
            },
            "built_at": {
             "type": "string"
            },
            "admin_version": {
             "type": "string"
            },
            "refresh": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "ward": {
          "code": "00070",
          "name": "Phường Hoàn Kiếm",
          "province_code": "01",
          "province": "Thành phố Hà Nội"
         },
         "total": 55,
         "offset": 0,
         "count": 3,
         "streets": [
          {
           "name": "Hàng Cân",
           "name_ascii": "hang can",
           "type": "street",
           "highway": "tertiary",
           "length_m": 157,
           "lat": 21.03465,
           "lng": 105.84967,
           "osm_way": "https://www.openstreetmap.org/way/28102774"
          },
          {
           "name": "Phố Hàng Bè",
           "name_ascii": "pho hang be",
           "type": "street",
           "highway": "residential",
           "length_m": 177,
           "lat": 21.03264,
           "lng": 105.85382,
           "osm_way": "https://www.openstreetmap.org/way/399591853"
          },
          {
           "name": "Phố Hàng Bồ",
           "name_ascii": "pho hang bo",
           "type": "street",
           "highway": "residential",
           "length_m": 285,
           "lat": 21.03382,
           "lng": 105.84815,
           "osm_way": "https://www.openstreetmap.org/way/28103110"
          }
         ],
         "attribution": "© OpenStreetMap contributors",
         "licence": "ODbL-1.0",
         "licence_url": "https://www.openstreetmap.org/copyright",
         "licence_note": "Street data © OpenStreetMap contributors, available under the Open Database License. This list is a derived database: if you redistribute it (or a substantial extract), credit OpenStreetMap and share it under the ODbL.",
         "licence_dump_url": "https://apibox.io.vn/data/vn-streets/20261111.json.gz",
         "coverage_note": "Only streets that carry a name in OpenStreetMap are listed; coverage is good in cities and incomplete in rural and mountainous areas. Wards are assigned from simplified boundaries, so streets on a ward border can appear in both wards.",
         "data": {
          "version": "20261111",
          "osm_timestamp": "2026-11-09T21:22:17.000Z",
          "built_at": "2026-11-11T03:01:14.154Z",
          "admin_version": "v5.2.0",
          "refresh": "monthly"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-pit-other": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam PIT on other income",
    "description": "Send the income `type` and the `amount` and the API returns the tax, the taxable part, the rate and the article it comes from. Types: `prize` (lottery, promotions, betting, contests), `inheritance` and `gift` (securities, capital, real estate, registered assets), `securities` (0.1% of the price), `capital_transfer` (20% of the gain, or 2% of the price when the cost is unknown), `real_estate` (2%), `royalty` and `franchise` (5% above the threshold), `capital_investment` (5% on dividends, loan interest), `casual` (10% withholding), and the new items taxed from 1/7/2026: `vn_domain`, `carbon_credit`, `license_plate` (5% above 20 million) and `digital_asset` (0.1%). Gold bars are listed in the law but no tax is collected until the Government sets the threshold.\n\nThe `date` picks the rules: Luật Thuế TNCN 109/2025/QH15 and Nghị định 253/2026/NĐ-CP from 1 July 2026 (thresholds 20 million, casual withholding from 5 million per payment), the 2007 law as amended before that (10 million, 2 million). Exemptions are applied when you send them: real estate between family members (`relationship`), the only home (`sole_home`), bank-deposit interest (`investment_kind=bank_deposit`), open-ended fund certificates held 2 years or more. Non-residents use `resident=false`.\n\nBusiness income of households is `/v1/vn-household-tax`; salaries are `/v1/vn-salary` and `/v1/vn-pit-annual`. Every answer has `rules` with the article, `legal` and a disclaimer.\n\nDocs: https://apibox.io.vn/docs/vn-pit-other/",
    "operationId": "vnPitOtherGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pit-other/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": true,
      "description": "prize, inheritance, gift, securities, capital_transfer, real_estate, royalty, franchise, capital_investment, casual, vn_domain, carbon_credit, license_plate, digital_asset, gold.",
      "schema": {
       "type": "string"
      },
      "example": "prize"
     },
     {
      "name": "amount",
      "in": "query",
      "required": true,
      "description": "Prize value, asset value, transfer price or income per occasion / contract (VND).",
      "schema": {
       "type": "number"
      },
      "example": 50000000
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date the income is received (default today); before 2026-07-01 uses the old law.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "cost",
      "in": "query",
      "required": false,
      "description": "capital_transfer: purchase price + reasonable costs.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "resident",
      "in": "query",
      "required": false,
      "description": "false for non-resident individuals.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "relationship",
      "in": "query",
      "required": false,
      "description": "spouse, parent, child, adoptive_parent, adopted_child, parent_in_law, child_in_law, grandparent, grandchild, sibling, other (real-estate exemption).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "asset",
      "in": "query",
      "required": false,
      "description": "inheritance / gift: real_estate, securities, capital, registered_asset.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sole_home",
      "in": "query",
      "required": false,
      "description": "real_estate: the only home in Vietnam (exempt).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "investment_kind",
      "in": "query",
      "required": false,
      "description": "capital_investment: bank_deposit, government_bond, life_insurance (exempt), dividend, loan_interest.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "open_fund",
      "in": "query",
      "required": false,
      "description": "securities: open-ended fund certificates (exempt when held_years ≥ 2, from 1/7/2026).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "type_vi": {
           "type": "string"
          },
          "type_en": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "resident": {
           "type": "boolean"
          },
          "amount": {
           "type": "number"
          },
          "status": {
           "type": "string"
          },
          "taxable_income": {
           "type": "number"
          },
          "rate_percent": {
           "type": "number"
          },
          "tax": {
           "type": "number"
          },
          "net": {
           "type": "number"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "string"
             },
             "value": {
              "type": "number"
             }
            }
           }
          },
          "rules": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "article": {
              "type": "string"
             },
             "rule_vi": {
              "type": "string"
             }
            }
           }
          },
          "related": {
           "type": "object",
           "properties": {
            "business_income": {
             "type": "string"
            },
            "salary": {
             "type": "string"
            },
            "annual_finalisation": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "type": "prize",
         "type_vi": "Trúng thưởng (xổ số, khuyến mại, đặt cược, trò chơi, cuộc thi có thưởng)",
         "type_en": "Winnings (lottery, promotions, betting, games, contests)",
         "date": "2026-11-11",
         "regime": "Luật 109/2025/QH15 (from 2026-07-01)",
         "resident": true,
         "amount": 50000000,
         "status": "taxable",
         "taxable_income": 30000000,
         "rate_percent": 10,
         "tax": 3000000,
         "net": 47000000,
         "steps": [
          {
           "step": "amount received (per prize / contract / occasion)",
           "value": 50000000
          },
          {
           "step": "threshold",
           "value": 20000000
          },
          {
           "step": "taxable income = amount − threshold",
           "value": 30000000
          }
         ],
         "rules": [
          {
           "article": "Luật 109/2025/QH15 Điều 15",
           "rule_vi": "10% × phần giá trị giải thưởng vượt trên 20 triệu đồng theo từng lần trúng thưởng"
          }
         ],
         "related": {
          "business_income": "/v1/vn-household-tax",
          "salary": "/v1/vn-salary",
          "annual_finalisation": "/v1/vn-pit-annual"
         },
         "legal": [
          "Luật Thuế thu nhập cá nhân 109/2025/QH15 (hiệu lực 01/7/2026)",
          "Nghị định 253/2026/NĐ-CP (hiệu lực 01/7/2026)"
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Reference calculation, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam PIT on other income",
    "description": "Send the income `type` and the `amount` and the API returns the tax, the taxable part, the rate and the article it comes from. Types: `prize` (lottery, promotions, betting, contests), `inheritance` and `gift` (securities, capital, real estate, registered assets), `securities` (0.1% of the price), `capital_transfer` (20% of the gain, or 2% of the price when the cost is unknown), `real_estate` (2%), `royalty` and `franchise` (5% above the threshold), `capital_investment` (5% on dividends, loan interest), `casual` (10% withholding), and the new items taxed from 1/7/2026: `vn_domain`, `carbon_credit`, `license_plate` (5% above 20 million) and `digital_asset` (0.1%). Gold bars are listed in the law but no tax is collected until the Government sets the threshold.\n\nThe `date` picks the rules: Luật Thuế TNCN 109/2025/QH15 and Nghị định 253/2026/NĐ-CP from 1 July 2026 (thresholds 20 million, casual withholding from 5 million per payment), the 2007 law as amended before that (10 million, 2 million). Exemptions are applied when you send them: real estate between family members (`relationship`), the only home (`sole_home`), bank-deposit interest (`investment_kind=bank_deposit`), open-ended fund certificates held 2 years or more. Non-residents use `resident=false`.\n\nBusiness income of households is `/v1/vn-household-tax`; salaries are `/v1/vn-salary` and `/v1/vn-pit-annual`. Every answer has `rules` with the article, `legal` and a disclaimer.\n\nDocs: https://apibox.io.vn/docs/vn-pit-other/",
    "operationId": "vnPitOtherPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pit-other/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "description": "prize, inheritance, gift, securities, capital_transfer, real_estate, royalty, franchise, capital_investment, casual, vn_domain, carbon_credit, license_plate, digital_asset, gold."
         },
         "amount": {
          "type": "number",
          "description": "Prize value, asset value, transfer price or income per occasion / contract (VND)."
         },
         "date": {
          "type": "string",
          "description": "Date the income is received (default today); before 2026-07-01 uses the old law."
         },
         "cost": {
          "type": "number",
          "description": "capital_transfer: purchase price + reasonable costs."
         },
         "resident": {
          "type": "boolean",
          "default": true,
          "description": "false for non-resident individuals."
         },
         "relationship": {
          "type": "string",
          "description": "spouse, parent, child, adoptive_parent, adopted_child, parent_in_law, child_in_law, grandparent, grandchild, sibling, other (real-estate exemption)."
         },
         "asset": {
          "type": "string",
          "description": "inheritance / gift: real_estate, securities, capital, registered_asset."
         },
         "sole_home": {
          "type": "boolean",
          "description": "real_estate: the only home in Vietnam (exempt)."
         },
         "investment_kind": {
          "type": "string",
          "description": "capital_investment: bank_deposit, government_bond, life_insurance (exempt), dividend, loan_interest."
         },
         "open_fund": {
          "type": "boolean",
          "description": "securities: open-ended fund certificates (exempt when held_years ≥ 2, from 1/7/2026)."
         }
        },
        "required": [
         "type",
         "amount"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "type_vi": {
           "type": "string"
          },
          "type_en": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "resident": {
           "type": "boolean"
          },
          "amount": {
           "type": "number"
          },
          "status": {
           "type": "string"
          },
          "taxable_income": {
           "type": "number"
          },
          "rate_percent": {
           "type": "number"
          },
          "tax": {
           "type": "number"
          },
          "net": {
           "type": "number"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "string"
             },
             "value": {
              "type": "number"
             }
            }
           }
          },
          "rules": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "article": {
              "type": "string"
             },
             "rule_vi": {
              "type": "string"
             }
            }
           }
          },
          "related": {
           "type": "object",
           "properties": {
            "business_income": {
             "type": "string"
            },
            "salary": {
             "type": "string"
            },
            "annual_finalisation": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-tax-penalty": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam tax penalty calculator",
    "description": "For `violation=late_filing` send the `deadline` (or a `period` such as `2026-05`, `2026-Q2` or `2025` with `form` vat, pit, cit, pit_individual or financial_statements: the deadline then comes from `/v1/vn-tax-calendar`, moved past weekends and holidays) and the `filed_date` or `days_late`. The API returns the band of Nghị định 125/2020/NĐ-CP Điều 13 (warning for 1–5 days with a mitigating circumstance, 2–5 million up to 30 days, 5–8 million up to 60, 8–15 million up to 90, 15–25 million beyond 90 days when the tax was paid, otherwise tax evasion at 1–3 times the tax) and the amount the tax office starts from: the middle of the band, −10% for one mitigating circumstance, the minimum for two or more, +10% / maximum for aggravating ones (NĐ 310/2025/NĐ-CP, from 16/1/2026; the older ±10% per circumstance rule for earlier violations).\n\nOther violations: `late_invoice` and `no_invoice` (bands by number of invoices, separately for sales and for promotions / gifts / internal use, NĐ 310 Điều 24), `understatement` (20% of the shortfall) and `evasion` (1–3×). Individuals and household businesses (`entity`) pay half. Send `tax_amount` and `paid_date` to add the 0.03%/day late-payment interest computed by `/v1/vn-late-interest`.\n\nDocs: https://apibox.io.vn/docs/vn-tax-penalty/",
    "operationId": "vnTaxPenaltyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-penalty/"
    },
    "parameters": [
     {
      "name": "violation",
      "in": "query",
      "required": false,
      "description": "late_filing, not_filed, late_invoice, no_invoice, understatement, evasion.",
      "schema": {
       "type": "string",
       "default": "late_filing"
      }
     },
     {
      "name": "deadline",
      "in": "query",
      "required": false,
      "description": "Filing deadline (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "period",
      "in": "query",
      "required": false,
      "description": "Tax period instead of a deadline: YYYY-MM, YYYY-Qn or YYYY, with `form`.",
      "schema": {
       "type": "string"
      },
      "example": "2026-05"
     },
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "vat, pit, cit, pit_individual, financial_statements.",
      "schema": {
       "type": "string",
       "default": "vat"
      },
      "example": "vat"
     },
     {
      "name": "filed_date",
      "in": "query",
      "required": false,
      "description": "Date the return was filed (default today) — or `days_late`.",
      "schema": {
       "type": "string"
      },
      "example": "2026-07-10"
     },
     {
      "name": "tax_amount",
      "in": "query",
      "required": false,
      "description": "Tax payable on the return (0 = none).",
      "schema": {
       "type": "number"
      },
      "example": 10000000
     },
     {
      "name": "tax_paid",
      "in": "query",
      "required": false,
      "description": "> 90 days late: tax and interest paid before an inspection?",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "paid_date",
      "in": "query",
      "required": false,
      "description": "Date the tax was paid: adds late-payment interest.",
      "schema": {
       "type": "string"
      },
      "example": "2026-07-10"
     },
     {
      "name": "entity",
      "in": "query",
      "required": false,
      "description": "organization, individual or household (half the fine).",
      "schema": {
       "type": "string",
       "default": "organization"
      }
     },
     {
      "name": "mitigating",
      "in": "query",
      "required": false,
      "description": "Number of mitigating circumstances.",
      "schema": {
       "type": "number",
       "default": 0
      },
      "example": 1
     },
     {
      "name": "aggravating",
      "in": "query",
      "required": false,
      "description": "Number of aggravating circumstances.",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "invoice_count",
      "in": "query",
      "required": false,
      "description": "late_invoice / no_invoice: number of invoices.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "purpose",
      "in": "query",
      "required": false,
      "description": "sale, or internal (promotions, samples, gifts, pay in kind, internal use).",
      "schema": {
       "type": "string",
       "default": "sale"
      }
     },
     {
      "name": "tax_shortfall",
      "in": "query",
      "required": false,
      "description": "understatement: tax understated.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "tax_evaded",
      "in": "query",
      "required": false,
      "description": "evasion: tax evaded.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "violation": {
           "type": "string"
          },
          "entity": {
           "type": "string"
          },
          "deadline_info": {
           "type": "object",
           "properties": {
            "form": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "due_date": {
             "type": "string"
            },
            "statutory_date": {
             "type": "string"
            },
            "title_vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "deadline": {
           "type": "string"
          },
          "filed_date": {
           "type": "string"
          },
          "days_late": {
           "type": "number"
          },
          "tax_amount": {
           "type": "number"
          },
          "rules_version": {
           "type": "string"
          },
          "classification": {
           "type": "string"
          },
          "band": {
           "type": "object",
           "properties": {
            "min": {
             "type": "number"
            },
            "max": {
             "type": "number"
            },
            "middle": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            },
            "text_vi": {
             "type": "string"
            }
           }
          },
          "amount_rule": {
           "type": "string"
          },
          "fine": {
           "type": "number"
          },
          "late_interest": {
           "type": "object",
           "properties": {
            "principal": {
             "type": "number"
            },
            "due_date": {
             "type": "string"
            },
            "paid_date": {
             "type": "string"
            },
            "days": {
             "type": "number"
            },
            "interest": {
             "type": "number"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "mitigating": {
           "type": "number"
          },
          "aggravating": {
           "type": "number"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "violation": "late_filing",
         "entity": "organization",
         "deadline_info": {
          "form": "vat",
          "period": "2026-05",
          "due_date": "2026-06-22",
          "statutory_date": "2026-06-20",
          "title_vi": "Khai, nộp thuế GTGT tháng 5/2026",
          "ref": "Luật Quản lý thuế 38/2019/QH14 Điều 44",
          "source": "/v1/vn-tax-calendar"
         },
         "deadline": "2026-06-22",
         "filed_date": "2026-07-10",
         "days_late": 18,
         "tax_amount": 10000000,
         "rules_version": "NĐ 125/2020 as amended by NĐ 310/2025 (violations from 2026-01-16)",
         "classification": "fine",
         "band": {
          "min": 2000000,
          "max": 5000000,
          "middle": 3500000,
          "ref": "NĐ 125/2020/NĐ-CP Điều 13 khoản 2",
          "text_vi": "Quá thời hạn từ 01 đến 30 ngày"
         },
         "amount_rule": "1 mitigating circumstance: middle − 10%",
         "fine": 3150000,
         "late_interest": {
          "principal": 10000000,
          "due_date": "2026-06-22",
          "paid_date": "2026-07-10",
          "days": 17,
          "interest": 51000,
          "source": "/v1/vn-late-interest"
         },
         "total": 3201000,
         "mitigating": 1,
         "aggravating": 0,
         "legal": [
          "Nghị định 125/2020/NĐ-CP (sửa đổi bởi Nghị định 102/2021/NĐ-CP và Nghị định 310/2025/NĐ-CP, hiệu lực 16/01/2026)",
          "Luật Xử lý vi phạm hành chính 15/2012/QH13 Điều 23 khoản 2 (mức phạt tổ chức gấp 2 lần cá nhân)"
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Reference calculation, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam tax penalty calculator",
    "description": "For `violation=late_filing` send the `deadline` (or a `period` such as `2026-05`, `2026-Q2` or `2025` with `form` vat, pit, cit, pit_individual or financial_statements: the deadline then comes from `/v1/vn-tax-calendar`, moved past weekends and holidays) and the `filed_date` or `days_late`. The API returns the band of Nghị định 125/2020/NĐ-CP Điều 13 (warning for 1–5 days with a mitigating circumstance, 2–5 million up to 30 days, 5–8 million up to 60, 8–15 million up to 90, 15–25 million beyond 90 days when the tax was paid, otherwise tax evasion at 1–3 times the tax) and the amount the tax office starts from: the middle of the band, −10% for one mitigating circumstance, the minimum for two or more, +10% / maximum for aggravating ones (NĐ 310/2025/NĐ-CP, from 16/1/2026; the older ±10% per circumstance rule for earlier violations).\n\nOther violations: `late_invoice` and `no_invoice` (bands by number of invoices, separately for sales and for promotions / gifts / internal use, NĐ 310 Điều 24), `understatement` (20% of the shortfall) and `evasion` (1–3×). Individuals and household businesses (`entity`) pay half. Send `tax_amount` and `paid_date` to add the 0.03%/day late-payment interest computed by `/v1/vn-late-interest`.\n\nDocs: https://apibox.io.vn/docs/vn-tax-penalty/",
    "operationId": "vnTaxPenaltyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-penalty/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "violation": {
          "type": "string",
          "default": "late_filing",
          "description": "late_filing, not_filed, late_invoice, no_invoice, understatement, evasion."
         },
         "deadline": {
          "type": "string",
          "description": "Filing deadline (YYYY-MM-DD)."
         },
         "period": {
          "type": "string",
          "description": "Tax period instead of a deadline: YYYY-MM, YYYY-Qn or YYYY, with `form`."
         },
         "form": {
          "type": "string",
          "default": "vat",
          "description": "vat, pit, cit, pit_individual, financial_statements."
         },
         "filed_date": {
          "type": "string",
          "description": "Date the return was filed (default today) — or `days_late`."
         },
         "tax_amount": {
          "type": "number",
          "description": "Tax payable on the return (0 = none)."
         },
         "tax_paid": {
          "type": "boolean",
          "default": true,
          "description": "> 90 days late: tax and interest paid before an inspection?"
         },
         "paid_date": {
          "type": "string",
          "description": "Date the tax was paid: adds late-payment interest."
         },
         "entity": {
          "type": "string",
          "default": "organization",
          "description": "organization, individual or household (half the fine)."
         },
         "mitigating": {
          "type": "number",
          "default": 0,
          "description": "Number of mitigating circumstances."
         },
         "aggravating": {
          "type": "number",
          "default": 0,
          "description": "Number of aggravating circumstances."
         },
         "invoice_count": {
          "type": "number",
          "default": 1,
          "description": "late_invoice / no_invoice: number of invoices."
         },
         "purpose": {
          "type": "string",
          "default": "sale",
          "description": "sale, or internal (promotions, samples, gifts, pay in kind, internal use)."
         },
         "tax_shortfall": {
          "type": "number",
          "description": "understatement: tax understated."
         },
         "tax_evaded": {
          "type": "number",
          "description": "evasion: tax evaded."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "violation": {
           "type": "string"
          },
          "entity": {
           "type": "string"
          },
          "deadline_info": {
           "type": "object",
           "properties": {
            "form": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "due_date": {
             "type": "string"
            },
            "statutory_date": {
             "type": "string"
            },
            "title_vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "deadline": {
           "type": "string"
          },
          "filed_date": {
           "type": "string"
          },
          "days_late": {
           "type": "number"
          },
          "tax_amount": {
           "type": "number"
          },
          "rules_version": {
           "type": "string"
          },
          "classification": {
           "type": "string"
          },
          "band": {
           "type": "object",
           "properties": {
            "min": {
             "type": "number"
            },
            "max": {
             "type": "number"
            },
            "middle": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            },
            "text_vi": {
             "type": "string"
            }
           }
          },
          "amount_rule": {
           "type": "string"
          },
          "fine": {
           "type": "number"
          },
          "late_interest": {
           "type": "object",
           "properties": {
            "principal": {
             "type": "number"
            },
            "due_date": {
             "type": "string"
            },
            "paid_date": {
             "type": "string"
            },
            "days": {
             "type": "number"
            },
            "interest": {
             "type": "number"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "mitigating": {
           "type": "number"
          },
          "aggravating": {
           "type": "number"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-import-cost": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam import tax & landed cost",
    "description": "Send an 8-digit `hs_code` and the value as `cif` (or `fob` / `exw` + `freight` + `insurance`) in any `currency` with an `exchange_rate` (otherwise today's Vietcombank buying rate is fetched). The API reads the 2026 tariff line from `/v1/hs-code` and computes, each tax on top of the previous base: customs value, import duty (MFN rate, the special preferential rate of an agreement with `fta` — a C/O form such as `E`, `D`, `EUR.1`, `CPTPP`, `RCEP` with `origin_country` — or the normal rate of 150% MFN with `mfn=false`), excise tax on customs value + duty (Luật Thuế TTĐB 66/2025), environmental protection tax per unit, and import VAT on the sum (8% while the reduction applies and the goods are not excluded, else 10%).\n\nThe answer has a `steps` table with each base, rate, amount and legal reference, the total payable at customs and the `landed_cost` (customs value + duties + excise + environmental tax + `other_costs`, adding VAT only when `vat_deductible=false`) per unit when `quantity` is sent. Any rate can be overridden (`import_duty_rate`, `excise_rate`, `environmental_tax_per_unit`, `vat_rate`, `additional_import_tax` for anti-dumping or safeguard duties). Excise items marked by engine size or seats need `excise_rate`.\n\nDocs: https://apibox.io.vn/docs/vn-import-cost/",
    "operationId": "vnImportCostGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-import-cost/"
    },
    "parameters": [
     {
      "name": "hs_code",
      "in": "query",
      "required": false,
      "description": "8-digit Vietnamese tariff line (e.g. 2203.00.91); or send `import_duty_rate`.",
      "schema": {
       "type": "string"
      },
      "example": "2203.00.91"
     },
     {
      "name": "cif",
      "in": "query",
      "required": false,
      "description": "CIF value (= customs value). Or `fob` / `exw` with `freight`, `insurance`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "currency",
      "in": "query",
      "required": false,
      "description": "Currency of the values.",
      "schema": {
       "type": "string",
       "default": "VND"
      },
      "example": "USD"
     },
     {
      "name": "exchange_rate",
      "in": "query",
      "required": false,
      "description": "VND per unit of currency (default: Vietcombank transfer buying rate today).",
      "schema": {
       "type": "number"
      },
      "example": 25000
     },
     {
      "name": "fta",
      "in": "query",
      "required": false,
      "description": "C/O form or agreement: E, D, AJ, VJ, AK, AANZ, AI, VK, VC, EAV, CPTPP, AHK, EUR.1, UK, S, VIFTA, RCEP.",
      "schema": {
       "type": "string"
      },
      "example": "EUR.1"
     },
     {
      "name": "origin_country",
      "in": "query",
      "required": false,
      "description": "ISO alpha-2 exporting country (RCEP groups, excluded countries, CPTPP Mexico).",
      "schema": {
       "type": "string"
      },
      "example": "DE"
     },
     {
      "name": "quantity",
      "in": "query",
      "required": false,
      "description": "Units (for environmental tax and the cost per unit).",
      "schema": {
       "type": "number"
      },
      "example": 12000
     },
     {
      "name": "excise_rate",
      "in": "query",
      "required": false,
      "description": "Override the excise rate (%).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "environmental_tax_per_unit",
      "in": "query",
      "required": false,
      "description": "Environmental tax per unit (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "other_costs",
      "in": "query",
      "required": false,
      "description": "Local costs added to the landed cost (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Import date (VAT reduction, excise schedule).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "currency": {
           "type": "string"
          },
          "exchange_rate": {
           "type": "number"
          },
          "exchange_rate_source": {
           "type": "string"
          },
          "value_basis": {
           "type": "string"
          },
          "value_parts": {
           "type": "object",
           "properties": {
            "fob": {
             "type": "number"
            },
            "freight": {
             "type": "number"
            },
            "insurance": {
             "type": "number"
            }
           }
          },
          "value_foreign": {
           "type": "number"
          },
          "hs": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "code_formatted": {
             "type": "string"
            },
            "description_vi": {
             "type": "string"
            },
            "unit": {
             "type": "string"
            },
            "mfn_rate": {
             "type": "number"
            },
            "normal_rate": {
             "type": "number"
            },
            "vat": {
             "type": "string"
            },
            "special_consumption_tax": {
             "type": "number"
            },
            "environmental_tax": {},
            "fta": {
             "type": "object",
             "properties": {
              "agreement": {
               "type": "string"
              },
              "cell": {
               "type": "number"
              }
             }
            },
            "tariff_year": {
             "type": "number"
            }
           }
          },
          "fta": {
           "type": "string"
          },
          "origin_country": {
           "type": "string"
          },
          "customs_value": {
           "type": "number"
          },
          "import_duty": {
           "type": "number"
          },
          "additional_import_tax": {
           "type": "number"
          },
          "excise_tax": {
           "type": "number"
          },
          "environmental_tax": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "vat_rate": {
           "type": "number"
          },
          "total_taxes": {
           "type": "number"
          },
          "payable_at_customs": {
           "type": "number"
          },
          "other_costs": {
           "type": "number"
          },
          "vat_deductible": {
           "type": "boolean"
          },
          "landed_cost": {
           "type": "number"
          },
          "quantity": {
           "type": "number"
          },
          "landed_cost_per_unit": {
           "type": "number"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "base": {},
             "rate": {},
             "amount": {
              "type": "number"
             },
             "basis": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "currency": "USD",
         "exchange_rate": 25000,
         "exchange_rate_source": "exchange_rate parameter",
         "value_basis": "FOB + freight + insurance",
         "value_parts": {
          "fob": 9000,
          "freight": 800,
          "insurance": 200
         },
         "value_foreign": 10000,
         "hs": {
          "code": "22030091",
          "code_formatted": "2203.00.91",
          "description_vi": "Có nồng độ cồn không quá 5,8% tính theo thể tích",
          "unit": "lít/kg",
          "mfn_rate": 35,
          "normal_rate": 52.5,
          "vat": "10/8",
          "special_consumption_tax": 65,
          "environmental_tax": null,
          "fta": {
           "agreement": "EVFTA",
           "cell": 22
          },
          "tariff_year": 2026
         },
         "fta": "EVFTA",
         "origin_country": "DE",
         "customs_value": 250000000,
         "import_duty": 55000000,
         "additional_import_tax": 0,
         "excise_tax": 198250000,
         "environmental_tax": 0,
         "vat": 50325000,
         "vat_rate": 10,
         "total_taxes": 303575000,
         "payable_at_customs": 303575000,
         "other_costs": 0,
         "vat_deductible": true,
         "landed_cost": 503250000,
         "quantity": 12000,
         "landed_cost_per_unit": 41937.5,
         "steps": [
          {
           "step": 1,
           "name": "Customs value",
           "name_vi": "Trị giá tính thuế (trị giá hải quan)",
           "base": "10,000 USD × 25000",
           "rate": null,
           "amount": 250000000
          },
          {
           "step": 2,
           "name": "Import duty",
           "name_vi": "Thuế nhập khẩu",
           "base": 250000000,
           "rate": 22,
           "amount": 55000000,
           "basis": "special preferential rate EVFTA"
          },
          {
           "step": 3,
           "name": "Excise tax",
           "name_vi": "Thuế tiêu thụ đặc biệt",
           "base": 305000000,
           "rate": 65,
           "amount": 198250000,
           "ref": "Luật Thuế TTĐB 66/2025/QH15 Điều 6 khoản 1 điểm b"
          },
          {
           "step": 4,
           "name": "Environmental protection tax",
           "name_vi": "Thuế bảo vệ môi trường",
           "base": 0,
           "rate": null,
           "amount": 0
          },
          {
           "step": 5,
           "name": "Import VAT",
           "name_vi": "Thuế GTGT hàng nhập khẩu",
           "base": 503250000,
           "rate": 10,
           "amount": 50325000,
           "basis": "10%: Không được giảm VAT theo 174/2025/NĐ-CP - PL2: Bia theo quy định của Luật Phòng, chống tác hại của rượu, bia;"
          }
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Reference calculation, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam import tax & landed cost",
    "description": "Send an 8-digit `hs_code` and the value as `cif` (or `fob` / `exw` + `freight` + `insurance`) in any `currency` with an `exchange_rate` (otherwise today's Vietcombank buying rate is fetched). The API reads the 2026 tariff line from `/v1/hs-code` and computes, each tax on top of the previous base: customs value, import duty (MFN rate, the special preferential rate of an agreement with `fta` — a C/O form such as `E`, `D`, `EUR.1`, `CPTPP`, `RCEP` with `origin_country` — or the normal rate of 150% MFN with `mfn=false`), excise tax on customs value + duty (Luật Thuế TTĐB 66/2025), environmental protection tax per unit, and import VAT on the sum (8% while the reduction applies and the goods are not excluded, else 10%).\n\nThe answer has a `steps` table with each base, rate, amount and legal reference, the total payable at customs and the `landed_cost` (customs value + duties + excise + environmental tax + `other_costs`, adding VAT only when `vat_deductible=false`) per unit when `quantity` is sent. Any rate can be overridden (`import_duty_rate`, `excise_rate`, `environmental_tax_per_unit`, `vat_rate`, `additional_import_tax` for anti-dumping or safeguard duties). Excise items marked by engine size or seats need `excise_rate`.\n\nDocs: https://apibox.io.vn/docs/vn-import-cost/",
    "operationId": "vnImportCostPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-import-cost/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "hs_code": {
          "type": "string",
          "description": "8-digit Vietnamese tariff line (e.g. 2203.00.91); or send `import_duty_rate`."
         },
         "cif": {
          "type": "number",
          "description": "CIF value (= customs value). Or `fob` / `exw` with `freight`, `insurance`."
         },
         "currency": {
          "type": "string",
          "default": "VND",
          "description": "Currency of the values."
         },
         "exchange_rate": {
          "type": "number",
          "description": "VND per unit of currency (default: Vietcombank transfer buying rate today)."
         },
         "fta": {
          "type": "string",
          "description": "C/O form or agreement: E, D, AJ, VJ, AK, AANZ, AI, VK, VC, EAV, CPTPP, AHK, EUR.1, UK, S, VIFTA, RCEP."
         },
         "origin_country": {
          "type": "string",
          "description": "ISO alpha-2 exporting country (RCEP groups, excluded countries, CPTPP Mexico)."
         },
         "quantity": {
          "type": "number",
          "description": "Units (for environmental tax and the cost per unit)."
         },
         "excise_rate": {
          "type": "number",
          "description": "Override the excise rate (%)."
         },
         "environmental_tax_per_unit": {
          "type": "number",
          "description": "Environmental tax per unit (VND)."
         },
         "other_costs": {
          "type": "number",
          "description": "Local costs added to the landed cost (VND)."
         },
         "date": {
          "type": "string",
          "description": "Import date (VAT reduction, excise schedule)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "currency": {
           "type": "string"
          },
          "exchange_rate": {
           "type": "number"
          },
          "exchange_rate_source": {
           "type": "string"
          },
          "value_basis": {
           "type": "string"
          },
          "value_parts": {
           "type": "object",
           "properties": {
            "fob": {
             "type": "number"
            },
            "freight": {
             "type": "number"
            },
            "insurance": {
             "type": "number"
            }
           }
          },
          "value_foreign": {
           "type": "number"
          },
          "hs": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "code_formatted": {
             "type": "string"
            },
            "description_vi": {
             "type": "string"
            },
            "unit": {
             "type": "string"
            },
            "mfn_rate": {
             "type": "number"
            },
            "normal_rate": {
             "type": "number"
            },
            "vat": {
             "type": "string"
            },
            "special_consumption_tax": {
             "type": "number"
            },
            "environmental_tax": {},
            "fta": {
             "type": "object",
             "properties": {
              "agreement": {
               "type": "string"
              },
              "cell": {
               "type": "number"
              }
             }
            },
            "tariff_year": {
             "type": "number"
            }
           }
          },
          "fta": {
           "type": "string"
          },
          "origin_country": {
           "type": "string"
          },
          "customs_value": {
           "type": "number"
          },
          "import_duty": {
           "type": "number"
          },
          "additional_import_tax": {
           "type": "number"
          },
          "excise_tax": {
           "type": "number"
          },
          "environmental_tax": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "vat_rate": {
           "type": "number"
          },
          "total_taxes": {
           "type": "number"
          },
          "payable_at_customs": {
           "type": "number"
          },
          "other_costs": {
           "type": "number"
          },
          "vat_deductible": {
           "type": "boolean"
          },
          "landed_cost": {
           "type": "number"
          },
          "quantity": {
           "type": "number"
          },
          "landed_cost_per_unit": {
           "type": "number"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "base": {},
             "rate": {},
             "amount": {
              "type": "number"
             },
             "basis": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-financial-report": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam financial statements (TT 99)",
    "description": "Send the trial balance (bảng cân đối số phát sinh) as JSON `rows`, CSV or an XLSX `file`: account number, opening debit / credit, period debit / credit turnover and closing debit / credit (column names in English or Vietnamese such as \"Nợ cuối kỳ\" are recognised). The API maps each balance to the line codes of Mẫu B01-DN under Thông tư 99/2025/TT-BTC (in force for financial years from 1 January 2026, replacing TT 200/2014): debit balances to asset lines, credit balances to liabilities, contra accounts (provisions, depreciation, treasury shares) in brackets, signed equity balances, receivables and payables on both sides shown separately (131 credit → advances from customers 312, 331 debit → prepayments 132). Rows tagged `term=long` go to the long-term lines; the most specific account wins and parent rows are skipped when their sub-accounts are present.\n\nB02-DN uses the closing turnovers to account 911 (revenue 511, deductions 521, cost of sales 632, financial income and expenses, selling and admin costs, other income and expenses, current and deferred CIT); lines that need detail ledgers (21, 24, 70, 71) come from `overrides`. Checks: the trial balance is balanced, total assets 280 = total liabilities and equity 440 (opening and closing), profit after tax = change in 4212. Unclosed income-statement balances are added to line 420b with a warning, and unmapped accounts are listed. `format=xlsx` returns a workbook with the B01, B02, mapping and checks sheets.\n\nDocs: https://apibox.io.vn/docs/vn-financial-report/",
    "operationId": "vnFinancialReportPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-financial-report/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "rows": {
          "type": "array",
          "items": {},
          "description": "Trial balance: `[{\"account\":\"111\",\"opening_debit\":0,\"debit\":0,\"credit\":0,\"closing_debit\":200000000,\"closing_credit\":0,\"term\":\"short\"}]`. Or `file` (XLSX/CSV) / `csv` text."
         },
         "overrides": {
          "type": "object",
          "description": "B02 lines from detail ledgers, e.g. `{\"24\": 12000000, \"21\": 0}`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         },
         "company": {
          "type": "string",
          "description": "Company name (echoed)."
         },
         "period_end": {
          "type": "string",
          "description": "Reporting date (echoed)."
         }
        }
       },
       "example": {
        "company": "Công ty TNHH Demo",
        "period_end": "2026-12-31",
        "rows": [
         {
          "account": "111",
          "debit": 200000000,
          "closing_debit": 200000000
         },
         {
          "account": "131",
          "debit": 150000000,
          "credit": 20000000,
          "closing_debit": 150000000,
          "closing_credit": 20000000
         },
         {
          "account": "156",
          "debit": 250000000,
          "closing_debit": 250000000
         },
         {
          "account": "331",
          "credit": 180000000,
          "closing_credit": 180000000
         },
         {
          "account": "4111",
          "credit": 325000000,
          "closing_credit": 325000000
         },
         {
          "account": "4212",
          "credit": 75000000,
          "closing_credit": 75000000
         },
         {
          "account": "511",
          "debit": 700000000,
          "credit": 700000000
         },
         {
          "account": "632",
          "debit": 500000000,
          "credit": 500000000
         },
         {
          "account": "642",
          "debit": 101000000,
          "credit": 101000000
         },
         {
          "account": "8211",
          "debit": 24000000,
          "credit": 24000000
         },
         {
          "account": "911",
          "debit": 700000000,
          "credit": 700000000
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "rows": {
          "type": "array",
          "items": {},
          "description": "Trial balance: `[{\"account\":\"111\",\"opening_debit\":0,\"debit\":0,\"credit\":0,\"closing_debit\":200000000,\"closing_credit\":0,\"term\":\"short\"}]`. Or `file` (XLSX/CSV) / `csv` text."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "XLSX or CSV trial balance (first sheet, header row)."
         },
         "overrides": {
          "type": "object",
          "description": "B02 lines from detail ledgers, e.g. `{\"24\": 12000000, \"21\": 0}`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         },
         "company": {
          "type": "string",
          "description": "Company name (echoed)."
         },
         "period_end": {
          "type": "string",
          "description": "Reporting date (echoed)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "company": {
           "type": "string"
          },
          "period_end": {
           "type": "string"
          },
          "currency": {
           "type": "string"
          },
          "standard": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "failed_checks": {
           "type": "number"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "check": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "debit": {
              "type": "number"
             },
             "credit": {
              "type": "number"
             },
             "assets": {
              "type": "number"
             },
             "liabilities_equity": {
              "type": "number"
             },
             "b02_60": {
              "type": "number"
             },
             "change_4212": {
              "type": "number"
             },
             "informational": {
              "type": "boolean"
             }
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "b01": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "closing": {
              "type": "number"
             },
             "opening": {
              "type": "number"
             },
             "formula": {
              "type": "string"
             }
            }
           }
          },
          "b02": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "source": {
              "type": "string"
             }
            }
           }
          },
          "unmapped": {
           "type": "array"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "company": "Công ty TNHH Demo",
         "period_end": "2026-12-31",
         "currency": "VND",
         "standard": "Thông tư 99/2025/TT-BTC, Phụ lục IV (Mẫu B01-DN, B02-DN; doanh nghiệp đáp ứng giả định hoạt động liên tục)",
         "valid": true,
         "failed_checks": 0,
         "checks": [
          {
           "check": "closing debit = closing credit",
           "ok": true,
           "debit": 600000000,
           "credit": 600000000
          },
          {
           "check": "total assets (280) = total liabilities and equity (440), closing",
           "ok": true,
           "assets": 600000000,
           "liabilities_equity": 600000000
          },
          {
           "check": "profit after tax (B02 line 60) = change in account 4212 (if no distributions this period)",
           "ok": true,
           "b02_60": 75000000,
           "change_4212": 75000000,
           "informational": true
          }
         ],
         "warnings": [
          "131 has a credit balance: shown separately (line 312, advances from customers), not netted. The balances must be the sum per customer / supplier, not the net of the account."
         ],
         "b01": [
          {
           "code": "100",
           "name_vi": "A - TÀI SẢN NGẮN HẠN",
           "name_en": "A - Current assets",
           "closing": 600000000,
           "opening": 0,
           "formula": "110 + 120 + 130 + 140 + 150 + 160"
          },
          {
           "code": "111",
           "name_vi": "1. Tiền",
           "name_en": "Cash",
           "closing": 200000000,
           "opening": 0
          },
          {
           "code": "131",
           "name_vi": "1. Phải thu ngắn hạn của khách hàng",
           "name_en": "Trade receivables, short term",
           "closing": 150000000,
           "opening": 0
          },
          {
           "code": "141",
           "name_vi": "1. Hàng tồn kho",
           "name_en": "Inventories",
           "closing": 250000000,
           "opening": 0
          },
          {
           "code": "280",
           "name_vi": "TỔNG CỘNG TÀI SẢN (280 = 100 + 200)",
           "name_en": "TOTAL ASSETS",
           "closing": 600000000,
           "opening": 0,
           "formula": "100 + 200"
          },
          {
           "code": "311",
           "name_vi": "1. Phải trả người bán ngắn hạn",
           "name_en": "Trade payables, short term",
           "closing": 180000000,
           "opening": 0
          },
          {
           "code": "312",
           "name_vi": "2. Người mua trả tiền trước ngắn hạn",
           "name_en": "Advances from customers, short term",
           "closing": 20000000,
           "opening": 0
          },
          {
           "code": "411",
           "name_vi": "1. Vốn góp của chủ sở hữu",
           "name_en": "Owners' contributed capital",
           "closing": 325000000,
           "opening": 0
          },
          {
           "code": "420b",
           "name_vi": "- LNST chưa phân phối kỳ này",
           "name_en": "of this period",
           "closing": 75000000,
           "opening": 0
          },
          {
           "code": "440",
           "name_vi": "TỔNG CỘNG NGUỒN VỐN (440 = 300 + 400)",
           "name_en": "TOTAL LIABILITIES AND EQUITY",
           "closing": 600000000,
           "opening": 0,
           "formula": "300 + 400"
          }
         ],
         "b02": [
          {
           "code": "01",
           "name_vi": "1. Doanh thu bán hàng và cung cấp dịch vụ",
           "amount": 700000000,
           "source": "Phát sinh Có TK 511"
          },
          {
           "code": "11",
           "name_vi": "4. Giá vốn hàng bán",
           "amount": 500000000,
           "source": "Phát sinh Có TK 632 đối ứng Nợ TK 911"
          },
          {
           "code": "26",
           "name_vi": "10. Chi phí quản lý doanh nghiệp",
           "amount": 101000000,
           "source": "Phát sinh Có TK 642 đối ứng Nợ TK 911"
          },
          {
           "code": "50",
           "name_vi": "15. Tổng lợi nhuận kế toán trước thuế (50 = 30 + 40)",
           "amount": 99000000,
           "source": "50 = 30 + 40"
          },
          {
           "code": "51",
           "name_vi": "16. Chi phí thuế TNDN hiện hành",
           "amount": 24000000,
           "source": "Phát sinh Có TK 8211 đối ứng Nợ TK 911"
          },
          {
           "code": "60",
           "name_vi": "18. Lợi nhuận sau thuế thu nhập doanh nghiệp (60 = 50 - 51 - 52)",
           "amount": 75000000,
           "source": "60 = 50 - (51 + 52)"
          }
         ],
         "unmapped": [],
         "reviewed": "2026-11-11",
         "disclaimer": "Draft statements from the trial balance you sent; review by an accountant is required before filing."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/inventory-costing": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Inventory costing (FIFO, average)",
    "description": "Send the receipts and issues of one period as `transactions` (JSON, CSV or XLSX): `date`, `type` (receipt / issue, also nhap / xuat), `item` (SKU), `quantity`, and `unit_cost` or `amount` for receipts, plus `opening` stock per item. Choose `method`: `fifo` (nhập trước xuất trước: issues consume the oldest layers), `weighted_average` (bình quân gia quyền cuối kỳ: one unit cost for the period from opening + all receipts), `moving_average` (bình quân sau mỗi lần nhập) or `specific` (thực tế đích danh, by `lot`).\n\nAll arithmetic uses integers (quantities to 6 decimals, amounts in minor units with `decimals` 0 for VND or 2 for USD), so there is no floating-point drift: each issue value is rounded once and the remainder stays in stock, and issuing the last unit takes the whole remaining value. The answer has a ledger per item in the style of the S10-DN stock card (quantity, unit cost, amount, running balance, the FIFO layers used), totals of receipts, issues and closing stock, the remaining FIFO layers and, for the periodic average, the rounding difference. Issues beyond the stock are refused unless `allow_negative=true`.\n\nDocs: https://apibox.io.vn/docs/inventory-costing/",
    "operationId": "inventoryCostingPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/inventory-costing/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "transactions": {
          "type": "array",
          "items": {},
          "description": "`[{\"date\":\"2026-01-05\",\"type\":\"receipt\",\"item\":\"A\",\"quantity\":200,\"unit_cost\":12000,\"ref\":\"PN01\"}, {\"type\":\"issue\",\"item\":\"A\",\"quantity\":150}]`. Or `file` / `csv`."
         },
         "method": {
          "type": "string",
          "default": "fifo",
          "description": "fifo, weighted_average, moving_average, specific."
         },
         "opening": {
          "type": "array",
          "items": {},
          "description": "Opening stock: `[{\"item\":\"A\",\"quantity\":100,\"amount\":1000000}]`."
         },
         "decimals": {
          "type": "number",
          "default": 0,
          "description": "Currency decimals (0 VND, 2 USD)."
         },
         "allow_negative": {
          "type": "boolean",
          "default": false,
          "description": "Value issues beyond stock at the last receipt cost."
         }
        },
        "required": [
         "transactions"
        ]
       },
       "example": {
        "method": "fifo",
        "opening": [
         {
          "item": "A",
          "quantity": 100,
          "amount": 1000000
         }
        ],
        "transactions": [
         {
          "date": "2026-01-05",
          "type": "receipt",
          "item": "A",
          "quantity": 200,
          "unit_cost": 12000,
          "ref": "PN01"
         },
         {
          "date": "2026-01-10",
          "type": "issue",
          "item": "A",
          "quantity": 150,
          "ref": "PX01"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "decimals": {
           "type": "number"
          },
          "items": {
           "type": "number"
          },
          "transactions": {
           "type": "number"
          },
          "totals": {
           "type": "object",
           "properties": {
            "opening": {
             "type": "number"
            },
            "receipts": {
             "type": "number"
            },
            "issues_cost": {
             "type": "number"
            },
            "closing": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "item": {
              "type": "string"
             },
             "opening": {
              "type": "object"
             },
             "receipts": {
              "type": "object"
             },
             "issues": {
              "type": "object"
             },
             "closing": {
              "type": "object"
             },
             "closing_layers": {
              "type": "array"
             },
             "ledger": {
              "type": "array"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "method": "fifo",
         "decimals": 0,
         "items": 1,
         "transactions": 2,
         "totals": {
          "opening": 1000000,
          "receipts": 2400000,
          "issues_cost": 1600000,
          "closing": 1800000
         },
         "results": [
          {
           "item": "A",
           "opening": {
            "quantity": 100,
            "amount": 1000000
           },
           "receipts": {
            "quantity": 200,
            "amount": 2400000
           },
           "issues": {
            "quantity": 150,
            "amount": 1600000
           },
           "closing": {
            "quantity": 150,
            "amount": 1800000,
            "unit_cost": 12000
           },
           "closing_layers": [
            {
             "from": "2026-01-05",
             "quantity": 150,
             "amount": 1800000,
             "unit_cost": 12000
            }
           ],
           "ledger": [
            {
             "date": "2026-01-05",
             "ref": "PN01",
             "type": "receipt",
             "quantity": 200,
             "unit_cost": 12000,
             "amount": 2400000,
             "balance_quantity": 300,
             "balance_amount": 3400000
            },
            {
             "date": "2026-01-10",
             "ref": "PX01",
             "type": "issue",
             "quantity": 150,
             "unit_cost": 10666.6667,
             "amount": 1600000,
             "balance_quantity": 150,
             "balance_amount": 1800000,
             "layers": [
              {
               "from": "opening",
               "quantity": 100,
               "amount": 1000000
              },
              {
               "from": "2026-01-05",
               "quantity": 50,
               "amount": 600000
              }
             ]
            }
           ]
          }
         ],
         "warnings": [],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-tax-form-xml": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "HTKK tax return XML & 05-1/BK",
    "description": "`action=parse` (default) reads the XML of a filed return exported by HTKK or downloaded from the eTax portal: form code and name, circular, original or supplementary, tax period, taxpayer, tax office, every indicator `[NN]` with its value, the appendices and whether the file carries a signature. Indicator names and arithmetic checks are provided for 01/GTGT (TT 80/2021 and TT 89/2026, from periods starting 1 July 2026, with the new [32b] and [34a]) and 05/QTT-TNCN (TT 80/2021); other forms return codes and values only. Use it to aggregate many periods or clients into a spreadsheet.\n\n`action=bk05_1` builds Phụ lục 05-1/BK-QTT-TNCN (resident employees with labour contracts) from JSON / CSV / XLSX rows: name, tax code or ID number, taxable income, insurance, dependants, tax withheld, whether the person authorises the employer to finalise. It validates tax codes (check digit, 12-digit ID numbers), computes the family deduction, [21] taxable income and, for authorising employees, [24] tax payable on the yearly scale of the `year` (rules from `/v1/vn-pit-annual`), [25] overpaid, [26] still payable and the totals [28]–[43]. `format=xlsx` gives the columns in HTKK order ([06]–[27]) to paste into the template of your HTKK version. No submission XML is generated.\n\nDocs: https://apibox.io.vn/docs/vn-tax-form-xml/",
    "operationId": "vnTaxFormXmlPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-form-xml/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse` (read a return XML) or `bk05_1` (build the 05-1/BK list)."
         },
         "xml": {
          "type": "string",
          "description": "parse: the return XML (or `file`, or the raw body)."
         },
         "employees": {
          "type": "array",
          "items": {},
          "description": "bk05_1: `[{\"name\":\"Nguyễn Văn A\",\"tax_code\":\"8000000004\",\"taxable_income\":300000000,\"insurance\":25200000,\"dependants\":1,\"tax_withheld\":6000000,\"authorized\":true}]`."
         },
         "year": {
          "type": "number",
          "description": "bk05_1: tax year (2024–2027, default last year)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "bk05_1: `json` or `xlsx`."
         },
         "strict": {
          "type": "boolean",
          "default": true,
          "description": "bk05_1 xlsx: refuse rows with errors (false = export anyway)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse` (read a return XML) or `bk05_1` (build the 05-1/BK list)."
         },
         "xml": {
          "type": "string",
          "description": "parse: the return XML (or `file`, or the raw body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "parse: XML file; bk05_1: XLSX / CSV of employees."
         },
         "employees": {
          "type": "array",
          "items": {},
          "description": "bk05_1: `[{\"name\":\"Nguyễn Văn A\",\"tax_code\":\"8000000004\",\"taxable_income\":300000000,\"insurance\":25200000,\"dependants\":1,\"tax_withheld\":6000000,\"authorized\":true}]`."
         },
         "year": {
          "type": "number",
          "description": "bk05_1: tax year (2024–2027, default last year)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "bk05_1: `json` or `xlsx`."
         },
         "strict": {
          "type": "boolean",
          "default": true,
          "description": "bk05_1 xlsx: refuse rows with errors (false = export anyway)."
         }
        }
       }
      },
      "application/xml": {
       "schema": {
        "type": "string"
       },
       "example": "<HSoThueDTu><HSoKhaiThue><TTinChung><TTinTKhaiThue><TKhaiThue><maTKhai>842</maTKhai><tenTKhai>TỜ KHAI THUẾ GIÁ TRỊ GIA TĂNG (Mẫu số 01/GTGT)</tenTKhai><moTaBMau>(Ban hành kèm theo Thông tư số 89/2026/TT-BTC…)</moTaBMau><loaiTKhai>C</loaiTKhai><KyKKhaiThue><kieuKy>M</kieuKy><kyKKhai>08/2026</kyKKhai></KyKKhaiThue></TKhaiThue><NNT><mst>0100109106</mst><tenNNT>CÔNG TY TNHH DEMO</tenNNT></NNT></TTinTKhaiThue></TTinChung><CTieuTKhaiChinh><ct22>5000000</ct22><ct25>20000000</ct25>…<ct40>5000000</ct40></CTieuTKhaiChinh></HSoKhaiThue></HSoThueDTu>"
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "form_code": {
           "type": "string"
          },
          "form_name": {
           "type": "string"
          },
          "circular": {
           "type": "string"
          },
          "xml_version": {
           "type": "string"
          },
          "kind": {
           "type": "string"
          },
          "amendment_no": {
           "type": "string"
          },
          "period": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "taxpayer": {
           "type": "object",
           "properties": {
            "tax_code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "address": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "phone": {},
            "email": {}
           }
          },
          "names_supported": {
           "type": "boolean"
          },
          "indicators": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "value": {
              "type": "number"
             }
            }
           }
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "check": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "expected": {
              "type": "number"
             },
             "actual": {
              "type": "number"
             }
            }
           }
          },
          "signed": {
           "type": "boolean"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "form": "01/GTGT",
         "form_code": "842",
         "form_name": "TỜ KHAI THUẾ GIÁ TRỊ GIA TĂNG (Mẫu số 01/GTGT)",
         "circular": "89/2026/TT-BTC",
         "xml_version": "2.7.0",
         "kind": "original",
         "amendment_no": "0",
         "period": {
          "type": "M",
          "period": "08/2026",
          "from": "01/08/2026",
          "to": "31/08/2026"
         },
         "taxpayer": {
          "tax_code": "0100109106",
          "name": "CÔNG TY TNHH DEMO",
          "address": "1 Tràng Tiền",
          "province": "Hà Nội",
          "phone": null,
          "email": null
         },
         "names_supported": true,
         "indicators": [
          {
           "code": "[22]",
           "name_vi": "Thuế GTGT còn được khấu trừ kỳ trước chuyển sang",
           "value": 5000000
          },
          {
           "code": "[25]",
           "name_vi": "Tổng số thuế GTGT được khấu trừ kỳ này",
           "value": 20000000
          },
          {
           "code": "[36]",
           "name_vi": "Thuế GTGT phát sinh trong kỳ",
           "value": 10000000
          },
          {
           "code": "[40]",
           "name_vi": "Thuế GTGT còn phải nộp trong kỳ",
           "value": 5000000
          }
         ],
         "checks": [
          {
           "check": "[28] = [31] + [33]",
           "ok": true,
           "expected": 30000000,
           "actual": 30000000
          },
          {
           "check": "[36] = [35] − [25]",
           "ok": true,
           "expected": 10000000,
           "actual": 10000000
          }
         ],
         "signed": true,
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-payroll-batch": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Batch Payroll & Payslips (VN)",
    "description": "Send the staff list as JSON (`employees`) or upload a CSV / XLSX file with a header row (Vietnamese headers such as \"Họ tên\", \"Lương\", \"Số NPT\", \"Vùng\", \"Lương đóng BH\" are recognised). Each row is computed with the same rules as `vn-salary`: employee social, health and unemployment insurance (8 / 1.5 / 1 %) on the insurance salary capped at 20 × the base salary (2,530,000 VND from 1/7/2026) and 20 × the regional minimum wage, family deductions of 15.5 million + 6.2 million per dependent and the 5-bracket PIT table from 2026, and the employer share (17 % + 0.5 % + 3 % + 1 %, optional 2 % union fund).\n\nRows can be gross (`salary` / `gross`) or net (`net`: the gross is solved), prorated by `work_days` / `standard_days`, with bonus, overtime (tax-free part), advances and other deductions. Allowances come as `allowances` (array of { name, amount, taxable, insurance }) or as columns prefixed `pc_` (taxable), `pckct_` (tax-free) or `pcbh_` (in the insurance salary); `allowance_rules` reclassifies them by name. Tax-free caps are not applied automatically: you decide what is exempt.\n\n`format=json` returns every row and column totals; `format=xlsx` a ready-to-print payroll sheet (\"Bảng thanh toán tiền lương\", Times New Roman, totals and signature lines); `format=payslips` a ZIP with one A5 PDF payslip per employee in Vietnamese or English (Be Vietnam Pro font). Limits: 2,000 rows, 200 payslips per request. Files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/vn-payroll-batch/",
    "operationId": "vnPayrollBatchPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-payroll-batch/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "employees": {
          "type": "array",
          "items": {},
          "description": "Employees: [{ name, employee_id?, department?, position?, salary | gross | net, dependents?, region?, insurance_salary?, allowances?, work_days?, bonus?, overtime?, advance?, … }]. Or upload `file` (CSV / XLSX)."
         },
         "period": {
          "type": "string",
          "description": "Payroll month YYYY-MM (default: this month). Rules of that month apply."
         },
         "mode": {
          "type": "string",
          "default": "gross",
          "description": "Default for rows with `salary`: gross or net."
         },
         "region": {
          "type": "number",
          "default": 1,
          "description": "Default minimum-wage region 1–4."
         },
         "standard_days": {
          "type": "number",
          "default": 26,
          "description": "Standard work days for proration."
         },
         "allowance_rules": {
          "type": "object",
          "description": "{ \"Ăn trưa\": { \"taxable\": false, \"insurance\": false } } to classify allowances by name."
         },
         "union_fund": {
          "type": "boolean",
          "default": false,
          "description": "Add the 2 % union fund to the employer cost."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "json, xlsx (payroll sheet) or payslips (ZIP of PDFs)."
         },
         "company": {
          "type": "string",
          "description": "Company name printed on the sheet and payslips."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "Payslip language: vi or en."
         }
        },
        "required": [
         "employees"
        ]
       },
       "example": {
        "period": "2026-11",
        "employees": [
         {
          "employee_id": "NV01",
          "name": "Nguyễn Văn An",
          "department": "Kế toán",
          "salary": 30000000
         },
         {
          "employee_id": "NV02",
          "name": "Trần Thị Bình",
          "salary": 20000000,
          "dependents": 1,
          "insurance_salary": 15000000,
          "allowances": [
           {
            "name": "Ăn trưa",
            "amount": 730000,
            "taxable": false
           },
           {
            "name": "Điện thoại",
            "amount": 500000
           }
          ]
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "employees": {
          "type": "array",
          "items": {},
          "description": "Employees: [{ name, employee_id?, department?, position?, salary | gross | net, dependents?, region?, insurance_salary?, allowances?, work_days?, bonus?, overtime?, advance?, … }]. Or upload `file` (CSV / XLSX)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "CSV or XLSX with a header row (multipart)."
         },
         "period": {
          "type": "string",
          "description": "Payroll month YYYY-MM (default: this month). Rules of that month apply."
         },
         "mode": {
          "type": "string",
          "default": "gross",
          "description": "Default for rows with `salary`: gross or net."
         },
         "region": {
          "type": "number",
          "default": 1,
          "description": "Default minimum-wage region 1–4."
         },
         "standard_days": {
          "type": "number",
          "default": 26,
          "description": "Standard work days for proration."
         },
         "allowance_rules": {
          "type": "object",
          "description": "{ \"Ăn trưa\": { \"taxable\": false, \"insurance\": false } } to classify allowances by name."
         },
         "union_fund": {
          "type": "boolean",
          "default": false,
          "description": "Add the 2 % union fund to the employer cost."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "json, xlsx (payroll sheet) or payslips (ZIP of PDFs)."
         },
         "company": {
          "type": "string",
          "description": "Company name printed on the sheet and payslips."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "Payslip language: vi or en."
         }
        },
        "required": [
         "employees"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "period": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "employees": {
           "type": "number"
          },
          "totals": {
           "type": "object",
           "properties": {
            "base_salary": {
             "type": "number"
            },
            "allowances_total": {
             "type": "number"
            },
            "bonus": {
             "type": "number"
            },
            "overtime": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "insurance_salary": {
             "type": "number"
            },
            "bhxh": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "non_taxable_income": {
             "type": "number"
            },
            "family_deduction": {
             "type": "number"
            },
            "taxable_income": {
             "type": "number"
            },
            "pit": {
             "type": "number"
            },
            "net": {
             "type": "number"
            },
            "advance": {
             "type": "number"
            },
            "other_deductions": {
             "type": "number"
            },
            "take_home": {
             "type": "number"
            },
            "er_bhxh": {
             "type": "number"
            },
            "er_tnld": {
             "type": "number"
            },
            "er_bhyt": {
             "type": "number"
            },
            "er_bhtn": {
             "type": "number"
            },
            "er_union": {
             "type": "number"
            },
            "employer_cost": {
             "type": "number"
            },
            "employee_insurance": {
             "type": "number"
            },
            "employer_insurance": {
             "type": "number"
            }
           }
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "employee_id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "department": {
              "type": "string"
             },
             "position": {},
             "email": {},
             "bank_account": {},
             "mode": {
              "type": "string"
             },
             "region": {
              "type": "number"
             },
             "dependents": {
              "type": "number"
             },
             "resident": {
              "type": "boolean"
             },
             "work_days": {},
             "standard_days": {},
             "base_salary": {
              "type": "number"
             },
             "allowances": {
              "type": "array"
             },
             "allowances_total": {
              "type": "number"
             },
             "bonus": {
              "type": "number"
             },
             "overtime": {
              "type": "number"
             },
             "gross": {
              "type": "number"
             },
             "insurance_salary": {
              "type": "number"
             },
             "employee_insurance": {
              "type": "object"
             },
             "non_taxable_income": {
              "type": "number"
             },
             "personal_deduction": {
              "type": "number"
             },
             "dependent_deduction": {
              "type": "number"
             },
             "taxable_income": {
              "type": "number"
             },
             "pit": {
              "type": "number"
             },
             "net": {
              "type": "number"
             },
             "advance": {
              "type": "number"
             },
             "other_deductions": {
              "type": "number"
             },
             "take_home": {
              "type": "number"
             },
             "employer": {
              "type": "object"
             },
             "employer_cost": {
              "type": "number"
             },
             "warnings": {
              "type": "array"
             }
            }
           }
          },
          "rules": {
           "type": "object",
           "properties": {
            "personal_deduction": {
             "type": "number"
            },
            "dependent_deduction": {
             "type": "number"
            },
            "deduction_ref": {
             "type": "string"
            },
            "tax_table": {
             "type": "string"
            },
            "base_salary": {
             "type": "number"
            },
            "base_salary_ref": {
             "type": "string"
            },
            "insurance_cap_bhxh_bhyt": {
             "type": "number"
            },
            "region_min_wage": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "region_min_wage_ref": {
             "type": "string"
            },
            "employee_rates": {
             "type": "object",
             "properties": {
              "bhxh": {
               "type": "number"
              },
              "bhyt": {
               "type": "number"
              },
              "bhtn": {
               "type": "number"
              }
             }
            },
            "employer_rates": {
             "type": "object",
             "properties": {
              "bhxh": {
               "type": "number"
              },
              "tnld_bnn": {
               "type": "number"
              },
              "bhyt": {
               "type": "number"
              },
              "bhtn": {
               "type": "number"
              },
              "union_fund": {
               "type": "number"
              }
             }
            },
            "allowances": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "period": "2026-11",
         "source": "json",
         "mode": "gross",
         "employees": 2,
         "totals": {
          "base_salary": 50000000,
          "allowances_total": 1230000,
          "bonus": 0,
          "overtime": 0,
          "gross": 51230000,
          "insurance_salary": 45000000,
          "bhxh": 3600000,
          "bhyt": 675000,
          "bhtn": 450000,
          "non_taxable_income": 730000,
          "family_deduction": 37200000,
          "taxable_income": 11350000,
          "pit": 635000,
          "net": 45870000,
          "advance": 0,
          "other_deductions": 0,
          "take_home": 45870000,
          "er_bhxh": 7650000,
          "er_tnld": 225000,
          "er_bhyt": 1350000,
          "er_bhtn": 450000,
          "er_union": 0,
          "employer_cost": 60905000,
          "employee_insurance": 4725000,
          "employer_insurance": 9675000
         },
         "rows": [
          {
           "no": 1,
           "employee_id": "NV01",
           "name": "Nguyễn Văn An",
           "department": "Kế toán",
           "position": null,
           "email": null,
           "bank_account": null,
           "mode": "gross",
           "region": 1,
           "dependents": 0,
           "resident": true,
           "work_days": null,
           "standard_days": null,
           "base_salary": 30000000,
           "allowances": [],
           "allowances_total": 0,
           "bonus": 0,
           "overtime": 0,
           "gross": 30000000,
           "insurance_salary": 30000000,
           "employee_insurance": {
            "bhxh": 2400000,
            "bhyt": 450000,
            "bhtn": 300000,
            "total": 3150000
           },
           "non_taxable_income": 0,
           "personal_deduction": 15500000,
           "dependent_deduction": 0,
           "taxable_income": 11350000,
           "pit": 635000,
           "net": 26215000,
           "advance": 0,
           "other_deductions": 0,
           "take_home": 26215000,
           "employer": {
            "bhxh": 5100000,
            "tnld_bnn": 150000,
            "bhyt": 900000,
            "bhtn": 300000,
            "union_fund": 0,
            "total": 6450000
           },
           "employer_cost": 36450000,
           "warnings": []
          }
         ],
         "rules": {
          "personal_deduction": 15500000,
          "dependent_deduction": 6200000,
          "deduction_ref": "Nghị quyết 110/2025/UBTVQH15",
          "tax_table": "Luật Thuế TNCN 109/2025/QH15 (5 bậc)",
          "base_salary": 2530000,
          "base_salary_ref": "Nghị định 161/2026/NĐ-CP",
          "insurance_cap_bhxh_bhyt": 50600000,
          "region_min_wage": [
           5310000,
           4730000,
           4140000,
           3700000
          ],
          "region_min_wage_ref": "Nghị định 293/2025/NĐ-CP",
          "employee_rates": {
           "bhxh": 0.08,
           "bhyt": 0.015,
           "bhtn": 0.01
          },
          "employer_rates": {
           "bhxh": 0.17,
           "tnld_bnn": 0.005,
           "bhyt": 0.03,
           "bhtn": 0.01,
           "union_fund": 0
          },
          "allowances": "Allowances are taxable and outside the insurance salary unless classified (non_t…"
         },
         "legal": "Luật Thuế TNCN 109/2025/QH15 and NQ 110/2025/UBTVQH15 (from tax year 2026); Luật BHXH 41/2024/QH15, Luật BHYT, Luật Việc làm (rates and 20× caps); NĐ 161/2026/NĐ-CP (base salary 2,530,000 from 1/7/2026); NĐ 293/2025/NĐ-CP (regional minimum wages 2026).",
         "reviewed": "2026-11-11",
         "disclaimer": "Reference calculation, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-bhxh-forms": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "BHXH Forms D02-LT, TK1-TS (VN)",
    "description": "Send the rows from your HR system (JSON or an uploaded CSV / XLSX) and get the declaration as an Excel file laid out like the official template of QĐ 366/QĐ-BHXH (29/4/2026, in force 1/5/2026, replacing QĐ 595): `form=d02-lt` builds \"Danh sách tham gia, điều chỉnh đóng BHXH, BHYT, BHTN\" with the 21 columns (salary, allowances, contract type, from / to month, KCB facility, change type…) and merged header rows; `form=tk1-ts` builds one \"Tờ khai đăng ký, điều chỉnh thông tin tham gia BHXH, BHYT\" sheet per person with fields [01] to [17].\n\nEach row is validated: 10-digit social insurance number, 12-digit personal ID, real dates (DD/MM/YYYY), month ranges, change type codes (TM, ON, TC, TD, GH, KL, TS, OF, DC…), salary plus allowances at least the regional minimum wage of the unit (`unit.region` or a ward code, NĐ 293/2025/NĐ-CP) and a warning above the 20 × base salary cap. `format=json` returns the errors per row and field (and the file as base64); `strict=true` refuses to build a file with errors (422).\n\nD02-TS no longer exists in QĐ 366 (the household list moved to NĐ 188/2025/NĐ-CP). The column layout follows the templates published with QĐ 366 by e-filing providers, since the official scan lists the forms without reproducing them; check with your BHXH office for local requirements.\n\nDocs: https://apibox.io.vn/docs/vn-bhxh-forms/",
    "operationId": "vnBhxhFormsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bhxh-forms/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "form": {
          "type": "string",
          "default": "d02-lt",
          "description": "d02-lt or tk1-ts."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "D02-LT: [{ name, bhxh_code | id_number, birth_date, position?, salary, allowance_position?, seniority_vk?, seniority_job?, other_allowances?, contract_type (indefinite|fixed|other), contract_date?, from_month, to_month?, health_facility?, result_delivery?, change_type, note? }]; TK1-TS: [{ name, sex, birth_date, id_number, ethnicity?, nationality?, phone?, email?, health_facility?, result_delivery?, address?, contribution?, payment_method?, change_request? }]. Or upload `file`."
         },
         "unit": {
          "type": "object",
          "description": "{ name, code, number?, region (1–4) or ward_code + province_code }."
         },
         "date": {
          "type": "string",
          "description": "Report date (default today)."
         },
         "format": {
          "type": "string",
          "default": "xlsx",
          "description": "xlsx (file) or json (validation report + xlsx_base64)."
         },
         "include_file": {
          "type": "boolean",
          "default": true,
          "description": "JSON format: include xlsx_base64."
         },
         "strict": {
          "type": "boolean",
          "default": false,
          "description": "Return 422 instead of a file when there are errors."
         }
        },
        "required": [
         "rows"
        ]
       },
       "example": {
        "form": "d02-lt",
        "format": "json",
        "include_file": false,
        "unit": {
         "name": "Công ty TNHH Ví Dụ",
         "code": "TA1234A",
         "region": 1
        },
        "rows": [
         {
          "name": "Nguyễn Văn An",
          "id_number": "001090012345",
          "birth_date": "15/03/1990",
          "position": "Kế toán viên",
          "salary": 8000000,
          "contract_type": "fixed",
          "contract_date": "01/11/2026",
          "from_month": "11/2026",
          "change_type": "TM"
         },
         {
          "name": "Trần Thị Bình",
          "bhxh_code": "7912345678",
          "birth_date": "20/05/1995",
          "salary": 4000000,
          "from_month": "11/2026",
          "change_type": "DC"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "rows": {
           "type": "number"
          },
          "valid": {
           "type": "boolean"
          },
          "error_count": {
           "type": "number"
          },
          "warning_count": {
           "type": "number"
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "row": {
              "type": "number"
             },
             "field": {
              "type": "string"
             },
             "code": {
              "type": "string"
             },
             "message": {
              "type": "string"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "minimum_wage": {
           "type": "object",
           "properties": {
            "region": {
             "type": "string"
            },
            "amount": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "object",
           "properties": {
            "decision": {
             "type": "string"
            },
            "signed": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "replaces": {
             "type": "string"
            },
            "template_source": {
             "type": "string"
            },
            "reviewed": {
             "type": "string"
            }
           }
          },
          "filename": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "form": "D02-LT",
         "rows": 2,
         "valid": false,
         "error_count": 1,
         "warning_count": 0,
         "errors": [
          {
           "row": 2,
           "field": "salary",
           "code": "below_minimum_wage",
           "message": "Salary + allowances 4,000,000 is below the region I minimum wage 5,310,000 (NĐ 293/2025/NĐ-CP)"
          }
         ],
         "warnings": [],
         "minimum_wage": {
          "region": "I",
          "amount": 5310000,
          "decree": "293/2025/NĐ-CP"
         },
         "legal": {
          "decision": "366/QĐ-BHXH",
          "signed": "2026-04-29",
          "effective_from": "2026-05-01",
          "replaces": "595/QĐ-BHXH (2017) and amendments",
          "template_source": "Templates attached to QĐ 366 as published by I-VAN providers (the official scan lists the forms only)",
          "reviewed": "2026-11-11"
         },
         "filename": "D02-LT-2026-11-11.xlsx",
         "disclaimer": "Reference template, not legal advice; check the official text and your BHXH office requirements."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-voluntary-insurance": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Voluntary BHXH & Household BHYT (VN)",
    "description": "Voluntary social insurance (BHXH tự nguyện, Luật BHXH 2024 and NĐ 159/2025/NĐ-CP): 22 % of the chosen income, from the rural poverty line (1,500,000 VND in 2026) to 20 × the reference level (50,600,000 VND from 1/7/2026). State support is 50 % (poor households, island communes), 40 % (near-poor), 30 % (ethnic minorities) or 20 % (others) of 22 % × the poverty line, for at most 10 years; the API adds the provincial top-up where we have verified it (`coverage`: Hà Nội, TP.HCM, Hải Phòng, Đà Nẵng) and flags `unverified` sources. Methods: monthly, 3, 6, 12 months, `advance` for 2–5 years ahead (discounted with the fund’s monthly investment rate) and `missing` for the missing months at retirement age.\n\nHousehold health insurance (BHYT hộ gia đình, NĐ 188/2025/NĐ-CP): 4.5 % of the base salary for the first member, 70 %, 60 %, 50 % and 40 % of that for the 2nd, 3rd, 4th and 5th+ members, paid for 3, 6 or 12 months, with provincial support for some cases (e.g. people aged 65–74 in TP.HCM). `type=both` returns both. Rates follow the date (`date`, default today).\n\nDocs: https://apibox.io.vn/docs/vn-voluntary-insurance/",
    "operationId": "vnVoluntaryInsuranceGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-voluntary-insurance/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "bhxh, bhyt or both.",
      "schema": {
       "type": "string",
       "default": "bhxh"
      },
      "example": "both"
     },
     {
      "name": "income",
      "in": "query",
      "required": false,
      "description": "BHXH: chosen monthly income (default the minimum).",
      "schema": {
       "type": "number"
      },
      "example": 2000000
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "poor, near_poor, ethnic_minority, island, veteran or other.",
      "schema": {
       "type": "string",
       "default": "other"
      },
      "example": "near_poor"
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "monthly, 3, 6, 12, advance (with years 2–5) or missing (with months 1–60).",
      "schema": {
       "type": "string",
       "default": "monthly"
      },
      "example": "12"
     },
     {
      "name": "years",
      "in": "query",
      "required": false,
      "description": "Years paid ahead (method=advance).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "months",
      "in": "query",
      "required": false,
      "description": "BHYT: 3, 6 or 12; BHXH missing: months 1–60.",
      "schema": {
       "type": "number"
      },
      "example": 12
     },
     {
      "name": "members",
      "in": "query",
      "required": false,
      "description": "BHYT: number of members, or an array [{ name, age, case }] (POST).",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 3
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or code for local support.",
      "schema": {
       "type": "string"
      },
      "example": "Hải Phòng"
     },
     {
      "name": "supported_months_used",
      "in": "query",
      "required": false,
      "description": "Months of state support already received (10-year cap).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rate",
      "in": "query",
      "required": false,
      "description": "Monthly fund rate in % for advance / missing payments.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Payment date (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "bhxh": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "group": {
             "type": "string"
            },
            "income": {
             "type": "number"
            },
            "rate": {
             "type": "number"
            },
            "method": {
             "type": "string"
            },
            "months": {
             "type": "number"
            },
            "monthly_contribution": {
             "type": "number"
            },
            "gross_amount": {
             "type": "number"
            },
            "support": {
             "type": "object",
             "properties": {
              "national_percent": {
               "type": "number"
              },
              "local_percent": {
               "type": "number"
              },
              "total_percent": {
               "type": "number"
              },
              "base": {
               "type": "number"
              },
              "months_supported": {
               "type": "number"
              },
              "monthly_national": {
               "type": "number"
              },
              "monthly_local": {
               "type": "number"
              },
              "national": {
               "type": "number"
              },
              "local": {
               "type": "number"
              },
              "total": {
               "type": "number"
              },
              "local_ref": {
               "type": "string"
              }
             }
            },
            "you_pay": {
             "type": "number"
            },
            "limits": {
             "type": "object",
             "properties": {
              "income_min": {
               "type": "number"
              },
              "income_min_ref": {
               "type": "string"
              },
              "income_max": {
               "type": "number"
              },
              "reference_level": {
               "type": "number"
              },
              "reference_level_ref": {
               "type": "string"
              }
             }
            },
            "notes": {
             "type": "array"
            },
            "unverified": {
             "type": "array"
            }
           }
          },
          "bhyt": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "months": {
             "type": "number"
            },
            "members": {
             "type": "number"
            },
            "base_salary": {
             "type": "number"
            },
            "base_salary_ref": {
             "type": "string"
            },
            "rate": {
             "type": "number"
            },
            "first_member_monthly": {
             "type": "number"
            },
            "ladder": {
             "type": "object",
             "properties": {
              "1": {
               "type": "number"
              },
              "2": {
               "type": "number"
              },
              "3": {
               "type": "number"
              },
              "4": {
               "type": "number"
              },
              "5+": {
               "type": "number"
              }
             }
            },
            "rows": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            },
            "you_pay": {
             "type": "number"
            },
            "notes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "province": {
          "code": "31",
          "name": "Hải Phòng"
         },
         "bhxh": {
          "type": "bhxh_voluntary",
          "date": "2026-11-11",
          "group": "near_poor",
          "income": 2000000,
          "rate": 0.22,
          "method": "12_months",
          "months": 12,
          "monthly_contribution": 440000,
          "gross_amount": 5280000,
          "support": {
           "national_percent": 0.4,
           "local_percent": 0.25,
           "total_percent": 0.65,
           "base": 330000,
           "months_supported": 12,
           "monthly_national": 132000,
           "monthly_local": 82500,
           "national": 1584000,
           "local": 990000,
           "total": 2574000,
           "local_ref": "NQ 56/2025/NQ-HĐND TP Hải Phòng (11/12/2025), luatvietnam.vn"
          },
          "you_pay": 2706000,
          "limits": {
           "income_min": 1500000,
           "income_min_ref": "NĐ 07/2021/NĐ-CP (chuẩn nghèo nông thôn, kéo dài đến 31/12/2026)",
           "income_max": 50600000,
           "reference_level": 2530000,
           "reference_level_ref": "Nghị định 161/2026/NĐ-CP"
          },
          "notes": [],
          "unverified": []
         },
         "bhyt": {
          "type": "bhyt_household",
          "date": "2026-11-11",
          "months": 12,
          "members": 3,
          "base_salary": 2530000,
          "base_salary_ref": "Nghị định 161/2026/NĐ-CP",
          "rate": 0.045,
          "first_member_monthly": 113850,
          "ladder": {
           "1": 1,
           "2": 0.7,
           "3": 0.6,
           "4": 0.5,
           "5+": 0.4
          },
          "rows": [
           {
            "member": 1,
            "name": null,
            "factor": 1,
            "monthly": 113850,
            "amount": 1366200,
            "local_support_percent": 0,
            "local_support": 0,
            "you_pay": 1366200,
            "support_rules": []
           },
           {
            "member": 2,
            "name": null,
            "factor": 0.7,
            "monthly": 79695,
            "amount": 956340,
            "local_support_percent": 0,
            "local_support": 0,
            "you_pay": 956340,
            "support_rules": []
           }
          ],
          "total": 3142260,
          "you_pay": 3142260,
          "notes": [
           "The 70/60/50/40% ladder applies to household members joining in the same fiscal year, in joining order.",
           "If the base salary changes after payment there is no top-up or refund for the period already paid (NĐ 188/2025 Điều 8 k.3)."
          ]
         },
         "coverage": [
          "Hà Nội",
          "TP. Hồ Chí Minh",
          "Hải Phòng",
          "Đà Nẵng"
         ],
         "legal": [
          {
           "ref": "Luật BHXH 41/2024/QH15 (Điều 31, 36)",
           "effective_from": "2025-07-01"
          },
          {
           "ref": "NĐ 159/2025/NĐ-CP (BHXH tự nguyện)",
           "effective_from": "2025-07-01"
          }
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Reference calculation, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Voluntary BHXH & Household BHYT (VN)",
    "description": "Voluntary social insurance (BHXH tự nguyện, Luật BHXH 2024 and NĐ 159/2025/NĐ-CP): 22 % of the chosen income, from the rural poverty line (1,500,000 VND in 2026) to 20 × the reference level (50,600,000 VND from 1/7/2026). State support is 50 % (poor households, island communes), 40 % (near-poor), 30 % (ethnic minorities) or 20 % (others) of 22 % × the poverty line, for at most 10 years; the API adds the provincial top-up where we have verified it (`coverage`: Hà Nội, TP.HCM, Hải Phòng, Đà Nẵng) and flags `unverified` sources. Methods: monthly, 3, 6, 12 months, `advance` for 2–5 years ahead (discounted with the fund’s monthly investment rate) and `missing` for the missing months at retirement age.\n\nHousehold health insurance (BHYT hộ gia đình, NĐ 188/2025/NĐ-CP): 4.5 % of the base salary for the first member, 70 %, 60 %, 50 % and 40 % of that for the 2nd, 3rd, 4th and 5th+ members, paid for 3, 6 or 12 months, with provincial support for some cases (e.g. people aged 65–74 in TP.HCM). `type=both` returns both. Rates follow the date (`date`, default today).\n\nDocs: https://apibox.io.vn/docs/vn-voluntary-insurance/",
    "operationId": "vnVoluntaryInsurancePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-voluntary-insurance/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "bhxh, bhyt or both.",
      "schema": {
       "type": "string",
       "default": "bhxh"
      }
     },
     {
      "name": "income",
      "in": "query",
      "required": false,
      "description": "BHXH: chosen monthly income (default the minimum).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "poor, near_poor, ethnic_minority, island, veteran or other.",
      "schema": {
       "type": "string",
       "default": "other"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "monthly, 3, 6, 12, advance (with years 2–5) or missing (with months 1–60).",
      "schema": {
       "type": "string",
       "default": "monthly"
      }
     },
     {
      "name": "years",
      "in": "query",
      "required": false,
      "description": "Years paid ahead (method=advance).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "months",
      "in": "query",
      "required": false,
      "description": "BHYT: 3, 6 or 12; BHXH missing: months 1–60.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "members",
      "in": "query",
      "required": false,
      "description": "BHYT: number of members, or an array [{ name, age, case }] (POST).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or code for local support.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "supported_months_used",
      "in": "query",
      "required": false,
      "description": "Months of state support already received (10-year cap).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rate",
      "in": "query",
      "required": false,
      "description": "Monthly fund rate in % for advance / missing payments.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Payment date (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "province": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "bhxh": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "group": {
             "type": "string"
            },
            "income": {
             "type": "number"
            },
            "rate": {
             "type": "number"
            },
            "method": {
             "type": "string"
            },
            "months": {
             "type": "number"
            },
            "monthly_contribution": {
             "type": "number"
            },
            "gross_amount": {
             "type": "number"
            },
            "support": {
             "type": "object",
             "properties": {
              "national_percent": {
               "type": "number"
              },
              "local_percent": {
               "type": "number"
              },
              "total_percent": {
               "type": "number"
              },
              "base": {
               "type": "number"
              },
              "months_supported": {
               "type": "number"
              },
              "monthly_national": {
               "type": "number"
              },
              "monthly_local": {
               "type": "number"
              },
              "national": {
               "type": "number"
              },
              "local": {
               "type": "number"
              },
              "total": {
               "type": "number"
              },
              "local_ref": {
               "type": "string"
              }
             }
            },
            "you_pay": {
             "type": "number"
            },
            "limits": {
             "type": "object",
             "properties": {
              "income_min": {
               "type": "number"
              },
              "income_min_ref": {
               "type": "string"
              },
              "income_max": {
               "type": "number"
              },
              "reference_level": {
               "type": "number"
              },
              "reference_level_ref": {
               "type": "string"
              }
             }
            },
            "notes": {
             "type": "array"
            },
            "unverified": {
             "type": "array"
            }
           }
          },
          "bhyt": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "months": {
             "type": "number"
            },
            "members": {
             "type": "number"
            },
            "base_salary": {
             "type": "number"
            },
            "base_salary_ref": {
             "type": "string"
            },
            "rate": {
             "type": "number"
            },
            "first_member_monthly": {
             "type": "number"
            },
            "ladder": {
             "type": "object",
             "properties": {
              "1": {
               "type": "number"
              },
              "2": {
               "type": "number"
              },
              "3": {
               "type": "number"
              },
              "4": {
               "type": "number"
              },
              "5+": {
               "type": "number"
              }
             }
            },
            "rows": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            },
            "you_pay": {
             "type": "number"
            },
            "notes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-bhyt-cost": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "BHYT Cost Sharing (VN)",
    "description": "Give the covered cost and the card code (the benefit level is read from it, as in `bhyt-check`) or `level` 1–5, plus the visit (outpatient / inpatient), the facility level under the 2023 medical examination law (`primary` cấp ban đầu, `basic` cấp cơ bản, `specialized` cấp chuyên sâu, with `former_level` district / provincial / central) and the route (`right`, `self` for self-referral, `emergency`). The API applies Luật BHYT Điều 22 as amended by Luật 51/2024/QH15 and NĐ 188/2025/NĐ-CP: card rate 100 / 95 / 80 %; self-referral 100 % at primary and former district facilities, inpatient 100 % at former provincial facilities, outpatient 50 % there from 1/7/2026 (0 % before), 40 % inpatient at other specialised hospitals, 100 % for diseases on the Ministry of Health lists (`listed_disease`) and for remote-area cases (`remote_area`); emergencies count as right route.\n\nIt also applies 100 % when one visit costs less than 15 % of the base salary (379,500 VND from 1/7/2026), at primary facilities, and after 5 consecutive years once co-payments in the year exceed 6 months of base salary (15,180,000 VND; pass `five_years` and `copay_paid`, and `copay_h1` for the 2026 mid-year change). The response lists `fund_pays`, `patient_pays` and every rule applied. Drug and service caps and out-of-list items are not modelled.\n\nDocs: https://apibox.io.vn/docs/vn-bhyt-cost/",
    "operationId": "vnBhytCostGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bhyt-cost/"
    },
    "parameters": [
     {
      "name": "cost",
      "in": "query",
      "required": true,
      "description": "Covered cost (VND).",
      "schema": {
       "type": "number"
      },
      "example": 1000000
     },
     {
      "name": "card",
      "in": "query",
      "required": false,
      "description": "15-character card code (benefit level read from it).",
      "schema": {
       "type": "string"
      },
      "example": "DN4797931234567"
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "Benefit level 1–5 when no card is given.",
      "schema": {
       "type": "number",
       "default": 4
      }
     },
     {
      "name": "visit",
      "in": "query",
      "required": false,
      "description": "outpatient or inpatient.",
      "schema": {
       "type": "string",
       "default": "outpatient"
      }
     },
     {
      "name": "facility",
      "in": "query",
      "required": false,
      "description": "primary, basic or specialized.",
      "schema": {
       "type": "string",
       "default": "basic"
      },
      "example": "basic"
     },
     {
      "name": "former_level",
      "in": "query",
      "required": false,
      "description": "district, provincial, central, low_score or mid_score.",
      "schema": {
       "type": "string"
      },
      "example": "provincial"
     },
     {
      "name": "route",
      "in": "query",
      "required": false,
      "description": "right, self or emergency.",
      "schema": {
       "type": "string",
       "default": "right"
      },
      "example": "self"
     },
     {
      "name": "listed_disease",
      "in": "query",
      "required": false,
      "description": "Disease on the TT 01/2025/TT-BYT lists.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "remote_area",
      "in": "query",
      "required": false,
      "description": "Ethnic minority / poor household in an extremely difficult area, or island resident.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "five_years",
      "in": "query",
      "required": false,
      "description": "5 consecutive years of cover.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "copay_paid",
      "in": "query",
      "required": false,
      "description": "Co-payments already paid this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "out_of_scope_cost",
      "in": "query",
      "required": false,
      "description": "Costs outside the BHYT scope.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date of care (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "cost": {
           "type": "number"
          },
          "out_of_scope_cost": {
           "type": "number"
          },
          "card": {
           "type": "object",
           "properties": {
            "normalized": {
             "type": "string"
            },
            "group": {
             "type": "string"
            },
            "group_vi": {
             "type": "string"
            },
            "benefit_level": {
             "type": "number"
            },
            "valid": {
             "type": "boolean"
            },
            "errors": {
             "type": "array"
            },
            "warnings": {
             "type": "array"
            }
           }
          },
          "benefit_level": {
           "type": "number"
          },
          "visit": {
           "type": "string"
          },
          "facility": {
           "type": "string"
          },
          "former_level": {
           "type": "string"
          },
          "route": {
           "type": "string"
          },
          "fund_pays": {
           "type": "number"
          },
          "patient_pays": {
           "type": "number"
          },
          "fund_share": {
           "type": "number"
          },
          "rate_applied": {
           "type": "number"
          },
          "route_factor": {
           "type": "number"
          },
          "card_rate": {
           "type": "number"
          },
          "thresholds": {
           "type": "object",
           "properties": {
            "base_salary": {
             "type": "number"
            },
            "base_salary_ref": {
             "type": "string"
            },
            "small_visit": {
             "type": "number"
            },
            "five_year_cap": {
             "type": "number"
            }
           }
          },
          "rules_applied": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "cost": 1000000,
         "out_of_scope_cost": 0,
         "card": {
          "normalized": "DN4797931234567",
          "group": "DN",
          "group_vi": "Người lao động làm việc theo hợp đồng lao động, người quản lý trong doanh nghiệp nhà nước",
          "benefit_level": 4,
          "valid": true,
          "errors": [],
          "warnings": []
         },
         "benefit_level": 4,
         "visit": "outpatient",
         "facility": "basic",
         "former_level": "provincial",
         "route": "self_referral",
         "fund_pays": 400000,
         "patient_pays": 600000,
         "fund_share": 0.4,
         "rate_applied": 0.4,
         "route_factor": 0.5,
         "card_rate": 0.8,
         "thresholds": {
          "base_salary": 2530000,
          "base_salary_ref": "Nghị định 161/2026/NĐ-CP",
          "small_visit": 379500,
          "five_year_cap": 15180000
         },
         "rules_applied": [
          "Card benefit level 4: 80% of covered costs (Luật BHYT Điều 22 k.1)",
          "Self-referral, outpatient at these facilities from 01/07/2026: 50% of the card rate (NĐ 188/2025 Điều 19)"
         ],
         "legal": [
          {
           "ref": "Luật BHYT 2008 sửa đổi bởi Luật 51/2024/QH15, Điều 22 (VBHN 40/VBHN-VPQH 16/03/2026)",
           "effective_from": "2025-07-01"
          },
          {
           "ref": "NĐ 188/2025/NĐ-CP Điều 17–19",
           "effective_from": "2025-08-15"
          }
         ],
         "note": "Covered costs only (drugs and services on the BHYT lists, at the BHYT price). Payment caps on some drugs, supplies and services are not applied.",
         "reviewed": "2026-11-11",
         "disclaimer": "Reference calculation, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "BHYT Cost Sharing (VN)",
    "description": "Give the covered cost and the card code (the benefit level is read from it, as in `bhyt-check`) or `level` 1–5, plus the visit (outpatient / inpatient), the facility level under the 2023 medical examination law (`primary` cấp ban đầu, `basic` cấp cơ bản, `specialized` cấp chuyên sâu, with `former_level` district / provincial / central) and the route (`right`, `self` for self-referral, `emergency`). The API applies Luật BHYT Điều 22 as amended by Luật 51/2024/QH15 and NĐ 188/2025/NĐ-CP: card rate 100 / 95 / 80 %; self-referral 100 % at primary and former district facilities, inpatient 100 % at former provincial facilities, outpatient 50 % there from 1/7/2026 (0 % before), 40 % inpatient at other specialised hospitals, 100 % for diseases on the Ministry of Health lists (`listed_disease`) and for remote-area cases (`remote_area`); emergencies count as right route.\n\nIt also applies 100 % when one visit costs less than 15 % of the base salary (379,500 VND from 1/7/2026), at primary facilities, and after 5 consecutive years once co-payments in the year exceed 6 months of base salary (15,180,000 VND; pass `five_years` and `copay_paid`, and `copay_h1` for the 2026 mid-year change). The response lists `fund_pays`, `patient_pays` and every rule applied. Drug and service caps and out-of-list items are not modelled.\n\nDocs: https://apibox.io.vn/docs/vn-bhyt-cost/",
    "operationId": "vnBhytCostPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bhyt-cost/"
    },
    "parameters": [
     {
      "name": "cost",
      "in": "query",
      "required": false,
      "description": "Covered cost (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "card",
      "in": "query",
      "required": false,
      "description": "15-character card code (benefit level read from it).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "Benefit level 1–5 when no card is given.",
      "schema": {
       "type": "number",
       "default": 4
      }
     },
     {
      "name": "visit",
      "in": "query",
      "required": false,
      "description": "outpatient or inpatient.",
      "schema": {
       "type": "string",
       "default": "outpatient"
      }
     },
     {
      "name": "facility",
      "in": "query",
      "required": false,
      "description": "primary, basic or specialized.",
      "schema": {
       "type": "string",
       "default": "basic"
      }
     },
     {
      "name": "former_level",
      "in": "query",
      "required": false,
      "description": "district, provincial, central, low_score or mid_score.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "route",
      "in": "query",
      "required": false,
      "description": "right, self or emergency.",
      "schema": {
       "type": "string",
       "default": "right"
      }
     },
     {
      "name": "listed_disease",
      "in": "query",
      "required": false,
      "description": "Disease on the TT 01/2025/TT-BYT lists.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "remote_area",
      "in": "query",
      "required": false,
      "description": "Ethnic minority / poor household in an extremely difficult area, or island resident.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "five_years",
      "in": "query",
      "required": false,
      "description": "5 consecutive years of cover.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "copay_paid",
      "in": "query",
      "required": false,
      "description": "Co-payments already paid this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "out_of_scope_cost",
      "in": "query",
      "required": false,
      "description": "Costs outside the BHYT scope.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date of care (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "cost": {
           "type": "number"
          },
          "out_of_scope_cost": {
           "type": "number"
          },
          "card": {
           "type": "object",
           "properties": {
            "normalized": {
             "type": "string"
            },
            "group": {
             "type": "string"
            },
            "group_vi": {
             "type": "string"
            },
            "benefit_level": {
             "type": "number"
            },
            "valid": {
             "type": "boolean"
            },
            "errors": {
             "type": "array"
            },
            "warnings": {
             "type": "array"
            }
           }
          },
          "benefit_level": {
           "type": "number"
          },
          "visit": {
           "type": "string"
          },
          "facility": {
           "type": "string"
          },
          "former_level": {
           "type": "string"
          },
          "route": {
           "type": "string"
          },
          "fund_pays": {
           "type": "number"
          },
          "patient_pays": {
           "type": "number"
          },
          "fund_share": {
           "type": "number"
          },
          "rate_applied": {
           "type": "number"
          },
          "route_factor": {
           "type": "number"
          },
          "card_rate": {
           "type": "number"
          },
          "thresholds": {
           "type": "object",
           "properties": {
            "base_salary": {
             "type": "number"
            },
            "base_salary_ref": {
             "type": "string"
            },
            "small_visit": {
             "type": "number"
            },
            "five_year_cap": {
             "type": "number"
            }
           }
          },
          "rules_applied": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-bhyt-xml": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "BHYT XML 130/4750 Validator (VN)",
    "description": "Send the GIAMDINHHS file (as `xml`, a raw XML body or a multipart `file`) or a single table (e.g. <TONG_HOP>). The API decodes every FILEHOSO (XML1–XML11, XML13–XML15, base64) and checks it against the schema of QĐ 130/QĐ-BYT as amended by QĐ 4750/QĐ-BYT, QĐ 3176/QĐ-BYT and QĐ 1931/QĐ-BYT (from 1/7/2026): required fields, numbers with a dot separator, maximum lengths, yyyyMMddHHmm / yyyyMMdd dates, code lists (MA_LOAI_KCB, KET_QUA_DTRI, MA_LOAI_RV, GIOI_TINH, PHAM_VI…), ICD-10 format, BHYT card codes with matching MA_DKBD / GT_THE_* lists, 5-character facility codes and NGAY_VAO ≤ NGAY_RA.\n\nCross-checks: MA_LK identical in every table of a HOSO, STT sequences, the QĐ 3176 line formulas of XML2 / XML3 (THANH_TIEN_BV, THANH_TIEN_BH, T_BHTT, T_BNTT, T_BNCCT) as warnings, and the XML1 totals (T_THUOC, T_VTYT, T_TONGCHI_BV, T_TONGCHI_BH, T_BNTT, T_BNCCT, T_BHTT, T_NGUONKHAC, T_BHTT_GDV) against the sums of XML2 + XML3 as errors, with a tolerance of 1 VND per 10 lines (`tolerance`). Every problem comes with HOSO, MA_LK, table, row, field and a code. `list=schema` returns the field tables; `include_data=true` returns the decoded tables as JSON.\n\nThis is a pre-submission check: the BHXH assessment rules are more detailed and not all public, so a clean result does not guarantee acceptance. Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/vn-bhyt-xml/",
    "operationId": "vnBhytXmlPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-bhyt-xml/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "GIAMDINHHS envelope or one table; or a raw XML body / multipart file."
         },
         "tolerance": {
          "type": "number",
          "default": 1,
          "description": "Rounding tolerance in VND per line."
         },
         "include_data": {
          "type": "boolean",
          "default": false,
          "description": "Return the decoded tables."
         },
         "list": {
          "type": "string",
          "description": "schema: return the field tables (with table=XML1…)."
         }
        },
        "required": [
         "xml"
        ]
       },
       "example": {
        "xml": "<TONG_HOP><MA_LK>LK0001</MA_LK><STT>1</STT><MA_BN>BN01</MA_BN><HO_TEN>Nguyễn Văn An</HO_TEN><NGAY_SINH>199003150000</NGAY_SINH><GIOI_TINH>1</GIOI_TINH><MA_QUOCTICH>000</MA_QUOCTICH><MA_DANTOC>01</MA_DANTOC><MA_NGHE_NGHIEP>00</MA_NGHE_NGHIEP><MA_THE_BHYT>DN4797931234567</MA_THE_BHYT><MA_DKBD>79001</MA_DKBD><GT_THE_TU>20260101</GT_THE_TU><GT_THE_DEN>20261231</GT_THE_DEN><MA_BENH_CHINH>J18.9</MA_BENH_CHINH><MA_DOITUONG_KCB>1</MA_DOITUONG_KCB><NGAY_VAO>202611100800</NGAY_VAO><NGAY_RA>202611091000</NGAY_RA><SO_NGAY_DTRI>1</SO_NGAY_DTRI><KET_QUA_DTRI>1</KET_QUA_DTRI><MA_LOAI_RV>1</MA_LOAI_RV><T_THUOC>50000</T_THUOC><T_VTYT>0</T_VTYT><T_TONGCHI_BV>88700</T_TONGCHI_BV><T_TONGCHI_BH>88700</T_TONGCHI_BH><T_BNTT>0</T_BNTT><T_BNCCT>17740</T_BNCCT><T_BHTT>70960</T_BHTT><T_NGUONKHAC>0</T_NGUONKHAC><T_BHTT_GDV>70960</T_BHTT_GDV><NAM_QT>2026</NAM_QT><THANG_QT>11</THANG_QT><MA_LOAI_KCB>1</MA_LOAI_KCB><MA_KHOA>K01</MA_KHOA><MA_CSKCB>79001</MA_CSKCB><MA_TTDV>000123/HCM-GPHN</MA_TTDV></TONG_HOP>"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "GIAMDINHHS envelope or one table; or a raw XML body / multipart file."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The XML file (multipart)."
         },
         "tolerance": {
          "type": "number",
          "default": 1,
          "description": "Rounding tolerance in VND per line."
         },
         "include_data": {
          "type": "boolean",
          "default": false,
          "description": "Return the decoded tables."
         },
         "list": {
          "type": "string",
          "description": "schema: return the field tables (with table=XML1…)."
         }
        },
        "required": [
         "xml"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "version": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "error_count": {
           "type": "number"
          },
          "warning_count": {
           "type": "number"
          },
          "envelope": {},
          "hoso": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "hoso": {
              "type": "number"
             },
             "ma_lk": {
              "type": "string"
             },
             "tables": {
              "type": "object"
             }
            }
           }
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "hoso": {
              "type": "number"
             },
             "ma_lk": {
              "type": "string"
             },
             "row": {},
             "table": {
              "type": "string"
             },
             "field": {
              "type": "string"
             },
             "code": {
              "type": "string"
             },
             "message": {
              "type": "string"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "truncated": {
           "type": "boolean"
          },
          "checks": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "version": "QĐ 130/QĐ-BYT as amended by QĐ 4750/QĐ-BYT, QĐ 3176/QĐ-BYT and QĐ 1931/QĐ-BYT (from 01/07/2026)",
         "valid": false,
         "error_count": 2,
         "warning_count": 0,
         "envelope": null,
         "hoso": [
          {
           "hoso": 1,
           "ma_lk": "LK0001",
           "tables": {
            "XML1": 1
           }
          }
         ],
         "errors": [
          {
           "hoso": 1,
           "ma_lk": "LK0001",
           "row": null,
           "table": "XML1",
           "field": "MA_LOAI_KCB",
           "code": "invalid_code",
           "message": "MA_LOAI_KCB must be one of 01, 02, 03, 04, 05, 06, 07, 08, 09"
          },
          {
           "hoso": 1,
           "ma_lk": "LK0001",
           "row": null,
           "table": "XML1",
           "field": "NGAY_RA",
           "code": "date_order",
           "message": "NGAY_RA is before NGAY_VAO"
          }
         ],
         "warnings": [],
         "truncated": false,
         "checks": "Structure, required fields, types, lengths, date formats, code lists, ICD-10 and BHYT card format, MA_LK consistency, line formulas (QĐ 3176) and XML1 totals against XML2 + XML3.",
         "legal": [
          {
           "ref": "QĐ 130/QĐ-BYT (18/01/2023)",
           "effective_from": "2023-01-18"
          },
          {
           "ref": "QĐ 4750/QĐ-BYT (29/12/2023)",
           "effective_from": "2024-07-01"
          }
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Pre-submission check only: the BHXH assessment rules are more detailed and not all public; passing here does not guarantee acceptance. Not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-court-fee": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Court Fee Calculator",
    "description": "Computes the court fee (án phí) and the advance fee (tạm ứng án phí) of a Vietnamese lawsuit under Nghị quyết 326/2016/UBTVQH14, still in force in 2026. Give `case_type` (civil, family, labour, commercial, administrative, criminal, divorce) and, for a claim with a monetary value, `amount` (the disputed value in VND). The response shows the bracket used, the formula step by step (e.g. 36,000,000 + 3% × the part above 800 million), the advance fee (50% of the fee, at least the fee for a case without monetary value) and the full bracket table.\n\nDivorce with property: send `property_shares` (the value each spouse receives) and each party's fee is computed on its own share, with the 50% / 0% rules when the spouses agree before trial or before mediation. `instance=appeal` gives appeal fees, `procedure=simplified` halves them, `exemption` (worker_claims, elderly, poor_household, disabled…) returns the exemption grounds of Điều 12, `force_majeure` the 50% reduction of Điều 13. Land disputes (`land=true`) return both approaches courts use (with and without monetary value). `fee` returns other court fees (consensual divorce, bankruptcy petition, foreign judgment recognition, copies…); `fee=list` lists them.\n\nEach response cites the resolution and its article and carries a disclaimer: who finally pays depends on the judgment (the losing party bears the fee on the claims rejected).\n\nDocs: https://apibox.io.vn/docs/vn-court-fee/",
    "operationId": "vnCourtFeeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-court-fee/"
    },
    "parameters": [
     {
      "name": "case_type",
      "in": "query",
      "required": false,
      "description": "`civil`, `family`, `labour`, `commercial`, `administrative`, `criminal`, `divorce` (or `consensual_divorce`).",
      "schema": {
       "type": "string",
       "default": "civil"
      },
      "example": "civil"
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Disputed value in VND (claim with monetary value). Omit for a case without monetary value. For criminal / administrative cases: the civil (damages) part.",
      "schema": {
       "type": "number"
      },
      "example": 1000000000
     },
     {
      "name": "instance",
      "in": "query",
      "required": false,
      "description": "`first` (sơ thẩm) or `appeal` (phúc thẩm).",
      "schema": {
       "type": "string",
       "default": "first"
      }
     },
     {
      "name": "procedure",
      "in": "query",
      "required": false,
      "description": "`normal` or `simplified` (50%).",
      "schema": {
       "type": "string",
       "default": "normal"
      }
     },
     {
      "name": "property_agreement",
      "in": "query",
      "required": false,
      "description": "Divorce: `none`, `before_mediation` (no fee on property) or `before_trial` (50%).",
      "schema": {
       "type": "string",
       "default": "none"
      }
     },
     {
      "name": "exemption",
      "in": "query",
      "required": false,
      "description": "Comma-separated grounds: worker_claims, child_support, administrative_detention, personal_injury, child, poor_household, elderly, disabled, revolution_merit, ethnic_minority, martyr_relative, force_majeure (50%).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "land",
      "in": "query",
      "required": false,
      "description": "Land / ownership dispute: also return the no-monetary-value approach.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "fee",
      "in": "query",
      "required": false,
      "description": "Other court fees: consensual_divorce, civil_matter, bankruptcy, foreign_judgment, ship_aircraft_arrest, copy (+ `pages`)… or `list`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "case_type": {
           "type": "string"
          },
          "case_type_vi": {
           "type": "string"
          },
          "instance": {
           "type": "string"
          },
          "procedure": {
           "type": "string"
          },
          "has_monetary_value": {
           "type": "boolean"
          },
          "claim_value": {
           "type": "number"
          },
          "court_fee": {
           "type": "number"
          },
          "advance_fee": {
           "type": "number"
          },
          "bracket": {
           "type": "object",
           "properties": {
            "index": {
             "type": "number"
            },
            "from": {
             "type": "number"
            },
            "to": {
             "type": "number"
            },
            "base": {
             "type": "number"
            },
            "rate_percent": {
             "type": "number"
            },
            "over": {
             "type": "number"
            }
           }
          },
          "formula": {
           "type": "string"
          },
          "formula_vi": {
           "type": "string"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "en": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          },
          "currency": {
           "type": "string"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "case_type": "civil",
         "case_type_vi": "dân sự",
         "instance": "first",
         "procedure": "normal",
         "has_monetary_value": true,
         "claim_value": 1000000000,
         "court_fee": 42000000,
         "advance_fee": 21000000,
         "bracket": {
          "index": 4,
          "from": 800000000,
          "to": 2000000000,
          "base": 36000000,
          "rate_percent": 3,
          "over": 800000000
         },
         "formula": "36,000,000 + 3% × (1,000,000,000 − 800,000,000)",
         "formula_vi": "36.000.000 + 3% × (1.000.000.000 − 800.000.000)",
         "steps": [
          {
           "en": "First-instance fee, civil case with monetary value 1,000,000,000 (bracket 4): 36,000,000 + 3% × (1,000,000,000 − 800,000,000) = 42,000,000",
           "vi": "Án phí sơ thẩm vụ án dân sự có giá ngạch 1.000.000.000 (bậc 4): 36.000.000 + 3% × (1.000.000.000 − 800.000.000) = 42.000.000 đồng",
           "amount": 42000000
          },
          {
           "en": "Advance fee: 50% of 42,000,000, at least the no-value fee 300,000 = 21,000,000",
           "vi": "Tạm ứng án phí: 50% × 42.000.000, không thấp hơn mức không có giá ngạch 300.000 = 21.000.000 đồng",
           "amount": 21000000
          }
         ],
         "currency": "VND",
         "notes": [
          "The court fee is charged on the value of the claims the court does not accept: the party who loses a claim pays the fee on that claim (Điều 26, 27). The amount here assumes one party bears the whole value."
         ],
         "legal": [
          {
           "ref": "Nghị quyết 326/2016/UBTVQH14",
           "effective_from": "2017-01-01",
           "url": "https://thuvienphapluat.vn/van-ban/Thue-Phi-Le-Phi/Nghi-quyet-326-2016-UBTVQH14-muc-thu-mien-giam-thu-nop-quan-ly-va-su-dung-an-phi-le-phi-Toa-an-337911.aspx"
          }
         ],
         "disclaimer": "Reference calculation, not legal advice; check the official text.",
         "disclaimer_vi": "Kết quả tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Court Fee Calculator",
    "description": "Computes the court fee (án phí) and the advance fee (tạm ứng án phí) of a Vietnamese lawsuit under Nghị quyết 326/2016/UBTVQH14, still in force in 2026. Give `case_type` (civil, family, labour, commercial, administrative, criminal, divorce) and, for a claim with a monetary value, `amount` (the disputed value in VND). The response shows the bracket used, the formula step by step (e.g. 36,000,000 + 3% × the part above 800 million), the advance fee (50% of the fee, at least the fee for a case without monetary value) and the full bracket table.\n\nDivorce with property: send `property_shares` (the value each spouse receives) and each party's fee is computed on its own share, with the 50% / 0% rules when the spouses agree before trial or before mediation. `instance=appeal` gives appeal fees, `procedure=simplified` halves them, `exemption` (worker_claims, elderly, poor_household, disabled…) returns the exemption grounds of Điều 12, `force_majeure` the 50% reduction of Điều 13. Land disputes (`land=true`) return both approaches courts use (with and without monetary value). `fee` returns other court fees (consensual divorce, bankruptcy petition, foreign judgment recognition, copies…); `fee=list` lists them.\n\nEach response cites the resolution and its article and carries a disclaimer: who finally pays depends on the judgment (the losing party bears the fee on the claims rejected).\n\nDocs: https://apibox.io.vn/docs/vn-court-fee/",
    "operationId": "vnCourtFeePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-court-fee/"
    },
    "parameters": [
     {
      "name": "case_type",
      "in": "query",
      "required": false,
      "description": "`civil`, `family`, `labour`, `commercial`, `administrative`, `criminal`, `divorce` (or `consensual_divorce`).",
      "schema": {
       "type": "string",
       "default": "civil"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Disputed value in VND (claim with monetary value). Omit for a case without monetary value. For criminal / administrative cases: the civil (damages) part.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "instance",
      "in": "query",
      "required": false,
      "description": "`first` (sơ thẩm) or `appeal` (phúc thẩm).",
      "schema": {
       "type": "string",
       "default": "first"
      }
     },
     {
      "name": "procedure",
      "in": "query",
      "required": false,
      "description": "`normal` or `simplified` (50%).",
      "schema": {
       "type": "string",
       "default": "normal"
      }
     },
     {
      "name": "property_agreement",
      "in": "query",
      "required": false,
      "description": "Divorce: `none`, `before_mediation` (no fee on property) or `before_trial` (50%).",
      "schema": {
       "type": "string",
       "default": "none"
      }
     },
     {
      "name": "exemption",
      "in": "query",
      "required": false,
      "description": "Comma-separated grounds: worker_claims, child_support, administrative_detention, personal_injury, child, poor_household, elderly, disabled, revolution_merit, ethnic_minority, martyr_relative, force_majeure (50%).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "land",
      "in": "query",
      "required": false,
      "description": "Land / ownership dispute: also return the no-monetary-value approach.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "fee",
      "in": "query",
      "required": false,
      "description": "Other court fees: consensual_divorce, civil_matter, bankruptcy, foreign_judgment, ship_aircraft_arrest, copy (+ `pages`)… or `list`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "property_shares": {
          "type": "array",
          "items": {},
          "description": "Divorce: value each spouse receives, e.g. `[{\"party\":\"vợ\",\"value\":1200000000}, …]`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "case_type": {
           "type": "string"
          },
          "case_type_vi": {
           "type": "string"
          },
          "instance": {
           "type": "string"
          },
          "procedure": {
           "type": "string"
          },
          "has_monetary_value": {
           "type": "boolean"
          },
          "claim_value": {
           "type": "number"
          },
          "court_fee": {
           "type": "number"
          },
          "advance_fee": {
           "type": "number"
          },
          "bracket": {
           "type": "object",
           "properties": {
            "index": {
             "type": "number"
            },
            "from": {
             "type": "number"
            },
            "to": {
             "type": "number"
            },
            "base": {
             "type": "number"
            },
            "rate_percent": {
             "type": "number"
            },
            "over": {
             "type": "number"
            }
           }
          },
          "formula": {
           "type": "string"
          },
          "formula_vi": {
           "type": "string"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "en": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          },
          "currency": {
           "type": "string"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-inheritance": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Inheritance Calculator",
    "description": "Send a small family tree (`heirs`: spouse, parents, children, grandparents, siblings, grandchildren, uncles / aunts, nephews / nieces, great-grandchildren, with `alive`, `minor`, `unable_to_work`, `refused`, `disqualified` and `parent` links) and the property: `own_property`, `joint_property` (half of the joint marital property belongs to the deceased, Marriage and Family Law art. 66), `funeral_costs`, `debts`. The API divides the net estate step by step and explains each step in English and Vietnamese.\n\nBy law (Civil Code art. 651) the first rank that has an heir takes everything in equal shares; a child who died before the deceased is represented by his or her children (art. 652). With a `will` (`gifts` as fractions or amounts, `disinherit`), lapsed gifts and the undisposed part go by law, and compulsory heirs (spouse, parents, minor children, adult children unable to work) get at least two thirds of the share they would have by law (art. 644); the shortfall is taken from the other beneficiaries in proportion to their gifts. Shares are exact fractions (BigInt rationals) and amounts are rounded so that they add up to the net estate.\n\nIt is an illustration, not legal advice: proof of kinship, the validity of the will and court practice decide real cases.\n\nDocs: https://apibox.io.vn/docs/vn-inheritance/",
    "operationId": "vnInheritancePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-inheritance/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "heirs": {
          "type": "array",
          "items": {},
          "description": "People: `{id, name, relation, alive, minor, unable_to_work, refused, disqualified, parent}`. Relations: spouse, father, mother, child, grandparent, sibling, grandchild, great_grandparent, uncle_aunt, nephew_niece, great_grandchild (Vietnamese words such as vợ, con, ông nội also work)."
         },
         "own_property": {
          "type": "number",
          "description": "Separate property of the deceased (VND). Alias `estate`."
         },
         "joint_property": {
          "type": "number",
          "description": "Joint marital property (VND); the deceased's part is `deceased_joint_share` (default 1/2)."
         },
         "funeral_costs": {
          "type": "number",
          "description": "Funeral costs paid from the estate."
         },
         "debts": {
          "type": "number",
          "description": "Debts of the deceased (also `other_obligations`)."
         },
         "will": {
          "type": "object",
          "description": "`{gifts: [{to, share | amount}], disinherit: [id]}`; `to` is an heir id or the name of any other beneficiary."
         }
        },
        "required": [
         "heirs"
        ]
       },
       "example": {
        "joint_property": 2000000000,
        "funeral_costs": 40000000,
        "heirs": [
         {
          "id": "w",
          "name": "Bà Lan",
          "relation": "spouse"
         },
         {
          "id": "c1",
          "name": "Anh Minh",
          "relation": "child"
         },
         {
          "id": "c2",
          "name": "Chị Hoa",
          "relation": "child",
          "alive": false
         },
         {
          "id": "g",
          "name": "Bé Na",
          "relation": "grandchild",
          "parent": "c2"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "estate": {
           "type": "object",
           "properties": {
            "own_property": {
             "type": "number"
            },
            "joint_property": {
             "type": "number"
            },
            "deceased_joint_share": {
             "type": "string"
            },
            "deceased_part_of_joint": {
             "type": "number"
            },
            "surviving_spouse_part_of_joint": {
             "type": "number"
            },
            "gross_estate": {
             "type": "number"
            },
            "funeral_costs": {
             "type": "number"
            },
            "debts": {
             "type": "number"
            },
            "other_obligations": {
             "type": "number"
            },
            "net_estate": {
             "type": "number"
            }
           }
          },
          "rank_inheriting_by_law": {
           "type": "number"
          },
          "heirs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "relation": {
              "type": "string"
             },
             "relation_vi": {
              "type": "string"
             },
             "rank": {
              "type": "number"
             },
             "fraction": {
              "type": "string"
             },
             "percent": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "basis": {
              "type": "array"
             },
             "not_receiving_because": {
              "type": "string"
             },
             "by_representation": {
              "type": "boolean"
             }
            }
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "method": "law",
         "estate": {
          "own_property": 0,
          "joint_property": 2000000000,
          "deceased_joint_share": "1/2",
          "deceased_part_of_joint": 1000000000,
          "surviving_spouse_part_of_joint": 1000000000,
          "gross_estate": 1000000000,
          "funeral_costs": 40000000,
          "debts": 0,
          "other_obligations": 0,
          "net_estate": 960000000
         },
         "rank_inheriting_by_law": 1,
         "heirs": [
          {
           "id": "w",
           "name": "Bà Lan",
           "relation": "spouse",
           "relation_vi": "vợ/chồng",
           "rank": 1,
           "fraction": "1/3",
           "percent": 33.3333,
           "amount": 320000000,
           "basis": [
            {
             "source": "law",
             "fraction": "1/3"
            }
           ]
          },
          {
           "id": "c1",
           "name": "Anh Minh",
           "relation": "child",
           "relation_vi": "con",
           "rank": 1,
           "fraction": "1/3",
           "percent": 33.3333,
           "amount": 320000000,
           "basis": [
            {
             "source": "law",
             "fraction": "1/3"
            }
           ]
          },
          {
           "id": "c2",
           "name": "Chị Hoa",
           "relation": "child",
           "relation_vi": "con",
           "rank": 1,
           "fraction": "0",
           "percent": 0,
           "amount": 0,
           "basis": [],
           "not_receiving_because": "died before or at the same time as the deceased"
          },
          {
           "id": "g",
           "name": "Bé Na",
           "relation": "grandchild",
           "relation_vi": "cháu (con của con)",
           "rank": 1,
           "by_representation": true,
           "fraction": "1/3",
           "percent": 33.3333,
           "amount": 320000000,
           "basis": [
            {
             "source": "law",
             "fraction": "1/3"
            }
           ]
          }
         ],
         "steps": [
          {
           "step": "obligations",
           "en": "Pay first, in the order of art. 658: funeral costs 40,000,000, debts 0, other obligations 0. Net estate to divide: 960,000,000.",
           "vi": "Thanh toán trước theo thứ tự Điều 658: chi phí mai táng 40.000.000, nợ 0, nghĩa vụ khác 0. Di sản còn lại để chia: 960.000.000."
          },
          {
           "step": "law",
           "en": "The whole estate goes to rank 1 heirs (art. 651), in equal shares: 3 share(s) of 1/3; a deceased child's share is split equally among his / her children (representation, art. 652). Higher ranks inherit only when no one of a lower rank number can (art. 651(3)).",
           "vi": "Toàn bộ di sản chia cho hàng thừa kế thứ 1 (Điều 651), mỗi người một phần bằng nhau: 3 suất, mỗi suất 1/3; suất của người con đã chết chia đều cho các con của người đó (thừa kế thế vị, Điều 652). Hàng sau chỉ được hưởng khi không còn ai ở hàng trước (Điều 651 khoản 3)."
          }
         ],
         "legal": [
          {
           "ref": "Bộ luật Dân sự 2015 (91/2015/QH13), Điều 612–662",
           "effective_from": "2017-01-01"
          },
          {
           "ref": "Luật Hôn nhân và gia đình 2014 (52/2014/QH13), Điều 66",
           "effective_from": "2015-01-01"
          }
         ],
         "notes": [
          "Illustration only: real cases depend on proof of kinship, the validity and wording of the will, the time the succession opened and court practice.",
          "Amounts are rounded to whole VND so that they add up to the net estate."
         ],
         "disclaimer": "Reference calculation, not legal advice; check the official text.",
         "disclaimer_vi": "Kết quả tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-legal-deadline": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Legal Deadline Calculator",
    "description": "Give the event date `start` and a `period` (15d, 2w, 3m, 1y, 1y6m, 10wd for working days, or \"30 ngày\", \"3 tháng\") or a `rule` id from the built-in table, and the API returns the last day of the time limit following the Civil Code 2015: the event day is not counted (art. 147), months and years end on the corresponding day (the last day of the month when there is none), and a period ending on a weekend or public holiday ends on the next working day (art. 148(5)), using the official Vietnamese holiday schedule. `mode=fixed` counts a month as 30 days and a year as 365 days (art. 146), `suspended_days` adds time not counted in a limitation period (art. 156).\n\nWithout `start`, the API lists the table: limitation periods for contract and tort claims (3 years), inheritance (30 / 10 / 3 years), void transactions, commercial disputes (2 years), labour disputes (6 / 9 / 12 months), administrative complaints (90 days) and lawsuits (1 year), appeal periods (15 days, 7 days), cassation protest (3 years), enforcement requests (5 years)… each with its article. Filter with `category` or `q`. `format=ics` returns a calendar file with reminders.\n\nThe response explains each step and cites the articles. It is a reference: check how the specific law counts the period.\n\nDocs: https://apibox.io.vn/docs/vn-legal-deadline/",
    "operationId": "vnLegalDeadlineGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-legal-deadline/"
    },
    "parameters": [
     {
      "name": "start",
      "in": "query",
      "required": false,
      "description": "Event date (YYYY-MM-DD or DD/MM/YYYY). Without it the table of rules is returned.",
      "schema": {
       "type": "string"
      },
      "example": "2026-04-15"
     },
     {
      "name": "period",
      "in": "query",
      "required": false,
      "description": "Length: 15d, 2w, 3m, 1y, 1y6m, 10wd (working days), \"30 ngày\", \"3 tháng\", \"nửa tháng\".",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "rule",
      "in": "query",
      "required": false,
      "description": "Rule id from the table (e.g. `civil_appeal_judgment`, `contract_dispute`, `inheritance_real_estate`).",
      "schema": {
       "type": "string"
      },
      "example": "civil_appeal_judgment"
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`calendar` (arts. 147–148) or `fixed` (art. 146: month = 30 days, year = 365 days).",
      "schema": {
       "type": "string",
       "default": "calendar"
      }
     },
     {
      "name": "suspended_days",
      "in": "query",
      "required": false,
      "description": "Days not counted in the limitation period (art. 156).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "saturday_off",
      "in": "query",
      "required": false,
      "description": "Treat Saturday as a day off.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Filter the table: civil, inheritance, commercial, labour, administrative, procedure.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` (default) or `ics`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "event_date": {
           "type": "string"
          },
          "period": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "rule": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "category": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "starts_vi": {
             "type": "string"
            },
            "starts_en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "start_date": {
           "type": "string"
          },
          "raw_end_date": {
           "type": "string"
          },
          "deadline": {
           "type": "string"
          },
          "deadline_weekday": {
           "type": "string"
          },
          "deadline_weekday_vi": {
           "type": "string"
          },
          "moved_to_next_workday": {
           "type": "boolean"
          },
          "moved_because": {
           "type": "string"
          },
          "days_from_event": {
           "type": "number"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "en": {
              "type": "string"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "event_date": "2026-04-15",
         "period": "15d",
         "mode": "calendar",
         "rule": {
          "id": "civil_appeal_judgment",
          "category": "procedure",
          "vi": "Thời hạn kháng cáo bản án sơ thẩm (dân sự)",
          "en": "Appeal against a first-instance civil judgment",
          "period": "15d",
          "starts_vi": "từ ngày tuyên án (vắng mặt: từ ngày nhận được bản án hoặc bản án được niêm yết)",
          "starts_en": "from the pronouncement (absent party: from receipt or posting of the judgment)",
          "ref": "Bộ luật Tố tụng dân sự 2015 Điều 273 khoản 1"
         },
         "start_date": "2026-04-16",
         "raw_end_date": "2026-04-30",
         "deadline": "2026-05-04",
         "deadline_weekday": "Monday",
         "deadline_weekday_vi": "Thứ Hai",
         "moved_to_next_workday": true,
         "moved_because": "Ngày Chiến thắng 30/4 và Quốc tế Lao động 1/5",
         "days_from_event": 19,
         "steps": [
          {
           "en": "The event day (2026-04-15) is not counted; the period starts on 2026-04-16 (art. 147(2))."
          },
          {
           "en": "15 day(s) (art. 148(1)-(2)): last day 2026-04-30."
          },
          {
           "en": "2026-04-30 is a day off (Ngày Chiến thắng 30/4 và Quốc tế Lao động 1/5): the period ends at the end of the next working day, 2026-05-04 (art. 148(5))."
          },
          {
           "en": "The period ends at 24:00 on 2026-05-04 (art. 148(6))."
          }
         ],
         "legal": [
          {
           "ref": "Bộ luật Dân sự 2015, Điều 144–148 (cách tính thời hạn), Điều 149–157 (thời hiệu)",
           "effective_from": "2017-01-01"
          },
          {
           "ref": "Bộ luật Tố tụng dân sự 2015 Điều 273 khoản 1"
          }
         ],
         "notes": [
          "Procedural laws sometimes count differently (e.g. \"ngày làm việc\"); courts generally apply BLDS arts. 144–148 to procedural deadlines (BLTTDS art. 182)."
         ],
         "disclaimer": "Reference calculation, not legal advice; check the official text.",
         "disclaimer_vi": "Kết quả tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Legal Deadline Calculator",
    "description": "Give the event date `start` and a `period` (15d, 2w, 3m, 1y, 1y6m, 10wd for working days, or \"30 ngày\", \"3 tháng\") or a `rule` id from the built-in table, and the API returns the last day of the time limit following the Civil Code 2015: the event day is not counted (art. 147), months and years end on the corresponding day (the last day of the month when there is none), and a period ending on a weekend or public holiday ends on the next working day (art. 148(5)), using the official Vietnamese holiday schedule. `mode=fixed` counts a month as 30 days and a year as 365 days (art. 146), `suspended_days` adds time not counted in a limitation period (art. 156).\n\nWithout `start`, the API lists the table: limitation periods for contract and tort claims (3 years), inheritance (30 / 10 / 3 years), void transactions, commercial disputes (2 years), labour disputes (6 / 9 / 12 months), administrative complaints (90 days) and lawsuits (1 year), appeal periods (15 days, 7 days), cassation protest (3 years), enforcement requests (5 years)… each with its article. Filter with `category` or `q`. `format=ics` returns a calendar file with reminders.\n\nThe response explains each step and cites the articles. It is a reference: check how the specific law counts the period.\n\nDocs: https://apibox.io.vn/docs/vn-legal-deadline/",
    "operationId": "vnLegalDeadlinePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-legal-deadline/"
    },
    "parameters": [
     {
      "name": "start",
      "in": "query",
      "required": false,
      "description": "Event date (YYYY-MM-DD or DD/MM/YYYY). Without it the table of rules is returned.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "period",
      "in": "query",
      "required": false,
      "description": "Length: 15d, 2w, 3m, 1y, 1y6m, 10wd (working days), \"30 ngày\", \"3 tháng\", \"nửa tháng\".",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "rule",
      "in": "query",
      "required": false,
      "description": "Rule id from the table (e.g. `civil_appeal_judgment`, `contract_dispute`, `inheritance_real_estate`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`calendar` (arts. 147–148) or `fixed` (art. 146: month = 30 days, year = 365 days).",
      "schema": {
       "type": "string",
       "default": "calendar"
      }
     },
     {
      "name": "suspended_days",
      "in": "query",
      "required": false,
      "description": "Days not counted in the limitation period (art. 156).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "saturday_off",
      "in": "query",
      "required": false,
      "description": "Treat Saturday as a day off.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Filter the table: civil, inheritance, commercial, labour, administrative, procedure.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` (default) or `ics`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "event_date": {
           "type": "string"
          },
          "period": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "rule": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "category": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "period": {
             "type": "string"
            },
            "starts_vi": {
             "type": "string"
            },
            "starts_en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "start_date": {
           "type": "string"
          },
          "raw_end_date": {
           "type": "string"
          },
          "deadline": {
           "type": "string"
          },
          "deadline_weekday": {
           "type": "string"
          },
          "deadline_weekday_vi": {
           "type": "string"
          },
          "moved_to_next_workday": {
           "type": "boolean"
          },
          "moved_because": {
           "type": "string"
          },
          "days_from_event": {
           "type": "number"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "en": {
              "type": "string"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-legal-parse": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Legal Text Parser",
    "description": "Send a Vietnamese legal or administrative document as plain text (`text`), HTML (`html`) or a .docx / .txt `file`. The parser normalises Unicode to NFC, then builds the tree Phần → Chương → Mục → Tiểu mục → Điều → Khoản → Điểm with numbers, titles and line numbers. Text quoted inside an amending law (“Điều 10. …”) is kept as text, not mistaken for structure.\n\nMetadata from the header: document number split into sequence / year / symbol with the type and issuer decoded (e.g. 123/2020/NĐ-CP → Nghị định, Chính phủ; administrative symbols per NĐ 30/2020 Phụ lục III), legal or administrative kind (the Law on Promulgation of Legal Documents 2025 numbers legal documents as number/year/symbol), issuer, type, title, place and date of issue, \"Căn cứ\" bases and the effective date found in the text. It also lists references to other documents (\"Nghị định số 01/2021/NĐ-CP\", \"Luật Đầu tư\"), article references (\"khoản 1 Điều 10 của Luật Đầu tư …\") and amendment markers (sửa đổi, bổ sung, bãi bỏ, thay thế…).\n\nFor retrieval-augmented generation, `chunks` cut the text by article (or by clause with `chunk_by=clause`; long articles are split by clause, then by sentence) under `max_chars` (or `max_tokens`), each chunk starting with its breadcrumb \"Nghị định 123/2020/NĐ-CP > Chương I > Điều 1. …\" so that the embedding keeps the context. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/vn-legal-parse/",
    "operationId": "vnLegalParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-legal-parse/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Plain text of the document (or send `html`, or a `file`)."
         },
         "html": {
          "type": "string",
          "description": "HTML of the document (tags are stripped, blocks become lines)."
         },
         "chunk_by": {
          "type": "string",
          "default": "article",
          "description": "`article` or `clause`."
         },
         "max_chars": {
          "type": "number",
          "default": 2000,
          "description": "Maximum characters per chunk (200–20,000)."
         },
         "max_tokens": {
          "type": "number",
          "description": "Alternative to max_chars (≈ 3 characters per token)."
         },
         "breadcrumb": {
          "type": "boolean",
          "default": true,
          "description": "Prefix each chunk with its heading path."
         },
         "output": {
          "type": "string",
          "default": "all",
          "description": "`all`, `structure`, `chunks` or `metadata`."
         }
        }
       },
       "example": {
        "text": "CHÍNH PHỦ\nSố: 123/2020/NĐ-CP\nHà Nội, ngày 19 tháng 10 năm 2020\nNGHỊ ĐỊNH\nQuy định về hóa đơn, chứng từ\nChương I\nQUY ĐỊNH CHUNG\nĐiều 1. Phạm vi điều chỉnh\n1. Nghị định này quy định việc quản lý, sử dụng hóa đơn khi bán hàng hóa, cung cấp dịch vụ.\n2. Hóa đơn gồm:\na) Hóa đơn điện tử;\nb) Hóa đơn do cơ quan thuế đặt in.\nĐiều 2. Hiệu lực thi hành\nNghị định này có hiệu lực thi hành từ ngày 01 tháng 7 năm 2022 và bãi bỏ khoản 3 Điều 5 Nghị định số 51/2010/NĐ-CP.",
        "max_chars": 800
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Plain text of the document (or send `html`, or a `file`)."
         },
         "html": {
          "type": "string",
          "description": "HTML of the document (tags are stripped, blocks become lines)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": ".docx or .txt file (multipart)."
         },
         "chunk_by": {
          "type": "string",
          "default": "article",
          "description": "`article` or `clause`."
         },
         "max_chars": {
          "type": "number",
          "default": 2000,
          "description": "Maximum characters per chunk (200–20,000)."
         },
         "max_tokens": {
          "type": "number",
          "description": "Alternative to max_chars (≈ 3 characters per token)."
         },
         "breadcrumb": {
          "type": "boolean",
          "default": true,
          "description": "Prefix each chunk with its heading path."
         },
         "output": {
          "type": "string",
          "default": "all",
          "description": "`all`, `structure`, `chunks` or `metadata`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "metadata": {
           "type": "object",
           "properties": {
            "number": {
             "type": "object",
             "properties": {
              "number": {
               "type": "string"
              },
              "seq": {
               "type": "number"
              },
              "year": {
               "type": "number"
              },
              "symbol": {
               "type": "string"
              },
              "type": {
               "type": "string"
              },
              "type_code": {
               "type": "string"
              },
              "issuer_codes": {
               "type": "array"
              },
              "issuers": {
               "type": "array"
              },
              "kind": {
               "type": "string"
              }
             }
            },
            "issued_date": {
             "type": "string"
            },
            "place": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "title": {
             "type": "string"
            },
            "effective_date": {
             "type": "string"
            },
            "characters": {
             "type": "number"
            }
           }
          },
          "stats": {
           "type": "object",
           "properties": {
            "parts": {
             "type": "number"
            },
            "chapters": {
             "type": "number"
            },
            "sections": {
             "type": "number"
            },
            "subsections": {
             "type": "number"
            },
            "articles": {
             "type": "number"
            },
            "clauses": {
             "type": "number"
            },
            "points": {
             "type": "number"
            },
            "references": {
             "type": "number"
            },
            "internal_references": {
             "type": "number"
            },
            "amendment_markers": {
             "type": "number"
            },
            "chunks": {
             "type": "number"
            }
           }
          },
          "structure": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "number": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "path": {
              "type": "string"
             },
             "children": {
              "type": "array"
             }
            }
           }
          },
          "references": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "kind": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "number": {
              "type": "string"
             },
             "count": {
              "type": "number"
             },
             "first_text": {
              "type": "string"
             }
            }
           }
          },
          "article_references": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "target": {
              "type": "string"
             },
             "document": {
              "type": "string"
             },
             "external": {
              "type": "boolean"
             },
             "count": {
              "type": "number"
             }
            }
           }
          },
          "amendments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "action": {
              "type": "string"
             },
             "text": {
              "type": "string"
             }
            }
           }
          },
          "chunks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "article": {
              "type": "string"
             },
             "path": {
              "type": "string"
             },
             "heading": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "chars": {
              "type": "number"
             },
             "approx_tokens": {
              "type": "number"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "metadata": {
          "number": {
           "number": "123/2020/NĐ-CP",
           "seq": 123,
           "year": 2020,
           "symbol": "NĐ-CP",
           "type": "Nghị định",
           "type_code": "NĐ",
           "issuer_codes": [
            "CP"
           ],
           "issuers": [
            "Chính phủ"
           ],
           "kind": "legal_normative"
          },
          "issued_date": "2020-10-19",
          "place": "Hà Nội",
          "issuer": "CHÍNH PHỦ",
          "type": "Nghị định",
          "title": "Quy định về hóa đơn, chứng từ",
          "effective_date": "2022-07-01",
          "characters": 458
         },
         "stats": {
          "parts": 0,
          "chapters": 1,
          "sections": 0,
          "subsections": 0,
          "articles": 2,
          "clauses": 2,
          "points": 2,
          "references": 1,
          "internal_references": 1,
          "amendment_markers": 1,
          "chunks": 2
         },
         "structure": [
          {
           "type": "chapter",
           "number": "I",
           "title": "QUY ĐỊNH CHUNG",
           "line": 6,
           "path": "Chương I. QUY ĐỊNH CHUNG",
           "children": [
            {
             "type": "article",
             "number": "1",
             "title": "Phạm vi điều chỉnh",
             "line": 8,
             "path": "Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh",
             "children": [
              {
               "type": "clause",
               "number": "1",
               "text": "Nghị định này quy định việc quản lý, sử dụng hóa đơn khi bán hàng hóa, cung cấp dịch vụ.",
               "line": 9,
               "path": "Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh > Khoản 1"
              },
              {
               "type": "clause",
               "number": "2",
               "text": "Hóa đơn gồm:",
               "line": 10,
               "path": "Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh > Khoản 2",
               "children": [
                {
                 "type": "point",
                 "number": "a",
                 "text": "Hóa đơn điện tử;",
                 "line": 11,
                 "path": "Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh > Khoản 2 > Điểm a"
                },
                {
                 "type": "point",
                 "number": "b",
                 "text": "Hóa đơn do cơ quan thuế đặt in.",
                 "line": 12,
                 "path": "Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh > Khoản 2 > Điểm b"
                }
               ]
              }
             ]
            },
            {
             "type": "article",
             "number": "2",
             "title": "Hiệu lực thi hành",
             "text": "Nghị định này có hiệu lực thi hành từ ngày 01 tháng 7 năm 2022 và bãi bỏ khoản 3 Điều 5 Nghị định số 51/2010/NĐ-CP.",
             "line": 13,
             "path": "Chương I. QUY ĐỊNH CHUNG > Điều 2. Hiệu lực thi hành"
            }
           ]
          }
         ],
         "references": [
          {
           "kind": "document",
           "type": "Nghị định",
           "number": "51/2010/NĐ-CP",
           "count": 1,
           "first_text": "Nghị định số 51/2010/NĐ-CP"
          }
         ],
         "article_references": [
          {
           "target": "khoản 3 Điều 5",
           "document": "Nghị định số 51/2010/NĐ-CP",
           "external": true,
           "count": 1
          }
         ],
         "amendments": [
          {
           "path": "Chương I. QUY ĐỊNH CHUNG > Điều 2. Hiệu lực thi hành",
           "action": "bãi bỏ",
           "text": "Nghị định này có hiệu lực thi hành từ ngày 01 tháng 7 năm 2022 và bãi bỏ khoản 3 Điều 5 Nghị định số 51/2010/NĐ-CP."
          }
         ],
         "chunks": [
          {
           "id": "dieu-1",
           "article": "1",
           "path": "Nghị định 123/2020/NĐ-CP > Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh",
           "heading": "Điều 1. Phạm vi điều chỉnh",
           "text": "Nghị định 123/2020/NĐ-CP > Chương I. QUY ĐỊNH CHUNG > Điều 1. Phạm vi điều chỉnh\n1. Nghị định này quy định việc quản lý, sử dụng hóa đơn khi bán hàng hóa, cung cấp dịch vụ.\n2. Hóa đơn gồm:\na) Hóa đơn điện tử;\nb) Hóa đơn do cơ quan thuế đặt in.",
           "chars": 243,
           "approx_tokens": 81
          },
          {
           "id": "dieu-2",
           "article": "2",
           "path": "Nghị định 123/2020/NĐ-CP > Chương I. QUY ĐỊNH CHUNG > Điều 2. Hiệu lực thi hành",
           "heading": "Điều 2. Hiệu lực thi hành",
           "text": "Nghị định 123/2020/NĐ-CP > Chương I. QUY ĐỊNH CHUNG > Điều 2. Hiệu lực thi hành\nNghị định này có hiệu lực thi hành từ ngày 01 tháng 7 năm 2022 và bãi bỏ khoản 3 Điều 5 Nghị định số 51/2010/NĐ-CP.",
           "chars": 195,
           "approx_tokens": 65
          }
         ],
         "notes": [
          "Text is normalised to Unicode NFC. Lines inside quotation marks (amending text) are not parsed as structure."
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-nd30-check": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Decree 30/2020 Document Format Checker",
    "description": "Upload a .docx administrative document (quyết định, công văn, thông báo, tờ trình…) and the API checks it against Nghị định 30/2020/NĐ-CP, Phụ lục I: A4 paper in portrait, margins (top and bottom 20–25 mm, left 30–35 mm, right 15–20 mm), Times New Roman everywhere, and the size, bold, italic and capitals of each element: Quốc hiệu (12–13, bold, capitals), Tiêu ngữ (13–14, bold), parent and issuing agency, number and symbol (13), place and date (13–14, italic), document type (13–14, bold, capitals), subject line, \"V/v\" line, \"Kính gửi\", body (13–14, justified, line spacing single to 1.5, first-line indent 1–1.27 cm, ≥ 6 pt between paragraphs), signer title and name (13–14, bold), \"Nơi nhận\" (12, bold italic) and its list (11). It also checks leading zeros in numbers and dates and the page number position.\n\nFonts and sizes are resolved like Word does: direct formatting, paragraph and character styles, document defaults and theme fonts. Elements are found heuristically from their text (CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM, \"Số:\", \"…, ngày … tháng … năm …\", \"Nơi nhận:\"…), including inside the usual two-column header tables; each element reports its paragraph index, measured values and the rule, and `detection_confidence` warns when few elements were recognised.\n\nFindings have a severity (error, warning, info) and an English and Vietnamese message. The file is processed in memory and not stored. Old .doc files must be saved as .docx first.\n\nDocs: https://apibox.io.vn/docs/vn-nd30-check/",
    "operationId": "vnNd30CheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-nd30-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .docx document (multipart `file`, raw body, or `file_base64`)."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "page": {
           "type": "object",
           "properties": {
            "width_mm": {
             "type": "number"
            },
            "height_mm": {
             "type": "number"
            },
            "orientation": {
             "type": "string"
            },
            "margins_mm": {
             "type": "object",
             "properties": {
              "top": {
               "type": "number"
              },
              "bottom": {
               "type": "number"
              },
              "left": {
               "type": "number"
              },
              "right": {
               "type": "number"
              }
             }
            }
           }
          },
          "fonts": {
           "type": "object",
           "properties": {
            "Arial": {
             "type": "number"
            }
           }
          },
          "elements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "element": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "found": {
              "type": "boolean"
             },
             "paragraphs": {
              "type": "array"
             },
             "text": {
              "type": "string"
             },
             "measured": {
              "type": "object",
              "properties": {}
             },
             "required": {
              "type": "object",
              "properties": {}
             },
             "ok": {
              "type": "boolean"
             },
             "issues": {
              "type": "array"
             }
            }
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "element": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "rule": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "paragraph": {
              "type": "number"
             },
             "text": {
              "type": "string"
             }
            }
           }
          },
          "summary": {
           "type": "object",
           "properties": {
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "infos": {
             "type": "number"
            },
            "elements_found": {
             "type": "number"
            },
            "compliant": {
             "type": "boolean"
            },
            "detection_confidence": {
             "type": "string"
            }
           }
          },
          "paragraphs": {
           "type": "number"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "page": {
          "width_mm": 215.9,
          "height_mm": 279.4,
          "orientation": "portrait",
          "margins_mm": {
           "top": 25.4,
           "bottom": 25.4,
           "left": 25.4,
           "right": 25.4
          }
         },
         "fonts": {
          "Arial": 574
         },
         "elements": [
          {
           "element": "quoc_hieu",
           "name_vi": "Quốc hiệu",
           "name_en": "National title",
           "found": true,
           "paragraphs": [
            3
           ],
           "text": "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM",
           "measured": {
            "size_pt": [
             14
            ],
            "bold_share": 1,
            "italic_share": 0,
            "uppercase": true
           },
           "required": {
            "size_pt": [
             12,
             13
            ],
            "bold": true,
            "italic": false,
            "uppercase": true
           },
           "ok": false,
           "issues": [
            "size"
           ]
          },
          {
           "element": "dia_danh_ngay",
           "name_vi": "Địa danh và thời điểm ban hành",
           "name_en": "Place and date",
           "found": true,
           "paragraphs": [
            5
           ],
           "text": "Bắc Ninh, ngày 5 tháng 2 năm 2026",
           "measured": {
            "size_pt": [
             13
            ],
            "bold_share": 0,
            "italic_share": 0,
            "uppercase": false
           },
           "required": {
            "size_pt": [
             13,
             14
            ],
            "italic": true
           },
           "ok": false,
           "issues": [
            "italic"
           ]
          },
          {
           "element": "noi_dung",
           "name_vi": "Nội dung",
           "name_en": "Body text",
           "found": true,
           "paragraphs": [
            8,
            9,
            10
           ],
           "text": "Căn cứ Nghị định số 30/2020/NĐ-CP ngày 05 tháng 3 năm 2020 của Chính phủ về công tác văn thư; | Điều 1. Ban hành kèm theo Quyết định này Quy chế làm việc của Sở Tài chính tỉnh Bắc Ninh, áp dụng cho to",
           "measured": {
            "size_pt": [
             12
            ],
            "bold_share": 0,
            "italic_share": 0,
            "uppercase": false
           },
           "required": {
            "size_pt": [
             13,
             14
            ],
            "italic": false
           },
           "ok": false,
           "issues": [
            "size"
           ]
          }
         ],
         "findings": [
          {
           "element": "page",
           "severity": "error",
           "rule": "paper_a4",
           "en": "Paper is not A4 (210 × 297 mm): 215.9 × 279.4 mm.",
           "vi": "Khổ giấy không phải A4 (210 × 297 mm): 215.9 × 279.4 mm."
          },
          {
           "element": "page",
           "severity": "error",
           "rule": "margin_top",
           "en": "Top margin 25.4 mm; required 20–25 mm.",
           "vi": "Lề trên 25.4 mm; quy định 20–25 mm."
          },
          {
           "element": "page",
           "severity": "error",
           "rule": "margin_bottom",
           "en": "Bottom margin 25.4 mm; required 20–25 mm.",
           "vi": "Lề dưới 25.4 mm; quy định 20–25 mm."
          },
          {
           "element": "page",
           "severity": "error",
           "rule": "margin_left",
           "en": "Left margin 25.4 mm; required 30–35 mm.",
           "vi": "Lề trái 25.4 mm; quy định 30–35 mm."
          },
          {
           "element": "page",
           "severity": "error",
           "rule": "margin_right",
           "en": "Right margin 25.4 mm; required 15–20 mm.",
           "vi": "Lề phải 25.4 mm; quy định 15–20 mm."
          },
          {
           "element": "font",
           "severity": "error",
           "rule": "times_new_roman",
           "en": "Font must be Times New Roman (Unicode TCVN 6909:2001). Other fonts used: Arial (574 chars).",
           "vi": "Phông chữ phải là Times New Roman (bộ mã Unicode TCVN 6909:2001). Đang dùng phông khác: Arial (574 ký tự)."
          },
          {
           "element": "quoc_hieu",
           "severity": "error",
           "rule": "font_size",
           "en": "National title: font size 14 pt; required 12–13 pt.",
           "vi": "Quốc hiệu: cỡ chữ 14; quy định 12–13.",
           "paragraph": 3,
           "text": "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM"
          }
         ],
         "summary": {
          "errors": 8,
          "warnings": 4,
          "infos": 1,
          "elements_found": 13,
          "compliant": false,
          "detection_confidence": "high"
         },
         "paragraphs": 17,
         "notes": [
          "Elements are detected heuristically from text patterns; documents laid out in unusual tables may be mis-detected (see detection_confidence)."
         ],
         "legal": [
          {
           "ref": "Nghị định 30/2020/NĐ-CP, Phụ lục I và III",
           "effective_from": "2020-03-05",
           "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=199279"
          }
         ],
         "disclaimer": "Reference check, not an official verification; check the official text.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-company-name": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Company Name Checker",
    "description": "Send a proposed Vietnamese company `name` and the API splits it into the type of enterprise (Công ty TNHH, Công ty cổ phần, Công ty hợp danh, Doanh nghiệp tư nhân, with their legal abbreviations) and the proper name, then checks the rules of the Law on Enterprises 2020 (unchanged by the 2025 amendment): the type element is present (art. 37), only letters of the Vietnamese alphabet, F, J, Z, W, digits and symbols (art. 37), no names of state bodies, armed forces or political organisations (art. 38), no offensive words (heuristic list), the foreign-language name in Latin letters with a type, and the abbreviation (art. 39). It suggests an English name and an abbreviation.\n\nWith `compare_with` (a registered name you know of) it applies the cases of art. 41: identical names, names that read the same (spelling variants such as ph / f, i / y, spaces), the same proper name with another type, the same abbreviation or foreign name, names that differ only by a number, ordinal or letter, by symbols (&, và, ., +, -, _), by \"tân\" / \"mới\", or by a region (\"miền Bắc\"…). `subsidiary=true` applies the exception of art. 41(3) for subsidiaries. Similarity scores come from the fuzzy-match engine with Vietnamese accent folding.\n\nIt does NOT search the National Business Registration Portal: check there before filing. The business registration office makes the final decision.\n\nDocs: https://apibox.io.vn/docs/vn-company-name/",
    "operationId": "vnCompanyNameGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-company-name/"
    },
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": true,
      "description": "Proposed Vietnamese name, e.g. \"Công ty TNHH Thương mại Hoàng Long\".",
      "schema": {
       "type": "string"
      },
      "example": "Công ty TNHH Hoàng Long 2"
     },
     {
      "name": "compare_with",
      "in": "query",
      "required": false,
      "description": "A registered name to compare with (art. 41).",
      "schema": {
       "type": "string"
      },
      "example": "Công ty TNHH Hoàng Long"
     },
     {
      "name": "english_name",
      "in": "query",
      "required": false,
      "description": "Proposed foreign-language name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "abbreviation",
      "in": "query",
      "required": false,
      "description": "Proposed abbreviated name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare_english_name",
      "in": "query",
      "required": false,
      "description": "Foreign name of the registered company.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare_abbreviation",
      "in": "query",
      "required": false,
      "description": "Abbreviated name of the registered company.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "subsidiary",
      "in": "query",
      "required": false,
      "description": "The new company is a subsidiary of the registered one (art. 41(3)).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "type": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "proper_name": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "severity": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "legal": {
              "type": "string"
             }
            }
           }
          },
          "suggestions": {
           "type": "object",
           "properties": {
            "english_name": {
             "type": "string"
            },
            "abbreviation": {
             "type": "string"
            },
            "initials": {
             "type": "string"
            }
           }
          },
          "comparison": {
           "type": "object",
           "properties": {
            "compare_with": {
             "type": "string"
            },
            "proper_name_a": {
             "type": "string"
            },
            "proper_name_b": {
             "type": "string"
            },
            "verdict": {
             "type": "string"
            },
            "cases": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "similarity": {
             "type": "object",
             "properties": {
              "combined": {
               "type": "number"
              },
              "levenshtein": {
               "type": "number"
              },
              "jaro_winkler": {
               "type": "number"
              },
              "token_sort": {
               "type": "number"
              },
              "token_set": {
               "type": "number"
              },
              "trigram": {
               "type": "number"
              }
             }
            },
            "normalized": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "note": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "name": "Công ty TNHH Hoàng Long 2",
         "type": {
          "key": "llc",
          "vi": "Công ty TNHH",
          "en": "Limited Liability Company"
         },
         "proper_name": "Hoàng Long 2",
         "valid": true,
         "errors": 0,
         "warnings": 0,
         "checks": [
          {
           "rule": "type_element",
           "ok": true,
           "severity": "info",
           "en": "Type of enterprise: Công ty TNHH.",
           "vi": "Loại hình doanh nghiệp: Công ty TNHH.",
           "legal": "Luật Doanh nghiệp 2020 Điều 37 khoản 1"
          },
          {
           "rule": "proper_name",
           "ok": true,
           "severity": "info",
           "en": "Proper name: \"Hoàng Long 2\".",
           "vi": "Tên riêng: \"Hoàng Long 2\".",
           "legal": "Luật Doanh nghiệp 2020 Điều 37 khoản 1"
          }
         ],
         "suggestions": {
          "english_name": "HOANG LONG 2 LIMITED LIABILITY COMPANY",
          "abbreviation": "HOANGLONG2 CO., LTD",
          "initials": "HL2"
         },
         "comparison": {
          "compare_with": "Công ty TNHH Hoàng Long",
          "proper_name_a": "Hoàng Long 2",
          "proper_name_b": "Hoàng Long",
          "verdict": "confusingly_similar",
          "cases": [
           {
            "case": "number_or_letter_suffix",
            "legal": "Điều 41 khoản 2 điểm d",
            "en": "Only differs by a number, ordinal or letter right after the proper name (\"2\").",
            "vi": "Tên riêng chỉ khác bởi số tự nhiên, số thứ tự hoặc một chữ cái ngay sau tên riêng (\"2\")."
           }
          ],
          "similarity": {
           "combined": 0.9083,
           "levenshtein": 0.8333,
           "jaro_winkler": 0.9667,
           "token_sort": 0.9091,
           "token_set": 1,
           "trigram": 0.8333
          },
          "normalized": [
           "hoang long 2",
           "hoang long"
          ]
         },
         "notes": [
          "This API does NOT search the National Business Registration Portal (dangkykinhdoanh.gov.vn): duplicates and confusing names can only be checked against names you send in compare_with. Check the portal before filing.",
          "Similarity (\"reads the same\") is a heuristic; the business registration office decides."
         ],
         "legal": [
          {
           "ref": "Luật Doanh nghiệp 2020 (59/2020/QH14), Điều 37–41",
           "effective_from": "2021-01-01",
           "note": "Not changed by Luật 76/2025/QH15 (from 2025-07-01)"
          },
          {
           "ref": "Nghị định 168/2025/NĐ-CP (đăng ký doanh nghiệp)",
           "effective_from": "2025-07-01"
          }
         ],
         "disclaimer": "Reference calculation, not legal advice; check the official text.",
         "disclaimer_vi": "Kết quả tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Company Name Checker",
    "description": "Send a proposed Vietnamese company `name` and the API splits it into the type of enterprise (Công ty TNHH, Công ty cổ phần, Công ty hợp danh, Doanh nghiệp tư nhân, with their legal abbreviations) and the proper name, then checks the rules of the Law on Enterprises 2020 (unchanged by the 2025 amendment): the type element is present (art. 37), only letters of the Vietnamese alphabet, F, J, Z, W, digits and symbols (art. 37), no names of state bodies, armed forces or political organisations (art. 38), no offensive words (heuristic list), the foreign-language name in Latin letters with a type, and the abbreviation (art. 39). It suggests an English name and an abbreviation.\n\nWith `compare_with` (a registered name you know of) it applies the cases of art. 41: identical names, names that read the same (spelling variants such as ph / f, i / y, spaces), the same proper name with another type, the same abbreviation or foreign name, names that differ only by a number, ordinal or letter, by symbols (&, và, ., +, -, _), by \"tân\" / \"mới\", or by a region (\"miền Bắc\"…). `subsidiary=true` applies the exception of art. 41(3) for subsidiaries. Similarity scores come from the fuzzy-match engine with Vietnamese accent folding.\n\nIt does NOT search the National Business Registration Portal: check there before filing. The business registration office makes the final decision.\n\nDocs: https://apibox.io.vn/docs/vn-company-name/",
    "operationId": "vnCompanyNamePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-company-name/"
    },
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": false,
      "description": "Proposed Vietnamese name, e.g. \"Công ty TNHH Thương mại Hoàng Long\".",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare_with",
      "in": "query",
      "required": false,
      "description": "A registered name to compare with (art. 41).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "english_name",
      "in": "query",
      "required": false,
      "description": "Proposed foreign-language name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "abbreviation",
      "in": "query",
      "required": false,
      "description": "Proposed abbreviated name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare_english_name",
      "in": "query",
      "required": false,
      "description": "Foreign name of the registered company.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare_abbreviation",
      "in": "query",
      "required": false,
      "description": "Abbreviated name of the registered company.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "subsidiary",
      "in": "query",
      "required": false,
      "description": "The new company is a subsidiary of the registered one (art. 41(3)).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "type": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "proper_name": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "severity": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "legal": {
              "type": "string"
             }
            }
           }
          },
          "suggestions": {
           "type": "object",
           "properties": {
            "english_name": {
             "type": "string"
            },
            "abbreviation": {
             "type": "string"
            },
            "initials": {
             "type": "string"
            }
           }
          },
          "comparison": {
           "type": "object",
           "properties": {
            "compare_with": {
             "type": "string"
            },
            "proper_name_a": {
             "type": "string"
            },
            "proper_name_b": {
             "type": "string"
            },
            "verdict": {
             "type": "string"
            },
            "cases": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "similarity": {
             "type": "object",
             "properties": {
              "combined": {
               "type": "number"
              },
              "levenshtein": {
               "type": "number"
              },
              "jaro_winkler": {
               "type": "number"
              },
              "token_sort": {
               "type": "number"
              },
              "token_set": {
               "type": "number"
              },
              "trigram": {
               "type": "number"
              }
             }
            },
            "normalized": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "note": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-visa-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Visa Rules by Nationality",
    "description": "Give a `nationality` (ISO code or English / Vietnamese country name) and an optional `entry_date`, `passport_type` and `purpose`, and the API returns the ways to enter Vietnam: unilateral visa exemptions (45 days for 12 countries under Resolution 44/NQ-CP until 14 March 2028, and 45 days for tourism for 12 more European countries under Resolution 229/NQ-CP until 14 August 2028), bilateral exemptions for ordinary passports (ASEAN countries 14–30 days, Chile and Panama 90 days, Kazakhstan, Mongolia, Belarus, Kyrgyzstan 30 days…), agreements for diplomatic and official passports, the e-visa open to all countries (up to 90 days, single or multiple entry, 25 / 50 USD), Phú Quốc (30 days for every nationality) and the special exemption card of Decree 221/2025.\n\nEach option has valid_from / valid_to and its legal basis, and whether it applies on the entry date; the summary gives the longest visa-free stay and when the exemption expires. Without a nationality, the API lists all visa-free countries for the date. Data come from the Ministry of Foreign Affairs list of visa exemptions and the government resolutions, reviewed monthly.\n\nImportant: entry rules change and border officers decide. Always check the Immigration Department (xuatnhapcanh.gov.vn, evisa.gov.vn) or a Vietnamese embassy before travelling.\n\nDocs: https://apibox.io.vn/docs/vn-visa-rules/",
    "operationId": "vnVisaRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-visa-rules/"
    },
    "parameters": [
     {
      "name": "nationality",
      "in": "query",
      "required": false,
      "description": "ISO 3166 alpha-2 / alpha-3 code or country name (English or Vietnamese). Without it, all visa-free countries are listed.",
      "schema": {
       "type": "string"
      },
      "example": "FR"
     },
     {
      "name": "entry_date",
      "in": "query",
      "required": false,
      "description": "Entry date (default today, from 2025-03-15).",
      "schema": {
       "type": "string"
      },
      "example": "2026-12-01"
     },
     {
      "name": "passport_type",
      "in": "query",
      "required": false,
      "description": "`ordinary`, `diplomatic` or `official`.",
      "schema": {
       "type": "string",
       "default": "ordinary"
      }
     },
     {
      "name": "purpose",
      "in": "query",
      "required": false,
      "description": "`tourism`, `business`, `work`, `family`, `official`…",
      "schema": {
       "type": "string",
       "default": "tourism"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "nationality": {
           "type": "object",
           "properties": {
            "alpha2": {
             "type": "string"
            },
            "alpha3": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            }
           }
          },
          "entry_date": {
           "type": "string"
          },
          "passport_type": {
           "type": "string"
          },
          "purpose": {
           "type": "string"
          },
          "visa_free": {
           "type": "boolean"
          },
          "visa_free_days": {
           "type": "number"
          },
          "exemption_expires": {
           "type": "string"
          },
          "recommended": {
           "type": "string"
          },
          "options": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "days": {
              "type": "number"
             },
             "purpose": {
              "type": "string"
             },
             "passports": {
              "type": "string"
             },
             "valid_from": {
              "type": "string"
             },
             "valid_to": {},
             "legal": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "applies_on_entry_date": {
              "type": "boolean"
             },
             "eligible": {
              "type": "boolean"
             },
             "entries": {
              "type": "array"
             },
             "fee_usd": {
              "type": "object"
             },
             "apply_at": {
              "type": "string"
             },
             "processing": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "nationality": {
          "alpha2": "FR",
          "alpha3": "FRA",
          "name": "France",
          "name_vi": "Pháp"
         },
         "entry_date": "2026-12-01",
         "passport_type": "ordinary",
         "purpose": "tourism",
         "visa_free": true,
         "visa_free_days": 45,
         "exemption_expires": "2028-03-14",
         "recommended": "Visa-free up to 45 days; for a longer stay apply for an e-visa (up to 90 days).",
         "options": [
          {
           "type": "unilateral_exemption",
           "days": 45,
           "purpose": "any",
           "passports": "all",
           "valid_from": "2025-03-15",
           "valid_to": "2028-03-14",
           "legal": "Nghị quyết 44/NQ-CP ngày 07/3/2025",
           "note": "British National (Overseas) passports are not covered.",
           "applies_on_entry_date": true,
           "eligible": true
          },
          {
           "type": "phu_quoc",
           "eligible": true,
           "days": 30,
           "legal": "QĐ 80/2013/QĐ-TTg; Luật 47/2014/QH13 (sửa đổi 2019, 2023)",
           "note": "Visa-free for every nationality when Phú Quốc is the place of entry (directly, or staying in the transit area of an international border gate then flying / sailing on to Phú Quốc). Travel to other parts of Vietnam requires a visa.",
           "valid_from": "2014-03-10",
           "valid_to": null
          },
          {
           "type": "e_visa",
           "eligible": true,
           "days": 90,
           "entries": [
            "single",
            "multiple"
           ],
           "fee_usd": {
            "single": 25,
            "multiple": 50
           },
           "apply_at": "https://evisa.gov.vn",
           "processing": "about 3 working days",
           "legal": "Luật 23/2023/QH15; Nghị quyết 127/NQ-CP; Thông tư 62/2023/TT-BTC",
           "note": "Available to citizens of all countries and territories; entry only through designated border gates listed on the e-visa portal.",
           "valid_from": "2023-08-15",
           "valid_to": null
          }
         ],
         "notes": [
          "Passport must be valid at least 6 months from entry; the person must not be in a \"not allowed to enter\" case (Law on Entry, art. 21)."
         ],
         "legal": [
          {
           "ref": "Nghị quyết 44/NQ-CP (07/3/2025)",
           "effective_from": "2025-03-15",
           "effective_to": "2028-03-14"
          },
          {
           "ref": "Nghị quyết 229/NQ-CP (08/8/2025)",
           "effective_from": "2025-08-15",
           "effective_to": "2028-08-14"
          }
         ],
         "disclaimer": "Entry rules change often and border officers decide on entry. Check the Vietnam Immigration Department (xuatnhapcanh.gov.vn / evisa.gov.vn) or a Vietnamese embassy before travelling. Reference only, not legal advice.",
         "disclaimer_vi": "Quy định nhập cảnh thay đổi thường xuyên và việc cho nhập cảnh do cơ quan kiểm soát xuất nhập cảnh quyết định. Hãy kiểm tra với Cục Quản lý xuất nhập cảnh (xuatnhapcanh.gov.vn / evisa.gov.vn) hoặc cơ quan đại diện Việt Nam trước khi đi. Chỉ để tham khảo, không phải tư vấn pháp lý.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-label-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Label Rules",
    "description": "Pick a product group (`group=cosmetics`, `food`, `toy`, `textile`, `electrical_electronic`… 69 groups of Appendix I of Decree 37/2026/NĐ-CP), give an HS code (`hs_code=9503`, mapped to the usual group) or describe the product (`q=nồi cơm điện`), and say whether the goods are made in Vietnam or imported (`origin=domestic|import`). The API lists every field the label must show with its legal source: the general content of Article 42 (name, responsible party or manufacturer + importer, origin) plus the group content of Appendix I (quantity, production date, expiry, ingredients, warnings, year of production…), mandatory phrases such as \"Thực phẩm bảo vệ sức khỏe\", the date rules of Article 46 / Appendix III, the allowed origin wording of Article 47 and, for imports, the auxiliary label (nhãn phụ) rules of Article 40.\n\nSend the label you have as `label` (JSON: `name`, `manufacturer`, `importer`, `origin`, `quantity`, `mfg_date`, `expiry`, `ingredients`, `lot`…) and the response adds a `check`: missing fields, invalid values (dates not in day-month-year order or without 2-digit day and month, a 2-digit year of production, an expiry before the production date, an origin without \"Sản xuất tại / Made in…\" or with a country code on the Vietnamese label) and warnings. For imports it also returns `aux_label_lines`, the Vietnamese sticker text in order, ready for `label-pdf` (template `aux`).\n\nDecree 37/2026/NĐ-CP (23 January 2026) replaced Decrees 43/2017 and 111/2021; labels printed under the old decrees may be used until 23 January 2028. The table is hand-entered from the decree text and reviewed every 6 months. Specialised rules (drugs, food safety, cosmetics notification, vehicles) can add requirements: this is a reference summary, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-label-rules/",
    "operationId": "vnLabelRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-label-rules/"
    },
    "parameters": [
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Product group id (Appendix I), e.g. `food`, `cosmetics`, `toy`, `textile`, `electrical_electronic`, or its number 1–69. Without any parameter the 69 groups are listed.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hs_code",
      "in": "query",
      "required": false,
      "description": "HS code (2–10 digits) to suggest the group.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Product words (Vietnamese or English) to find the group.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "origin",
      "in": "query",
      "required": false,
      "description": "`domestic` or `import` (adds manufacturer + importer and the auxiliary label rules).",
      "schema": {
       "type": "string",
       "default": "domestic"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "no": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "origin": {
           "type": "string"
          },
          "required_fields": {
           "type": "array",
           "items": {}
          },
          "check": {
           "type": "object",
           "properties": {
            "valid": {
             "type": "boolean"
            },
            "missing": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "invalid": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "warnings": {
             "type": "array"
            },
            "present": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "aux_label_lines": {
           "type": "array",
           "items": {}
          },
          "legal": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "replaces": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "reviewed": {
             "type": "string"
            }
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Label Rules",
    "description": "Pick a product group (`group=cosmetics`, `food`, `toy`, `textile`, `electrical_electronic`… 69 groups of Appendix I of Decree 37/2026/NĐ-CP), give an HS code (`hs_code=9503`, mapped to the usual group) or describe the product (`q=nồi cơm điện`), and say whether the goods are made in Vietnam or imported (`origin=domestic|import`). The API lists every field the label must show with its legal source: the general content of Article 42 (name, responsible party or manufacturer + importer, origin) plus the group content of Appendix I (quantity, production date, expiry, ingredients, warnings, year of production…), mandatory phrases such as \"Thực phẩm bảo vệ sức khỏe\", the date rules of Article 46 / Appendix III, the allowed origin wording of Article 47 and, for imports, the auxiliary label (nhãn phụ) rules of Article 40.\n\nSend the label you have as `label` (JSON: `name`, `manufacturer`, `importer`, `origin`, `quantity`, `mfg_date`, `expiry`, `ingredients`, `lot`…) and the response adds a `check`: missing fields, invalid values (dates not in day-month-year order or without 2-digit day and month, a 2-digit year of production, an expiry before the production date, an origin without \"Sản xuất tại / Made in…\" or with a country code on the Vietnamese label) and warnings. For imports it also returns `aux_label_lines`, the Vietnamese sticker text in order, ready for `label-pdf` (template `aux`).\n\nDecree 37/2026/NĐ-CP (23 January 2026) replaced Decrees 43/2017 and 111/2021; labels printed under the old decrees may be used until 23 January 2028. The table is hand-entered from the decree text and reviewed every 6 months. Specialised rules (drugs, food safety, cosmetics notification, vehicles) can add requirements: this is a reference summary, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-label-rules/",
    "operationId": "vnLabelRulesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-label-rules/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "group": {
          "type": "string",
          "description": "Product group id (Appendix I), e.g. `food`, `cosmetics`, `toy`, `textile`, `electrical_electronic`, or its number 1–69. Without any parameter the 69 groups are listed."
         },
         "hs_code": {
          "type": "string",
          "description": "HS code (2–10 digits) to suggest the group."
         },
         "q": {
          "type": "string",
          "description": "Product words (Vietnamese or English) to find the group."
         },
         "origin": {
          "type": "string",
          "default": "domestic",
          "description": "`domestic` or `import` (adds manufacturer + importer and the auxiliary label rules)."
         },
         "label": {
          "type": "object",
          "description": "Label fields to check: name, responsible, manufacturer, importer, origin, quantity, mfg_date, mfg_month_year, mfg_year, expiry, ingredients, warnings, instructions, storage, lot, registration, specs, phrase…"
         }
        }
       },
       "example": {
        "group": "cosmetics",
        "origin": "import",
        "label": {
         "name": "Serum dưỡng da",
         "manufacturer": {
          "name": "ABC Cosmetics Co., Ltd",
          "address": "Seoul, Korea"
         },
         "importer": {
          "name": "Công ty TNHH XYZ",
          "address": "Hà Nội"
         },
         "origin": "Made in KR",
         "quantity": "30 ml",
         "ingredients": "Water, Glycerin",
         "lot": "L2301",
         "expiry": "01/05/2027",
         "instructions": "Thoa lên da"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "no": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "origin": {
           "type": "string"
          },
          "required_fields": {
           "type": "array",
           "items": {}
          },
          "check": {
           "type": "object",
           "properties": {
            "valid": {
             "type": "boolean"
            },
            "missing": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "invalid": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "warnings": {
             "type": "array"
            },
            "present": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "aux_label_lines": {
           "type": "array",
           "items": {}
          },
          "legal": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "replaces": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "reviewed": {
             "type": "string"
            }
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "group": {
          "id": "cosmetics",
          "no": 14,
          "vi": "Mỹ phẩm",
          "en": "Cosmetics",
          "note": "The expiry date is mandatory when the product is stable for less than 30 months."
         },
         "origin": "import",
         "required_fields": [
          {
           "key": "name",
           "required": true,
           "vi": "Tên hàng hóa",
           "en": "Product name",
           "source": "Điều 42 khoản 1 điểm a"
          },
          {
           "key": "manufacturer",
           "required": true,
           "vi": "Tên, địa chỉ tổ chức, cá nhân sản xuất",
           "en": "Manufacturer name and address",
           "source": "Điều 42 khoản 1 điểm b, Điều 44 khoản 2"
          },
          "…"
         ],
         "check": {
          "valid": false,
          "missing": [
           {
            "field": "warnings",
            "vi": "Thông tin, cảnh báo",
            "en": "Warnings",
            "source": "Phụ lục I mục 14"
           }
          ],
          "invalid": [
           {
            "field": "origin",
            "value": "Made in KR",
            "issue": "\"KR\" looks like a country code: on the Vietnamese label the country name is not abbreviated (Điều 39 khoản 1); abbreviations per TCVN 7217-1 are only accepted on the original label of imports (Điều 42 khoản 2)"
           }
          ],
          "warnings": [],
          "present": [
           "name",
           "manufacturer",
           "importer",
           "origin",
           "quantity",
           "ingredients",
           "lot",
           "expiry",
           "instructions"
          ]
         },
         "aux_label_lines": [
          {
           "key": "name",
           "label": "Tên hàng",
           "value": "Serum dưỡng da"
          },
          {
           "key": "manufacturer",
           "label": "Nhà sản xuất",
           "value": "ABC Cosmetics Co., Ltd, Seoul, Korea"
          },
          {
           "key": "importer",
           "label": "Nhập khẩu và phân phối",
           "value": "Công ty TNHH XYZ, Hà Nội"
          },
          {
           "key": "origin",
           "label": "Xuất xứ",
           "value": "Hàn Quốc"
          },
          "…"
         ],
         "legal": {
          "decree": "Nghị định 37/2026/NĐ-CP (quy định chi tiết Luật Chất lượng sản phẩm, hàng hóa), Chương IV, Phụ lục I và III",
          "effective_from": "2026-01-23",
          "replaces": [
           "Nghị định 43/2017/NĐ-CP",
           "Nghị định 111/2021/NĐ-CP"
          ],
          "reviewed": "2026-11-11"
         },
         "disclaimer": "Reference summary, not legal advice; check the official text of Nghị định 37/2026/NĐ-CP and the specialised rules (drugs, food safety, cosmetics…)."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/label-pdf": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Label PDF (thermal printer)",
    "description": "Choose a `template` and a `size` (`100x150`, `100x100`, `76x130`, `75x50`, `50x30`, `a6` or any `WIDTHxHEIGHT` in mm) and send one label as fields or many as `labels` (one page each, `copies` per label, up to 500 pages). Templates: `shipping` (self-delivery waybill: shop / carrier, date, order code as Code 128, receiver in large type, sender, COD amount with the amount in Vietnamese words, weight, contents, note and a QR code), `price` (product name, price in VND, optional crossed-out old price and unit, EAN-13 when the barcode has 12–13 digits, else Code 128), `aux` (Vietnamese auxiliary label of imported goods from the same fields as `vn-label-rules`, with missing mandatory fields reported in `x-warnings`) and `custom` (title, lines, barcode, QR).\n\nText is set in Be Vietnam Pro (full Vietnamese, embedded as a subset) and shrinks to fit the label; barcodes and QR codes are vector shapes, so they print sharp at 203 or 300 dpi. The EAN-13 check digit is verified (12 digits: it is added). The response is `application/pdf`, or JSON with the PDF in base64 with `format=json`. Print at 100 % scale (no \"fit to page\") on the matching label stock.\n\nDocs: https://apibox.io.vn/docs/label-pdf/",
    "operationId": "labelPdfPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/label-pdf/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "template": {
          "type": "string",
          "default": "shipping",
          "description": "`shipping`, `price`, `aux` or `custom` (also per label)."
         },
         "size": {
          "type": "string",
          "default": "100x150",
          "description": "`100x150`, `100x100`, `76x130`, `75x50`, `50x30`, `a6` or WIDTHxHEIGHT in mm."
         },
         "labels": {
          "type": "array",
          "items": {},
          "description": "Labels (one page each). Shipping: sender, receiver {name, phone, address}, order_code, cod, weight (g), items / content, note, shop, date, qr. Price: name, price, old_price, unit, barcode. Aux: group + label fields of vn-label-rules. Custom: title, lines, barcode, qr. `copies` per label."
         },
         "rotate": {
          "type": "boolean",
          "default": false,
          "description": "Swap width and height (landscape)."
         },
         "format": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf` or `json` (base64)."
         }
        }
       },
       "example": {
        "template": "shipping",
        "size": "100x150",
        "labels": [
         {
          "shop": "Shop Hoa Mai",
          "date": "11/11/2026",
          "order_code": "DH20261111-001",
          "sender": {
           "name": "Shop Hoa Mai",
           "phone": "0901234567",
           "address": "12 Nguyễn Huệ, Phường Sài Gòn, TP. Hồ Chí Minh"
          },
          "receiver": {
           "name": "Nguyễn Thị Lan",
           "phone": "0912345678",
           "address": "Số 5 ngõ 12 Phố Huế, Phường Hai Bà Trưng, Hà Nội"
          },
          "cod": 350000,
          "weight": 1200,
          "items": [
           {
            "name": "Áo thun",
            "quantity": 2
           }
          ],
          "note": "Cho xem hàng"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/pdf": {
        "schema": {
         "type": "string",
         "contentMediaType": "application/pdf"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/image-watermark": {
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Image Watermark",
    "description": "Upload an image as multipart `file` (or several files for a batch) with a watermark `text`, a `logo` (PNG with transparency or JPEG) or both. `position` is one of `top-left`, `top`, `top-right`, `left`, `center`, `right`, `bottom-left`, `bottom`, `bottom-right` or `tile` (the watermark repeated over the whole photo in staggered rows, rotated by `rotation`, default 30°). `scale` sets the watermark width as a share of the image width (default 0.3), `opacity` 0–1 or 0–100, `margin` a share of the shorter side, `spacing` the gap between tiles. Text uses Be Vietnam Pro (full Vietnamese) in `color` with a thin contrasting outline (`stroke`, `outline=false` to remove); with a logo and text the text is placed under the logo (`layout=stack`) or separately (`text_position`).\n\nOne image returns the image (same format, or `format=png|jpeg`, `quality`); several images return `watermarked.zip`. `max_width` resizes before watermarking. Limits: 25 megapixels per image, 100 MP and 20 images per request, and your plan's upload size. Images are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/image-watermark/",
    "operationId": "imageWatermarkPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-watermark/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Watermark text (max 200 characters)."
         },
         "position": {
          "type": "string",
          "default": "bottom-right",
          "description": "Corner / edge / `center`, or `tile`."
         },
         "opacity": {
          "type": "number",
          "default": 0.6,
          "description": "0–1 (or 0–100). Default 0.3 for tile."
         },
         "scale": {
          "type": "number",
          "default": 0.3,
          "description": "Watermark width / image width (0.01–1)."
         },
         "margin": {
          "type": "number",
          "default": 0.03,
          "description": "Margin as a share of the shorter side."
         },
         "rotation": {
          "type": "number",
          "description": "Text rotation in degrees (−90…90; default 30 for tile)."
         },
         "color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Text colour (CSS)."
         },
         "format": {
          "type": "string",
          "description": "`same` (default), `jpeg` or `png`."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Image (JPEG / PNG); several files for a batch (any field names except `logo`), or file_base64 / images_base64."
         },
         "text": {
          "type": "string",
          "description": "Watermark text (max 200 characters)."
         },
         "logo": {
          "type": "string",
          "format": "binary",
          "description": "Logo image (PNG with transparency or JPEG)."
         },
         "position": {
          "type": "string",
          "default": "bottom-right",
          "description": "Corner / edge / `center`, or `tile`."
         },
         "opacity": {
          "type": "number",
          "default": 0.6,
          "description": "0–1 (or 0–100). Default 0.3 for tile."
         },
         "scale": {
          "type": "number",
          "default": 0.3,
          "description": "Watermark width / image width (0.01–1)."
         },
         "margin": {
          "type": "number",
          "default": 0.03,
          "description": "Margin as a share of the shorter side."
         },
         "rotation": {
          "type": "number",
          "description": "Text rotation in degrees (−90…90; default 30 for tile)."
         },
         "color": {
          "type": "string",
          "default": "#ffffff",
          "description": "Text colour (CSS)."
         },
         "format": {
          "type": "string",
          "description": "`same` (default), `jpeg` or `png`."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "image/jpeg": {
        "schema": {
         "type": "string",
         "contentMediaType": "image/jpeg"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-cod-reconcile": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "COD Reconciliation (Vietnam)",
    "description": "Upload the carrier's COD statement (bảng đối soát) as multipart `statement` (XLSX or CSV; several files allowed) or send `statement_rows` as JSON, plus your order list as `orders` (file or JSON array with an order code and / or tracking number and the expected COD). Columns are recognised from their header names in Vietnamese or English, accents ignored (\"Mã vận đơn\", \"Mã đơn shop\", \"Tiền thu hộ\", \"Phí vận chuyển\", \"Phí hoàn\", \"Thực nhận\", \"Waybill No.\", \"COD Amount\"…), with the header row found anywhere in the first 40 rows and total rows skipped. The carrier is recognised from the header / file name or from the tracking-number formats of `tracking-detect`.\n\nThe response gives totals (COD, shipping fee, COD fee, return fee, insurance, other fees, expected payout = COD − fees, stated payout), per-row checks (payout ≠ COD − fees, returned orders without a return fee), duplicates, and with `orders`: matched orders, amount mismatches (`cod_short`, `cod_over`, COD on a returned order, a shipping fee that differs from yours), orders missing from the statement and statement rows missing from your orders. `bank_amount` compares the bank transfer with the statement payout; `tolerance` allows small rounding differences.\n\nCarrier export layouts change: unknown headers are reported in `columns`, and `statement_rows` lets you map columns yourself. Files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/vn-cod-reconcile/",
    "operationId": "vnCodReconcilePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-cod-reconcile/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "carrier": {
          "type": "string",
          "description": "Force the carrier: ghn, ghtk, spx, jt, viettelpost, ninjavan."
         },
         "bank_amount": {
          "type": "number",
          "description": "Amount received by bank transfer, compared with the statement payout."
         },
         "tolerance": {
          "type": "number",
          "default": 0,
          "description": "Allowed difference in VND."
         },
         "include_matched": {
          "type": "boolean",
          "default": false,
          "description": "Also list matched orders."
         }
        }
       },
       "example": {
        "carrier": "ghn",
        "statement_rows": [
         {
          "Mã đơn GHN": "GAB12CD3",
          "Mã đơn shop": "DH001",
          "Tiền thu hộ": 350000,
          "Phí vận chuyển": 22000,
          "Thực nhận": 328000
         },
         {
          "Mã đơn GHN": "GAB12CD4",
          "Mã đơn shop": "DH002",
          "Tiền thu hộ": 199000,
          "Phí vận chuyển": 22000,
          "Thực nhận": 177000
         }
        ],
        "orders": [
         {
          "order_code": "DH001",
          "cod": 350000
         },
         {
          "order_code": "DH002",
          "cod": 250000
         },
         {
          "order_code": "DH003",
          "cod": 120000
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "statement": {
          "type": "string",
          "format": "binary",
          "description": "Carrier COD statement (XLSX / CSV); statement2… for more files. Or `statement_rows` (JSON array of row objects)."
         },
         "orders": {
          "type": "string",
          "format": "binary",
          "description": "Your orders: file (XLSX / CSV) or JSON array of {order_code, tracking, cod, shipping_fee}."
         },
         "carrier": {
          "type": "string",
          "description": "Force the carrier: ghn, ghtk, spx, jt, viettelpost, ninjavan."
         },
         "bank_amount": {
          "type": "number",
          "description": "Amount received by bank transfer, compared with the statement payout."
         },
         "tolerance": {
          "type": "number",
          "default": 0,
          "description": "Allowed difference in VND."
         },
         "include_matched": {
          "type": "boolean",
          "default": false,
          "description": "Also list matched orders."
         }
        },
        "required": [
         "statement"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "statements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "carrier": {
              "type": "string"
             },
             "carrier_name": {
              "type": "string"
             },
             "carrier_detected_by": {
              "type": "string"
             },
             "header_row": {
              "type": "number"
             },
             "columns": {
              "type": "object"
             },
             "rows": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "rows": {
             "type": "number"
            },
            "delivered": {
             "type": "number"
            },
            "returned": {
             "type": "number"
            },
            "cod": {
             "type": "number"
            },
            "shipping_fee": {
             "type": "number"
            },
            "cod_fee": {
             "type": "number"
            },
            "return_fee": {
             "type": "number"
            },
            "insurance_fee": {
             "type": "number"
            },
            "other_fee": {
             "type": "number"
            },
            "total_fees": {
             "type": "number"
            },
            "expected_payout": {
             "type": "number"
            },
            "stated_payout": {
             "type": "number"
            }
           }
          },
          "reconciliation": {
           "type": "object",
           "properties": {
            "summary": {
             "type": "object",
             "properties": {
              "orders": {
               "type": "number"
              },
              "statement_rows": {
               "type": "number"
              },
              "matched": {
               "type": "number"
              },
              "amount_mismatch": {
               "type": "number"
              },
              "missing_in_statement": {
               "type": "number"
              },
              "missing_in_orders": {
               "type": "number"
              },
              "duplicates": {
               "type": "number"
              },
              "cod_short_total": {
               "type": "number"
              }
             }
            },
            "amount_mismatch": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "missing_in_statement": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "missing_in_orders": {
             "type": "array"
            }
           }
          },
          "privacy": {
           "type": "string"
          }
         }
        },
        "example": {
         "statements": [
          {
           "name": "ghn",
           "carrier": "ghn",
           "carrier_name": "Giao Hàng Nhanh (GHN)",
           "carrier_detected_by": "parameter",
           "header_row": 1,
           "columns": {
            "tracking": "Mã đơn GHN",
            "order_code": "Mã đơn shop",
            "cod": "Tiền thu hộ",
            "shipping_fee": "Phí vận chuyển",
            "payout": "Thực nhận"
           },
           "rows": 2
          }
         ],
         "totals": {
          "rows": 2,
          "delivered": 2,
          "returned": 0,
          "cod": 549000,
          "shipping_fee": 44000,
          "cod_fee": 0,
          "return_fee": 0,
          "insurance_fee": 0,
          "other_fee": 0,
          "total_fees": 44000,
          "expected_payout": 505000,
          "stated_payout": 505000
         },
         "reconciliation": {
          "summary": {
           "orders": 3,
           "statement_rows": 2,
           "matched": 1,
           "amount_mismatch": 1,
           "missing_in_statement": 1,
           "missing_in_orders": 0,
           "duplicates": 0,
           "cod_short_total": 51000
          },
          "amount_mismatch": [
           {
            "tracking": "GAB12CD4",
            "order_code": "DH002",
            "cod_statement": 199000,
            "cod_expected": 250000,
            "fees": 22000,
            "payout": 177000,
            "status": null,
            "issues": [
             "cod_short"
            ],
            "difference": -51000
           }
          ],
          "missing_in_statement": [
           {
            "tracking": null,
            "order_code": "DH003",
            "cod_expected": 120000,
            "status": null,
            "row": 4
           }
          ],
          "missing_in_orders": []
         },
         "privacy": "Files are processed in memory and not stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cargo-load": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "CBM & Container Loading",
    "description": "Give the carton size (`length`, `width`, `height` in `unit` cm, mm, m or in), `weight` per carton and `quantity`, or a list of carton types in `cartons`. The API returns the volume (CBM) per carton and in total, gross weight and chargeable weight for air (cm³ / 6000, `air_divisor`), express couriers (cm³ / 5000, `express_divisor`), sea LCL (freight tons, 1 CBM = 1000 kg) and road (1 CBM = 333 kg), each with whether volume or weight decides.\n\nAdd `container` (`20gp`, `40gp`, `40hc`, `45hc` or `all`) or `pallet` (`eur` 1200 × 800, `standard` 1200 × 1000, `us`, `asia`; `max_height` incl. the pallet, default 180 cm, `max_weight`) to plan the loading. For one carton type it tries the six orientations (two with `upright=true`, limited by `max_stack`), fills the leftover length at the door with the best other orientation, and returns the maximum count, whether space or payload limits it, cartons per layer, the layer plan, volume and weight utilisation, and how many containers / pallets the quantity needs. Several carton types are packed with a first-fit-decreasing layer heuristic, marked `estimate: true`.\n\nContainer internal sizes and payloads are typical published values; real boxes vary by maker and leave gaps, so keep a margin of 5–10 %.\n\nDocs: https://apibox.io.vn/docs/cargo-load/",
    "operationId": "cargoLoadGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cargo-load/"
    },
    "parameters": [
     {
      "name": "length",
      "in": "query",
      "required": true,
      "description": "Carton length (outer).",
      "schema": {
       "type": "number"
      },
      "example": 60
     },
     {
      "name": "width",
      "in": "query",
      "required": true,
      "description": "Carton width.",
      "schema": {
       "type": "number"
      },
      "example": 40
     },
     {
      "name": "height",
      "in": "query",
      "required": true,
      "description": "Carton height.",
      "schema": {
       "type": "number"
      },
      "example": 40
     },
     {
      "name": "weight",
      "in": "query",
      "required": false,
      "description": "Gross weight per carton (`weight_unit` kg, g, lb).",
      "schema": {
       "type": "number"
      },
      "example": 12
     },
     {
      "name": "quantity",
      "in": "query",
      "required": false,
      "description": "Number of cartons.",
      "schema": {
       "type": "number"
      },
      "example": 300
     },
     {
      "name": "unit",
      "in": "query",
      "required": false,
      "description": "`mm`, `cm`, `m` or `in`.",
      "schema": {
       "type": "string",
       "default": "cm"
      }
     },
     {
      "name": "container",
      "in": "query",
      "required": false,
      "description": "`20gp`, `40gp`, `40hc`, `45hc` or `all`.",
      "schema": {
       "type": "string"
      },
      "example": "20gp"
     },
     {
      "name": "pallet",
      "in": "query",
      "required": false,
      "description": "`eur`, `standard`, `us` or `asia` (with `max_height`, `max_weight`, `overhang`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "upright",
      "in": "query",
      "required": false,
      "description": "Keep cartons upright (no tipping).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "air_divisor",
      "in": "query",
      "required": false,
      "description": "Air volumetric divisor (cm³/kg).",
      "schema": {
       "type": "number",
       "default": 6000
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "total_cbm": {
           "type": "number"
          },
          "total_gross_weight_kg": {
           "type": "number"
          },
          "cartons": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "cbm_each": {
              "type": "number"
             },
             "cbm_total": {
              "type": "number"
             },
             "weight_total_kg": {
              "type": "number"
             },
             "volumetric_air_kg_each": {
              "type": "number"
             },
             "volumetric_express_kg_each": {
              "type": "number"
             }
            }
           }
          },
          "chargeable": {
           "type": "object",
           "properties": {
            "air": {
             "type": "object",
             "properties": {
              "divisor": {
               "type": "number"
              },
              "volumetric_kg": {
               "type": "number"
              },
              "chargeable_kg": {
               "type": "number"
              },
              "basis": {
               "type": "string"
              },
              "rule": {
               "type": "string"
              }
             }
            },
            "express": {
             "type": "object",
             "properties": {
              "divisor": {
               "type": "number"
              },
              "volumetric_kg": {
               "type": "number"
              },
              "chargeable_kg": {
               "type": "number"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "sea_lcl": {
             "type": "object",
             "properties": {
              "kg_per_cbm": {
               "type": "number"
              },
              "revenue_tons": {
               "type": "number"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "road": {
             "type": "object",
             "properties": {
              "kg_per_cbm": {
               "type": "number"
              },
              "chargeable_kg": {
               "type": "number"
              }
             }
            }
           }
          },
          "loading": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "kind": {
             "type": "string"
            },
            "internal_mm": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "volume_cbm": {
             "type": "number"
            },
            "max_payload_kg": {
             "type": "number"
            },
            "max_cartons": {
             "type": "number"
            },
            "limited_by": {
             "type": "string"
            },
            "max_by_space": {
             "type": "number"
            },
            "max_by_weight": {
             "type": "number"
            },
            "per_layer": {
             "type": "number"
            },
            "layer_plan": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "quantity": {
             "type": "number"
            },
            "loaded": {
             "type": "number"
            },
            "remaining": {
             "type": "number"
            },
            "units_needed": {
             "type": "number"
            },
            "utilisation_volume_pct": {
             "type": "number"
            },
            "utilisation_weight_pct": {
             "type": "number"
            },
            "loaded_weight_kg": {
             "type": "number"
            },
            "estimate": {
             "type": "boolean"
            }
           }
          }
         }
        },
        "example": {
         "total_cbm": 28.8,
         "total_gross_weight_kg": 3600,
         "cartons": [
          {
           "name": "carton 1",
           "quantity": 300,
           "cbm_each": 0.096,
           "cbm_total": 28.8,
           "weight_total_kg": 3600,
           "volumetric_air_kg_each": 16,
           "volumetric_express_kg_each": 19.2
          }
         ],
         "chargeable": {
          "air": {
           "divisor": 6000,
           "volumetric_kg": 4800,
           "chargeable_kg": 4800,
           "basis": "volume",
           "rule": "cm³ / 6000 (IATA 1:6000 = 167 kg/m³)"
          },
          "express": {
           "divisor": 5000,
           "volumetric_kg": 5760,
           "chargeable_kg": 5760,
           "basis": "volume"
          },
          "sea_lcl": {
           "kg_per_cbm": 1000,
           "revenue_tons": 28.8,
           "basis": "volume"
          },
          "road": {
           "kg_per_cbm": 333,
           "chargeable_kg": 9590.4
          }
         },
         "loading": {
          "id": "20gp",
          "name": "20' standard (20GP / 20DC)",
          "kind": "container",
          "internal_mm": [
           5898,
           2352,
           2393
          ],
          "volume_cbm": 33.2,
          "max_payload_kg": 28200,
          "max_cartons": 240,
          "limited_by": "space",
          "max_by_space": 240,
          "max_by_weight": 2350,
          "per_layer": 48,
          "layer_plan": [
           {
            "orientation": "L×W×H",
            "box_mm": [
             600,
             400,
             400
            ],
            "along_length": 9,
            "across_width": 5,
            "layers": 5,
            "count": 225
           },
           {
            "orientation": "W×L×H",
            "box_mm": [
             400,
             600,
             400
            ],
            "along_length": 1,
            "across_width": 3,
            "layers": 5,
            "count": 15,
            "note": "fills the remaining length at the door end"
           }
          ],
          "quantity": 300,
          "loaded": 240,
          "remaining": 60,
          "units_needed": 2,
          "utilisation_volume_pct": 69.41,
          "utilisation_weight_pct": 10.21,
          "loaded_weight_kg": 2880,
          "estimate": false
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "CBM & Container Loading",
    "description": "Give the carton size (`length`, `width`, `height` in `unit` cm, mm, m or in), `weight` per carton and `quantity`, or a list of carton types in `cartons`. The API returns the volume (CBM) per carton and in total, gross weight and chargeable weight for air (cm³ / 6000, `air_divisor`), express couriers (cm³ / 5000, `express_divisor`), sea LCL (freight tons, 1 CBM = 1000 kg) and road (1 CBM = 333 kg), each with whether volume or weight decides.\n\nAdd `container` (`20gp`, `40gp`, `40hc`, `45hc` or `all`) or `pallet` (`eur` 1200 × 800, `standard` 1200 × 1000, `us`, `asia`; `max_height` incl. the pallet, default 180 cm, `max_weight`) to plan the loading. For one carton type it tries the six orientations (two with `upright=true`, limited by `max_stack`), fills the leftover length at the door with the best other orientation, and returns the maximum count, whether space or payload limits it, cartons per layer, the layer plan, volume and weight utilisation, and how many containers / pallets the quantity needs. Several carton types are packed with a first-fit-decreasing layer heuristic, marked `estimate: true`.\n\nContainer internal sizes and payloads are typical published values; real boxes vary by maker and leave gaps, so keep a margin of 5–10 %.\n\nDocs: https://apibox.io.vn/docs/cargo-load/",
    "operationId": "cargoLoadPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cargo-load/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "length": {
          "type": "number",
          "description": "Carton length (outer)."
         },
         "width": {
          "type": "number",
          "description": "Carton width."
         },
         "height": {
          "type": "number",
          "description": "Carton height."
         },
         "weight": {
          "type": "number",
          "description": "Gross weight per carton (`weight_unit` kg, g, lb)."
         },
         "quantity": {
          "type": "number",
          "description": "Number of cartons."
         },
         "cartons": {
          "type": "array",
          "items": {},
          "description": "Several carton types: [{name, length, width, height, weight, quantity, upright, max_stack}]."
         },
         "unit": {
          "type": "string",
          "default": "cm",
          "description": "`mm`, `cm`, `m` or `in`."
         },
         "container": {
          "type": "string",
          "description": "`20gp`, `40gp`, `40hc`, `45hc` or `all`."
         },
         "pallet": {
          "type": "string",
          "description": "`eur`, `standard`, `us` or `asia` (with `max_height`, `max_weight`, `overhang`)."
         },
         "upright": {
          "type": "boolean",
          "default": false,
          "description": "Keep cartons upright (no tipping)."
         },
         "air_divisor": {
          "type": "number",
          "default": 6000,
          "description": "Air volumetric divisor (cm³/kg)."
         }
        },
        "required": [
         "length",
         "width",
         "height"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "total_cbm": {
           "type": "number"
          },
          "total_gross_weight_kg": {
           "type": "number"
          },
          "cartons": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "cbm_each": {
              "type": "number"
             },
             "cbm_total": {
              "type": "number"
             },
             "weight_total_kg": {
              "type": "number"
             },
             "volumetric_air_kg_each": {
              "type": "number"
             },
             "volumetric_express_kg_each": {
              "type": "number"
             }
            }
           }
          },
          "chargeable": {
           "type": "object",
           "properties": {
            "air": {
             "type": "object",
             "properties": {
              "divisor": {
               "type": "number"
              },
              "volumetric_kg": {
               "type": "number"
              },
              "chargeable_kg": {
               "type": "number"
              },
              "basis": {
               "type": "string"
              },
              "rule": {
               "type": "string"
              }
             }
            },
            "express": {
             "type": "object",
             "properties": {
              "divisor": {
               "type": "number"
              },
              "volumetric_kg": {
               "type": "number"
              },
              "chargeable_kg": {
               "type": "number"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "sea_lcl": {
             "type": "object",
             "properties": {
              "kg_per_cbm": {
               "type": "number"
              },
              "revenue_tons": {
               "type": "number"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "road": {
             "type": "object",
             "properties": {
              "kg_per_cbm": {
               "type": "number"
              },
              "chargeable_kg": {
               "type": "number"
              }
             }
            }
           }
          },
          "loading": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "kind": {
             "type": "string"
            },
            "internal_mm": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "volume_cbm": {
             "type": "number"
            },
            "max_payload_kg": {
             "type": "number"
            },
            "max_cartons": {
             "type": "number"
            },
            "limited_by": {
             "type": "string"
            },
            "max_by_space": {
             "type": "number"
            },
            "max_by_weight": {
             "type": "number"
            },
            "per_layer": {
             "type": "number"
            },
            "layer_plan": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "quantity": {
             "type": "number"
            },
            "loaded": {
             "type": "number"
            },
            "remaining": {
             "type": "number"
            },
            "units_needed": {
             "type": "number"
            },
            "utilisation_volume_pct": {
             "type": "number"
            },
            "utilisation_weight_pct": {
             "type": "number"
            },
            "loaded_weight_kg": {
             "type": "number"
            },
            "estimate": {
             "type": "boolean"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/gs1-parse": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "GS1 Parser & Digital Link",
    "description": "Send `data` as the human-readable form `(01)09520123456788(17)261231(10)ABC123`, as raw scanner output with GS separators (ASCII 29, or `<GS>`, `{GS}`, `\\x1d`, a custom `separator`; a `]C1` / `]d2` / `]Q3` symbology prefix is recognised) or as a GS1 Digital Link URI (`https://id.gs1.org/01/09520123456788/10/ABC123?17=261231`, any domain and path prefix). Each Application Identifier is looked up in the GS1 General Specifications table (over 700 AI entries incl. the decimal families 310n–369n and 390n–395n): fixed or variable length, digits or GS1 character sets, check digits of GTIN / SSCC / GLN, YYMMDD dates with the GS1 century rule and day 00 = last day of the month, decimals and units (`3103` 001234 → 1.234 kg), currency AIs.\n\nThe response lists every element with its title, value, validity and decoded `date` / `number`, a simple `values` map, GS1 association checks (e.g. (21) needs (01)), the GS1 prefix of a GTIN, and the same data rebuilt as human-readable text, element string (predefined-length AIs first, GS where needed), `]C1` GS1-128 data and a GS1 Digital Link URI (primary key and qualifiers in the path in the standard order, other AIs in the query; `domain` to use your own resolver). `ais` builds from a JSON object ({\"01\": \"…\", \"10\": \"…\", \"17\": \"…\"}).\n\nUse it after `barcode-read` to decode medicine, food and logistics labels, or to make the Digital Link for a traceability QR code (Vietnam TT 02/2024/TT-BKHCN).\n\nDocs: https://apibox.io.vn/docs/gs1-parse/",
    "operationId": "gs1ParseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/gs1-parse/"
    },
    "parameters": [
     {
      "name": "data",
      "in": "query",
      "required": true,
      "description": "GS1 data: \"(01)…(17)…\", raw element string with GS separators, or a Digital Link URI.",
      "schema": {
       "type": "string"
      },
      "example": "(01)09520123456788(17)261200(10)ABC123(3103)001234"
     },
     {
      "name": "separator",
      "in": "query",
      "required": false,
      "description": "Extra character / text used as GS by your scanner.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "Resolver domain for the Digital Link that is built.",
      "schema": {
       "type": "string",
       "default": "https://id.gs1.org"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "elements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ai": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "value": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "check_digit": {
              "type": "object"
             },
             "indicator_digit": {
              "type": "number"
             },
             "gtin13": {
              "type": "string"
             },
             "gs1_prefix": {
              "type": "object"
             },
             "date": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "decimals": {
              "type": "number"
             },
             "number": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             }
            }
           }
          },
          "values": {
           "type": "object",
           "properties": {
            "10": {
             "type": "string"
            },
            "17": {
             "type": "string"
            },
            "3103": {
             "type": "number"
            },
            "01": {
             "type": "string"
            }
           }
          },
          "human_readable": {
           "type": "string"
          },
          "element_string": {
           "type": "string"
          },
          "gs1_128_data": {
           "type": "string"
          },
          "digital_link": {
           "type": "string"
          }
         }
        },
        "example": {
         "form": "human_readable",
         "valid": true,
         "elements": [
          {
           "ai": "01",
           "title": "GTIN",
           "value": "09520123456788",
           "valid": true,
           "check_digit": {
            "value": 8,
            "expected": 8,
            "valid": true
           },
           "indicator_digit": 0,
           "gtin13": "9520123456788",
           "gs1_prefix": {
            "prefix": "952",
            "name": "Demonstrations and examples of the GS1 system",
            "country_code": null,
            "note": "The issuing GS1 member organisation, not the country of manufacture."
           }
          },
          {
           "ai": "17",
           "title": "USE BY OR EXPIRY",
           "value": "261200",
           "valid": true,
           "date": "2026-12-31",
           "note": "Day 00: the last day of the month"
          },
          {
           "ai": "10",
           "title": "BATCH/LOT",
           "value": "ABC123",
           "valid": true
          },
          {
           "ai": "3103",
           "title": "NET WEIGHT (kg)",
           "value": "001234",
           "valid": true,
           "decimals": 3,
           "number": 1.234,
           "unit": "kg"
          }
         ],
         "values": {
          "10": "ABC123",
          "17": "2026-12-31",
          "3103": 1.234,
          "01": "09520123456788"
         },
         "human_readable": "(01)09520123456788(17)261200(3103)001234(10)ABC123",
         "element_string": "010952012345678817261200310300123410ABC123",
         "gs1_128_data": "]C1010952012345678817261200310300123410ABC123",
         "digital_link": "https://id.gs1.org/01/09520123456788/10/ABC123?17=261200&3103=001234"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "GS1 Parser & Digital Link",
    "description": "Send `data` as the human-readable form `(01)09520123456788(17)261231(10)ABC123`, as raw scanner output with GS separators (ASCII 29, or `<GS>`, `{GS}`, `\\x1d`, a custom `separator`; a `]C1` / `]d2` / `]Q3` symbology prefix is recognised) or as a GS1 Digital Link URI (`https://id.gs1.org/01/09520123456788/10/ABC123?17=261231`, any domain and path prefix). Each Application Identifier is looked up in the GS1 General Specifications table (over 700 AI entries incl. the decimal families 310n–369n and 390n–395n): fixed or variable length, digits or GS1 character sets, check digits of GTIN / SSCC / GLN, YYMMDD dates with the GS1 century rule and day 00 = last day of the month, decimals and units (`3103` 001234 → 1.234 kg), currency AIs.\n\nThe response lists every element with its title, value, validity and decoded `date` / `number`, a simple `values` map, GS1 association checks (e.g. (21) needs (01)), the GS1 prefix of a GTIN, and the same data rebuilt as human-readable text, element string (predefined-length AIs first, GS where needed), `]C1` GS1-128 data and a GS1 Digital Link URI (primary key and qualifiers in the path in the standard order, other AIs in the query; `domain` to use your own resolver). `ais` builds from a JSON object ({\"01\": \"…\", \"10\": \"…\", \"17\": \"…\"}).\n\nUse it after `barcode-read` to decode medicine, food and logistics labels, or to make the Digital Link for a traceability QR code (Vietnam TT 02/2024/TT-BKHCN).\n\nDocs: https://apibox.io.vn/docs/gs1-parse/",
    "operationId": "gs1ParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/gs1-parse/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "string",
          "description": "GS1 data: \"(01)…(17)…\", raw element string with GS separators, or a Digital Link URI."
         },
         "ais": {
          "type": "object",
          "description": "Build mode: {\"01\": \"09520123456788\", \"10\": \"ABC\", \"17\": \"261231\"} (instead of data)."
         },
         "separator": {
          "type": "string",
          "description": "Extra character / text used as GS by your scanner."
         },
         "domain": {
          "type": "string",
          "default": "https://id.gs1.org",
          "description": "Resolver domain for the Digital Link that is built."
         }
        },
        "required": [
         "data"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "elements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ai": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "value": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "check_digit": {
              "type": "object"
             },
             "indicator_digit": {
              "type": "number"
             },
             "gtin13": {
              "type": "string"
             },
             "gs1_prefix": {
              "type": "object"
             },
             "date": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "decimals": {
              "type": "number"
             },
             "number": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             }
            }
           }
          },
          "values": {
           "type": "object",
           "properties": {
            "10": {
             "type": "string"
            },
            "17": {
             "type": "string"
            },
            "3103": {
             "type": "number"
            },
            "01": {
             "type": "string"
            }
           }
          },
          "human_readable": {
           "type": "string"
          },
          "element_string": {
           "type": "string"
          },
          "gs1_128_data": {
           "type": "string"
          },
          "digital_link": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-pesticides": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Pesticide List",
    "description": "Look up the national lists of plant protection products (thuốc bảo vệ thực vật) of Vietnam: the permitted list of Thông tư 75/2025/TT-BNNMT (in force from 10/2/2026) as amended by Thông tư 28/2026/TT-BNNMT (from 15/8/2026), and the list of 31 banned active ingredients. About 6,800 trade name × formulation rows with active ingredient, category (insecticide, fungicide, herbicide, rodenticide, growth regulator, molluscicide, termiticide…), the pests and crops registered (parsed into `targets`), the registrant, and which circular lists or amended it.\n\nSearch with `q` (trade name, ingredient, pest, crop or registrant, accent-insensitive), or combine `trade`, `ingredient`, `crop`, `pest`, `registrant`, `category`, `status`. With `crop` and `pest` together, both must be named in the same registration (e.g. nhện đỏ on sầu riêng). `action=ingredient` tells whether an active ingredient (or mixture) is permitted, phased out (carbosulfan, benfuracarb under Điều 2 TT 75/2025), removed earlier (glyphosate, paraquat, 2,4-D, chlorpyrifos ethyl, fipronil) or banned; `action=banned` lists Phụ lục II.\n\nThe data are rebuilt weekly from the signed PDFs published by the Ministry of Agriculture and Environment; the build checks the counts stated in each circular. It is a lookup aid: always follow the product label (dose, pre-harvest interval) and the official text.\n\nDocs: https://apibox.io.vn/docs/vn-pesticides/",
    "operationId": "vnPesticidesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pesticides/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Free text: trade name, active ingredient, pest, crop or registrant (accents optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "trade",
      "in": "query",
      "required": false,
      "description": "Trade name (exact or prefix).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ingredient",
      "in": "query",
      "required": false,
      "description": "Active ingredient(s); \"a + b\" requires both.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "crop",
      "in": "query",
      "required": false,
      "description": "Crop, e.g. `lúa`, `sầu riêng`.",
      "schema": {
       "type": "string"
      },
      "example": "sầu riêng"
     },
     {
      "name": "pest",
      "in": "query",
      "required": false,
      "description": "Pest or disease, e.g. `rầy nâu`, `thán thư`.",
      "schema": {
       "type": "string"
      },
      "example": "nhện đỏ"
     },
     {
      "name": "registrant",
      "in": "query",
      "required": false,
      "description": "Registrant company (substring).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "`insecticide`, `fungicide`, `herbicide`, `rodenticide`, `plant_growth_regulator`, `attractant`, `molluscicide`, `adjuvant`, `termiticide`, `wood_preservative`, `fumigant`, `postharvest`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "description": "`all`, `permitted`, `restricted` (phase-out) or `withdrawn`.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`search`, `ingredient` (status of an active ingredient), `banned`, `stats`.",
      "schema": {
       "type": "string",
       "default": "search"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results per page (1–100); `offset` to page.",
      "schema": {
       "type": "number",
       "default": 20
      },
      "example": 1
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "query": {
           "type": "object",
           "properties": {
            "crop": {
             "type": "string"
            },
            "pest": {
             "type": "string"
            },
            "status": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "limit": {
           "type": "number"
          },
          "offset": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "trade_name": {
              "type": "string"
             },
             "active_ingredient": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "category_vi": {
              "type": "string"
             },
             "category_en": {
              "type": "string"
             },
             "use": {
              "type": "string"
             },
             "use_vi": {
              "type": "string"
             },
             "pests_crops": {
              "type": "string"
             },
             "targets": {
              "type": "array"
             },
             "registrant": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "list": {
              "type": "string"
             },
             "listed_by": {
              "type": "string"
             },
             "listed_from": {
              "type": "string"
             }
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "signed": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "role": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "search",
         "query": {
          "crop": "sầu riêng",
          "pest": "nhện đỏ",
          "status": "all"
         },
         "total": 2,
         "limit": 1,
         "offset": 0,
         "results": [
          {
           "trade_name": "Bimite 480SC",
           "active_ingredient": "Bifenazate (min 95%)",
           "category": "insecticide",
           "category_vi": "Thuốc trừ sâu",
           "category_en": "Insecticide",
           "use": "agriculture",
           "use_vi": "Thuốc sử dụng trong nông nghiệp",
           "pests_crops": "nhện đỏ/ sầu riêng",
           "targets": [
            {
             "pests": [
              "nhện đỏ"
             ],
             "crops": [
              "sầu riêng"
             ]
            }
           ],
           "registrant": "Công ty CP Hợp Trí Summit",
           "status": "permitted",
           "status_vi": "Được phép sử dụng",
           "list": "Phụ lục II, Thông tư 28/2026/TT-BNNMT (bổ sung vào Phụ lục I TT 75/2025/TT-BNNMT)",
           "listed_by": "28/2026/TT-BNNMT",
           "listed_from": "2026-08-15"
          }
         ],
         "data_version": "2026-08-15",
         "legal": [
          {
           "text": "Thông tư 75/2025/TT-BNNMT",
           "signed": "2025-12-26",
           "effective_from": "2026-02-10",
           "role": "Danh mục thuốc BVTV được phép sử dụng (Phụ lục I) và cấm sử dụng (Phụ lục II)",
           "url": "https://mae.gov.vn/van-ban-phap-luat-723.htm"
          }
         ],
         "disclaimer": "Reference lookup of the published lists, not legal or agronomic advice; check the official text and the product label (dose, pre-harvest interval).",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Pesticide List",
    "description": "Look up the national lists of plant protection products (thuốc bảo vệ thực vật) of Vietnam: the permitted list of Thông tư 75/2025/TT-BNNMT (in force from 10/2/2026) as amended by Thông tư 28/2026/TT-BNNMT (from 15/8/2026), and the list of 31 banned active ingredients. About 6,800 trade name × formulation rows with active ingredient, category (insecticide, fungicide, herbicide, rodenticide, growth regulator, molluscicide, termiticide…), the pests and crops registered (parsed into `targets`), the registrant, and which circular lists or amended it.\n\nSearch with `q` (trade name, ingredient, pest, crop or registrant, accent-insensitive), or combine `trade`, `ingredient`, `crop`, `pest`, `registrant`, `category`, `status`. With `crop` and `pest` together, both must be named in the same registration (e.g. nhện đỏ on sầu riêng). `action=ingredient` tells whether an active ingredient (or mixture) is permitted, phased out (carbosulfan, benfuracarb under Điều 2 TT 75/2025), removed earlier (glyphosate, paraquat, 2,4-D, chlorpyrifos ethyl, fipronil) or banned; `action=banned` lists Phụ lục II.\n\nThe data are rebuilt weekly from the signed PDFs published by the Ministry of Agriculture and Environment; the build checks the counts stated in each circular. It is a lookup aid: always follow the product label (dose, pre-harvest interval) and the official text.\n\nDocs: https://apibox.io.vn/docs/vn-pesticides/",
    "operationId": "vnPesticidesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pesticides/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "q": {
          "type": "string",
          "description": "Free text: trade name, active ingredient, pest, crop or registrant (accents optional)."
         },
         "trade": {
          "type": "string",
          "description": "Trade name (exact or prefix)."
         },
         "ingredient": {
          "type": "string",
          "description": "Active ingredient(s); \"a + b\" requires both."
         },
         "crop": {
          "type": "string",
          "description": "Crop, e.g. `lúa`, `sầu riêng`."
         },
         "pest": {
          "type": "string",
          "description": "Pest or disease, e.g. `rầy nâu`, `thán thư`."
         },
         "registrant": {
          "type": "string",
          "description": "Registrant company (substring)."
         },
         "category": {
          "type": "string",
          "description": "`insecticide`, `fungicide`, `herbicide`, `rodenticide`, `plant_growth_regulator`, `attractant`, `molluscicide`, `adjuvant`, `termiticide`, `wood_preservative`, `fumigant`, `postharvest`."
         },
         "status": {
          "type": "string",
          "default": "all",
          "description": "`all`, `permitted`, `restricted` (phase-out) or `withdrawn`."
         },
         "action": {
          "type": "string",
          "default": "search",
          "description": "`search`, `ingredient` (status of an active ingredient), `banned`, `stats`."
         },
         "limit": {
          "type": "number",
          "default": 20,
          "description": "Results per page (1–100); `offset` to page."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "query": {
           "type": "object",
           "properties": {
            "crop": {
             "type": "string"
            },
            "pest": {
             "type": "string"
            },
            "status": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "limit": {
           "type": "number"
          },
          "offset": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "trade_name": {
              "type": "string"
             },
             "active_ingredient": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "category_vi": {
              "type": "string"
             },
             "category_en": {
              "type": "string"
             },
             "use": {
              "type": "string"
             },
             "use_vi": {
              "type": "string"
             },
             "pests_crops": {
              "type": "string"
             },
             "targets": {
              "type": "array"
             },
             "registrant": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "list": {
              "type": "string"
             },
             "listed_by": {
              "type": "string"
             },
             "listed_from": {
              "type": "string"
             }
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "signed": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "role": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-water-bill": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Water Bill",
    "description": "Send the m³ used (or two meter readings) and a `provider` and get the bill: each tier with its m³ and price, the amount before VAT, VAT 5% (clean water, Luật Thuế GTGT 48/2024), the wastewater charge and the total. Covered (`coverage`): Hà Nội (QĐ 3541/QĐ-UBND), the former Ho Chi Minh City area served by SAWACO (QĐ 25/2019/QĐ-UBND, 4 m³ per registered person, drainage service price 30% + VAT), former Bình Dương (Biwase), Đà Nẵng urban and rural (QĐ 2967/QĐ-UBND, prices incl. VAT), former Quảng Nam, Hải Phòng urban and rural (QĐ 05/2024/QĐ-UBND) and rural Cần Thơ (QĐ 5260/QĐ-UBND, from 1/11/2026).\n\nTier sizes are per meter and multiplied by `households` on the meter; with `persons` only, every 4 registered persons count as one household (TT 145/2025/TT-BTC). `customer` selects household, poor household, administrative / public, production or business prices. The environmental protection fee on domestic wastewater is 10% of the price before VAT (NĐ 346/2025/NĐ-CP, from 1/1/2026); override it with `wastewater_percent` where the province sets another rate or a commune is exempt.\n\nFor other water companies send `custom_tiers` (`[{\"up_to\":10,\"price\":8500},{\"price\":27000}]`) with `tier_basis` and `prices_include_vat`. `action=tariffs` returns all tables with their decisions and sources. Figures from a single source are flagged in `tariff.verified` and `notes`.\n\nDocs: https://apibox.io.vn/docs/vn-water-bill/",
    "operationId": "vnWaterBillGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-water-bill/"
    },
    "parameters": [
     {
      "name": "provider",
      "in": "query",
      "required": false,
      "description": "`hanoi`, `hcm`, `binh_duong`, `da_nang`, `da_nang_rural`, `quang_nam`, `hai_phong`, `hai_phong_rural`, `can_tho_rural` (or a province name).",
      "schema": {
       "type": "string"
      },
      "example": "hanoi"
     },
     {
      "name": "m3",
      "in": "query",
      "required": false,
      "description": "m³ used (or `start_reading` + `end_reading`).",
      "schema": {
       "type": "number"
      },
      "example": 25
     },
     {
      "name": "customer",
      "in": "query",
      "required": false,
      "description": "`household`, `poor`, `admin`, `production`, `business`.",
      "schema": {
       "type": "string",
       "default": "household"
      }
     },
     {
      "name": "persons",
      "in": "query",
      "required": false,
      "description": "Registered persons (HCMC quota per person; elsewhere 4 persons = 1 household).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "households",
      "in": "query",
      "required": false,
      "description": "Households sharing the meter.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "wastewater_percent",
      "in": "query",
      "required": false,
      "description": "Override the wastewater fee / drainage percent (0 = exempt).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "vat_percent",
      "in": "query",
      "required": false,
      "description": "Override the VAT rate on water.",
      "schema": {
       "type": "number",
       "default": 5
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`tariffs`: list all tables and sources.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "provider": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "customer": {
           "type": "string"
          },
          "m3": {
           "type": "number"
          },
          "quota": {
           "type": "object",
           "properties": {
            "basis": {
             "type": "string"
            },
            "households": {
             "type": "number"
            }
           }
          },
          "tiers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tier": {
              "type": "number"
             },
             "m3": {
              "type": "number"
             },
             "price": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "limit": {
              "type": "number"
             }
            }
           }
          },
          "water_amount": {
           "type": "number"
          },
          "prices_include_vat": {
           "type": "boolean"
          },
          "amount_before_vat": {
           "type": "number"
          },
          "vat_percent": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "wastewater": {
           "type": "object",
           "properties": {
            "kind": {
             "type": "string"
            },
            "kind_vi": {
             "type": "string"
            },
            "percent": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "vat_percent": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "provider": "hanoi",
         "name": "Hà Nội",
         "name_vi": "Hà Nội",
         "customer": "household",
         "m3": 25,
         "quota": {
          "basis": "household",
          "households": 1
         },
         "tiers": [
          {
           "tier": 1,
           "m3": 10,
           "price": 8500,
           "amount": 85000,
           "limit": 10
          },
          {
           "tier": 2,
           "m3": 10,
           "price": 9900,
           "amount": 99000,
           "limit": 10
          },
          {
           "tier": 3,
           "m3": 5,
           "price": 16000,
           "amount": 80000,
           "limit": 10
          }
         ],
         "water_amount": 264000,
         "prices_include_vat": false,
         "amount_before_vat": 264000,
         "vat_percent": 5,
         "vat": 13200,
         "wastewater": {
          "kind": "env_fee",
          "kind_vi": "Phí bảo vệ môi trường đối với nước thải sinh hoạt",
          "percent": 10,
          "amount": 26400,
          "vat_percent": 0,
          "vat": 0,
          "ref": "NĐ 346/2025/NĐ-CP (phí bảo vệ môi trường đối với nước thải sinh hoạt, 10%)"
         },
         "total": 303600,
         "legal": [
          {
           "text": "QĐ 3541/QĐ-UBND (7/7/2023), stage 2",
           "effective_from": "2024-01-01"
          },
          {
           "text": "Luật Thuế GTGT 48/2024/QH15 (nước sạch 5%)",
           "effective_from": "2025-07-01"
          },
          {
           "text": "NĐ 346/2025/NĐ-CP (phí bảo vệ môi trường đối với nước thải)",
           "effective_from": "2026-01-01"
          }
         ],
         "coverage": [
          "hanoi",
          "hcm",
          "binh_duong",
          "da_nang",
          "da_nang_rural",
          "quang_nam",
          "hai_phong",
          "hai_phong_rural",
          "can_tho_rural"
         ],
         "disclaimer": "Reference calculation, not legal advice; check the official text and your invoice.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Water Bill",
    "description": "Send the m³ used (or two meter readings) and a `provider` and get the bill: each tier with its m³ and price, the amount before VAT, VAT 5% (clean water, Luật Thuế GTGT 48/2024), the wastewater charge and the total. Covered (`coverage`): Hà Nội (QĐ 3541/QĐ-UBND), the former Ho Chi Minh City area served by SAWACO (QĐ 25/2019/QĐ-UBND, 4 m³ per registered person, drainage service price 30% + VAT), former Bình Dương (Biwase), Đà Nẵng urban and rural (QĐ 2967/QĐ-UBND, prices incl. VAT), former Quảng Nam, Hải Phòng urban and rural (QĐ 05/2024/QĐ-UBND) and rural Cần Thơ (QĐ 5260/QĐ-UBND, from 1/11/2026).\n\nTier sizes are per meter and multiplied by `households` on the meter; with `persons` only, every 4 registered persons count as one household (TT 145/2025/TT-BTC). `customer` selects household, poor household, administrative / public, production or business prices. The environmental protection fee on domestic wastewater is 10% of the price before VAT (NĐ 346/2025/NĐ-CP, from 1/1/2026); override it with `wastewater_percent` where the province sets another rate or a commune is exempt.\n\nFor other water companies send `custom_tiers` (`[{\"up_to\":10,\"price\":8500},{\"price\":27000}]`) with `tier_basis` and `prices_include_vat`. `action=tariffs` returns all tables with their decisions and sources. Figures from a single source are flagged in `tariff.verified` and `notes`.\n\nDocs: https://apibox.io.vn/docs/vn-water-bill/",
    "operationId": "vnWaterBillPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-water-bill/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "provider": {
          "type": "string",
          "description": "`hanoi`, `hcm`, `binh_duong`, `da_nang`, `da_nang_rural`, `quang_nam`, `hai_phong`, `hai_phong_rural`, `can_tho_rural` (or a province name)."
         },
         "m3": {
          "type": "number",
          "description": "m³ used (or `start_reading` + `end_reading`)."
         },
         "customer": {
          "type": "string",
          "default": "household",
          "description": "`household`, `poor`, `admin`, `production`, `business`."
         },
         "persons": {
          "type": "number",
          "description": "Registered persons (HCMC quota per person; elsewhere 4 persons = 1 household)."
         },
         "households": {
          "type": "number",
          "default": 1,
          "description": "Households sharing the meter."
         },
         "wastewater_percent": {
          "type": "number",
          "description": "Override the wastewater fee / drainage percent (0 = exempt)."
         },
         "vat_percent": {
          "type": "number",
          "default": 5,
          "description": "Override the VAT rate on water."
         },
         "custom_tiers": {
          "type": "array",
          "items": {},
          "description": "Own tariff: `[{\"up_to\":10,\"price\":8500},{\"price\":27000}]` with `tier_basis` (`household`/`person`) and `prices_include_vat`."
         },
         "action": {
          "type": "string",
          "description": "`tariffs`: list all tables and sources."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "provider": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "customer": {
           "type": "string"
          },
          "m3": {
           "type": "number"
          },
          "quota": {
           "type": "object",
           "properties": {
            "basis": {
             "type": "string"
            },
            "households": {
             "type": "number"
            }
           }
          },
          "tiers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tier": {
              "type": "number"
             },
             "m3": {
              "type": "number"
             },
             "price": {
              "type": "number"
             },
             "amount": {
              "type": "number"
             },
             "limit": {
              "type": "number"
             }
            }
           }
          },
          "water_amount": {
           "type": "number"
          },
          "prices_include_vat": {
           "type": "boolean"
          },
          "amount_before_vat": {
           "type": "number"
          },
          "vat_percent": {
           "type": "number"
          },
          "vat": {
           "type": "number"
          },
          "wastewater": {
           "type": "object",
           "properties": {
            "kind": {
             "type": "string"
            },
            "kind_vi": {
             "type": "string"
            },
            "percent": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "vat_percent": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-build-density": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Building Density (QCVN 01)",
    "description": "Send the lot area, the building type and (for apartments and services) the height, and get the maximum net building density (mật độ xây dựng thuần) of the national planning standard QCVN 01:2021/BXD: detached houses by lot area (Bảng 2.8: 100% up to 90 m², 90% at 100 m², 70% at 200 m² … 40% from 1,000 m²), apartment lots and service / mixed lots by lot area and height (Bảng 2.9, 2.10), public service lots (40% in new areas, 60% in existing areas). Values between two lot areas are interpolated linearly; heights between two rows use the higher row.\n\nThe answer adds the maximum footprint, the floor area ratio cap (7 for detached houses; Bảng 2.12 for apartment and service lots in existing areas; 13 for buildings of 46 m and more) with the resulting gross floor area, and, with `road_width`, the minimum setback from the red line by road width and height (Bảng 2.7). `existing_area=true` applies the rules of existing (renovated) areas.\n\nQCVN 01:2026/BXD (Thông tư 46/2026/TT-BXD) replaces it from 1/1/2027 with the same values; `date` from 2027 cites the new table numbers. The approved detailed plan, urban design or local architecture regulation always prevails: these are national maxima for places where no such plan sets the indicator.\n\nDocs: https://apibox.io.vn/docs/vn-build-density/",
    "operationId": "vnBuildDensityGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-build-density/"
    },
    "parameters": [
     {
      "name": "lot_area",
      "in": "query",
      "required": true,
      "description": "Lot area in m².",
      "schema": {
       "type": "number"
      },
      "example": 150
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`house` (detached), `apartment`, `service` (services / mixed without housing), `public`.",
      "schema": {
       "type": "string",
       "default": "house"
      }
     },
     {
      "name": "height",
      "in": "query",
      "required": false,
      "description": "Building height in m (or `floors`, 3.6 m each); required for apartment / service.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "road_width",
      "in": "query",
      "required": false,
      "description": "Red-line width of the street in m, for the setback.",
      "schema": {
       "type": "number"
      },
      "example": 12
     },
     {
      "name": "existing_area",
      "in": "query",
      "required": false,
      "description": "Lot in an existing / renovated urban area.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date of the rules (YYYY-MM-DD); from 2027 the QCVN 01:2026 table numbers.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "lot_area_m2": {
           "type": "number"
          },
          "existing_area": {
           "type": "boolean"
          },
          "max_density_percent": {
           "type": "number"
          },
          "max_footprint_m2": {
           "type": "number"
          },
          "table": {
           "type": "string"
          },
          "max_floor_area_ratio": {
           "type": "number"
          },
          "max_gross_floor_area_m2": {
           "type": "number"
          },
          "floors_at_max_density": {
           "type": "number"
          },
          "far_note": {
           "type": "string"
          },
          "setback": {
           "type": "object",
           "properties": {
            "min_setback_m": {
             "type": "number"
            },
            "road_width_m": {
             "type": "number"
            },
            "height_m": {
             "type": "number"
            },
            "assumed_height": {
             "type": "string"
            },
            "table": {
             "type": "string"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "type": "house",
         "lot_area_m2": 150,
         "existing_area": false,
         "max_density_percent": 80,
         "max_footprint_m2": 120,
         "table": "Bảng 2.8 QCVN 01:2021/BXD",
         "max_floor_area_ratio": 7,
         "max_gross_floor_area_m2": 1050,
         "floors_at_max_density": 8,
         "far_note": "Detached housing: floor area ratio ≤ 7 (note to the table).",
         "setback": {
          "min_setback_m": 0,
          "road_width_m": 12,
          "height_m": 12,
          "assumed_height": "house height not given: < 19 m assumed",
          "table": "Bảng 2.7 QCVN 01:2021/BXD",
          "rule": "Minimum setback from the red line of roads of district level and above; a podium and a tower use their own heights."
         },
         "notes": [
          "Linear interpolation between the two nearest lot areas of the table.",
          "The approved detailed plan (quy hoạch chi tiết 1/500, 1/2000), urban design or local architecture regulation prevails; these national maxima apply where no such plan sets the indicator."
         ],
         "legal": [
          {
           "text": "QCVN 01:2021/BXD (Thông tư 01/2021/TT-BXD)",
           "effective_from": "2021-07-05",
           "effective_to": "2026-12-31"
          },
          {
           "text": "QCVN 01:2026/BXD (Thông tư 46/2026/TT-BXD, 30/6/2026)",
           "effective_from": "2027-01-01"
          }
         ],
         "disclaimer": "Reference calculation, not legal advice; check the official text and the approved local plan.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Building Density (QCVN 01)",
    "description": "Send the lot area, the building type and (for apartments and services) the height, and get the maximum net building density (mật độ xây dựng thuần) of the national planning standard QCVN 01:2021/BXD: detached houses by lot area (Bảng 2.8: 100% up to 90 m², 90% at 100 m², 70% at 200 m² … 40% from 1,000 m²), apartment lots and service / mixed lots by lot area and height (Bảng 2.9, 2.10), public service lots (40% in new areas, 60% in existing areas). Values between two lot areas are interpolated linearly; heights between two rows use the higher row.\n\nThe answer adds the maximum footprint, the floor area ratio cap (7 for detached houses; Bảng 2.12 for apartment and service lots in existing areas; 13 for buildings of 46 m and more) with the resulting gross floor area, and, with `road_width`, the minimum setback from the red line by road width and height (Bảng 2.7). `existing_area=true` applies the rules of existing (renovated) areas.\n\nQCVN 01:2026/BXD (Thông tư 46/2026/TT-BXD) replaces it from 1/1/2027 with the same values; `date` from 2027 cites the new table numbers. The approved detailed plan, urban design or local architecture regulation always prevails: these are national maxima for places where no such plan sets the indicator.\n\nDocs: https://apibox.io.vn/docs/vn-build-density/",
    "operationId": "vnBuildDensityPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-build-density/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "lot_area": {
          "type": "number",
          "description": "Lot area in m²."
         },
         "type": {
          "type": "string",
          "default": "house",
          "description": "`house` (detached), `apartment`, `service` (services / mixed without housing), `public`."
         },
         "height": {
          "type": "number",
          "description": "Building height in m (or `floors`, 3.6 m each); required for apartment / service."
         },
         "road_width": {
          "type": "number",
          "description": "Red-line width of the street in m, for the setback."
         },
         "existing_area": {
          "type": "boolean",
          "description": "Lot in an existing / renovated urban area."
         },
         "date": {
          "type": "string",
          "description": "Date of the rules (YYYY-MM-DD); from 2027 the QCVN 01:2026 table numbers."
         }
        },
        "required": [
         "lot_area"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "lot_area_m2": {
           "type": "number"
          },
          "existing_area": {
           "type": "boolean"
          },
          "max_density_percent": {
           "type": "number"
          },
          "max_footprint_m2": {
           "type": "number"
          },
          "table": {
           "type": "string"
          },
          "max_floor_area_ratio": {
           "type": "number"
          },
          "max_gross_floor_area_m2": {
           "type": "number"
          },
          "floors_at_max_density": {
           "type": "number"
          },
          "far_note": {
           "type": "string"
          },
          "setback": {
           "type": "object",
           "properties": {
            "min_setback_m": {
             "type": "number"
            },
            "road_width_m": {
             "type": "number"
            },
            "height_m": {
             "type": "number"
            },
            "assumed_height": {
             "type": "string"
            },
            "table": {
             "type": "string"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "text": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-syllable": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Syllables & Poetry",
    "description": "Analyse Vietnamese text syllable by syllable: onset (phụ âm đầu), medial (âm đệm), nucleus (âm chính), final (âm cuối) and tone (thanh), whether the syllable is valid (spelling rules such as c/k/q, g/gh, ng/ngh, stop finals only with sắc or nặng, impossible rhymes), its tone class (bằng / trắc) and a broad IPA transcription for the Northern (Hà Nội), Central (Huế) and Southern (Sài Gòn) dialects, with tones in Chao digits.\n\n`action=rhyme` compares a syllable with others (exact, rhyme = same vowel and final, near = vần thông) or lists rhyming syllables from the Vietnamese dictionary, filtered by tone class. `action=poem` checks a poem: lục bát (tones at positions 2-4-6 and 2-4-6-8, ngang / huyền contrast of syllables 6 and 8, rhyme of syllable 6 of the six-syllable line with syllable 6 of the eight-syllable line and of syllable 8 with the next line) or Tang-style seven-syllable poems (nhị tứ lục phân minh, đối and niêm, bằng rhymes at the end of lines 1, 2, 4, 6, 8).\n\nThe phonology follows Thompson (1965), Kirby (2011) and the dialect tables of Wikipedia \"Vietnamese phonology\"; transcriptions are approximate, one value per dialect. No data leaves the request.\n\nDocs: https://apibox.io.vn/docs/vn-syllable/",
    "operationId": "vnSyllableGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-syllable/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Text to analyse (up to 500 syllables).",
      "schema": {
       "type": "string"
      },
      "example": "Tiếng Việt"
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`analyze`, `rhyme` or `poem`.",
      "schema": {
       "type": "string",
       "default": "analyze"
      }
     },
     {
      "name": "syllable",
      "in": "query",
      "required": false,
      "description": "rhyme: the syllable to match.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "compare",
      "in": "query",
      "required": false,
      "description": "rhyme: syllables to compare, comma separated (otherwise rhymes from the dictionary).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "tone_class",
      "in": "query",
      "required": false,
      "description": "rhyme: `same`, `bang`, `trac` or `any`.",
      "schema": {
       "type": "string",
       "default": "same"
      }
     },
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "poem: `auto`, `luc_bat` or `that_ngon`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "dialect",
      "in": "query",
      "required": false,
      "description": "`north`, `central`, `south` or `all`.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "valid": {
           "type": "boolean"
          },
          "syllables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "syllable": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "onset": {
              "type": "string"
             },
             "medial": {},
             "nucleus": {
              "type": "string"
             },
             "coda": {
              "type": "string"
             },
             "rhyme_spelling": {
              "type": "string"
             },
             "tone": {
              "type": "string"
             },
             "tone_vi": {
              "type": "string"
             },
             "tone_class": {
              "type": "string"
             },
             "tone_class_vi": {
              "type": "string"
             },
             "checked": {
              "type": "boolean"
             },
             "ipa": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "ipa": {
           "type": "object",
           "properties": {
            "north": {
             "type": "string"
            },
            "central": {
             "type": "string"
            },
            "south": {
             "type": "string"
            }
           }
          },
          "tone_pattern": {
           "type": "string"
          },
          "references": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "analyze",
         "count": 2,
         "valid": true,
         "syllables": [
          {
           "syllable": "Tiếng",
           "valid": true,
           "onset": "t",
           "medial": null,
           "nucleus": "iê",
           "coda": "ng",
           "rhyme_spelling": "iêng",
           "tone": "sac",
           "tone_vi": "sắc",
           "tone_class": "trac",
           "tone_class_vi": "trắc",
           "checked": false,
           "ipa": {
            "north": "tiəŋ35",
            "central": "tiən24",
            "south": "tiːn35"
           }
          },
          {
           "syllable": "Việt",
           "valid": true,
           "onset": "v",
           "medial": null,
           "nucleus": "iê",
           "coda": "t",
           "rhyme_spelling": "iêt",
           "tone": "nang",
           "tone_vi": "nặng",
           "tone_class": "trac",
           "tone_class_vi": "trắc",
           "checked": true,
           "ipa": {
            "north": "viət21",
            "central": "viət31",
            "south": "jiːt21"
           }
          }
         ],
         "ipa": {
          "north": "tiəŋ35 viət21",
          "central": "tiən24 viət31",
          "south": "tiːn35 jiːt21"
         },
         "tone_pattern": "TT",
         "references": [
          "L. C. Thompson, A Vietnamese Grammar (1965)",
          "J. Kirby, \"Vietnamese (Hanoi Vietnamese)\", JIPA 41(3):381–392 (2011)",
          "Wikipedia, \"Vietnamese phonology\" (tone values by dialect)"
         ],
         "note": "Broad, approximate transcription with one value per dialect; tones in Chao digits."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Syllables & Poetry",
    "description": "Analyse Vietnamese text syllable by syllable: onset (phụ âm đầu), medial (âm đệm), nucleus (âm chính), final (âm cuối) and tone (thanh), whether the syllable is valid (spelling rules such as c/k/q, g/gh, ng/ngh, stop finals only with sắc or nặng, impossible rhymes), its tone class (bằng / trắc) and a broad IPA transcription for the Northern (Hà Nội), Central (Huế) and Southern (Sài Gòn) dialects, with tones in Chao digits.\n\n`action=rhyme` compares a syllable with others (exact, rhyme = same vowel and final, near = vần thông) or lists rhyming syllables from the Vietnamese dictionary, filtered by tone class. `action=poem` checks a poem: lục bát (tones at positions 2-4-6 and 2-4-6-8, ngang / huyền contrast of syllables 6 and 8, rhyme of syllable 6 of the six-syllable line with syllable 6 of the eight-syllable line and of syllable 8 with the next line) or Tang-style seven-syllable poems (nhị tứ lục phân minh, đối and niêm, bằng rhymes at the end of lines 1, 2, 4, 6, 8).\n\nThe phonology follows Thompson (1965), Kirby (2011) and the dialect tables of Wikipedia \"Vietnamese phonology\"; transcriptions are approximate, one value per dialect. No data leaves the request.\n\nDocs: https://apibox.io.vn/docs/vn-syllable/",
    "operationId": "vnSyllablePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-syllable/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text to analyse (up to 500 syllables)."
         },
         "action": {
          "type": "string",
          "default": "analyze",
          "description": "`analyze`, `rhyme` or `poem`."
         },
         "syllable": {
          "type": "string",
          "description": "rhyme: the syllable to match."
         },
         "compare": {
          "type": "string",
          "description": "rhyme: syllables to compare, comma separated (otherwise rhymes from the dictionary)."
         },
         "tone_class": {
          "type": "string",
          "default": "same",
          "description": "rhyme: `same`, `bang`, `trac` or `any`."
         },
         "poem": {
          "type": "string",
          "description": "poem: one line per line (or separated by \"/\")."
         },
         "form": {
          "type": "string",
          "default": "auto",
          "description": "poem: `auto`, `luc_bat` or `that_ngon`."
         },
         "dialect": {
          "type": "string",
          "default": "all",
          "description": "`north`, `central`, `south` or `all`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "valid": {
           "type": "boolean"
          },
          "syllables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "syllable": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "onset": {
              "type": "string"
             },
             "medial": {},
             "nucleus": {
              "type": "string"
             },
             "coda": {
              "type": "string"
             },
             "rhyme_spelling": {
              "type": "string"
             },
             "tone": {
              "type": "string"
             },
             "tone_vi": {
              "type": "string"
             },
             "tone_class": {
              "type": "string"
             },
             "tone_class_vi": {
              "type": "string"
             },
             "checked": {
              "type": "boolean"
             },
             "ipa": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "ipa": {
           "type": "object",
           "properties": {
            "north": {
             "type": "string"
            },
            "central": {
             "type": "string"
            },
            "south": {
             "type": "string"
            }
           }
          },
          "tone_pattern": {
           "type": "string"
          },
          "references": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/llm-tokens": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "LLM Token Counter & Chunker",
    "description": "Counts tokens with the real OpenAI tokenizers: `o200k_base` (GPT-4o, GPT-4.1, GPT-5, o1 / o3 / o4) and `cl100k_base` (GPT-4, GPT-3.5, text-embedding-3), using the tiktoken rank tables through gpt-tokenizer. Pass `model` (for example `gpt-4o`) to pick the encoding automatically. The count also returns characters, words, tokens per word, an optional cost (`price_per_million`) and a limit check (`max_tokens`). For Claude, Gemini, Llama, Mistral, Qwen and DeepSeek, whose tokenizers are not public or not bundled, the response gives clearly labelled estimates with a range, never presented as exact.\n\n`action=truncate` cuts the text to at most `max_tokens` tokens (from the start, or keep the end with `keep=end`) without breaking a character. `action=chunk` splits long text for retrieval (RAG): it prefers Markdown headings, then paragraphs, lines, sentences (Vietnamese sentence rules such as \"TP.\" or \"ThS.\" are handled), then words, packs pieces up to `max_tokens` and adds an `overlap` made of whole sentences. Each chunk has exact `start` / `end` character offsets in your text. `action=encode` / `decode` converts between text and token ids.\n\nFor Vietnamese text the response shows how much more it costs than English (`vietnamese_vs_english`, measured on the same paragraph in both languages). Special tokens such as `<|endoftext|>` are counted as plain text unless `special=true`. Limits: 1 million characters (500,000 for chunking). The text is processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/llm-tokens/",
    "operationId": "llmTokensGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/llm-tokens/"
    },
    "parameters": [
     {
      "name": "text",
      "in": "query",
      "required": true,
      "description": "The text (up to 1,000,000 characters). A raw text/plain body also works.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`count`, `truncate`, `chunk`, `encode` or `decode`.",
      "schema": {
       "type": "string",
       "default": "count"
      }
     },
     {
      "name": "encoding",
      "in": "query",
      "required": false,
      "description": "`o200k_base`, `cl100k_base` or `all` (default: both for count, o200k_base otherwise).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "model",
      "in": "query",
      "required": false,
      "description": "OpenAI model name (e.g. `gpt-4o`, `gpt-4`) to choose the encoding.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "max_tokens",
      "in": "query",
      "required": false,
      "description": "Limit for truncate, chunk size for chunk (default 512), limit check for count.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "overlap",
      "in": "query",
      "required": false,
      "description": "Chunk overlap in tokens (whole sentences, at most half of max_tokens).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "keep",
      "in": "query",
      "required": false,
      "description": "Truncate: keep the `start` or the `end` of the text.",
      "schema": {
       "type": "string",
       "default": "start"
      }
     },
     {
      "name": "price_per_million",
      "in": "query",
      "required": false,
      "description": "USD per 1M input tokens, to get `estimated_cost_usd`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "description": "Token ids for `action=decode` (array or comma-separated).",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "special",
      "in": "query",
      "required": false,
      "description": "Treat `<|endoftext|>` and similar as special tokens.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "estimates",
      "in": "query",
      "required": false,
      "description": "Include the estimates for other model families.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "encoding": {
           "type": "string"
          },
          "tokens": {
           "type": "number"
          },
          "counts": {
           "type": "object",
           "properties": {
            "o200k_base": {
             "type": "number"
            },
            "cl100k_base": {
             "type": "number"
            }
           }
          },
          "characters": {
           "type": "number"
          },
          "bytes_utf8": {
           "type": "number"
          },
          "words": {
           "type": "number"
          },
          "language": {
           "type": "string"
          },
          "tokens_per_word": {
           "type": "number"
          },
          "chars_per_token": {
           "type": "number"
          },
          "vietnamese_vs_english": {
           "type": "object",
           "properties": {
            "reference": {
             "type": "string"
            },
            "english_tokens": {
             "type": "number"
            },
            "vietnamese_tokens": {
             "type": "number"
            },
            "ratio": {
             "type": "number"
            },
            "english_tokens_per_word": {
             "type": "number"
            },
            "vietnamese_tokens_per_syllable": {
             "type": "number"
            },
            "this_text_tokens_per_word": {
             "type": "number"
            }
           }
          },
          "estimates": {
           "type": "array",
           "items": {}
          },
          "estimates_note": {
           "type": "string"
          },
          "source": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "LLM Token Counter & Chunker",
    "description": "Counts tokens with the real OpenAI tokenizers: `o200k_base` (GPT-4o, GPT-4.1, GPT-5, o1 / o3 / o4) and `cl100k_base` (GPT-4, GPT-3.5, text-embedding-3), using the tiktoken rank tables through gpt-tokenizer. Pass `model` (for example `gpt-4o`) to pick the encoding automatically. The count also returns characters, words, tokens per word, an optional cost (`price_per_million`) and a limit check (`max_tokens`). For Claude, Gemini, Llama, Mistral, Qwen and DeepSeek, whose tokenizers are not public or not bundled, the response gives clearly labelled estimates with a range, never presented as exact.\n\n`action=truncate` cuts the text to at most `max_tokens` tokens (from the start, or keep the end with `keep=end`) without breaking a character. `action=chunk` splits long text for retrieval (RAG): it prefers Markdown headings, then paragraphs, lines, sentences (Vietnamese sentence rules such as \"TP.\" or \"ThS.\" are handled), then words, packs pieces up to `max_tokens` and adds an `overlap` made of whole sentences. Each chunk has exact `start` / `end` character offsets in your text. `action=encode` / `decode` converts between text and token ids.\n\nFor Vietnamese text the response shows how much more it costs than English (`vietnamese_vs_english`, measured on the same paragraph in both languages). Special tokens such as `<|endoftext|>` are counted as plain text unless `special=true`. Limits: 1 million characters (500,000 for chunking). The text is processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/llm-tokens/",
    "operationId": "llmTokensPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/llm-tokens/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "The text (up to 1,000,000 characters). A raw text/plain body also works."
         },
         "action": {
          "type": "string",
          "default": "count",
          "description": "`count`, `truncate`, `chunk`, `encode` or `decode`."
         },
         "encoding": {
          "type": "string",
          "description": "`o200k_base`, `cl100k_base` or `all` (default: both for count, o200k_base otherwise)."
         },
         "model": {
          "type": "string",
          "description": "OpenAI model name (e.g. `gpt-4o`, `gpt-4`) to choose the encoding."
         },
         "max_tokens": {
          "type": "number",
          "description": "Limit for truncate, chunk size for chunk (default 512), limit check for count."
         },
         "overlap": {
          "type": "number",
          "default": 50,
          "description": "Chunk overlap in tokens (whole sentences, at most half of max_tokens)."
         },
         "keep": {
          "type": "string",
          "default": "start",
          "description": "Truncate: keep the `start` or the `end` of the text."
         },
         "price_per_million": {
          "type": "number",
          "description": "USD per 1M input tokens, to get `estimated_cost_usd`."
         },
         "ids": {
          "type": "array",
          "items": {},
          "description": "Token ids for `action=decode` (array or comma-separated)."
         },
         "special": {
          "type": "boolean",
          "default": false,
          "description": "Treat `<|endoftext|>` and similar as special tokens."
         },
         "estimates": {
          "type": "boolean",
          "default": true,
          "description": "Include the estimates for other model families."
         }
        },
        "required": [
         "text"
        ]
       },
       "example": {
        "text": "Xin chào! Hôm nay trời đẹp, chúng ta đi dạo nhé."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "encoding": {
           "type": "string"
          },
          "tokens": {
           "type": "number"
          },
          "counts": {
           "type": "object",
           "properties": {
            "o200k_base": {
             "type": "number"
            },
            "cl100k_base": {
             "type": "number"
            }
           }
          },
          "characters": {
           "type": "number"
          },
          "bytes_utf8": {
           "type": "number"
          },
          "words": {
           "type": "number"
          },
          "language": {
           "type": "string"
          },
          "tokens_per_word": {
           "type": "number"
          },
          "chars_per_token": {
           "type": "number"
          },
          "vietnamese_vs_english": {
           "type": "object",
           "properties": {
            "reference": {
             "type": "string"
            },
            "english_tokens": {
             "type": "number"
            },
            "vietnamese_tokens": {
             "type": "number"
            },
            "ratio": {
             "type": "number"
            },
            "english_tokens_per_word": {
             "type": "number"
            },
            "vietnamese_tokens_per_syllable": {
             "type": "number"
            },
            "this_text_tokens_per_word": {
             "type": "number"
            }
           }
          },
          "estimates": {
           "type": "array",
           "items": {}
          },
          "estimates_note": {
           "type": "string"
          },
          "source": {
           "type": "string"
          }
         }
        },
        "example": {
         "encoding": "o200k_base",
         "tokens": 17,
         "counts": {
          "o200k_base": 17,
          "cl100k_base": 28
         },
         "characters": 48,
         "bytes_utf8": 60,
         "words": 11,
         "language": "vi",
         "tokens_per_word": 1.55,
         "chars_per_token": 2.82,
         "vietnamese_vs_english": {
          "reference": "the same paragraph in English and Vietnamese",
          "english_tokens": 39,
          "vietnamese_tokens": 45,
          "ratio": 1.15,
          "english_tokens_per_word": 1.08,
          "vietnamese_tokens_per_syllable": 1.22,
          "this_text_tokens_per_word": 1.55
         },
         "estimates": [
          {
           "family": "anthropic",
           "models": "Claude",
           "estimated_tokens": 35,
           "range": [
            28,
            42
           ],
           "estimate": true,
           "basis": "cl100k_base × 1.25",
           "note": "Claude tokenizer is not public; use the free Anthropic count_tokens API for exact numbers."
          },
          {
           "family": "google",
           "models": "Gemini, Gemma",
           "estimated_tokens": 16,
           "range": [
            14,
            18
           ],
           "estimate": true,
           "basis": "o200k_base × 0.95",
           "note": "SentencePiece 256k vocabulary; exact counts via the Gemini countTokens API."
          },
          "…"
         ],
         "estimates_note": "Estimates are heuristics (an exact OpenAI count × a factor per script), not real tokenizer output.",
         "source": "gpt-tokenizer 4.1.2 (MIT), OpenAI tiktoken ranks"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/secret-scan": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Secret Scanner",
    "description": "Send text (`text` or a raw body) or a `file`: a single source file, a `.gz`, a unified diff (only added lines are scanned, with line numbers of the new file) or a `.zip` of a repository. The scanner applies the default gitleaks rule set (220+ rules: AWS, GitHub, GitLab, Stripe, Slack, Google, OpenAI and Anthropic keys, private keys, JWTs and many more), converted from Go RE2 to JavaScript and refreshed weekly, plus our own rule for passwords inside connection-string URLs (`postgres://user:pass@host`). As in gitleaks, each rule has keywords, an optional secret group, a Shannon entropy threshold and allowlists (placeholders like `${VAR}`, `changeme`, example keys, `node_modules`, lock files, images).\n\nEach finding gives `rule_id`, description, file, `line` / `column` (1-based) and end position, the masked secret and masked match, the entropy and a confidence (`low` for the generic key rule). `entropy=true` also reports long high-entropy strings that no rule matched. `rules` restricts the scan to some rule ids. Regexes run only on windows around keyword hits, with a total time budget, so a pathological input cannot run forever; the response flags `timed_out` or `slow_rules` if that happens.\n\nPrivacy: the content is scanned in memory and is never stored or logged, and secrets are masked in the response. Still, a key that has been pasted anywhere should be rotated. Limits: 5 million characters in total, files in a ZIP up to 2 MB each, 10,000 files.\n\nDocs: https://apibox.io.vn/docs/secret-scan/",
    "operationId": "secretScanPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/secret-scan/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text, code or a unified diff to scan (or send a raw text body)."
         },
         "filename": {
          "type": "string",
          "description": "Path of the text, for path-based rules and allowlists (e.g. `config/.env`)."
         },
         "diff": {
          "type": "boolean",
          "description": "Treat the text as a unified diff (auto-detected)."
         },
         "entropy": {
          "type": "boolean",
          "default": false,
          "description": "Also report high-entropy strings not matched by a rule."
         },
         "rules": {
          "type": "string",
          "description": "Comma-separated rule ids to run (default: all)."
         },
         "limit": {
          "type": "number",
          "default": 1000,
          "description": "Maximum findings returned (1–5000)."
         }
        }
       },
       "example": {
        "text": "AWS_ACCESS_KEY_ID=AKIAQWERTYUIOPASDFGH\nDATABASE_URL=postgres://admin:S3cr3tP4ssw0rd!@db.example.com:5432/app\n",
        "filename": ".env"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Text, code or a unified diff to scan (or send a raw text body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "A text file, .gz, diff or .zip of a repository (multipart, or `file_base64`)."
         },
         "filename": {
          "type": "string",
          "description": "Path of the text, for path-based rules and allowlists (e.g. `config/.env`)."
         },
         "diff": {
          "type": "boolean",
          "description": "Treat the text as a unified diff (auto-detected)."
         },
         "entropy": {
          "type": "boolean",
          "default": false,
          "description": "Also report high-entropy strings not matched by a rule."
         },
         "rules": {
          "type": "string",
          "description": "Comma-separated rule ids to run (default: all)."
         },
         "limit": {
          "type": "number",
          "default": 1000,
          "description": "Maximum findings returned (1–5000)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "leaks_found": {
           "type": "boolean"
          },
          "count": {
           "type": "number"
          },
          "files_scanned": {
           "type": "number"
          },
          "characters_scanned": {
           "type": "number"
          },
          "by_rule": {
           "type": "object",
           "properties": {
            "aws-access-token": {
             "type": "number"
            },
            "url-credentials": {
             "type": "number"
            }
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule_id": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "file": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "column": {
              "type": "number"
             },
             "end_line": {
              "type": "number"
             },
             "end_column": {
              "type": "number"
             },
             "secret_masked": {
              "type": "string"
             },
             "match_masked": {
              "type": "string"
             },
             "entropy": {
              "type": "number"
             },
             "confidence": {
              "type": "string"
             },
             "fingerprint": {
              "type": "string"
             }
            }
           }
          },
          "truncated": {
           "type": "boolean"
          },
          "rules": {
           "type": "object",
           "properties": {
            "count": {
             "type": "number"
            },
            "source": {
             "type": "string"
            },
            "dropped": {
             "type": "number"
            }
           }
          },
          "ms": {
           "type": "number"
          },
          "privacy": {
           "type": "string"
          }
         }
        },
        "example": {
         "leaks_found": true,
         "count": 2,
         "files_scanned": 1,
         "characters_scanned": 109,
         "by_rule": {
          "aws-access-token": 1,
          "url-credentials": 1
         },
         "findings": [
          {
           "rule_id": "aws-access-token",
           "description": "Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms.",
           "file": ".env",
           "line": 1,
           "column": 19,
           "end_line": 1,
           "end_column": 38,
           "secret_masked": "AKIA**************GH",
           "match_masked": "AKIA**************GH",
           "entropy": 3.984,
           "confidence": "high",
           "fingerprint": ".env:aws-access-token:1"
          },
          {
           "rule_id": "url-credentials",
           "description": "Password inside a URL / connection string (database, broker, FTP, HTTP basic auth).",
           "file": ".env",
           "line": 2,
           "column": 31,
           "end_line": 2,
           "end_column": 45,
           "secret_masked": "S3***********d!",
           "match_masked": "postgres://admin:S3***********d!@db.example.com:5432",
           "entropy": 3.507,
           "confidence": "high",
           "fingerprint": ".env:url-credentials:2"
          }
         ],
         "truncated": false,
         "rules": {
          "count": 222,
          "source": "gitleaks default config (MIT)",
          "dropped": 0
         },
         "ms": 5,
         "privacy": "The text is scanned in memory and not stored or logged; secrets are masked in the response."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/dep-audit": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Dependency Audit",
    "description": "Upload or paste a manifest or lockfile: `package.json`, `package-lock.json` (v1–v3), `yarn.lock` (classic and Berry), `pnpm-lock.yaml`, `requirements.txt`, `poetry.lock`, `Pipfile.lock`, `composer.lock` / `composer.json`, `go.sum` / `go.mod`, `Gemfile.lock` or `Cargo.lock`. The format is detected from `filename` or the content. Every package and version is checked against OSV.dev (Google’s open vulnerability database, which aggregates the GitHub Advisory Database, PyPA, Go, RustSec and others) in batches of up to 1,000.\n\nEach vulnerable package lists its advisories with GHSA / CVE ids, summary, severity (computed from the CVSS v3 vector, or the advisory’s own rating), the versions that fix it and `fixed_in` (the first fixed version above yours); `upgrade_to` is the lowest version that fixes all of them. With `latest=true` the latest release is fetched from npm, PyPI or Packagist for direct dependencies (all packages for small files). Licences from the lockfile or registry are normalised to SPDX (spdx-correct) and flagged as `weak`, `strong` or `network` copyleft.\n\nFor manifests with ranges (`^1.2.3`, `>=3.0`) the lowest allowed version is checked and marked `version_from_range`: use a lockfile for exact results. Advisory details are cached for a day and fetched for at most 150 advisories per call (`max_details`, up to 300). Vulnerability data: OSV.dev, credited in each response.\n\nDocs: https://apibox.io.vn/docs/dep-audit/",
    "operationId": "depAuditPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dep-audit/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "content": {
          "type": "string",
          "description": "The manifest / lockfile text (or upload `file`, or send a raw body)."
         },
         "filename": {
          "type": "string",
          "description": "File name used to detect the format (e.g. `yarn.lock`)."
         },
         "format": {
          "type": "string",
          "description": "Force the format: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, requirements.txt, poetry.lock, pipfile.lock, composer.lock, composer.json, go.sum, go.mod, gemfile.lock, cargo.lock."
         },
         "latest": {
          "type": "boolean",
          "default": false,
          "description": "Also fetch the latest version and licence from npm / PyPI / Packagist."
         },
         "include_dev": {
          "type": "boolean",
          "default": true,
          "description": "Include development dependencies."
         },
         "only_vulnerable": {
          "type": "boolean",
          "default": false,
          "description": "List only vulnerable packages."
         },
         "vulns": {
          "type": "boolean",
          "default": true,
          "description": "Set to false to skip the OSV.dev check (licences / versions only)."
         },
         "max_details": {
          "type": "number",
          "default": 150,
          "description": "Maximum advisories whose details are fetched (0–300)."
         }
        }
       },
       "example": {
        "content": "{\"dependencies\":{\"lodash\":\"4.17.20\"}}",
        "filename": "package.json",
        "latest": true
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "content": {
          "type": "string",
          "description": "The manifest / lockfile text (or upload `file`, or send a raw body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The manifest / lockfile as an upload."
         },
         "filename": {
          "type": "string",
          "description": "File name used to detect the format (e.g. `yarn.lock`)."
         },
         "format": {
          "type": "string",
          "description": "Force the format: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, requirements.txt, poetry.lock, pipfile.lock, composer.lock, composer.json, go.sum, go.mod, gemfile.lock, cargo.lock."
         },
         "latest": {
          "type": "boolean",
          "default": false,
          "description": "Also fetch the latest version and licence from npm / PyPI / Packagist."
         },
         "include_dev": {
          "type": "boolean",
          "default": true,
          "description": "Include development dependencies."
         },
         "only_vulnerable": {
          "type": "boolean",
          "default": false,
          "description": "List only vulnerable packages."
         },
         "vulns": {
          "type": "boolean",
          "default": true,
          "description": "Set to false to skip the OSV.dev check (licences / versions only)."
         },
         "max_details": {
          "type": "number",
          "default": 150,
          "description": "Maximum advisories whose details are fetched (0–300)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "packages_total": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "vulnerable_packages": {
             "type": "number"
            },
            "vulnerabilities": {
             "type": "number"
            },
            "by_severity": {
             "type": "object",
             "properties": {
              "high": {
               "type": "number"
              },
              "medium": {
               "type": "number"
              }
             }
            },
            "outdated_packages": {
             "type": "number"
            },
            "latest_checked": {
             "type": "number"
            },
            "licences": {
             "type": "object",
             "properties": {
              "MIT": {
               "type": "number"
              }
             }
            },
            "copyleft_packages": {
             "type": "number"
            }
           }
          },
          "packages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "version": {
              "type": "string"
             },
             "ecosystem": {
              "type": "string"
             },
             "declared": {
              "type": "string"
             },
             "dev": {
              "type": "boolean"
             },
             "direct": {
              "type": "boolean"
             },
             "vulnerable": {
              "type": "boolean"
             },
             "vulnerabilities": {
              "type": "array"
             },
             "upgrade_to": {
              "type": "string"
             },
             "latest": {
              "type": "string"
             },
             "outdated": {
              "type": "boolean"
             },
             "licence": {
              "type": "object"
             }
            }
           }
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "format": "package.json",
         "packages_total": 1,
         "summary": {
          "vulnerable_packages": 1,
          "vulnerabilities": 4,
          "by_severity": {
           "high": 2,
           "medium": 2
          },
          "outdated_packages": 1,
          "latest_checked": 1,
          "licences": {
           "MIT": 1
          },
          "copyleft_packages": 0
         },
         "packages": [
          {
           "name": "lodash",
           "version": "4.17.20",
           "ecosystem": "npm",
           "declared": "4.17.20",
           "dev": false,
           "direct": true,
           "vulnerable": true,
           "vulnerabilities": [
            {
             "id": "GHSA-35jh-r3h4-6jhm",
             "aliases": [
              "CVE-2021-23337"
             ],
             "summary": "Command Injection in lodash",
             "severity": "high",
             "cvss_score": 7.2,
             "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
             "fixed_versions": [
              "4.17.21"
             ],
             "fixed_in": "4.17.21",
             "published": "2021-05-06T16:05:51Z",
             "url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm"
            },
            {
             "id": "GHSA-r5fr-rjxr-66jc",
             "aliases": [
              "CVE-2026-4800"
             ],
             "summary": "lodash vulnerable to Code Injection via `_.template` imports key names",
             "severity": "high",
             "cvss_score": 8.1,
             "fixed_versions": [
              "4.18.0"
             ],
             "fixed_in": "4.18.0",
             "url": "https://osv.dev/vulnerability/GHSA-r5fr-rjxr-66jc"
            },
            "…"
           ],
           "upgrade_to": "4.18.0",
           "latest": "4.18.1",
           "outdated": true,
           "licence": {
            "declared": "MIT",
            "spdx": "MIT",
            "ids": [
             "MIT"
            ],
            "copyleft": "none"
           }
          }
         ],
         "attribution": "Vulnerability data from OSV.dev (https://osv.dev), aggregating GitHub Advisory Database (CC-BY 4.0), PyPA, Go, RustSec and other sources under their licences."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/dmarc-report": {
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "DMARC Report Reader",
    "description": "Mailbox providers send DMARC aggregate (RUA) reports as XML files, usually zipped or gzipped. Upload one or more (`file`, `file2`…, up to 50 files or 200 reports, ZIPs may contain several) or paste the XML. The API reads both the RFC 7489 format and the newer DMARCbis aggregate format (namespace `dmarc-2.0`, with `np`, `testing` and `discovery_method`) and returns the reporter, report id, date range, the published policy and every record: source IP, message count, disposition, the DKIM and SPF results as evaluated by the receiver, override reasons, header / envelope from and the raw DKIM / SPF results with our own alignment check.\n\nAll reports are then aggregated: total messages, DMARC pass / fail and pass rates, aligned DKIM and SPF rates, dispositions, totals per From domain, and a list of sending sources sorted by volume with their pass rate, DKIM domains and selectors and SPF domains. `failing_sources` shows the IPs whose mail failed, and `advice` gives plain next steps (authorise a legitimate sender, add DKIM because SPF breaks on forwarding, move from `p=none` to `quarantine` when more than 98% passes).\n\nWith `enrich=true` the top 50 sources also get their reverse DNS (PTR) and, where available, ASN / network owner (from DB-IP Lite, CC BY 4.0: the answer then carries `attribution` \"IP Geolocation by DB-IP\" and `attribution_url`). Set `include_records=false` for a compact answer. Reports are parsed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/dmarc-report/",
    "operationId": "dmarcReportPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dmarc-report/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "The report XML as text (or send a raw XML body)."
         },
         "enrich": {
          "type": "boolean",
          "default": false,
          "description": "Look up PTR and ASN for the top 50 source IPs."
         },
         "include_records": {
          "type": "boolean",
          "default": true,
          "description": "Include every record of each report."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Report file: .xml, .xml.gz, .gz or .zip (also `file2`… for more files)."
         },
         "xml": {
          "type": "string",
          "description": "The report XML as text (or send a raw XML body)."
         },
         "enrich": {
          "type": "boolean",
          "default": false,
          "description": "Look up PTR and ASN for the top 50 source IPs."
         },
         "include_records": {
          "type": "boolean",
          "default": true,
          "description": "Include every record of each report."
         }
        }
       }
      },
      "application/xml": {
       "schema": {
        "type": "string"
       },
       "example": "<feedback>…<policy_published><domain>example.vn</domain><p>none</p>…</policy_published><record>…</record></feedback>"
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "reports_count": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "messages": {
             "type": "number"
            },
            "dmarc_pass": {
             "type": "number"
            },
            "dmarc_fail": {
             "type": "number"
            },
            "pass_rate": {
             "type": "number"
            },
            "dkim_aligned_pass_rate": {
             "type": "number"
            },
            "spf_aligned_pass_rate": {
             "type": "number"
            },
            "dispositions": {
             "type": "object",
             "properties": {
              "none": {
               "type": "number"
              }
             }
            },
            "source_ips": {
             "type": "number"
            },
            "policies": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "domains": {
             "type": "object",
             "properties": {
              "example.vn": {
               "type": "object"
              }
             }
            },
            "date_range": {
             "type": "object",
             "properties": {
              "begin": {
               "type": "string"
              },
              "end": {
               "type": "string"
              }
             }
            },
            "reporters": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "advice": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "source_ip": {
              "type": "string"
             },
             "count": {
              "type": "number"
             },
             "pass": {
              "type": "number"
             },
             "fail": {
              "type": "number"
             },
             "dkim_aligned_pass": {
              "type": "number"
             },
             "spf_aligned_pass": {
              "type": "number"
             },
             "header_from": {
              "type": "array"
             },
             "dkim_domains": {
              "type": "array"
             },
             "spf_domains": {
              "type": "array"
             },
             "dispositions": {
              "type": "object",
              "properties": {}
             },
             "pass_rate": {
              "type": "number"
             }
            }
           }
          },
          "failing_sources": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "source_ip": {
              "type": "string"
             },
             "messages": {
              "type": "number"
             },
             "header_from": {
              "type": "array"
             }
            }
           }
          },
          "reports": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "file": {},
             "format": {
              "type": "string"
             },
             "reporter": {
              "type": "object"
             },
             "policy_published": {
              "type": "object"
             },
             "records": {
              "type": "array"
             }
            }
           }
          }
         }
        },
        "example": {
         "reports_count": 1,
         "summary": {
          "messages": 123,
          "dmarc_pass": 120,
          "dmarc_fail": 3,
          "pass_rate": 97.56,
          "dkim_aligned_pass_rate": 97.56,
          "spf_aligned_pass_rate": 97.56,
          "dispositions": {
           "none": 123
          },
          "source_ips": 2,
          "policies": [
           "none"
          ],
          "domains": {
           "example.vn": {
            "messages": 123,
            "pass": 120,
            "fail": 3
           }
          },
          "date_range": {
           "begin": "2024-11-06T00:00:00.000Z",
           "end": "2024-11-06T23:59:59.000Z"
          },
          "reporters": [
           "google.com"
          ]
         },
         "advice": [
          "Policy is p=none: before enforcing, authorise (SPF) or sign (DKIM, aligned with the From domain) every legitimate source listed in failing_sources.",
          "1 source IP(s) sent mail that failed DMARC; check which are your own services (add them to SPF / set up DKIM) and which are spoofing."
         ],
         "sources": [
          {
           "source_ip": "209.85.220.41",
           "count": 120,
           "pass": 120,
           "fail": 0,
           "dkim_aligned_pass": 120,
           "spf_aligned_pass": 120,
           "header_from": [
            "example.vn"
           ],
           "dkim_domains": [
            "example.vn (google): pass"
           ],
           "spf_domains": [
            "example.vn: pass"
           ],
           "dispositions": {
            "none": 120
           },
           "pass_rate": 100
          },
          {
           "source_ip": "198.51.100.7",
           "count": 3,
           "pass": 0,
           "fail": 3,
           "dkim_aligned_pass": 0,
           "spf_aligned_pass": 0,
           "header_from": [
            "example.vn"
           ],
           "dkim_domains": [],
           "spf_domains": [
            "spammer.test: softfail"
           ],
           "dispositions": {
            "none": 3
           },
           "pass_rate": 0
          }
         ],
         "failing_sources": [
          {
           "source_ip": "198.51.100.7",
           "messages": 3,
           "header_from": [
            "example.vn"
           ]
          }
         ],
         "reports": [
          {
           "file": null,
           "format": "rfc7489",
           "reporter": {
            "org_name": "google.com",
            "email": "noreply-dmarc-support@google.com",
            "report_id": "1234567890"
           },
           "policy_published": {
            "domain": "example.vn",
            "p": "none",
            "sp": "none",
            "adkim": "r",
            "aspf": "r",
            "pct": 100
           },
           "records": [
            "…"
           ]
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/graphql-tools": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "GraphQL Tools",
    "description": "A toolbox built on graphql-js 17, the reference implementation. `action=format` pretty-prints a query or SDL document. `validate` checks a `query` against a `schema` (SDL text or an introspection result) and returns every error with line and column, plus the fields used (`Type.field` coordinates) and which of them are deprecated. Syntax errors always come back with their location. `analyze` lists operations, variables, fragments, and per operation the depth, field count, alias count and a list-aware complexity score (fields multiplied by `first` / `last` / `limit` arguments); `max_depth` and `max_complexity` turn it into a pass / fail check for a gateway.\n\n`stats` summarises a schema: types by kind, field count, queries, mutations, subscriptions with their arguments, custom directives and deprecated fields. `diff` compares `old_schema` with `new_schema` and sorts changes into breaking (field removed, argument made required…), dangerous (optional argument added, enum value added…) and safe. `to-sdl` turns an introspection JSON into SDL (`sort=true` sorts types and fields), `to-introspection` does the reverse, and `sample` writes an example query for a Query field or a fragment for a type.\n\nLimits: 2 MB per document, 200,000 tokens. Nothing is executed: the API never sends your query to any server.\n\nDocs: https://apibox.io.vn/docs/graphql-tools/",
    "operationId": "graphqlToolsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/graphql-tools/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`format`, `validate`, `analyze`, `stats`, `diff`, `to-sdl`, `to-introspection`, `sample` (guessed from the inputs when omitted).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "query",
      "in": "query",
      "required": false,
      "description": "GraphQL query / mutation / fragments, or SDL for format.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "max_depth",
      "in": "query",
      "required": false,
      "description": "Analyze / validate: maximum allowed depth (adds `depth_ok`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "max_complexity",
      "in": "query",
      "required": false,
      "description": "Analyze / validate: maximum complexity (adds `complexity_ok`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Sample: a Query field or a type name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "depth",
      "in": "query",
      "required": false,
      "description": "Sample: nesting depth (1–5).",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "to-sdl: sort types and fields alphabetically.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "message": {
              "type": "string"
             },
             "locations": {
              "type": "array"
             }
            }
           }
          },
          "operations": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {},
             "type": {
              "type": "string"
             },
             "variables": {
              "type": "array"
             },
             "depth": {
              "type": "number"
             },
             "field_count": {
              "type": "number"
             },
             "complexity": {
              "type": "number"
             },
             "aliases": {
              "type": "number"
             },
             "root_fields": {
              "type": "array"
             }
            }
           }
          },
          "fragments": {
           "type": "array"
          },
          "fields_used": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "coordinate": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "deprecated": {},
             "count": {
              "type": "number"
             }
            }
           }
          },
          "deprecated_used": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "GraphQL Tools",
    "description": "A toolbox built on graphql-js 17, the reference implementation. `action=format` pretty-prints a query or SDL document. `validate` checks a `query` against a `schema` (SDL text or an introspection result) and returns every error with line and column, plus the fields used (`Type.field` coordinates) and which of them are deprecated. Syntax errors always come back with their location. `analyze` lists operations, variables, fragments, and per operation the depth, field count, alias count and a list-aware complexity score (fields multiplied by `first` / `last` / `limit` arguments); `max_depth` and `max_complexity` turn it into a pass / fail check for a gateway.\n\n`stats` summarises a schema: types by kind, field count, queries, mutations, subscriptions with their arguments, custom directives and deprecated fields. `diff` compares `old_schema` with `new_schema` and sorts changes into breaking (field removed, argument made required…), dangerous (optional argument added, enum value added…) and safe. `to-sdl` turns an introspection JSON into SDL (`sort=true` sorts types and fields), `to-introspection` does the reverse, and `sample` writes an example query for a Query field or a fragment for a type.\n\nLimits: 2 MB per document, 200,000 tokens. Nothing is executed: the API never sends your query to any server.\n\nDocs: https://apibox.io.vn/docs/graphql-tools/",
    "operationId": "graphqlToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/graphql-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "`format`, `validate`, `analyze`, `stats`, `diff`, `to-sdl`, `to-introspection`, `sample` (guessed from the inputs when omitted)."
         },
         "query": {
          "type": "string",
          "description": "GraphQL query / mutation / fragments, or SDL for format."
         },
         "schema": {
          "type": "string",
          "description": "Schema as SDL text or introspection JSON."
         },
         "old_schema": {
          "type": "string",
          "description": "Diff: the previous schema."
         },
         "new_schema": {
          "type": "string",
          "description": "Diff: the new schema."
         },
         "max_depth": {
          "type": "number",
          "description": "Analyze / validate: maximum allowed depth (adds `depth_ok`)."
         },
         "max_complexity": {
          "type": "number",
          "description": "Analyze / validate: maximum complexity (adds `complexity_ok`)."
         },
         "type": {
          "type": "string",
          "description": "Sample: a Query field or a type name."
         },
         "depth": {
          "type": "number",
          "default": 2,
          "description": "Sample: nesting depth (1–5)."
         },
         "sort": {
          "type": "boolean",
          "default": false,
          "description": "to-sdl: sort types and fields alphabetically."
         }
        }
       },
       "example": {
        "schema": "type Book {\n  id: ID!\n  title: String\n  isbn: String @deprecated(reason: \"use id\")\n}\n\ntype Query {\n  book(id: ID!): Book\n}",
        "query": "{ book(id: 1) { title isbn price } }"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "message": {
              "type": "string"
             },
             "locations": {
              "type": "array"
             }
            }
           }
          },
          "operations": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {},
             "type": {
              "type": "string"
             },
             "variables": {
              "type": "array"
             },
             "depth": {
              "type": "number"
             },
             "field_count": {
              "type": "number"
             },
             "complexity": {
              "type": "number"
             },
             "aliases": {
              "type": "number"
             },
             "root_fields": {
              "type": "array"
             }
            }
           }
          },
          "fragments": {
           "type": "array"
          },
          "fields_used": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "coordinate": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "deprecated": {},
             "count": {
              "type": "number"
             }
            }
           }
          },
          "deprecated_used": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "valid": false,
         "errors": [
          {
           "message": "Cannot query field \"price\" on type \"Book\".",
           "locations": [
            {
             "line": 1,
             "column": 28
            }
           ]
          }
         ],
         "operations": [
          {
           "name": null,
           "type": "query",
           "variables": [],
           "depth": 2,
           "field_count": 4,
           "complexity": 4,
           "aliases": 0,
           "root_fields": [
            "book"
           ]
          }
         ],
         "fragments": [],
         "fields_used": [
          {
           "coordinate": "Query.book",
           "type": "Book",
           "deprecated": null,
           "count": 1
          },
          {
           "coordinate": "Book.title",
           "type": "String",
           "deprecated": null,
           "count": 1
          },
          {
           "coordinate": "Book.isbn",
           "type": "String",
           "deprecated": "use id",
           "count": 1
          }
         ],
         "deprecated_used": [
          "Book.isbn"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/binary-formats": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Protobuf, MessagePack, CBOR, BSON",
    "description": "Pick a `format` (`protobuf`, `msgpack`, `cbor`, `bson`) and an `action`. To decode, send the bytes as `data` (base64 or hex, detected automatically; spaces, `0x` and colons are ignored) or upload a `file`; the result is JSON. To encode, send the value as `json`; the result has `base64`, `hex` and the size. `to` converts a decoded value straight into another format (for example MessagePack → CBOR).\n\nProtobuf: give the schema in `proto` (proto2 / proto3 text, with nested messages, enums, maps, oneofs, packed repeated fields, 64-bit integers kept exact as strings) and `message_type` (e.g. `shop.Order`). Field names may be the .proto names or lowerCamelCase; enums accept names or numbers; bytes are base64. `defaults=true` fills missing fields with their default values, `enums_as_numbers=true` returns enum numbers. Without `proto`, the wire data is decoded schemalessly: each field number with its wire type and possible readings (unsigned, signed zigzag, float / double, UTF-8 string or nested message).\n\nIn JSON, binary values appear as `{\"$bytes\": \"<base64>\"}`, CBOR tags as `{\"$tag\": n, \"value\": …}`, MessagePack extensions as `{\"$ext\": type, \"$bytes\": …}`, big integers as strings and timestamps as ISO dates; the same forms are accepted when encoding. BSON uses MongoDB Extended JSON (`$oid`, `$date`, `$numberLong`…, relaxed by default, `ejson=canonical` for canonical). Size limit: 2 MB of binary data.\n\nDocs: https://apibox.io.vn/docs/binary-formats/",
    "operationId": "binaryFormatsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/binary-formats/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "format": {
          "type": "string",
          "description": "`protobuf`, `msgpack`, `cbor` or `bson`."
         },
         "action": {
          "type": "string",
          "description": "`decode` or `encode` (default: encode when `json` is given)."
         },
         "data": {
          "type": "string",
          "description": "Decode: the bytes as base64 or hex."
         },
         "input_encoding": {
          "type": "string",
          "description": "Force `base64` or `hex` for `data`."
         },
         "json": {
          "type": "object",
          "description": "Encode: the value (JSON object / array, or a JSON string)."
         },
         "proto": {
          "type": "string",
          "description": "Protobuf: the .proto schema text."
         },
         "message_type": {
          "type": "string",
          "description": "Protobuf: message name, with package (e.g. `shop.Order`)."
         },
         "defaults": {
          "type": "boolean",
          "default": false,
          "description": "Protobuf decode: include fields with default values."
         },
         "enums_as_numbers": {
          "type": "boolean",
          "default": false,
          "description": "Protobuf decode: enums as numbers instead of names."
         },
         "ejson": {
          "type": "string",
          "default": "relaxed",
          "description": "BSON: `relaxed` or `canonical` Extended JSON."
         },
         "to": {
          "type": "string",
          "description": "Decode: also re-encode into `msgpack`, `cbor` or `bson`."
         }
        },
        "required": [
         "format"
        ]
       },
       "example": {
        "format": "protobuf",
        "proto": "syntax = \"proto3\";\nmessage Test1 { int32 a = 1; }",
        "data": "089601"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "format": {
          "type": "string",
          "description": "`protobuf`, `msgpack`, `cbor` or `bson`."
         },
         "action": {
          "type": "string",
          "description": "`decode` or `encode` (default: encode when `json` is given)."
         },
         "data": {
          "type": "string",
          "description": "Decode: the bytes as base64 or hex."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Decode: the binary file (multipart)."
         },
         "input_encoding": {
          "type": "string",
          "description": "Force `base64` or `hex` for `data`."
         },
         "json": {
          "type": "object",
          "description": "Encode: the value (JSON object / array, or a JSON string)."
         },
         "proto": {
          "type": "string",
          "description": "Protobuf: the .proto schema text."
         },
         "message_type": {
          "type": "string",
          "description": "Protobuf: message name, with package (e.g. `shop.Order`)."
         },
         "defaults": {
          "type": "boolean",
          "default": false,
          "description": "Protobuf decode: include fields with default values."
         },
         "enums_as_numbers": {
          "type": "boolean",
          "default": false,
          "description": "Protobuf decode: enums as numbers instead of names."
         },
         "ejson": {
          "type": "string",
          "default": "relaxed",
          "description": "BSON: `relaxed` or `canonical` Extended JSON."
         },
         "to": {
          "type": "string",
          "description": "Decode: also re-encode into `msgpack`, `cbor` or `bson`."
         }
        },
        "required": [
         "format"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "input_bytes": {
           "type": "number"
          },
          "message_type": {
           "type": "string"
          },
          "json": {
           "type": "object",
           "properties": {
            "a": {
             "type": "number"
            }
           }
          }
         }
        },
        "example": {
         "format": "protobuf",
         "action": "decode",
         "input_bytes": 3,
         "message_type": "Test1",
         "json": {
          "a": 150
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/curl-convert": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "curl Converter",
    "description": "Paste a curl command, for example from an API’s documentation or from the browser’s \"Copy as cURL\" (bash or Windows cmd), and get equivalent code for JavaScript `fetch`, `axios`, Python `requests`, PHP curl, Go `net/http`, Java `HttpClient`, C# `HttpClient`, Ruby `Net::HTTP`, Node.js `http` / `https`, `wget` and HTTPie. `to` selects targets (comma-separated, default all). The response also has the parsed request: method, URL, query parameters, headers, body (JSON, form, multipart parts or a file reference) and auth, handy to feed a no-code HTTP step.\n\nThe command line is parsed by our own POSIX shell-word parser: single and double quotes, backslash escapes, `$'…'` ANSI-C strings, line continuations with `\\`, `^` (cmd) or backtick (PowerShell). Supported options: `-X`, `-H`, `-d` / `--data` / `--data-raw` / `--data-binary` / `--data-urlencode`, `--json`, `-F` / `--form`, `-u`, `--oauth2-bearer`, `-b`, `-A`, `-e`, `-k`, `-L`, `-I`, `-G`, `--compressed`, `-x`, `--url`, `--url-query`, `-o`, `-m`, combined short flags (`-sSL`) and `--opt=value`.\n\nHarmless display options (`-s`, `-v`, `-i`, `--retry`…) are listed in `ignored_options`; options we do not translate are listed in `unsupported_options`, and `warnings` explain approximations (files read with `@`, cookies from a file, several URLs). Nothing is sent to the URL in the command.\n\nDocs: https://apibox.io.vn/docs/curl-convert/",
    "operationId": "curlConvertGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/curl-convert/"
    },
    "parameters": [
     {
      "name": "curl",
      "in": "query",
      "required": true,
      "description": "The curl command (or send it as a raw text body).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Targets: fetch, axios, python, php, go, java, csharp, ruby, node, wget, httpie or all (comma-separated).",
      "schema": {
       "type": "string",
       "default": "all"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "request": {
           "type": "object",
           "properties": {
            "method": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "full_url": {
             "type": "string"
            },
            "query": {
             "type": "object",
             "properties": {}
            },
            "headers": {
             "type": "object",
             "properties": {
              "Content-Type": {
               "type": "string"
              }
             }
            },
            "body": {
             "type": "object",
             "properties": {
              "type": {
               "type": "string"
              },
              "text": {
               "type": "string"
              },
              "json": {
               "type": "object"
              }
             }
            },
            "auth": {
             "type": "object",
             "properties": {
              "user": {
               "type": "string"
              },
              "password": {
               "type": "string"
              },
              "type": {
               "type": "string"
              }
             }
            },
            "follow_redirects": {
             "type": "boolean"
            },
            "insecure": {
             "type": "boolean"
            },
            "compressed": {
             "type": "boolean"
            }
           }
          },
          "code": {
           "type": "object",
           "properties": {
            "python": {
             "type": "string"
            }
           }
          },
          "targets": {
           "type": "object",
           "properties": {
            "python": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "curl Converter",
    "description": "Paste a curl command, for example from an API’s documentation or from the browser’s \"Copy as cURL\" (bash or Windows cmd), and get equivalent code for JavaScript `fetch`, `axios`, Python `requests`, PHP curl, Go `net/http`, Java `HttpClient`, C# `HttpClient`, Ruby `Net::HTTP`, Node.js `http` / `https`, `wget` and HTTPie. `to` selects targets (comma-separated, default all). The response also has the parsed request: method, URL, query parameters, headers, body (JSON, form, multipart parts or a file reference) and auth, handy to feed a no-code HTTP step.\n\nThe command line is parsed by our own POSIX shell-word parser: single and double quotes, backslash escapes, `$'…'` ANSI-C strings, line continuations with `\\`, `^` (cmd) or backtick (PowerShell). Supported options: `-X`, `-H`, `-d` / `--data` / `--data-raw` / `--data-binary` / `--data-urlencode`, `--json`, `-F` / `--form`, `-u`, `--oauth2-bearer`, `-b`, `-A`, `-e`, `-k`, `-L`, `-I`, `-G`, `--compressed`, `-x`, `--url`, `--url-query`, `-o`, `-m`, combined short flags (`-sSL`) and `--opt=value`.\n\nHarmless display options (`-s`, `-v`, `-i`, `--retry`…) are listed in `ignored_options`; options we do not translate are listed in `unsupported_options`, and `warnings` explain approximations (files read with `@`, cookies from a file, several URLs). Nothing is sent to the URL in the command.\n\nDocs: https://apibox.io.vn/docs/curl-convert/",
    "operationId": "curlConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/curl-convert/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "curl": {
          "type": "string",
          "description": "The curl command (or send it as a raw text body)."
         },
         "to": {
          "type": "string",
          "default": "all",
          "description": "Targets: fetch, axios, python, php, go, java, csharp, ruby, node, wget, httpie or all (comma-separated)."
         }
        },
        "required": [
         "curl"
        ]
       },
       "example": {
        "curl": "curl -X POST https://api.example.com/v1/orders -H 'Content-Type: application/json' -u key:secret -d '{\"sku\":\"A1\",\"qty\":2}'",
        "to": "python"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "request": {
           "type": "object",
           "properties": {
            "method": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "full_url": {
             "type": "string"
            },
            "query": {
             "type": "object",
             "properties": {}
            },
            "headers": {
             "type": "object",
             "properties": {
              "Content-Type": {
               "type": "string"
              }
             }
            },
            "body": {
             "type": "object",
             "properties": {
              "type": {
               "type": "string"
              },
              "text": {
               "type": "string"
              },
              "json": {
               "type": "object"
              }
             }
            },
            "auth": {
             "type": "object",
             "properties": {
              "user": {
               "type": "string"
              },
              "password": {
               "type": "string"
              },
              "type": {
               "type": "string"
              }
             }
            },
            "follow_redirects": {
             "type": "boolean"
            },
            "insecure": {
             "type": "boolean"
            },
            "compressed": {
             "type": "boolean"
            }
           }
          },
          "code": {
           "type": "object",
           "properties": {
            "python": {
             "type": "string"
            }
           }
          },
          "targets": {
           "type": "object",
           "properties": {
            "python": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "request": {
          "method": "POST",
          "url": "https://api.example.com/v1/orders",
          "full_url": "https://api.example.com/v1/orders",
          "query": {},
          "headers": {
           "Content-Type": "application/json"
          },
          "body": {
           "type": "json",
           "text": "{\"sku\":\"A1\",\"qty\":2}",
           "json": {
            "sku": "A1",
            "qty": 2
           }
          },
          "auth": {
           "user": "key",
           "password": "secret",
           "type": "basic"
          },
          "follow_redirects": false,
          "insecure": false,
          "compressed": false
         },
         "code": {
          "python": "import requests\n\njson_data = {\n    \"sku\": \"A1\",\n    \"qty\": 2,\n}\n\nresponse = requests.post(\"https://api.example.com/v1/orders\",\n    json=json_data,\n    auth=(\"key\", \"secret\"),\n    allow_redirects=False,\n)\nprint(response.status_code, response.text)\n"
         },
         "targets": {
          "python": "Python requests"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/web-push": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Web Push Sender",
    "description": "Call with no parameters (or `action=generate_keys`) to get a fresh P-256 VAPID key pair in base64url: `public_key` is the `applicationServerKey` for `pushManager.subscribe()` in the browser, `private_key` stays on your server. Keys are generated for the response only and never stored or logged.\n\n`action=send` posts a notification to one `subscription` (the PushSubscription JSON from the browser: `endpoint` + `keys.p256dh` + `keys.auth`) or up to 50 `subscriptions`. The optional `payload` (text or JSON, max 4,078 bytes) is encrypted with aes128gcm (RFC 8291) using WebCrypto ECDH, HKDF and AES-GCM, and the request is signed with a VAPID ES256 JWT (RFC 8292) built from your `vapid` object (`subject` = mailto: or https: contact, `public_key`, `private_key`). Set `ttl` (seconds, default 86400), `urgency` (very-low, low, normal, high) and `topic` (replaces an undelivered message with the same topic).\n\nEach result has the push service HTTP `status`; `gone: true` (404 / 410) means the subscription expired and should be deleted. `action=encrypt` returns the encrypted body and headers without sending, for debugging or sending yourself. Nothing is stored: subscriptions and keys live only in the request.\n\nDocs: https://apibox.io.vn/docs/web-push/",
    "operationId": "webPushGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/web-push/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`generate_keys` (default without a subscription), `send` or `encrypt` (build the request without sending).",
      "schema": {
       "type": "string",
       "default": "generate_keys"
      }
     },
     {
      "name": "ttl",
      "in": "query",
      "required": false,
      "description": "Seconds the push service keeps the message if the device is offline (0-2,419,200).",
      "schema": {
       "type": "number",
       "default": 86400
      }
     },
     {
      "name": "urgency",
      "in": "query",
      "required": false,
      "description": "`very-low`, `low`, `normal` or `high`.",
      "schema": {
       "type": "string",
       "default": "normal"
      }
     },
     {
      "name": "topic",
      "in": "query",
      "required": false,
      "description": "Up to 32 base64url characters; a newer message with the same topic replaces an undelivered one.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sent": {
           "type": "number"
          },
          "failed": {
           "type": "number"
          },
          "gone": {
           "type": "number"
          },
          "ttl": {
           "type": "number"
          },
          "urgency": {
           "type": "string"
          },
          "topic": {},
          "payload_bytes": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "host": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "status": {
              "type": "number"
             },
             "gone": {
              "type": "boolean"
             },
             "retry_after": {},
             "message_id": {},
             "response": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Web Push Sender",
    "description": "Call with no parameters (or `action=generate_keys`) to get a fresh P-256 VAPID key pair in base64url: `public_key` is the `applicationServerKey` for `pushManager.subscribe()` in the browser, `private_key` stays on your server. Keys are generated for the response only and never stored or logged.\n\n`action=send` posts a notification to one `subscription` (the PushSubscription JSON from the browser: `endpoint` + `keys.p256dh` + `keys.auth`) or up to 50 `subscriptions`. The optional `payload` (text or JSON, max 4,078 bytes) is encrypted with aes128gcm (RFC 8291) using WebCrypto ECDH, HKDF and AES-GCM, and the request is signed with a VAPID ES256 JWT (RFC 8292) built from your `vapid` object (`subject` = mailto: or https: contact, `public_key`, `private_key`). Set `ttl` (seconds, default 86400), `urgency` (very-low, low, normal, high) and `topic` (replaces an undelivered message with the same topic).\n\nEach result has the push service HTTP `status`; `gone: true` (404 / 410) means the subscription expired and should be deleted. `action=encrypt` returns the encrypted body and headers without sending, for debugging or sending yourself. Nothing is stored: subscriptions and keys live only in the request.\n\nDocs: https://apibox.io.vn/docs/web-push/",
    "operationId": "webPushPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/web-push/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "generate_keys",
          "description": "`generate_keys` (default without a subscription), `send` or `encrypt` (build the request without sending)."
         },
         "subscription": {
          "type": "object",
          "description": "PushSubscription JSON: `{\"endpoint\": \"https://...\", \"keys\": {\"p256dh\": \"...\", \"auth\": \"...\"}}`."
         },
         "subscriptions": {
          "type": "array",
          "items": {},
          "description": "Up to 50 subscriptions for one send."
         },
         "payload": {
          "type": [
           "string",
           "object"
          ],
          "description": "Message text or JSON object (max 4,078 bytes); omit for a push without data."
         },
         "vapid": {
          "type": "object",
          "description": "`{\"subject\": \"mailto:you@example.com\", \"public_key\": \"...\", \"private_key\": \"...\"}`, required for `send`."
         },
         "ttl": {
          "type": "number",
          "default": 86400,
          "description": "Seconds the push service keeps the message if the device is offline (0-2,419,200)."
         },
         "urgency": {
          "type": "string",
          "default": "normal",
          "description": "`very-low`, `low`, `normal` or `high`."
         },
         "topic": {
          "type": "string",
          "description": "Up to 32 base64url characters; a newer message with the same topic replaces an undelivered one."
         }
        }
       },
       "example": {
        "action": "send",
        "subscription": {
         "endpoint": "https://fcm.googleapis.com/fcm/send/abc",
         "keys": {
          "p256dh": "BCVxsr7N_eNgVRqvHtD0zTZsEc6-VV-JvLexhqUzORcxaOzi6-AYWXvTBHm4bjyPjs7Vd8pZGH6SRpkNtoIAiw4",
          "auth": "BTBZMqHH6r4Tts7J_aSIgg"
         }
        },
        "payload": {
         "title": "Đơn hàng #1024",
         "body": "Đã giao thành công"
        },
        "ttl": 3600,
        "urgency": "high",
        "vapid": {
         "subject": "mailto:ops@example.com",
         "public_key": "BECWGWmqQ8K_C-FP8oHoC2GdtyNmQRTEHe8z3qsK5VDKHjkpMUG-RRrKyy-jczLPSqC1y15k6r_iPaGLt39VFOw",
         "private_key": "(your private key)"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sent": {
           "type": "number"
          },
          "failed": {
           "type": "number"
          },
          "gone": {
           "type": "number"
          },
          "ttl": {
           "type": "number"
          },
          "urgency": {
           "type": "string"
          },
          "topic": {},
          "payload_bytes": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "host": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "status": {
              "type": "number"
             },
             "gone": {
              "type": "boolean"
             },
             "retry_after": {},
             "message_id": {},
             "response": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "sent": 0,
         "failed": 1,
         "gone": 1,
         "ttl": 3600,
         "urgency": "high",
         "topic": null,
         "payload_bytes": 61,
         "results": [
          {
           "index": 0,
           "host": "fcm.googleapis.com",
           "ok": false,
           "status": 410,
           "gone": true,
           "retry_after": null,
           "message_id": null,
           "response": "push subscription has unsubscribed or expired.\n"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/a11y-check": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Accessibility Checker",
    "description": "Send `html` (page source) or a public `url`. The page is parsed into a DOM without a browser and checked with the axe-core rule engine (Deque, MPL-2.0) for the chosen WCAG `level` (`a`, `aa` default, `aaa`) plus best practices: image alt text, form labels, link and button names, document title and language, heading order, landmarks, lists, tables, ARIA roles and attribute values, duplicate ARIA ids, autocomplete values, zoom blocking in the viewport meta tag, iframes titles and more.\n\nEach violation has the rule id, `impact` (critical, serious, moderate, minor), WCAG success criteria (e.g. `1.1.1`), a help link, and up to `max_nodes` offending elements with their CSS selector, HTML snippet and what to fix. `score` (0-100) summarises the result; `needs_review` lists checks axe could not decide.\n\nRules that need a rendered page (colour contrast, target size, inline spacing, scrollable regions, focus order) are not run and are listed in `not_checked`; content added by JavaScript is not seen. Automated checks find only part of the WCAG issues, so also test manually. HTML is limited to 3 MB.\n\nDocs: https://apibox.io.vn/docs/a11y-check/",
    "operationId": "a11yCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/a11y-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public page to fetch (HTML up to 3 MB). Use `html` instead for pages behind a login.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "WCAG level: `a`, `aa` or `aaa`.",
      "schema": {
       "type": "string",
       "default": "aa"
      }
     },
     {
      "name": "best_practices",
      "in": "query",
      "required": false,
      "description": "Include axe best-practice rules (heading order, landmarks, empty headings…).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "max_nodes",
      "in": "query",
      "required": false,
      "description": "Offending elements returned per rule (1-100).",
      "schema": {
       "type": "number",
       "default": 10
      }
     },
     {
      "name": "include_passes",
      "in": "query",
      "required": false,
      "description": "Also list the rules that passed.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "experimental",
      "in": "query",
      "required": false,
      "description": "Include axe experimental rules.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "url": {},
          "level": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "issues": {
           "type": "number"
          },
          "by_impact": {
           "type": "object",
           "properties": {
            "critical": {
             "type": "number"
            },
            "serious": {
             "type": "number"
            },
            "moderate": {
             "type": "number"
            },
            "minor": {
             "type": "number"
            }
           }
          },
          "rules": {
           "type": "object",
           "properties": {
            "checked": {
             "type": "number"
            },
            "failed": {
             "type": "number"
            },
            "needs_review": {
             "type": "number"
            },
            "not_checked": {
             "type": "number"
            }
           }
          },
          "violations": {
           "type": "array",
           "items": {}
          },
          "needs_review": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "impact": {
              "type": "string"
             },
             "help": {
              "type": "string"
             },
             "wcag": {
              "type": "array"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "not_checked": {
           "type": "array",
           "items": {}
          },
          "engine": {
           "type": "string"
          },
          "ms": {
           "type": "number"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Accessibility Checker",
    "description": "Send `html` (page source) or a public `url`. The page is parsed into a DOM without a browser and checked with the axe-core rule engine (Deque, MPL-2.0) for the chosen WCAG `level` (`a`, `aa` default, `aaa`) plus best practices: image alt text, form labels, link and button names, document title and language, heading order, landmarks, lists, tables, ARIA roles and attribute values, duplicate ARIA ids, autocomplete values, zoom blocking in the viewport meta tag, iframes titles and more.\n\nEach violation has the rule id, `impact` (critical, serious, moderate, minor), WCAG success criteria (e.g. `1.1.1`), a help link, and up to `max_nodes` offending elements with their CSS selector, HTML snippet and what to fix. `score` (0-100) summarises the result; `needs_review` lists checks axe could not decide.\n\nRules that need a rendered page (colour contrast, target size, inline spacing, scrollable regions, focus order) are not run and are listed in `not_checked`; content added by JavaScript is not seen. Automated checks find only part of the WCAG issues, so also test manually. HTML is limited to 3 MB.\n\nDocs: https://apibox.io.vn/docs/a11y-check/",
    "operationId": "a11yCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/a11y-check/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public page to fetch (HTML up to 3 MB). Use `html` instead for pages behind a login."
         },
         "html": {
          "type": "string",
          "description": "Page source to check (or send it as a text/html body)."
         },
         "level": {
          "type": "string",
          "default": "aa",
          "description": "WCAG level: `a`, `aa` or `aaa`."
         },
         "best_practices": {
          "type": "boolean",
          "default": true,
          "description": "Include axe best-practice rules (heading order, landmarks, empty headings…)."
         },
         "max_nodes": {
          "type": "number",
          "default": 10,
          "description": "Offending elements returned per rule (1-100)."
         },
         "include_passes": {
          "type": "boolean",
          "default": false,
          "description": "Also list the rules that passed."
         },
         "experimental": {
          "type": "boolean",
          "default": false,
          "description": "Include axe experimental rules."
         }
        }
       },
       "example": {
        "html": "<!doctype html><html><head><title>Shop</title></head><body><img src=\"logo.png\"><a href=\"/cart\"></a><form><input type=\"email\" placeholder=\"Email\"><button></button></form></body></html>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "url": {},
          "level": {
           "type": "string"
          },
          "score": {
           "type": "number"
          },
          "issues": {
           "type": "number"
          },
          "by_impact": {
           "type": "object",
           "properties": {
            "critical": {
             "type": "number"
            },
            "serious": {
             "type": "number"
            },
            "moderate": {
             "type": "number"
            },
            "minor": {
             "type": "number"
            }
           }
          },
          "rules": {
           "type": "object",
           "properties": {
            "checked": {
             "type": "number"
            },
            "failed": {
             "type": "number"
            },
            "needs_review": {
             "type": "number"
            },
            "not_checked": {
             "type": "number"
            }
           }
          },
          "violations": {
           "type": "array",
           "items": {}
          },
          "needs_review": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "impact": {
              "type": "string"
             },
             "help": {
              "type": "string"
             },
             "wcag": {
              "type": "array"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "not_checked": {
           "type": "array",
           "items": {}
          },
          "engine": {
           "type": "string"
          },
          "ms": {
           "type": "number"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "source": "html",
         "url": null,
         "level": "AA",
         "score": 75,
         "issues": 8,
         "by_impact": {
          "critical": 2,
          "serious": 2,
          "moderate": 4,
          "minor": 0
         },
         "rules": {
          "checked": 83,
          "failed": 7,
          "needs_review": 1,
          "not_checked": 8
         },
         "violations": [
          {
           "rule": "button-name",
           "impact": "critical",
           "level": "A",
           "wcag": [
            "4.1.2"
           ],
           "best_practice": false,
           "help": "Buttons must have discernible text",
           "description": "Ensure buttons have discernible text",
           "help_url": "https://dequeuniversity.com/rules/axe/4.14/button-name?application=axeAPI",
           "count": 1,
           "nodes": [
            {
             "target": "button",
             "html": "<button></button>",
             "failure": "Element does not have inner text that is visible to screen readers | aria-label attribute does not exist or is empty | …"
            }
           ]
          },
          {
           "rule": "image-alt",
           "impact": "critical",
           "level": "A",
           "wcag": [
            "1.1.1"
           ],
           "best_practice": false,
           "help": "Images must have alternative text",
           "description": "Ensure <img> elements have alternative text or a role of none or presentation",
           "help_url": "https://dequeuniversity.com/rules/axe/4.14/image-alt?application=axeAPI",
           "count": 1,
           "nodes": [
            {
             "target": "img",
             "html": "<img src=\"logo.png\">",
             "failure": "Element does not have an alt attribute | …"
            }
           ]
          },
          "…"
         ],
         "needs_review": [
          {
           "rule": "bypass",
           "impact": "serious",
           "help": "Page must have means to bypass repeated blocks",
           "wcag": [
            "2.4.1"
           ],
           "…": "…"
          }
         ],
         "not_checked": [
          {
           "rule": "avoid-inline-spacing",
           "wcag": [
            "1.4.12"
           ],
           "reason": "needs the CSS object model"
          },
          {
           "rule": "color-contrast",
           "wcag": [
            "1.4.3"
           ],
           "reason": "needs rendered colours and layout"
          },
          "…"
         ],
         "engine": "axe-core 4.14.0 (static DOM, no layout)",
         "ms": 34,
         "note": "Static check without a browser: colour contrast, target size, focus order and anything that depends on CSS layout or scripts are not tested. …"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/font-subset": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Font Subsetter",
    "description": "Upload a font as multipart `file` (TTF, OTF, WOFF or a TrueType collection with `face_index`) and say which characters to keep: sample `text`, `unicodes` ranges (`U+0020-007E, U+1EA0-1EF9`) and / or a `preset`: `latin`, `latin-ext` (Google Fonts ranges), `vietnamese` (Basic Latin + Latin-1 + every precomposed Vietnamese letter + combining tone marks + ₫), `vietnamese-only` or `digits`. The font is subset with HarfBuzz hb-subset, keeping the glyphs reachable through OpenType layout (ligatures, accents).\n\nChoose `format` `woff2` (default), `woff`, `ttf` or `all`. The response has the sizes before and after, `missing_characters` the font does not contain, `vietnamese_support` (full / partial / none), a CSS `@font-face` block with `unicode-range`, and the files as base64 (`output=binary` returns the font itself). Layout features: `features=default` (HarfBuzz default set), `all`, or a list such as `kern,liga`; `drop_features` removes some; `hinting=false` drops hinting for smaller files; `pin_axes=true` turns a variable font into its default instance.\n\nWOFF2 input is not accepted (send the TTF / WOFF). Fonts up to 30 MB. Only subset fonts whose licence allows it (e.g. SIL OFL); responsibility for the font licence stays with you.\n\nDocs: https://apibox.io.vn/docs/font-subset/",
    "operationId": "fontSubsetPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/font-subset/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Sample text: every character in it is kept."
         },
         "unicodes": {
          "type": "string",
          "description": "Unicode ranges, e.g. `U+0020-007E, U+20AB` (wildcards like `U+1E??` allowed)."
         },
         "preset": {
          "type": "string",
          "description": "`latin`, `latin-ext`, `vietnamese`, `vietnamese-only`, `digits` (comma list allowed)."
         },
         "format": {
          "type": "string",
          "default": "woff2",
          "description": "`woff2`, `woff`, `ttf` or `all` (comma list allowed)."
         },
         "features": {
          "type": "string",
          "default": "default",
          "description": "OpenType layout features to keep: `default`, `all` or a list like `kern,liga,ss01`."
         },
         "drop_features": {
          "type": "string",
          "description": "Feature tags to remove, e.g. `dlig,salt`."
         },
         "hinting": {
          "type": "boolean",
          "default": true,
          "description": "`false` removes TrueType hinting (smaller files)."
         },
         "pin_axes": {
          "type": "boolean",
          "default": false,
          "description": "Variable fonts: keep only the default instance."
         },
         "family": {
          "type": "string",
          "description": "font-family name in the CSS (default: the font’s family name)."
         },
         "output": {
          "type": "string",
          "default": "json",
          "description": "`json` (files as base64) or `binary` (the first chosen format as a file)."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "TTF, OTF, WOFF or TTC font (multipart, raw body or `file_base64`), max 30 MB."
         },
         "text": {
          "type": "string",
          "description": "Sample text: every character in it is kept."
         },
         "unicodes": {
          "type": "string",
          "description": "Unicode ranges, e.g. `U+0020-007E, U+20AB` (wildcards like `U+1E??` allowed)."
         },
         "preset": {
          "type": "string",
          "description": "`latin`, `latin-ext`, `vietnamese`, `vietnamese-only`, `digits` (comma list allowed)."
         },
         "format": {
          "type": "string",
          "default": "woff2",
          "description": "`woff2`, `woff`, `ttf` or `all` (comma list allowed)."
         },
         "features": {
          "type": "string",
          "default": "default",
          "description": "OpenType layout features to keep: `default`, `all` or a list like `kern,liga,ss01`."
         },
         "drop_features": {
          "type": "string",
          "description": "Feature tags to remove, e.g. `dlig,salt`."
         },
         "hinting": {
          "type": "boolean",
          "default": true,
          "description": "`false` removes TrueType hinting (smaller files)."
         },
         "pin_axes": {
          "type": "boolean",
          "default": false,
          "description": "Variable fonts: keep only the default instance."
         },
         "family": {
          "type": "string",
          "description": "font-family name in the CSS (default: the font’s family name)."
         },
         "output": {
          "type": "string",
          "default": "json",
          "description": "`json` (files as base64) or `binary` (the first chosen format as a file)."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "font": {
           "type": "object",
           "properties": {
            "family": {
             "type": "string"
            },
            "style": {
             "type": "string"
            },
            "full_name": {
             "type": "string"
            },
            "postscript_name": {
             "type": "string"
            },
            "input_format": {
             "type": "string"
            },
            "input_bytes": {
             "type": "number"
            },
            "characters_in_font": {
             "type": "number"
            }
           }
          },
          "requested": {
           "type": "number"
          },
          "kept": {
           "type": "number"
          },
          "missing": {
           "type": "number"
          },
          "missing_characters": {
           "type": "string"
          },
          "missing_ranges": {
           "type": "string"
          },
          "vietnamese_support": {
           "type": "string"
          },
          "features": {
           "type": "string"
          },
          "hinting": {
           "type": "boolean"
          },
          "sizes": {
           "type": "object",
           "properties": {
            "original": {
             "type": "number"
            },
            "woff2": {
             "type": "number"
            },
            "woff": {
             "type": "number"
            }
           }
          },
          "saved_percent": {
           "type": "number"
          },
          "unicode_range": {
           "type": "string"
          },
          "css": {
           "type": "string"
          },
          "files": {
           "type": "object",
           "properties": {
            "woff2": {
             "type": "object",
             "properties": {
              "filename": {
               "type": "string"
              },
              "content_base64": {
               "type": "string"
              }
             }
            },
            "woff": {
             "type": "object",
             "properties": {
              "filename": {
               "type": "string"
              },
              "content_base64": {
               "type": "string"
              }
             }
            }
           }
          },
          "ms": {
           "type": "number"
          }
         }
        },
        "example": {
         "font": {
          "family": "Be Vietnam Pro",
          "style": "Regular",
          "full_name": "Be Vietnam Pro Regular",
          "postscript_name": "BeVietnamPro-Regular",
          "input_format": "ttf",
          "input_bytes": 132948,
          "characters_in_font": 459
         },
         "requested": 311,
         "kept": 309,
         "missing": 2,
         "missing_characters": "̩‛",
         "missing_ranges": "U+0329, U+201B",
         "vietnamese_support": "full",
         "features": "default",
         "hinting": true,
         "sizes": {
          "original": 132948,
          "woff2": 30884,
          "woff": 35096
         },
         "saved_percent": 76.8,
         "unicode_range": "U+0020-007E, U+00A0-00FF, U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0306, U+0309, U+0323, U+1EA0-1EF9, U+2013-2014, U+2018-201A, U+201C-201D, U+2026, U+20AB",
         "css": "@font-face {\n  font-family: 'Be Vietnam Pro';\n  font-style: normal;\n  font-weight: 400;\n  font-display: swap;\n  src: url('BeVietnamPro-Regular-subset.woff2') format('woff2'),\n       url('BeVietnamPro-Regular-subset.woff') format('woff');\n  unicode-range: U+0020-007E, U+00A0-00FF, …, U+1EA0-1EF9, …, U+20AB;\n}",
         "files": {
          "woff2": {
           "filename": "BeVietnamPro-Regular-subset.woff2",
           "content_base64": "d09GMgABAAAAAHikABEAAAABScwAAHhGAAEAAAAA…"
          },
          "woff": {
           "filename": "BeVietnamPro-Regular-subset.woff",
           "content_base64": "d09GRgABAAAAAIkYABEAAAABScwAAQAAAAAAAAAA…"
          }
         },
         "ms": 177
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/media-metadata": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "Audio & Video Metadata",
    "description": "Upload the file as multipart `file` (or raw body / `file_base64`), or give a public `url`: only the first `max_mb` MB (default 8, max 25) are downloaded, which is enough for most files. Formats: MP3 (ID3v1 / v2), AAC (ADTS), M4A / MP4 / MOV (ISO BMFF), FLAC, Ogg Vorbis / Opus, WAV, AIFF, WebM / MKV (Matroska), WMA / ASF and more, parsed with the music-metadata library.\n\nThe response has the `container`, main `codec`, `duration` (seconds and `duration_hms`), `bitrate`, `sample_rate`, `channels`, `bits_per_sample`, `lossless`, and for video the `width`, `height`, `fps` and `video_codec` (H.264, H.265 / HEVC, VP9, AV1…). `tracks` lists every audio / video / subtitle track; `tags` holds title, artist, album, year, genre, track number, comment and encoder.\n\n`cover` describes embedded cover art; with `cover=true` it includes a JPEG `thumbnail` (max 300 px) as a data URL. When a URL is read only partly, duration and bitrate may be estimates and MP4 files with their index at the end may lack details (the response says so).\n\nDocs: https://apibox.io.vn/docs/media-metadata/",
    "operationId": "mediaMetadataGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/media-metadata/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the file instead of an upload.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "max_mb",
      "in": "query",
      "required": false,
      "description": "Megabytes read from the URL (1-25).",
      "schema": {
       "type": "number",
       "default": 8
      }
     },
     {
      "name": "cover",
      "in": "query",
      "required": false,
      "description": "Include a JPEG thumbnail of the embedded cover art.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "file": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            },
            "kind": {
             "type": "string"
            }
           }
          },
          "container": {
           "type": "string"
          },
          "codec": {
           "type": "string"
          },
          "codec_profile": {},
          "duration": {
           "type": "number"
          },
          "duration_hms": {
           "type": "string"
          },
          "bitrate": {
           "type": "number"
          },
          "overall_bitrate": {
           "type": "number"
          },
          "sample_rate": {
           "type": "number"
          },
          "channels": {
           "type": "number"
          },
          "bits_per_sample": {
           "type": "number"
          },
          "lossless": {
           "type": "boolean"
          },
          "has_audio": {
           "type": "boolean"
          },
          "has_video": {
           "type": "boolean"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "fps": {
           "type": "number"
          },
          "video_codec": {
           "type": "string"
          },
          "tracks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "codec": {
              "type": "string"
             },
             "codec_id": {
              "type": "string"
             },
             "language": {},
             "duration": {
              "type": "number"
             },
             "bitrate": {
              "type": "number"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "display_width": {
              "type": "number"
             },
             "display_height": {
              "type": "number"
             },
             "fps": {
              "type": "number"
             },
             "interlaced": {},
             "sample_rate": {
              "type": "number"
             },
             "channels": {
              "type": "number"
             },
             "bit_depth": {
              "type": "number"
             }
            }
           }
          },
          "tags": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "encodedby": {
             "type": "string"
            }
           }
          },
          "tag_types": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "cover": {}
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Audio & Video Metadata",
    "description": "Upload the file as multipart `file` (or raw body / `file_base64`), or give a public `url`: only the first `max_mb` MB (default 8, max 25) are downloaded, which is enough for most files. Formats: MP3 (ID3v1 / v2), AAC (ADTS), M4A / MP4 / MOV (ISO BMFF), FLAC, Ogg Vorbis / Opus, WAV, AIFF, WebM / MKV (Matroska), WMA / ASF and more, parsed with the music-metadata library.\n\nThe response has the `container`, main `codec`, `duration` (seconds and `duration_hms`), `bitrate`, `sample_rate`, `channels`, `bits_per_sample`, `lossless`, and for video the `width`, `height`, `fps` and `video_codec` (H.264, H.265 / HEVC, VP9, AV1…). `tracks` lists every audio / video / subtitle track; `tags` holds title, artist, album, year, genre, track number, comment and encoder.\n\n`cover` describes embedded cover art; with `cover=true` it includes a JPEG `thumbnail` (max 300 px) as a data URL. When a URL is read only partly, duration and bitrate may be estimates and MP4 files with their index at the end may lack details (the response says so).\n\nDocs: https://apibox.io.vn/docs/media-metadata/",
    "operationId": "mediaMetadataPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/media-metadata/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the file instead of an upload."
         },
         "max_mb": {
          "type": "number",
          "default": 8,
          "description": "Megabytes read from the URL (1-25)."
         },
         "cover": {
          "type": "boolean",
          "default": false,
          "description": "Include a JPEG thumbnail of the embedded cover art."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Audio or video file (multipart, raw body or `file_base64`), up to your plan’s file limit."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the file instead of an upload."
         },
         "max_mb": {
          "type": "number",
          "default": 8,
          "description": "Megabytes read from the URL (1-25)."
         },
         "cover": {
          "type": "boolean",
          "default": false,
          "description": "Include a JPEG thumbnail of the embedded cover art."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "file": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            },
            "kind": {
             "type": "string"
            }
           }
          },
          "container": {
           "type": "string"
          },
          "codec": {
           "type": "string"
          },
          "codec_profile": {},
          "duration": {
           "type": "number"
          },
          "duration_hms": {
           "type": "string"
          },
          "bitrate": {
           "type": "number"
          },
          "overall_bitrate": {
           "type": "number"
          },
          "sample_rate": {
           "type": "number"
          },
          "channels": {
           "type": "number"
          },
          "bits_per_sample": {
           "type": "number"
          },
          "lossless": {
           "type": "boolean"
          },
          "has_audio": {
           "type": "boolean"
          },
          "has_video": {
           "type": "boolean"
          },
          "width": {
           "type": "number"
          },
          "height": {
           "type": "number"
          },
          "fps": {
           "type": "number"
          },
          "video_codec": {
           "type": "string"
          },
          "tracks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "codec": {
              "type": "string"
             },
             "codec_id": {
              "type": "string"
             },
             "language": {},
             "duration": {
              "type": "number"
             },
             "bitrate": {
              "type": "number"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "display_width": {
              "type": "number"
             },
             "display_height": {
              "type": "number"
             },
             "fps": {
              "type": "number"
             },
             "interlaced": {},
             "sample_rate": {
              "type": "number"
             },
             "channels": {
              "type": "number"
             },
             "bit_depth": {
              "type": "number"
             }
            }
           }
          },
          "tags": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "encodedby": {
             "type": "string"
            }
           }
          },
          "tag_types": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "cover": {}
         }
        },
        "example": {
         "file": {
          "name": "bai-giang.mp4",
          "bytes": 31997,
          "kind": "file"
         },
         "container": "isom/iso2/avc1/mp41",
         "codec": "MPEG-4/AAC",
         "codec_profile": null,
         "duration": 2.023,
         "duration_hms": "00:02.023",
         "bitrate": 127988,
         "overall_bitrate": 127988,
         "sample_rate": 44100,
         "channels": 1,
         "bits_per_sample": 16,
         "lossless": false,
         "has_audio": true,
         "has_video": true,
         "width": 320,
         "height": 240,
         "fps": 25,
         "video_codec": "H.264 / AVC",
         "tracks": [
          {
           "id": 1,
           "type": "video",
           "codec": "H.264 / AVC",
           "codec_id": "avc1",
           "language": null,
           "duration": 2,
           "bitrate": 45020,
           "width": 320,
           "height": 240,
           "display_width": 320,
           "display_height": 240,
           "fps": 25,
           "interlaced": null
          },
          {
           "id": 2,
           "type": "audio",
           "codec": "MPEG-4/AAC",
           "codec_id": "mp4a",
           "language": null,
           "duration": 2.023,
           "bitrate": 69699,
           "sample_rate": 44100,
           "channels": 1,
           "bit_depth": 16
          }
         ],
         "tags": {
          "title": "MP4 test",
          "encodedby": "Lavf62.3.100"
         },
         "tag_types": [
          "iTunes"
         ],
         "cover": null
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/archive": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "ZIP & tar.gz Archive Tool",
    "description": "`action=list` (default for an uploaded `file`) returns every entry with name, size, compressed size, date, CRC-32, compression method and flags for directories, encrypted entries and `unsafe` names (absolute paths or `..`). ZIP names without the UTF-8 flag are decoded as UTF-8 when valid, else CP437 (set `name_encoding`, e.g. `windows-1258`, for archives made by older Windows tools). ZIP64, tar (ustar, pax and GNU long names), tar.gz and single-file .gz are supported.\n\n`action=extract` with `entry` returns one file as base64 (plus `text` for small UTF-8 files) or as the raw file with `output=raw`. `action=extract_all` returns all files as base64 JSON (up to 20 MB) or re-packed as a ZIP with `output=zip`; unsafe and encrypted entries are skipped and listed.\n\n`action=create` builds a `format` `zip` (default), `tar`, `tar.gz` or `gz` from multipart files (file1, file2…) or `files`: `[{\"name\": \"a.txt\", \"content_base64\": \"…\"}]` (or `content` text), with compression `level` 0-9. Zip-bomb guards: total uncompressed size (200 MB on Pro), 1000:1 ratio, 10,000 entries; output sizes are checked while inflating. Password-protected (encrypted) ZIPs, 7z, RAR, bzip2 and xz are not supported.\n\nDocs: https://apibox.io.vn/docs/archive/",
    "operationId": "archivePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/archive/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "list",
          "description": "`list`, `extract`, `extract_all` or `create`."
         },
         "entry": {
          "type": "string",
          "description": "Entry name for `extract`."
         },
         "output": {
          "type": "string",
          "default": "json",
          "description": "`extract`: `json` or `raw`; `extract_all`: `json` or `zip`; `create`: file (default) or `base64`."
         },
         "files": {
          "type": "array",
          "items": {},
          "description": "For `create`: `[{\"name\": \"dir/a.txt\", \"content_base64\": \"…\"}]` or `content` text; multipart files also work."
         },
         "format": {
          "type": "string",
          "default": "zip",
          "description": "For `create`: `zip`, `tar`, `tar.gz` or `gz`."
         },
         "level": {
          "type": "number",
          "default": 6,
          "description": "Compression level 0-9 for `create`."
         },
         "name_encoding": {
          "type": "string",
          "default": "auto",
          "description": "ZIP name encoding: `auto`, `utf-8`, `cp437`, `windows-1258`…"
         },
         "filename": {
          "type": "string",
          "default": "archive",
          "description": "Download name for `create`."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "list",
          "description": "`list`, `extract`, `extract_all` or `create`."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Archive to read (ZIP, tar, tar.gz / tgz, gz) as multipart, raw body or `file_base64`."
         },
         "entry": {
          "type": "string",
          "description": "Entry name for `extract`."
         },
         "output": {
          "type": "string",
          "default": "json",
          "description": "`extract`: `json` or `raw`; `extract_all`: `json` or `zip`; `create`: file (default) or `base64`."
         },
         "files": {
          "type": "array",
          "items": {},
          "description": "For `create`: `[{\"name\": \"dir/a.txt\", \"content_base64\": \"…\"}]` or `content` text; multipart files also work."
         },
         "format": {
          "type": "string",
          "default": "zip",
          "description": "For `create`: `zip`, `tar`, `tar.gz` or `gz`."
         },
         "level": {
          "type": "number",
          "default": 6,
          "description": "Compression level 0-9 for `create`."
         },
         "name_encoding": {
          "type": "string",
          "default": "auto",
          "description": "ZIP name encoding: `auto`, `utf-8`, `cp437`, `windows-1258`…"
         },
         "filename": {
          "type": "string",
          "default": "archive",
          "description": "Download name for `create`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "entries": {
           "type": "number"
          },
          "files": {
           "type": "number"
          },
          "directories": {
           "type": "number"
          },
          "total_bytes": {
           "type": "number"
          },
          "compressed_bytes": {
           "type": "number"
          },
          "ratio": {
           "type": "number"
          },
          "encrypted": {
           "type": "boolean"
          },
          "zip_bomb_suspected": {
           "type": "boolean"
          },
          "warnings": {
           "type": "array"
          },
          "truncated": {
           "type": "boolean"
          },
          "list": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "format": "zip",
         "entries": 4,
         "files": 3,
         "directories": 1,
         "total_bytes": 300021,
         "compressed_bytes": 300071,
         "ratio": 1,
         "encrypted": false,
         "zip_bomb_suspected": false,
         "warnings": [],
         "truncated": false,
         "list": [
          {
           "name": "hoa-don.xml",
           "dir": false,
           "size": 15,
           "compressed": 15,
           "method": "stored",
           "date": "2026-11-11T13:46:06",
           "crc32": "b3e05eec",
           "encrypted": false,
           "unsafe": false
          },
          {
           "name": "sub/",
           "dir": true,
           "size": 0,
           "compressed": 0,
           "method": "stored",
           "date": "2026-11-11T13:46:06",
           "crc32": "00000000",
           "encrypted": false,
           "unsafe": false
          },
          {
           "name": "sub/rand.bin",
           "dir": false,
           "size": 300000,
           "compressed": 300050,
           "method": "deflate",
           "date": "2026-11-11T13:46:06",
           "crc32": "85582e2a",
           "encrypted": false,
           "unsafe": false
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/log-parse": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Log Parser & Analyzer",
    "description": "Send the log as `log` text, a text/plain body or a multipart `file` (up to 200,000 lines). The `format` is detected automatically: `combined` and `common` (nginx / Apache defaults), `syslog` (RFC 3164 and RFC 5424) or `json` (one JSON object per line, with common field names such as `remote_addr`, `status`, `request`, `httpRequest.status`). For a custom layout pass your nginx `log_format` string (`$remote_addr … \"$request\" $status … $request_time`) or Apache `LogFormat` (`%h %l %u %t \"%r\" %>s %b %D`).\n\nEach row has the parsed fields plus `time` (ISO 8601 UTC), `method`, `path`, `protocol` and, for bots, `bot` and the AI bot category. `stats` contains the time range, requests per hour, peak minute, unique IPs, bytes, status codes and classes, 4xx / 5xx counts with the top failing paths, top IPs, paths, referrers and user agents, browsers and OS (ua-parser-js), bot requests and AI crawlers (ai.robots.txt list); for syslog: severities, facilities, hosts and apps.\n\nFilter with `status` (`404`, `4xx`, `5xx`), choose `limit` rows to return (default 500, max 10,000; stats always cover all lines) and `top` list size. RFC 3164 syslog lines have no year: set `year`. Lines that do not match are counted in `failed` with their line numbers.\n\nDocs: https://apibox.io.vn/docs/log-parse/",
    "operationId": "logParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/log-parse/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "log": {
          "type": "string",
          "description": "Log text (or send a text/plain body or multipart `file`)."
         },
         "format": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `combined`, `common`, `syslog`, `json` (or `nginx` / `apache` with `log_format`)."
         },
         "log_format": {
          "type": "string",
          "description": "nginx log_format or Apache LogFormat string for custom layouts."
         },
         "status": {
          "type": "string",
          "description": "Keep only one status (`404`) or class (`4xx`, `5xx`)."
         },
         "limit": {
          "type": "number",
          "default": 500,
          "description": "Parsed rows returned (0-10,000)."
         },
         "top": {
          "type": "number",
          "default": 10,
          "description": "Length of the top lists (1-100)."
         },
         "year": {
          "type": "number",
          "default": "current year",
          "description": "Year for RFC 3164 syslog lines (they have none)."
         }
        }
       },
       "example": {
        "log": "203.0.113.5 - - [11/Nov/2026:08:15:02 +0700] \"GET /san-pham/ao-thun?page=2 HTTP/1.1\" 200 5120 \"https://www.google.com/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36\"\n66.249.66.1 - - [11/Nov/2026:08:16:00 +0700] \"GET /robots.txt HTTP/1.1\" 200 120 \"-\" \"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\"\n…",
        "limit": 1
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "log": {
          "type": "string",
          "description": "Log text (or send a text/plain body or multipart `file`)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Log file upload."
         },
         "format": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `combined`, `common`, `syslog`, `json` (or `nginx` / `apache` with `log_format`)."
         },
         "log_format": {
          "type": "string",
          "description": "nginx log_format or Apache LogFormat string for custom layouts."
         },
         "status": {
          "type": "string",
          "description": "Keep only one status (`404`) or class (`4xx`, `5xx`)."
         },
         "limit": {
          "type": "number",
          "default": 500,
          "description": "Parsed rows returned (0-10,000)."
         },
         "top": {
          "type": "number",
          "default": 10,
          "description": "Length of the top lists (1-100)."
         },
         "year": {
          "type": "number",
          "default": "current year",
          "description": "Year for RFC 3164 syslog lines (they have none)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "lines": {
           "type": "number"
          },
          "parsed": {
           "type": "number"
          },
          "failed": {
           "type": "number"
          },
          "failed_lines": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "truncated_input": {
           "type": "boolean"
          },
          "stats": {
           "type": "object",
           "properties": {
            "time_range": {
             "type": "object",
             "properties": {
              "from": {
               "type": "string"
              },
              "to": {
               "type": "string"
              }
             }
            },
            "requests_per_hour": {
             "type": "object",
             "properties": {
              "2026-11-11T01:00Z": {
               "type": "number"
              }
             }
            },
            "peak_minute": {
             "type": "object",
             "properties": {
              "minute": {
               "type": "string"
              },
              "count": {
               "type": "number"
              }
             }
            },
            "average_per_minute": {
             "type": "number"
            },
            "unique_ips": {
             "type": "number"
            },
            "bytes_sent": {
             "type": "number"
            },
            "status_classes": {
             "type": "object",
             "properties": {
              "2xx": {
               "type": "number"
              },
              "3xx": {
               "type": "number"
              },
              "4xx": {
               "type": "number"
              },
              "5xx": {
               "type": "number"
              }
             }
            },
            "status_codes": {
             "type": "object",
             "properties": {
              "200": {
               "type": "number"
              },
              "302": {
               "type": "number"
              },
              "404": {
               "type": "number"
              },
              "502": {
               "type": "number"
              }
             }
            },
            "errors_4xx": {
             "type": "number"
            },
            "errors_5xx": {
             "type": "number"
            },
            "methods": {
             "type": "object",
             "properties": {
              "GET": {
               "type": "number"
              },
              "POST": {
               "type": "number"
              }
             }
            },
            "top_ips": {
             "type": "array",
             "items": {}
            },
            "top_paths": {
             "type": "array",
             "items": {}
            },
            "top_4xx": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "top_5xx": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "browsers": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "bot_requests": {
             "type": "number"
            },
            "top_bots": {
             "type": "array",
             "items": {}
            },
            "ai_bots": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "…": {
             "type": "string"
            }
           }
          },
          "rows_returned": {
           "type": "number"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "remote_addr": {
              "type": "string"
             },
             "ident": {},
             "remote_user": {},
             "time_local": {
              "type": "string"
             },
             "request": {
              "type": "string"
             },
             "status": {
              "type": "number"
             },
             "body_bytes_sent": {
              "type": "number"
             },
             "http_referer": {
              "type": "string"
             },
             "http_user_agent": {
              "type": "string"
             },
             "time": {
              "type": "string"
             },
             "method": {
              "type": "string"
             },
             "path": {
              "type": "string"
             },
             "protocol": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "format": "combined",
         "lines": 7,
         "parsed": 6,
         "failed": 1,
         "failed_lines": [
          7
         ],
         "truncated_input": false,
         "stats": {
          "time_range": {
           "from": "2026-11-11T01:15:02.000Z",
           "to": "2026-11-11T01:16:46.000Z"
          },
          "requests_per_hour": {
           "2026-11-11T01:00Z": 6
          },
          "peak_minute": {
           "minute": "2026-11-11T01:16Z",
           "count": 4
          },
          "average_per_minute": 2.2,
          "unique_ips": 4,
          "bytes_sent": 26039,
          "status_classes": {
           "2xx": 3,
           "3xx": 1,
           "4xx": 1,
           "5xx": 1
          },
          "status_codes": {
           "200": 3,
           "302": 1,
           "404": 1,
           "502": 1
          },
          "errors_4xx": 1,
          "errors_5xx": 1,
          "methods": {
           "GET": 5,
           "POST": 1
          },
          "top_ips": [
           {
            "ip": "203.0.113.5",
            "count": 2
           },
           {
            "ip": "198.51.100.7",
            "count": 2
           },
           "…"
          ],
          "top_paths": [
           {
            "path": "/san-pham/ao-thun",
            "count": 1
           },
           "…"
          ],
          "top_4xx": [
           {
            "request": "404 /wp-login.php",
            "count": 1
           }
          ],
          "top_5xx": [
           {
            "request": "502 /api/orders",
            "count": 1
           }
          ],
          "browsers": [
           {
            "browser": "Chrome",
            "count": 2
           }
          ],
          "bot_requests": 4,
          "top_bots": [
           {
            "bot": "Googlebot",
            "count": 1
           },
           {
            "bot": "GPTBot",
            "count": 1
           },
           {
            "bot": "python-requests",
            "count": 1
           },
           "…"
          ],
          "ai_bots": [
           {
            "bot": "GPTBot (training)",
            "count": 1
           }
          ],
          "…": "…"
         },
         "rows_returned": 1,
         "rows": [
          {
           "remote_addr": "203.0.113.5",
           "ident": null,
           "remote_user": null,
           "time_local": "11/Nov/2026:08:15:02 +0700",
           "request": "GET /san-pham/ao-thun?page=2 HTTP/1.1",
           "status": 200,
           "body_bytes_sent": 5120,
           "http_referer": "https://www.google.com/",
           "http_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) … Chrome/130.0.0.0 Safari/537.36",
           "time": "2026-11-11T01:15:02.000Z",
           "method": "GET",
           "path": "/san-pham/ao-thun?page=2",
           "protocol": "HTTP/1.1"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/csv-query": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "SQL on CSV & Excel",
    "description": "Upload one or more tables as multipart files (CSV with any delimiter, XLSX, JSON array or JSON lines); each file becomes a table named after the file (orders.csv → `orders`) or after a custom field name. You can also send `csv` text (table `t`, or the name in `table`), `data` (JSON array) or `tables` `{\"name\": rows | \"csv text\"}`. Column types are inferred (numbers, booleans, text; empty cells are NULL; numbers with leading zeros such as phone numbers stay text).\n\nSupported SQL: `SELECT [DISTINCT]` columns, `*`, `t.*`, expressions and aliases; `FROM` with `[INNER] JOIN` / `LEFT JOIN … ON` (equality joins use a hash join) and comma / CROSS JOIN; `WHERE` with AND / OR / NOT, comparisons, `LIKE` (case-insensitive, % and _), `IN`, `BETWEEN`, `IS [NOT] NULL`; `GROUP BY` with COUNT(*), COUNT(DISTINCT), SUM, AVG, MIN, MAX, TOTAL, GROUP_CONCAT; `HAVING`; `ORDER BY` columns, aliases or positions with ASC / DESC and NULLS FIRST / LAST; `LIMIT` / `OFFSET`; CASE, CAST and functions LOWER, UPPER, LENGTH, TRIM, SUBSTR, REPLACE, INSTR, CONCAT, ROUND, ABS, FLOOR, CEIL, COALESCE, IFNULL, NULLIF, DATE, YEAR, MONTH, DAY and UNACCENT (removes Vietnamese diacritics). Subqueries, UNION and window functions are not supported.\n\nOutput JSON (`columns`, `rows`, counts) or `format=csv`. Limits: 200,000 rows per table, 5,000,000 cells in total, 10,000 result rows (`max_rows`), 8 seconds per query; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/csv-query/",
    "operationId": "csvQueryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/csv-query/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "sql": {
          "type": "string",
          "description": "SELECT query (max 20,000 characters)."
         },
         "csv": {
          "type": "string",
          "description": "CSV text for a single table named `t` (or `table`)."
         },
         "data": {
          "type": "array",
          "items": {},
          "description": "JSON array of objects (or arrays with a header row) for a single table."
         },
         "tables": {
          "type": "object",
          "description": "Several tables: `{\"orders\": [...], \"customers\": \"id,name\\n1,An\"}`."
         },
         "table": {
          "type": "string",
          "default": "t",
          "description": "Table name for `csv` / `data`."
         },
         "sheet": {
          "type": "string",
          "description": "XLSX sheet name or index (default: first visible sheet)."
         },
         "delimiter": {
          "type": "string",
          "default": "auto",
          "description": "CSV delimiter (auto-detected by default)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `csv`."
         },
         "max_rows": {
          "type": "number",
          "default": 10000,
          "description": "Cap on returned rows (1-10,000)."
         }
        },
        "required": [
         "sql"
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "sql": {
          "type": "string",
          "description": "SELECT query (max 20,000 characters)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "One or more multipart files (CSV, XLSX, JSON); the table name comes from the file name."
         },
         "csv": {
          "type": "string",
          "description": "CSV text for a single table named `t` (or `table`)."
         },
         "data": {
          "type": "array",
          "items": {},
          "description": "JSON array of objects (or arrays with a header row) for a single table."
         },
         "tables": {
          "type": "object",
          "description": "Several tables: `{\"orders\": [...], \"customers\": \"id,name\\n1,An\"}`."
         },
         "table": {
          "type": "string",
          "default": "t",
          "description": "Table name for `csv` / `data`."
         },
         "sheet": {
          "type": "string",
          "description": "XLSX sheet name or index (default: first visible sheet)."
         },
         "delimiter": {
          "type": "string",
          "default": "auto",
          "description": "CSV delimiter (auto-detected by default)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `csv`."
         },
         "max_rows": {
          "type": "number",
          "default": 10000,
          "description": "Cap on returned rows (1-10,000)."
         }
        },
        "required": [
         "sql"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "columns": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "row_count": {
           "type": "number"
          },
          "total_rows": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "orders": {
              "type": "number"
             },
             "total": {
              "type": "number"
             }
            }
           }
          },
          "tables": {
           "type": "object",
           "properties": {
            "orders": {
             "type": "object",
             "properties": {
              "rows": {
               "type": "number"
              },
              "columns": {
               "type": "array"
              }
             }
            },
            "customers": {
             "type": "object",
             "properties": {
              "rows": {
               "type": "number"
              },
              "columns": {
               "type": "array"
              }
             }
            }
           }
          },
          "ms": {
           "type": "number"
          }
         }
        },
        "example": {
         "columns": [
          "name",
          "orders",
          "total"
         ],
         "row_count": 3,
         "total_rows": 3,
         "truncated": false,
         "rows": [
          {
           "name": "Trần Thị Bình",
           "orders": 2,
           "total": 600000
          },
          {
           "name": "Lê Văn Cường",
           "orders": 1,
           "total": 450000
          },
          {
           "name": "Nguyễn Văn An",
           "orders": 1,
           "total": 300000
          }
         ],
         "tables": {
          "orders": {
           "rows": 6,
           "columns": [
            "id",
            "customer_id",
            "product",
            "qty",
            "price",
            "date",
            "status"
           ]
          },
          "customers": {
           "rows": 4,
           "columns": [
            "id",
            "name",
            "city",
            "phone"
           ]
          }
         },
         "ms": 3
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cities": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "World City Search",
    "description": "`q` searches city names by prefix, without caring about accents or case (`ha noi`, `Hà Nội` and `hanoi` all find Hanoi), including the English and Vietnamese names GeoNames has (`Thượng Hải` finds Shanghai). Exact names come first, then prefixes, then names where a later word starts with your text (`york` also matches New York); within each group the bigger city wins. Filter with `country` (ISO code) and `min_population`.\n\n`lat` + `lon` returns the nearest cities (reverse geocoding at city level) with the distance in km, optionally within `radius_km`. `id` (or `/v1/cities/<geonameid>`) returns one city with its country, first-level division (state / province), population, elevation, IANA time zone and current UTC offset, feature type (capital, seat of a division…) and alternate names; `details=true` adds the same fields to search results.\n\nData: GeoNames cities5000 (every place with at least 5 000 inhabitants plus seats of administrative divisions), refreshed weekly, licensed CC BY 4.0 – keep the `attribution` text visible when you show the data. Division names follow GeoNames and may lag behind recent reorganisations (for Vietnam's 2025 provinces use /v1/vn-provinces).\n\nDocs: https://apibox.io.vn/docs/cities/",
    "operationId": "citiesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cities/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name or beginning of a name (accents optional). One of `q`, `lat`+`lon` or `id` is required.",
      "schema": {
       "type": "string"
      },
      "example": "da nang"
     },
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude for a nearest-city search (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude (`lng` accepted).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "GeoNames id for the details of one city (also `/v1/cities/<id>`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "ISO 3166-1 alpha-2 filter, e.g. `VN`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_population",
      "in": "query",
      "required": false,
      "description": "Only cities with at least this population.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "radius_km",
      "in": "query",
      "required": false,
      "description": "Maximum distance for a nearest search.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results (1–50).",
      "schema": {
       "type": "number",
       "default": 10
      },
      "example": 2
     },
     {
      "name": "details",
      "in": "query",
      "required": false,
      "description": "Full details (admin1, time zone offset, elevation, alternate names) in search results.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "object",
           "properties": {
            "q": {
             "type": "string"
            },
            "country": {},
            "min_population": {}
           }
          },
          "count": {
           "type": "number"
          },
          "total_matches": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "country_code": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "admin1": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "population": {
              "type": "number"
             },
             "timezone": {
              "type": "string"
             },
             "match": {
              "type": "string"
             }
            }
           }
          },
          "attribution": {
           "type": "string"
          },
          "data_version": {
           "type": "string"
          },
          "dataset": {
           "type": "string"
          }
         }
        },
        "example": {
         "query": {
          "q": "da nang",
          "country": null,
          "min_population": null
         },
         "count": 1,
         "total_matches": 1,
         "results": [
          {
           "id": 1583992,
           "name": "Da Nang",
           "name_en": "Da Nang",
           "name_vi": "Đà Nẵng",
           "country_code": "VN",
           "country": "Vietnam",
           "admin1": "Da Nang City",
           "lat": 16.0678,
           "lon": 108.2208,
           "population": 1276000,
           "timezone": "Asia/Ho_Chi_Minh",
           "match": "exact"
          }
         ],
         "attribution": "Data © GeoNames (www.geonames.org), CC BY 4.0",
         "data_version": "2026-11-11",
         "dataset": "GeoNames cities5000: 70026 places with >= 5 000 inhabitants or seats of administrative divisions"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/world-postcodes": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "World Postal Codes",
    "description": "`country` + `postcode` (or `/v1/world-postcodes/<CC>/<code>`) returns the places that use the code with their first, second and third-level divisions and approximate coordinates; spaces, dashes and case do not matter (`sw1a1aa` = `SW1A 1AA`). A partial code (an outward code such as `SW1A`, the first digits of a ZIP) lists the codes that start with it. Every answer also says whether the code matches the official format of the country (`format.valid`, the pattern and examples); `validate_only=true` checks the format without a lookup, and works for about 180 countries – including those without a database, such as Vietnam.\n\n`q` finds places by name in a country (accents optional) with their codes; `lat` + `lon` returns the nearest postal codes to a point. `action=countries` lists the countries covered and `action=formats` the format patterns.\n\nData: the GeoNames postal-code dump (CC BY 4.0, refreshed weekly) – about 4.1 million codes; the UK and the Netherlands have full codes (UK from Code-Point Open, Open Government Licence), Canada, Ireland, Malta, Chile and Argentina only the first part, Brazil only major codes, and some countries (Vietnam included) none. Coordinates are centroids, not delivery points. Formats come from Google's address metadata (libaddressinput, CC BY 4.0). Keep the `attribution` text when you display the data.\n\nDocs: https://apibox.io.vn/docs/world-postcodes/",
    "operationId": "worldPostcodesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/world-postcodes/"
    },
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": true,
      "description": "ISO 3166-1 alpha-2 code (`US`, `GB`, `DE`…). Not needed with `action`.",
      "schema": {
       "type": "string"
      },
      "example": "GB"
     },
     {
      "name": "postcode",
      "in": "query",
      "required": false,
      "description": "Postal code to look up (full or partial).",
      "schema": {
       "type": "string"
      },
      "example": "sw1a1aa"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Place name to search in the country.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude for the nearest codes (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "validate_only",
      "in": "query",
      "required": false,
      "description": "Only check the format of `postcode`.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`countries` (coverage) or `formats` (patterns of every country).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for partial codes and place search (1–100; nearest: 1–20, default 5).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "country": {
           "type": "string"
          },
          "postcode": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "format": {
           "type": "object",
           "properties": {
            "checked": {
             "type": "boolean"
            },
            "valid": {
             "type": "boolean"
            },
            "pattern": {
             "type": "string"
            },
            "examples": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "postcode": {
              "type": "string"
             },
             "place": {
              "type": "string"
             },
             "admin1": {
              "type": "string"
             },
             "admin1_code": {
              "type": "string"
             },
             "admin2": {
              "type": "string"
             },
             "admin2_code": {
              "type": "string"
             },
             "admin3": {
              "type": "string"
             },
             "admin3_code": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "accuracy": {
              "type": "number"
             }
            }
           }
          },
          "accuracy_note": {
           "type": "string"
          },
          "data_version": {
           "type": "string"
          },
          "attribution": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "country": "GB",
         "postcode": "SW1A 1AA",
         "found": true,
         "format": {
          "checked": true,
          "valid": true,
          "pattern": "GIR ?0AA|(?:(?:AB|AL|B|…|ZE)(?:\\d[\\dA-Z]? ?\\d[ABD-HJLN-UW-Z]{2}))|BFPO ?\\d{1,4}",
          "examples": [
           "EC1Y 8SY",
           "GIR 0AA",
           "M2 5BQ",
           "…"
          ]
         },
         "count": 1,
         "places": [
          {
           "postcode": "SW1A 1AA",
           "place": "London",
           "admin1": "England",
           "admin1_code": "ENG",
           "admin2": "Greater London",
           "admin2_code": "GLA",
           "admin3": "City of Westminster",
           "admin3_code": "E09000033",
           "lat": 51.501,
           "lon": -0.1416,
           "accuracy": 6
          }
         ],
         "accuracy_note": "accuracy: 1 = estimated, 4 = from a GeoNames place, 6 = centroid of addresses or shape (null = unknown)",
         "data_version": "20261111",
         "attribution": [
          "Postal code data © GeoNames (geonames.org), CC BY 4.0. GB: contains Royal Mail data © Royal Mail copyright and database right; contains OS data © Crown copyright and database right (Open Government Licence v3.0).",
          "Postal code formats: Google libaddressinput address metadata, CC BY 4.0"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/elevation": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Elevation (Vietnam)",
    "description": "`lat` + `lon` returns the height above mean sea level (EGM2008 geoid) at that point, interpolated bilinearly between the four surrounding samples of the Copernicus DEM GLO-90 grid (3 arc-seconds, about 90 m). `points` takes up to 100 points (`[[lat, lon], …]`, `[{lat, lon}]` or `lat,lon|lat,lon`). `path` (a polyline of up to 100 vertices, or a GeoJSON LineString) with `samples` (2–500, default 100) returns an elevation profile at evenly spaced distances plus start / end / min / max height, total gain and loss and the steepest grade.\n\nCoverage: the box 8–24° N, 102–110° E (Vietnam, Laos, Cambodia and parts of Thailand and southern China). The open sea has no DEM tile and returns 0 (`source: \"ocean\"`); points outside the box return `null` (`out_of_coverage`). The DEM is a surface model: it includes buildings and forest canopy, so heights in cities and forests are a few metres above the ground, and narrow peaks are smoothed (Fansipan reads about 3 100 m for 3 143 m).\n\nLicence: Copernicus DEM, free for commercial use with the attribution returned in `attribution` (keep it visible). The tiles are static: they are rebuilt only when Copernicus publishes a new release.\n\nDocs: https://apibox.io.vn/docs/elevation/",
    "operationId": "elevationGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/elevation/"
    },
    "parameters": [
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude of one point (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude (`lng` accepted).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "points",
      "in": "query",
      "required": false,
      "description": "Up to 100 points: `[[lat, lon], …]`, `[{lat, lon}]` or `lat,lon|lat,lon`.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "path",
      "in": "query",
      "required": false,
      "description": "Polyline (2–100 vertices, same formats, or a GeoJSON LineString) for an elevation profile.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "samples",
      "in": "query",
      "required": false,
      "description": "Profile samples along `path` (2–500).",
      "schema": {
       "type": "number",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "distance_m": {
           "type": "number"
          },
          "samples": {
           "type": "number"
          },
          "spacing_m": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "start_m": {
             "type": "number"
            },
            "end_m": {
             "type": "number"
            },
            "min_m": {
             "type": "number"
            },
            "max_m": {
             "type": "number"
            },
            "gain_m": {
             "type": "number"
            },
            "loss_m": {
             "type": "number"
            },
            "max_grade_percent": {
             "type": "number"
            }
           }
          },
          "profile": {
           "type": "array",
           "items": {}
          },
          "note": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "south": {
             "type": "number"
            },
            "north": {
             "type": "number"
            },
            "west": {
             "type": "number"
            },
            "east": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Elevation (Vietnam)",
    "description": "`lat` + `lon` returns the height above mean sea level (EGM2008 geoid) at that point, interpolated bilinearly between the four surrounding samples of the Copernicus DEM GLO-90 grid (3 arc-seconds, about 90 m). `points` takes up to 100 points (`[[lat, lon], …]`, `[{lat, lon}]` or `lat,lon|lat,lon`). `path` (a polyline of up to 100 vertices, or a GeoJSON LineString) with `samples` (2–500, default 100) returns an elevation profile at evenly spaced distances plus start / end / min / max height, total gain and loss and the steepest grade.\n\nCoverage: the box 8–24° N, 102–110° E (Vietnam, Laos, Cambodia and parts of Thailand and southern China). The open sea has no DEM tile and returns 0 (`source: \"ocean\"`); points outside the box return `null` (`out_of_coverage`). The DEM is a surface model: it includes buildings and forest canopy, so heights in cities and forests are a few metres above the ground, and narrow peaks are smoothed (Fansipan reads about 3 100 m for 3 143 m).\n\nLicence: Copernicus DEM, free for commercial use with the attribution returned in `attribution` (keep it visible). The tiles are static: they are rebuilt only when Copernicus publishes a new release.\n\nDocs: https://apibox.io.vn/docs/elevation/",
    "operationId": "elevationPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/elevation/"
    },
    "parameters": [
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude of one point (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude (`lng` accepted).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "points": {
          "type": "array",
          "items": {},
          "description": "Up to 100 points: `[[lat, lon], …]`, `[{lat, lon}]` or `lat,lon|lat,lon`."
         },
         "path": {
          "type": "array",
          "items": {},
          "description": "Polyline (2–100 vertices, same formats, or a GeoJSON LineString) for an elevation profile."
         },
         "samples": {
          "type": "number",
          "default": 100,
          "description": "Profile samples along `path` (2–500)."
         }
        }
       },
       "example": {
        "path": [
         [
          22.3367,
          103.8438
         ],
         [
          22.3033,
          103.775
         ]
        ],
        "samples": 50
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "distance_m": {
           "type": "number"
          },
          "samples": {
           "type": "number"
          },
          "spacing_m": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "start_m": {
             "type": "number"
            },
            "end_m": {
             "type": "number"
            },
            "min_m": {
             "type": "number"
            },
            "max_m": {
             "type": "number"
            },
            "gain_m": {
             "type": "number"
            },
            "loss_m": {
             "type": "number"
            },
            "max_grade_percent": {
             "type": "number"
            }
           }
          },
          "profile": {
           "type": "array",
           "items": {}
          },
          "note": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "south": {
             "type": "number"
            },
            "north": {
             "type": "number"
            },
            "west": {
             "type": "number"
            },
            "east": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "distance_m": 7992.4,
         "samples": 50,
         "spacing_m": 163.1,
         "summary": {
          "start_m": 1507.1,
          "end_m": 3101.9,
          "min_m": 1246.9,
          "max_m": 3101.9,
          "gain_m": 2066.2,
          "loss_m": 471.4,
          "max_grade_percent": 78.8
         },
         "profile": [
          {
           "distance_m": 0,
           "lat": 22.3367,
           "lon": 103.8438,
           "elevation_m": 1507.1
          },
          {
           "distance_m": 163.1,
           "lat": 22.336018,
           "lon": 103.842396,
           "elevation_m": 1501.7
          },
          "…",
          {
           "distance_m": 7992.4,
           "lat": 22.3033,
           "lon": 103.775,
           "elevation_m": 3101.9
          }
         ],
         "note": "Copernicus DEM GLO-90 is a surface model (3 arc-seconds, ~90 m): heights include buildings and trees, relative to the EGM2008 geoid (≈ mean sea level); typical error a few metres, more on steep slopes. Ocean = 0. …",
         "coverage": {
          "south": 8,
          "north": 24,
          "west": 102,
          "east": 110,
          "note": "Vietnam and neighbouring areas for now"
         },
         "data_version": "20261111",
         "attribution": "Produced using Copernicus WorldDEM-90 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved. The organisations in charge of the Copernicus programme by law or by delegation do not incur any liability for any use of the Copernicus WorldDEM-90."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/airports": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Airports",
    "description": "`/v1/airports/SGN` (or `iata=`, `icao=`, `code=`) returns one airport: name, type, city, country, region, coordinates, elevation, scheduled service, codes and, for large and medium airports, the open runways (ends, length, width, surface, lighting). `q` searches names, cities and known alternate names without accents (`saigon` finds Tân Sơn Nhất); filter with `country`, `type` (large, medium, small, seaplane) and `scheduled=true`.\n\n`lat` + `lon` lists the nearest airports (by default large, medium and small airports that have an IATA code) with their distance; `from` + `to` returns the great-circle distance in km, miles and nautical miles and the initial and final bearing.\n\nData: OurAirports (public domain), refreshed weekly: all large and medium airports, plus small airports and seaplane bases that have an IATA or ICAO code; closed airports and heliports are left out. Distances are on a sphere, within about 0.5 % of the ellipsoid distance – fine for display and estimates, not for flight planning.\n\nPath segments: `code`: IATA (3 letters) or ICAO (4 letters) code: `/v1/airports/HAN`. Also `iata=`, `icao=`, `code=`.\n\nDocs: https://apibox.io.vn/docs/airports/",
    "operationId": "airportsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/airports/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name, city or code to search.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lat",
      "in": "query",
      "required": false,
      "description": "Latitude for the nearest airports (with `lon`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "lon",
      "in": "query",
      "required": false,
      "description": "Longitude.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Origin airport code for a distance (with `to`).",
      "schema": {
       "type": "string"
      },
      "example": "SGN"
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Destination airport code.",
      "schema": {
       "type": "string"
      },
      "example": "NRT"
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "ISO country filter, e.g. `VN`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`large`, `medium`, `small`, `seaplane` (comma-separated).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scheduled",
      "in": "query",
      "required": false,
      "description": "Only airports with (true) or without (false) scheduled flights.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results (1–50).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "object",
           "properties": {
            "iata": {
             "type": "string"
            },
            "icao": {
             "type": "string"
            },
            "ident": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "municipality": {
             "type": "string"
            },
            "country_code": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "region_code": {
             "type": "string"
            },
            "lat": {
             "type": "number"
            },
            "lon": {
             "type": "number"
            },
            "elevation_ft": {
             "type": "number"
            },
            "elevation_m": {
             "type": "number"
            },
            "scheduled_service": {
             "type": "boolean"
            }
           }
          },
          "to": {
           "type": "object",
           "properties": {
            "iata": {
             "type": "string"
            },
            "icao": {
             "type": "string"
            },
            "ident": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "municipality": {
             "type": "string"
            },
            "country_code": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "region_code": {
             "type": "string"
            },
            "lat": {
             "type": "number"
            },
            "lon": {
             "type": "number"
            },
            "elevation_ft": {
             "type": "number"
            },
            "elevation_m": {
             "type": "number"
            },
            "scheduled_service": {
             "type": "boolean"
            }
           }
          },
          "distance": {
           "type": "object",
           "properties": {
            "km": {
             "type": "number"
            },
            "mi": {
             "type": "number"
            },
            "nmi": {
             "type": "number"
            }
           }
          },
          "initial_bearing": {
           "type": "number"
          },
          "initial_bearing_compass": {
           "type": "string"
          },
          "final_bearing": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "data_version": {
           "type": "string"
          }
         }
        },
        "example": {
         "from": {
          "iata": "SGN",
          "icao": "VVTS",
          "ident": "VVTS",
          "name": "Tan Son Nhat International Airport",
          "type": "large_airport",
          "municipality": "Ho Chi Minh City",
          "country_code": "VN",
          "country": "Vietnam",
          "region_code": "VN-SE",
          "lat": 10.8188,
          "lon": 106.652,
          "elevation_ft": 33,
          "elevation_m": 10,
          "scheduled_service": true
         },
         "to": {
          "iata": "NRT",
          "icao": "RJAA",
          "ident": "RJAA",
          "name": "Narita International Airport",
          "type": "large_airport",
          "municipality": "Narita",
          "country_code": "JP",
          "country": "Japan",
          "region_code": "JP-12",
          "lat": 35.76858,
          "lon": 140.38871,
          "elevation_ft": 141,
          "elevation_m": 43,
          "scheduled_service": true
         },
         "distance": {
          "km": 4383.7,
          "mi": 2723.9,
          "nmi": 2367
         },
         "initial_bearing": 45.2,
         "initial_bearing_compass": "NE",
         "final_bearing": 59.2,
         "method": "great-circle (haversine) distance on a sphere of radius 6371.0088 km; bearings in degrees from true north",
         "attribution": "Data: OurAirports (ourairports.com), public domain",
         "data_version": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vin-decode": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "VIN Decoder",
    "description": "Send `vin` (or `/v1/vin-decode/<VIN>`). The API checks the length and alphabet (I, O and Q are never used), computes the check digit of position 9 (mandatory for North American vehicles, a warning elsewhere), splits the WMI / VDS / VIS sections, finds the manufacturer, its country and the vehicle type in the NHTSA list of World Manufacturer Identifiers (13 000 entries, incl. 6-character WMIs of small makers and Vietnamese makers such as VinFast), gives the country of origin from the ISO 3780 ranges of the first two characters, the model year from position 10 (the 30-year cycle is resolved with the position 7 rule for North American light vehicles, other candidates listed), the plant code and serial number.\n\n`online=true` also asks NHTSA vPIC (public, no key) for make, model, trim, body class, engine, fuel, plant, safety equipment… – detailed mainly for vehicles sold in the USA; answers are cached 30 days. `vins` decodes up to 50 VINs at once (10 with `online`).\n\nThe offline decode does not tell the model of non-US vehicles: VDS coding is manufacturer-specific. Data: NHTSA vPIC (US government work, public domain), refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/vin-decode/",
    "operationId": "vinDecodeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vin-decode/"
    },
    "parameters": [
     {
      "name": "vin",
      "in": "query",
      "required": true,
      "description": "17-character VIN (spaces and dashes ignored). Or `/v1/vin-decode/<VIN>`.",
      "schema": {
       "type": "string"
      },
      "example": "1HGCM82633A004352"
     },
     {
      "name": "online",
      "in": "query",
      "required": false,
      "description": "Add the NHTSA vPIC decode (`vpic` object; cached 30 days).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "vins",
      "in": "query",
      "required": false,
      "description": "Up to 50 VINs (array or comma-separated) instead of `vin`.",
      "schema": {
       "type": "array",
       "items": {}
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vin": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "warnings": {
           "type": "array"
          },
          "wmi": {
           "type": "string"
          },
          "vds": {
           "type": "string"
          },
          "vis": {
           "type": "string"
          },
          "manufacturer": {
           "type": "string"
          },
          "manufacturer_country": {
           "type": "string"
          },
          "vehicle_type": {
           "type": "string"
          },
          "country_of_origin": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "wmi_known": {
           "type": "boolean"
          },
          "check_digit": {
           "type": "object",
           "properties": {
            "value": {
             "type": "string"
            },
            "expected": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            },
            "required": {
             "type": "boolean"
            }
           }
          },
          "model_year": {
           "type": "number"
          },
          "model_year_candidates": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "model_year_rule": {
           "type": "string"
          },
          "plant_code": {
           "type": "string"
          },
          "serial_number": {
           "type": "string"
          },
          "sources": {
           "type": "object",
           "properties": {
            "wmi": {
             "type": "string"
            },
            "online": {}
           }
          },
          "data_version": {
           "type": "string"
          }
         }
        },
        "example": {
         "vin": "1HGCM82633A004352",
         "valid": true,
         "warnings": [],
         "wmi": "1HG",
         "vds": "CM8263",
         "vis": "3A004352",
         "manufacturer": "AMERICAN HONDA MOTOR CO., INC.",
         "manufacturer_country": "United States",
         "vehicle_type": "Passenger Car",
         "country_of_origin": "United States",
         "region": "North America",
         "wmi_known": true,
         "check_digit": {
          "value": "3",
          "expected": "3",
          "valid": true,
          "required": true
         },
         "model_year": 2003,
         "model_year_candidates": [
          2003
         ],
         "model_year_rule": "only year of the cycle not in the future",
         "plant_code": "A",
         "serial_number": "004352",
         "sources": {
          "wmi": "NHTSA vPIC manufacturer list (public domain)",
          "online": null
         },
         "data_version": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "VIN Decoder",
    "description": "Send `vin` (or `/v1/vin-decode/<VIN>`). The API checks the length and alphabet (I, O and Q are never used), computes the check digit of position 9 (mandatory for North American vehicles, a warning elsewhere), splits the WMI / VDS / VIS sections, finds the manufacturer, its country and the vehicle type in the NHTSA list of World Manufacturer Identifiers (13 000 entries, incl. 6-character WMIs of small makers and Vietnamese makers such as VinFast), gives the country of origin from the ISO 3780 ranges of the first two characters, the model year from position 10 (the 30-year cycle is resolved with the position 7 rule for North American light vehicles, other candidates listed), the plant code and serial number.\n\n`online=true` also asks NHTSA vPIC (public, no key) for make, model, trim, body class, engine, fuel, plant, safety equipment… – detailed mainly for vehicles sold in the USA; answers are cached 30 days. `vins` decodes up to 50 VINs at once (10 with `online`).\n\nThe offline decode does not tell the model of non-US vehicles: VDS coding is manufacturer-specific. Data: NHTSA vPIC (US government work, public domain), refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/vin-decode/",
    "operationId": "vinDecodePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vin-decode/"
    },
    "parameters": [
     {
      "name": "vin",
      "in": "query",
      "required": false,
      "description": "17-character VIN (spaces and dashes ignored). Or `/v1/vin-decode/<VIN>`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "online",
      "in": "query",
      "required": false,
      "description": "Add the NHTSA vPIC decode (`vpic` object; cached 30 days).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "vins": {
          "type": "array",
          "items": {},
          "description": "Up to 50 VINs (array or comma-separated) instead of `vin`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vin": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "warnings": {
           "type": "array"
          },
          "wmi": {
           "type": "string"
          },
          "vds": {
           "type": "string"
          },
          "vis": {
           "type": "string"
          },
          "manufacturer": {
           "type": "string"
          },
          "manufacturer_country": {
           "type": "string"
          },
          "vehicle_type": {
           "type": "string"
          },
          "country_of_origin": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "wmi_known": {
           "type": "boolean"
          },
          "check_digit": {
           "type": "object",
           "properties": {
            "value": {
             "type": "string"
            },
            "expected": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            },
            "required": {
             "type": "boolean"
            }
           }
          },
          "model_year": {
           "type": "number"
          },
          "model_year_candidates": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "model_year_rule": {
           "type": "string"
          },
          "plant_code": {
           "type": "string"
          },
          "serial_number": {
           "type": "string"
          },
          "sources": {
           "type": "object",
           "properties": {
            "wmi": {
             "type": "string"
            },
            "online": {}
           }
          },
          "data_version": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/page-watch": {
   "get": {
    "tags": [
     "Testing"
    ],
    "summary": "Page Change Watcher",
    "description": "`POST /v1/page-watch` with a `url` creates a watcher: the page is fetched at once to take a baseline, then every `interval_minutes`. Choose what is compared: an optional CSS `selector` (all matches), `mode` `text` (visible text with line breaks, scripts and styles removed), `html` (the markup, one tag per line) or `regex` (only what a `pattern` extracts, e.g. prices). Remove noise before comparing with `ignore` (up to 20 regular expressions) and `ignore_presets` (`dates`, `times`, `numbers`, including Vietnamese forms such as “ngày 11 tháng 11” and “5 phút trước”). The normalised content (up to 200 KB) is stored compressed with its SHA-256.\n\nWhen the hash changes, a `change` event with a unified diff (truncated to 4 KB; the last 20 events are kept) is stored and sent to your `webhook_url` (`{\"event\": \"page.changed\", \"watcher\", \"added\", \"removed\", \"diff\", \"hash\", \"previous_hash\"}`) and to the verified e-mail of your account (at most one e-mail per watcher per hour, with daily caps). Three failed checks in a row raise one `page.error` alert. Sites answering 429 / 503 are left alone for their Retry-After (or a doubled interval); robots.txt is checked on creation and weekly, and our bot identifies itself as APIBoxBot.\n\n`GET /v1/page-watch` lists your watchers, `/{id}` shows one with its events (`include_snapshot=true` adds the stored content), `PATCH` updates it (a new URL or rule starts a new baseline), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a test without changing anything. `dry_run=true` previews the normalised content without an account. Plans: Free 3 watchers every 60+ minutes, Starter 20 every 30+, Pro 100 every 15+ minutes.\n\nPath segments: `id`: `/v1/page-watch/{id}` (GET, PATCH, POST, DELETE), `/{id}/events`, `/{id}/check` (POST: test run).\n\nDocs: https://apibox.io.vn/docs/page-watch/",
    "operationId": "pageWatchGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/page-watch/"
    },
    "parameters": [
     {
      "name": "include_snapshot",
      "in": "query",
      "required": false,
      "description": "`GET /{id}`: also return the stored content.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "selector": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "pattern": {},
          "ignore": {
           "type": "array"
          },
          "ignore_presets": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "interval_minutes": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "error": {}
           }
          },
          "last_change_at": {},
          "changes_total": {
           "type": "number"
          },
          "checks_total": {
           "type": "number"
          },
          "snapshot": {
           "type": "object",
           "properties": {
            "sha256": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            }
           }
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "status_code": {
             "type": "number"
            },
            "selector_matches": {
             "type": "number"
            },
            "lines": {
             "type": "number"
            },
            "truncated": {
             "type": "boolean"
            },
            "preview": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Testing"
    ],
    "summary": "Page Change Watcher",
    "description": "`POST /v1/page-watch` with a `url` creates a watcher: the page is fetched at once to take a baseline, then every `interval_minutes`. Choose what is compared: an optional CSS `selector` (all matches), `mode` `text` (visible text with line breaks, scripts and styles removed), `html` (the markup, one tag per line) or `regex` (only what a `pattern` extracts, e.g. prices). Remove noise before comparing with `ignore` (up to 20 regular expressions) and `ignore_presets` (`dates`, `times`, `numbers`, including Vietnamese forms such as “ngày 11 tháng 11” and “5 phút trước”). The normalised content (up to 200 KB) is stored compressed with its SHA-256.\n\nWhen the hash changes, a `change` event with a unified diff (truncated to 4 KB; the last 20 events are kept) is stored and sent to your `webhook_url` (`{\"event\": \"page.changed\", \"watcher\", \"added\", \"removed\", \"diff\", \"hash\", \"previous_hash\"}`) and to the verified e-mail of your account (at most one e-mail per watcher per hour, with daily caps). Three failed checks in a row raise one `page.error` alert. Sites answering 429 / 503 are left alone for their Retry-After (or a doubled interval); robots.txt is checked on creation and weekly, and our bot identifies itself as APIBoxBot.\n\n`GET /v1/page-watch` lists your watchers, `/{id}` shows one with its events (`include_snapshot=true` adds the stored content), `PATCH` updates it (a new URL or rule starts a new baseline), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a test without changing anything. `dry_run=true` previews the normalised content without an account. Plans: Free 3 watchers every 60+ minutes, Starter 20 every 30+, Pro 100 every 15+ minutes.\n\nPath segments: `id`: `/v1/page-watch/{id}` (GET, PATCH, POST, DELETE), `/{id}/events`, `/{id}/check` (POST: test run).\n\nDocs: https://apibox.io.vn/docs/page-watch/",
    "operationId": "pageWatchPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/page-watch/"
    },
    "parameters": [
     {
      "name": "include_snapshot",
      "in": "query",
      "required": false,
      "description": "`GET /{id}`: also return the stored content.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public page to watch (required when creating)."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "selector": {
          "type": "string",
          "description": "CSS selector of the watched part (all matches); empty = whole page."
         },
         "mode": {
          "type": "string",
          "default": "text",
          "description": "`text`, `html` or `regex`."
         },
         "pattern": {
          "type": "string",
          "description": "mode `regex`: what to extract (group 1 if present), `/…/i` syntax allowed, max 200 characters."
         },
         "ignore": {
          "type": "array",
          "items": {},
          "description": "Regular expressions removed before comparing (array or one per line, max 20)."
         },
         "ignore_presets": {
          "type": "string",
          "description": "Comma list of `dates`, `times`, `numbers`."
         },
         "interval_minutes": {
          "type": "number",
          "description": "Check interval: from the plan minimum (60 Free, 30 Starter, 15 Pro) to 10080. Default: max(plan minimum, 60)."
         },
         "alert_email": {
          "type": "boolean",
          "default": true,
          "description": "E-mail the verified account address on changes."
         },
         "webhook_url": {
          "type": "string",
          "description": "URL receiving a JSON POST (`page.changed` / `page.error`); empty to remove."
         },
         "paused": {
          "type": "boolean",
          "default": false,
          "description": "Pause or resume checks."
         },
         "dry_run": {
          "type": "boolean",
          "default": false,
          "description": "Only fetch and return the normalised content (no account needed, nothing saved)."
         }
        },
        "required": [
         "url"
        ]
       },
       "example": {
        "url": "https://example.edu.vn/tuyen-sinh",
        "name": "Tuyển sinh",
        "selector": ".news",
        "ignore_presets": "dates",
        "interval_minutes": 60,
        "webhook_url": "https://example.com/hooks/page"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "selector": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "pattern": {},
          "ignore": {
           "type": "array"
          },
          "ignore_presets": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "interval_minutes": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "error": {}
           }
          },
          "last_change_at": {},
          "changes_total": {
           "type": "number"
          },
          "checks_total": {
           "type": "number"
          },
          "snapshot": {
           "type": "object",
           "properties": {
            "sha256": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            }
           }
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "status_code": {
             "type": "number"
            },
            "selector_matches": {
             "type": "number"
            },
            "lines": {
             "type": "number"
            },
            "truncated": {
             "type": "boolean"
            },
            "preview": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "id": "pw_ubts7ip9hp6nsep1qj1d",
         "name": "Tuyển sinh",
         "url": "https://example.edu.vn/tuyen-sinh",
         "selector": ".news",
         "mode": "text",
         "pattern": null,
         "ignore": [],
         "ignore_presets": [
          "dates"
         ],
         "interval_minutes": 60,
         "alert_email": true,
         "webhook_url": "https://example.com/hooks/page",
         "paused": false,
         "status": "ok",
         "last_check": {
          "at": "2026-11-11T03:20:00.000Z",
          "error": null
         },
         "last_change_at": null,
         "changes_total": 0,
         "checks_total": 1,
         "snapshot": {
          "sha256": "1d6fb694b0d75af3154ba70809eeb475aa4c1ff4a50a170581797e7028520d3d",
          "bytes": 92
         },
         "next_check_at": "2026-11-11T04:20:00.000Z",
         "created_at": "2026-11-11T03:20:00.000Z",
         "first_check": {
          "status_code": 200,
          "selector_matches": 1,
          "lines": 3,
          "truncated": false,
          "preview": "Thông báo tuyển sinh\nĐề án tuyển sinh năm 2027\nLịch thi đánh giá năng lực"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "patch": {
    "tags": [
     "Testing"
    ],
    "summary": "Page Change Watcher",
    "description": "`POST /v1/page-watch` with a `url` creates a watcher: the page is fetched at once to take a baseline, then every `interval_minutes`. Choose what is compared: an optional CSS `selector` (all matches), `mode` `text` (visible text with line breaks, scripts and styles removed), `html` (the markup, one tag per line) or `regex` (only what a `pattern` extracts, e.g. prices). Remove noise before comparing with `ignore` (up to 20 regular expressions) and `ignore_presets` (`dates`, `times`, `numbers`, including Vietnamese forms such as “ngày 11 tháng 11” and “5 phút trước”). The normalised content (up to 200 KB) is stored compressed with its SHA-256.\n\nWhen the hash changes, a `change` event with a unified diff (truncated to 4 KB; the last 20 events are kept) is stored and sent to your `webhook_url` (`{\"event\": \"page.changed\", \"watcher\", \"added\", \"removed\", \"diff\", \"hash\", \"previous_hash\"}`) and to the verified e-mail of your account (at most one e-mail per watcher per hour, with daily caps). Three failed checks in a row raise one `page.error` alert. Sites answering 429 / 503 are left alone for their Retry-After (or a doubled interval); robots.txt is checked on creation and weekly, and our bot identifies itself as APIBoxBot.\n\n`GET /v1/page-watch` lists your watchers, `/{id}` shows one with its events (`include_snapshot=true` adds the stored content), `PATCH` updates it (a new URL or rule starts a new baseline), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a test without changing anything. `dry_run=true` previews the normalised content without an account. Plans: Free 3 watchers every 60+ minutes, Starter 20 every 30+, Pro 100 every 15+ minutes.\n\nPath segments: `id`: `/v1/page-watch/{id}` (GET, PATCH, POST, DELETE), `/{id}/events`, `/{id}/check` (POST: test run).\n\nDocs: https://apibox.io.vn/docs/page-watch/",
    "operationId": "pageWatchPatch",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/page-watch/"
    },
    "parameters": [
     {
      "name": "include_snapshot",
      "in": "query",
      "required": false,
      "description": "`GET /{id}`: also return the stored content.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public page to watch (required when creating)."
         },
         "name": {
          "type": "string",
          "description": "Display name (max 100 characters)."
         },
         "selector": {
          "type": "string",
          "description": "CSS selector of the watched part (all matches); empty = whole page."
         },
         "mode": {
          "type": "string",
          "default": "text",
          "description": "`text`, `html` or `regex`."
         },
         "pattern": {
          "type": "string",
          "description": "mode `regex`: what to extract (group 1 if present), `/…/i` syntax allowed, max 200 characters."
         },
         "ignore": {
          "type": "array",
          "items": {},
          "description": "Regular expressions removed before comparing (array or one per line, max 20)."
         },
         "ignore_presets": {
          "type": "string",
          "description": "Comma list of `dates`, `times`, `numbers`."
         },
         "interval_minutes": {
          "type": "number",
          "description": "Check interval: from the plan minimum (60 Free, 30 Starter, 15 Pro) to 10080. Default: max(plan minimum, 60)."
         },
         "alert_email": {
          "type": "boolean",
          "default": true,
          "description": "E-mail the verified account address on changes."
         },
         "webhook_url": {
          "type": "string",
          "description": "URL receiving a JSON POST (`page.changed` / `page.error`); empty to remove."
         },
         "paused": {
          "type": "boolean",
          "default": false,
          "description": "Pause or resume checks."
         },
         "dry_run": {
          "type": "boolean",
          "default": false,
          "description": "Only fetch and return the normalised content (no account needed, nothing saved)."
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "selector": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "pattern": {},
          "ignore": {
           "type": "array"
          },
          "ignore_presets": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "interval_minutes": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "error": {}
           }
          },
          "last_change_at": {},
          "changes_total": {
           "type": "number"
          },
          "checks_total": {
           "type": "number"
          },
          "snapshot": {
           "type": "object",
           "properties": {
            "sha256": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            }
           }
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "status_code": {
             "type": "number"
            },
            "selector_matches": {
             "type": "number"
            },
            "lines": {
             "type": "number"
            },
            "truncated": {
             "type": "boolean"
            },
            "preview": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "delete": {
    "tags": [
     "Testing"
    ],
    "summary": "Page Change Watcher",
    "description": "`POST /v1/page-watch` with a `url` creates a watcher: the page is fetched at once to take a baseline, then every `interval_minutes`. Choose what is compared: an optional CSS `selector` (all matches), `mode` `text` (visible text with line breaks, scripts and styles removed), `html` (the markup, one tag per line) or `regex` (only what a `pattern` extracts, e.g. prices). Remove noise before comparing with `ignore` (up to 20 regular expressions) and `ignore_presets` (`dates`, `times`, `numbers`, including Vietnamese forms such as “ngày 11 tháng 11” and “5 phút trước”). The normalised content (up to 200 KB) is stored compressed with its SHA-256.\n\nWhen the hash changes, a `change` event with a unified diff (truncated to 4 KB; the last 20 events are kept) is stored and sent to your `webhook_url` (`{\"event\": \"page.changed\", \"watcher\", \"added\", \"removed\", \"diff\", \"hash\", \"previous_hash\"}`) and to the verified e-mail of your account (at most one e-mail per watcher per hour, with daily caps). Three failed checks in a row raise one `page.error` alert. Sites answering 429 / 503 are left alone for their Retry-After (or a doubled interval); robots.txt is checked on creation and weekly, and our bot identifies itself as APIBoxBot.\n\n`GET /v1/page-watch` lists your watchers, `/{id}` shows one with its events (`include_snapshot=true` adds the stored content), `PATCH` updates it (a new URL or rule starts a new baseline), `DELETE` removes it, `/{id}/events` returns the history and `POST /{id}/check` runs a test without changing anything. `dry_run=true` previews the normalised content without an account. Plans: Free 3 watchers every 60+ minutes, Starter 20 every 30+, Pro 100 every 15+ minutes.\n\nPath segments: `id`: `/v1/page-watch/{id}` (GET, PATCH, POST, DELETE), `/{id}/events`, `/{id}/check` (POST: test run).\n\nDocs: https://apibox.io.vn/docs/page-watch/",
    "operationId": "pageWatchDelete",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/page-watch/"
    },
    "parameters": [
     {
      "name": "include_snapshot",
      "in": "query",
      "required": false,
      "description": "`GET /{id}`: also return the stored content.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "selector": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "pattern": {},
          "ignore": {
           "type": "array"
          },
          "ignore_presets": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "interval_minutes": {
           "type": "number"
          },
          "alert_email": {
           "type": "boolean"
          },
          "webhook_url": {
           "type": "string"
          },
          "paused": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "last_check": {
           "type": "object",
           "properties": {
            "at": {
             "type": "string"
            },
            "error": {}
           }
          },
          "last_change_at": {},
          "changes_total": {
           "type": "number"
          },
          "checks_total": {
           "type": "number"
          },
          "snapshot": {
           "type": "object",
           "properties": {
            "sha256": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            }
           }
          },
          "next_check_at": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "first_check": {
           "type": "object",
           "properties": {
            "status_code": {
             "type": "number"
            },
            "selector_matches": {
             "type": "number"
            },
            "lines": {
             "type": "number"
            },
            "truncated": {
             "type": "boolean"
            },
            "preview": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ics-parse": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "iCalendar Parser",
    "description": "Send iCalendar text as `ics` (or as a raw `text/calendar` body), a `file`, a `url` / `urls` (public feeds, `webcal://` accepted, up to 5 per request) or `calendars` (an array of texts or `{url}` objects) to merge several calendars. Each event comes back with summary, description, location, URL, status, transparency, categories, organizer and attendees, alarms, `start` / `end` in the target `timezone` (ISO 8601 with offset; `YYYY-MM-DD` for all-day events, end exclusive), `start_utc` / `end_utc`, duration and the original time zone. Times with a TZID use the IANA zone, or the calendar’s own VTIMEZONE when the name is not an IANA one (Outlook), a few Windows names are mapped, and floating times are read in the target zone.\n\nWith `from` / `to` (dates are inclusive, read in the target zone) recurring series are expanded: RRULE with FREQ (minutely to yearly), INTERVAL, COUNT, UNTIL, BYDAY with ordinals (`1FR`, `-1SU`), BYMONTHDAY, BYMONTH, BYYEARDAY, BYHOUR / BYMINUTE / BYSECOND, BYSETPOS and WKST, plus RDATE, EXDATE and moved or cancelled instances (RECURRENCE-ID). Recurrences keep their wall-clock time across daylight-saving changes. Without a range, events are returned as stored with their `rrule` (`expand=true` lists the first occurrences); `limit` caps the output (default 1000, max 5000).\n\n`free_slots=true` merges the busy time of all calendars (cancelled and transparent events ignored, all-day events only with `all_day_busy=true`) and returns the free intervals inside working hours (`work_start`, `work_end`, `work_days` as ISO weekdays, `min_minutes`) for up to 62 days (default: 7 days from today). Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/ics-parse/",
    "operationId": "icsParseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ics-parse/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public .ics / webcal feed URL; `urls` for several (max 5).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "timezone",
      "in": "query",
      "required": false,
      "description": "Target IANA zone. Default: the calendar’s X-WR-TIMEZONE, else UTC.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Range start (YYYY-MM-DD or ISO date-time); turns expansion on.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "Range end (a date is inclusive). Default: 1 year after `from`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expand",
      "in": "query",
      "required": false,
      "description": "Expand recurrences (default: on when a range is given).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum events returned (1–5000).",
      "schema": {
       "type": "number",
       "default": 1000
      }
     },
     {
      "name": "include_cancelled",
      "in": "query",
      "required": false,
      "description": "Keep events with STATUS:CANCELLED.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "free_slots",
      "in": "query",
      "required": false,
      "description": "Also return free time within working hours.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "work_start",
      "in": "query",
      "required": false,
      "description": "Working day start (HH:MM).",
      "schema": {
       "type": "string",
       "default": "09:00"
      }
     },
     {
      "name": "work_end",
      "in": "query",
      "required": false,
      "description": "Working day end (HH:MM).",
      "schema": {
       "type": "string",
       "default": "17:00"
      }
     },
     {
      "name": "work_days",
      "in": "query",
      "required": false,
      "description": "ISO weekdays, 1 = Monday … 7 = Sunday, e.g. `1-5` or `1-6`.",
      "schema": {
       "type": "string",
       "default": "1-5"
      }
     },
     {
      "name": "min_minutes",
      "in": "query",
      "required": false,
      "description": "Shortest free slot returned (5–1440).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "all_day_busy",
      "in": "query",
      "required": false,
      "description": "Count all-day events as busy.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "calendars": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "source": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "timezone": {
              "type": "string"
             },
             "prodid": {
              "type": "string"
             },
             "method": {},
             "events": {
              "type": "number"
             }
            }
           }
          },
          "timezone": {
           "type": "string"
          },
          "range": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "expanded": {
           "type": "boolean"
          },
          "count": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "events": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "uid": {
              "type": "string"
             },
             "summary": {
              "type": "string"
             },
             "start": {
              "type": "string"
             },
             "end": {
              "type": "string"
             },
             "start_utc": {
              "type": "string"
             },
             "end_utc": {
              "type": "string"
             },
             "all_day": {
              "type": "boolean"
             },
             "duration_minutes": {
              "type": "number"
             },
             "timezone": {
              "type": "string"
             },
             "location": {
              "type": "string"
             },
             "recurring": {
              "type": "boolean"
             }
            }
           }
          },
          "free_slots": {
           "type": "object",
           "properties": {
            "work_hours": {
             "type": "object",
             "properties": {
              "start": {
               "type": "string"
              },
              "end": {
               "type": "string"
              },
              "days": {
               "type": "array"
              }
             }
            },
            "min_minutes": {
             "type": "number"
            },
            "busy": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "slots": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total_free_minutes": {
             "type": "number"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "iCalendar Parser",
    "description": "Send iCalendar text as `ics` (or as a raw `text/calendar` body), a `file`, a `url` / `urls` (public feeds, `webcal://` accepted, up to 5 per request) or `calendars` (an array of texts or `{url}` objects) to merge several calendars. Each event comes back with summary, description, location, URL, status, transparency, categories, organizer and attendees, alarms, `start` / `end` in the target `timezone` (ISO 8601 with offset; `YYYY-MM-DD` for all-day events, end exclusive), `start_utc` / `end_utc`, duration and the original time zone. Times with a TZID use the IANA zone, or the calendar’s own VTIMEZONE when the name is not an IANA one (Outlook), a few Windows names are mapped, and floating times are read in the target zone.\n\nWith `from` / `to` (dates are inclusive, read in the target zone) recurring series are expanded: RRULE with FREQ (minutely to yearly), INTERVAL, COUNT, UNTIL, BYDAY with ordinals (`1FR`, `-1SU`), BYMONTHDAY, BYMONTH, BYYEARDAY, BYHOUR / BYMINUTE / BYSECOND, BYSETPOS and WKST, plus RDATE, EXDATE and moved or cancelled instances (RECURRENCE-ID). Recurrences keep their wall-clock time across daylight-saving changes. Without a range, events are returned as stored with their `rrule` (`expand=true` lists the first occurrences); `limit` caps the output (default 1000, max 5000).\n\n`free_slots=true` merges the busy time of all calendars (cancelled and transparent events ignored, all-day events only with `all_day_busy=true`) and returns the free intervals inside working hours (`work_start`, `work_end`, `work_days` as ISO weekdays, `min_minutes`) for up to 62 days (default: 7 days from today). Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/ics-parse/",
    "operationId": "icsParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ics-parse/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ics": {
          "type": "string",
          "description": "iCalendar text (or send it as a raw text/calendar body)."
         },
         "url": {
          "type": "string",
          "description": "Public .ics / webcal feed URL; `urls` for several (max 5)."
         },
         "calendars": {
          "type": "array",
          "items": {},
          "description": "Several calendars to merge: texts or `{url}` / `{ics}` objects (max 10)."
         },
         "timezone": {
          "type": "string",
          "description": "Target IANA zone. Default: the calendar’s X-WR-TIMEZONE, else UTC."
         },
         "from": {
          "type": "string",
          "description": "Range start (YYYY-MM-DD or ISO date-time); turns expansion on."
         },
         "to": {
          "type": "string",
          "description": "Range end (a date is inclusive). Default: 1 year after `from`."
         },
         "expand": {
          "type": "boolean",
          "description": "Expand recurrences (default: on when a range is given)."
         },
         "limit": {
          "type": "number",
          "default": 1000,
          "description": "Maximum events returned (1–5000)."
         },
         "include_cancelled": {
          "type": "boolean",
          "default": false,
          "description": "Keep events with STATUS:CANCELLED."
         },
         "free_slots": {
          "type": "boolean",
          "default": false,
          "description": "Also return free time within working hours."
         },
         "work_start": {
          "type": "string",
          "default": "09:00",
          "description": "Working day start (HH:MM)."
         },
         "work_end": {
          "type": "string",
          "default": "17:00",
          "description": "Working day end (HH:MM)."
         },
         "work_days": {
          "type": "string",
          "default": "1-5",
          "description": "ISO weekdays, 1 = Monday … 7 = Sunday, e.g. `1-5` or `1-6`."
         },
         "min_minutes": {
          "type": "number",
          "default": 30,
          "description": "Shortest free slot returned (5–1440)."
         },
         "all_day_busy": {
          "type": "boolean",
          "default": false,
          "description": "Count all-day events as busy."
         }
        }
       },
       "example": {
        "ics": "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//APIBox//demo//VI\r\nX-WR-CALNAME:Nhóm dự án\r\nX-WR-TIMEZONE:Asia/Ho_Chi_Minh\r\nBEGIN:VEVENT\r\nUID:standup@example.vn\r\nDTSTART;TZID=Asia/Ho_Chi_Minh:20261116T090000\r\nDTEND;TZID=Asia/Ho_Chi_Minh:20261116T093000\r\nRRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=12\r\nSUMMARY:Họp đầu ngày\r\nLOCATION:Phòng 3\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nUID:demo@example.vn\r\nDTSTART:20261117T070000Z\r\nDTEND:20261117T083000Z\r\nSUMMARY:Demo khách hàng\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",
        "from": "2026-11-16",
        "to": "2026-11-17",
        "free_slots": true,
        "work_start": "08:30",
        "work_end": "17:30"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "ics": {
          "type": "string",
          "description": "iCalendar text (or send it as a raw text/calendar body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": ".ics file (multipart)."
         },
         "url": {
          "type": "string",
          "description": "Public .ics / webcal feed URL; `urls` for several (max 5)."
         },
         "calendars": {
          "type": "array",
          "items": {},
          "description": "Several calendars to merge: texts or `{url}` / `{ics}` objects (max 10)."
         },
         "timezone": {
          "type": "string",
          "description": "Target IANA zone. Default: the calendar’s X-WR-TIMEZONE, else UTC."
         },
         "from": {
          "type": "string",
          "description": "Range start (YYYY-MM-DD or ISO date-time); turns expansion on."
         },
         "to": {
          "type": "string",
          "description": "Range end (a date is inclusive). Default: 1 year after `from`."
         },
         "expand": {
          "type": "boolean",
          "description": "Expand recurrences (default: on when a range is given)."
         },
         "limit": {
          "type": "number",
          "default": 1000,
          "description": "Maximum events returned (1–5000)."
         },
         "include_cancelled": {
          "type": "boolean",
          "default": false,
          "description": "Keep events with STATUS:CANCELLED."
         },
         "free_slots": {
          "type": "boolean",
          "default": false,
          "description": "Also return free time within working hours."
         },
         "work_start": {
          "type": "string",
          "default": "09:00",
          "description": "Working day start (HH:MM)."
         },
         "work_end": {
          "type": "string",
          "default": "17:00",
          "description": "Working day end (HH:MM)."
         },
         "work_days": {
          "type": "string",
          "default": "1-5",
          "description": "ISO weekdays, 1 = Monday … 7 = Sunday, e.g. `1-5` or `1-6`."
         },
         "min_minutes": {
          "type": "number",
          "default": 30,
          "description": "Shortest free slot returned (5–1440)."
         },
         "all_day_busy": {
          "type": "boolean",
          "default": false,
          "description": "Count all-day events as busy."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "calendars": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "source": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "timezone": {
              "type": "string"
             },
             "prodid": {
              "type": "string"
             },
             "method": {},
             "events": {
              "type": "number"
             }
            }
           }
          },
          "timezone": {
           "type": "string"
          },
          "range": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "expanded": {
           "type": "boolean"
          },
          "count": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "events": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "uid": {
              "type": "string"
             },
             "summary": {
              "type": "string"
             },
             "start": {
              "type": "string"
             },
             "end": {
              "type": "string"
             },
             "start_utc": {
              "type": "string"
             },
             "end_utc": {
              "type": "string"
             },
             "all_day": {
              "type": "boolean"
             },
             "duration_minutes": {
              "type": "number"
             },
             "timezone": {
              "type": "string"
             },
             "location": {
              "type": "string"
             },
             "recurring": {
              "type": "boolean"
             }
            }
           }
          },
          "free_slots": {
           "type": "object",
           "properties": {
            "work_hours": {
             "type": "object",
             "properties": {
              "start": {
               "type": "string"
              },
              "end": {
               "type": "string"
              },
              "days": {
               "type": "array"
              }
             }
            },
            "min_minutes": {
             "type": "number"
            },
            "busy": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "slots": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total_free_minutes": {
             "type": "number"
            }
           }
          }
         }
        },
        "example": {
         "calendars": [
          {
           "index": 0,
           "source": "ics",
           "name": "Nhóm dự án",
           "timezone": "Asia/Ho_Chi_Minh",
           "prodid": "-//APIBox//demo//VI",
           "method": null,
           "events": 2
          }
         ],
         "timezone": "Asia/Ho_Chi_Minh",
         "range": {
          "from": "2026-11-16T00:00:00+07:00",
          "to": "2026-11-18T00:00:00+07:00"
         },
         "expanded": true,
         "count": 2,
         "truncated": false,
         "events": [
          {
           "uid": "standup@example.vn",
           "summary": "Họp đầu ngày",
           "start": "2026-11-16T09:00:00+07:00",
           "end": "2026-11-16T09:30:00+07:00",
           "start_utc": "2026-11-16T02:00:00.000Z",
           "end_utc": "2026-11-16T02:30:00.000Z",
           "all_day": false,
           "duration_minutes": 30,
           "timezone": "Asia/Ho_Chi_Minh",
           "location": "Phòng 3",
           "recurring": true
          },
          {
           "uid": "demo@example.vn",
           "summary": "Demo khách hàng",
           "start": "2026-11-17T14:00:00+07:00",
           "end": "2026-11-17T15:30:00+07:00",
           "start_utc": "2026-11-17T07:00:00.000Z",
           "end_utc": "2026-11-17T08:30:00.000Z",
           "all_day": false,
           "duration_minutes": 90,
           "timezone": "UTC"
          }
         ],
         "free_slots": {
          "work_hours": {
           "start": "08:30",
           "end": "17:30",
           "days": [
            1,
            2,
            3,
            4,
            5
           ]
          },
          "min_minutes": 30,
          "busy": [
           {
            "start": "2026-11-16T09:00:00+07:00",
            "end": "2026-11-16T09:30:00+07:00"
           },
           {
            "start": "2026-11-17T14:00:00+07:00",
            "end": "2026-11-17T15:30:00+07:00"
           }
          ],
          "slots": [
           {
            "start": "2026-11-16T08:30:00+07:00",
            "end": "2026-11-16T09:00:00+07:00",
            "minutes": 30
           },
           {
            "start": "2026-11-16T09:30:00+07:00",
            "end": "2026-11-16T17:30:00+07:00",
            "minutes": 480
           },
           {
            "start": "2026-11-17T08:30:00+07:00",
            "end": "2026-11-17T14:00:00+07:00",
            "minutes": 330
           },
           {
            "start": "2026-11-17T15:30:00+07:00",
            "end": "2026-11-17T17:30:00+07:00",
            "minutes": 120
           }
          ],
          "total_free_minutes": 960
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-invoice-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam e-invoice rules",
    "description": "`action=timing` takes a transaction `type` (goods, export, services, staged, reconciliation, construction, real_estate, lending, insurance, taxi, healthcare, casino, lottery, ETC toll…; `action=types` lists all 27) and the event dates you know (`delivery_date`, `customs_clearance_date`, `completion_date`, `payment_date`, `reconciliation_date`, `service_month`…). It returns the rule with its article, the latest invoice date (exports: next working day after clearance, holidays included; reconciled services: the 7th of the next month or 7 days after the agreed period; airline agents: the 10th), the latest signing / sending date (next working day) and, with `invoice_date`, whether the invoice is on time.\n\n`action=fix` takes the `error` (buyer_name, buyer_address, amount_in_words → notice only with Mẫu 04/SS-HĐĐT; tax_code, goods, quantity, unit_price, amount, tax_rate, tax_amount → adjustment or replacement), the `invoice_kind` (with_code, without_code, pos, registered_asset), `buyer_type` and `previous_fix`, and returns the steps, whether a written agreement is needed and the exact line \"Điều chỉnh / Thay thế cho hóa đơn Mẫu số… ký hiệu… số… ngày…\" filled from `original`. `event` covers trade discounts, returns, insurance refunds, cancelled prepaid services and settlement changes. `action=fields` lists the compulsory invoice contents.\n\nRules by date: from 1/7/2026 Nghị định 254/2026/NĐ-CP and Thông tư 91/2026/TT-BTC (which replaced NĐ 123/2020, NĐ 70/2025 and TT 32/2025); 1/6/2025–30/6/2026 the NĐ 70/2025 version. Read from the official gazette (Công báo). Reference only, with a `confidence` flag where the text needs interpretation.\n\nDocs: https://apibox.io.vn/docs/vn-invoice-rules/",
    "operationId": "vnInvoiceRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-invoice-rules/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`timing`, `fix`, `fields` or `types` (guessed from the other parameters when omitted).",
      "schema": {
       "type": "string",
       "default": "timing"
      },
      "example": "timing"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "timing: goods, export, services, staged, reconciliation, telecom_interconnect, construction, real_estate, airline_web, airline_agent, lending, taxi, healthcare, healthcare_bhxh, etc_toll, insurance, lottery, casino, consumer_transactions, night_sales…",
      "schema": {
       "type": "string"
      },
      "example": "export"
     },
     {
      "name": "delivery_date / customs_clearance_date / completion_date / payment_date / reconciliation_date / acceptance_date",
      "in": "query",
      "required": false,
      "description": "Event dates (YYYY-MM-DD) used to compute the deadline; `service_month` (YYYY-MM) and `period_end` for reconciled services.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "invoice_date",
      "in": "query",
      "required": false,
      "description": "Check an issued invoice: on_time, late or early.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-10"
     },
     {
      "name": "error",
      "in": "query",
      "required": false,
      "description": "fix: comma list of buyer_name, buyer_address, amount_in_words, other_info, tax_code, goods, quantity, unit_price, amount, tax_rate, tax_amount, other_required.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "event",
      "in": "query",
      "required": false,
      "description": "fix: commercial_discount, goods_return, registered_asset_return, insurance_refund, cancelled_prepaid, bank_fee_refund, settlement_change, fx_gas.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "invoice_kind",
      "in": "query",
      "required": false,
      "description": "with_code, without_code, pos (cash register) or registered_asset.",
      "schema": {
       "type": "string",
       "default": "with_code"
      }
     },
     {
      "name": "buyer_type",
      "in": "query",
      "required": false,
      "description": "business or individual (fields also: budget_unit, foreigner).",
      "schema": {
       "type": "string",
       "default": "business"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date deciding the rules (default: the invoice / event date, else today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "rule_vi": {
           "type": "string"
          },
          "ref": {
           "type": "string"
          },
          "confidence": {
           "type": "string"
          },
          "deadline": {
           "type": "string"
          },
          "deadline_basis": {
           "type": "string"
          },
          "check": {
           "type": "object",
           "properties": {
            "invoice_date": {
             "type": "string"
            },
            "deadline": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "days_late": {
             "type": "number"
            }
           }
          },
          "signing": {
           "type": "object",
           "properties": {
            "rule_vi": {
             "type": "string"
            },
            "latest_signing_date": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "timing",
         "type": "export",
         "name_vi": "Xuất khẩu hàng hóa (kể cả gia công xuất khẩu)",
         "rule_vi": "Người bán tự xác định nhưng chậm nhất không quá ngày làm việc tiếp theo kể từ ngày hàng hóa được thông quan.",
         "ref": "NĐ 254/2026/NĐ-CP Điều 9 khoản 1 đoạn 2",
         "confidence": "high",
         "deadline": "2026-11-09",
         "deadline_basis": "next working day after customs clearance 2026-11-06",
         "check": {
          "invoice_date": "2026-11-10",
          "deadline": "2026-11-09",
          "status": "late",
          "days_late": 1
         },
         "signing": {
          "rule_vi": "Nếu thời điểm ký số khác thời điểm lập hóa đơn: ký số và gửi cơ quan thuế cấp mã / chuyển dữ liệu chậm nhất là ngày làm việc tiếp theo kể từ thời điểm lập hóa đơn (trừ trường hợp gửi theo Bảng tổng hợp).",
          "latest_signing_date": "2026-11-10",
          "ref": "NĐ 254/2026/NĐ-CP, Phụ lục mục 7"
         },
         "date": "2026-11-10",
         "regime": "nd254",
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only, not legal / tax / accounting advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam e-invoice rules",
    "description": "`action=timing` takes a transaction `type` (goods, export, services, staged, reconciliation, construction, real_estate, lending, insurance, taxi, healthcare, casino, lottery, ETC toll…; `action=types` lists all 27) and the event dates you know (`delivery_date`, `customs_clearance_date`, `completion_date`, `payment_date`, `reconciliation_date`, `service_month`…). It returns the rule with its article, the latest invoice date (exports: next working day after clearance, holidays included; reconciled services: the 7th of the next month or 7 days after the agreed period; airline agents: the 10th), the latest signing / sending date (next working day) and, with `invoice_date`, whether the invoice is on time.\n\n`action=fix` takes the `error` (buyer_name, buyer_address, amount_in_words → notice only with Mẫu 04/SS-HĐĐT; tax_code, goods, quantity, unit_price, amount, tax_rate, tax_amount → adjustment or replacement), the `invoice_kind` (with_code, without_code, pos, registered_asset), `buyer_type` and `previous_fix`, and returns the steps, whether a written agreement is needed and the exact line \"Điều chỉnh / Thay thế cho hóa đơn Mẫu số… ký hiệu… số… ngày…\" filled from `original`. `event` covers trade discounts, returns, insurance refunds, cancelled prepaid services and settlement changes. `action=fields` lists the compulsory invoice contents.\n\nRules by date: from 1/7/2026 Nghị định 254/2026/NĐ-CP and Thông tư 91/2026/TT-BTC (which replaced NĐ 123/2020, NĐ 70/2025 and TT 32/2025); 1/6/2025–30/6/2026 the NĐ 70/2025 version. Read from the official gazette (Công báo). Reference only, with a `confidence` flag where the text needs interpretation.\n\nDocs: https://apibox.io.vn/docs/vn-invoice-rules/",
    "operationId": "vnInvoiceRulesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-invoice-rules/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "timing",
          "description": "`timing`, `fix`, `fields` or `types` (guessed from the other parameters when omitted)."
         },
         "type": {
          "type": "string",
          "description": "timing: goods, export, services, staged, reconciliation, telecom_interconnect, construction, real_estate, airline_web, airline_agent, lending, taxi, healthcare, healthcare_bhxh, etc_toll, insurance, lottery, casino, consumer_transactions, night_sales…"
         },
         "delivery_date / customs_clearance_date / completion_date / payment_date / reconciliation_date / acceptance_date": {
          "type": "string",
          "description": "Event dates (YYYY-MM-DD) used to compute the deadline; `service_month` (YYYY-MM) and `period_end` for reconciled services."
         },
         "invoice_date": {
          "type": "string",
          "description": "Check an issued invoice: on_time, late or early."
         },
         "error": {
          "type": "string",
          "description": "fix: comma list of buyer_name, buyer_address, amount_in_words, other_info, tax_code, goods, quantity, unit_price, amount, tax_rate, tax_amount, other_required."
         },
         "event": {
          "type": "string",
          "description": "fix: commercial_discount, goods_return, registered_asset_return, insurance_refund, cancelled_prepaid, bank_fee_refund, settlement_change, fx_gas."
         },
         "invoice_kind": {
          "type": "string",
          "default": "with_code",
          "description": "with_code, without_code, pos (cash register) or registered_asset."
         },
         "buyer_type": {
          "type": "string",
          "default": "business",
          "description": "business or individual (fields also: budget_unit, foreigner)."
         },
         "original": {
          "type": "object",
          "description": "Wrong invoice: {form, symbol, number, date} for the correction line."
         },
         "date": {
          "type": "string",
          "description": "Date deciding the rules (default: the invoice / event date, else today)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "name_vi": {
           "type": "string"
          },
          "rule_vi": {
           "type": "string"
          },
          "ref": {
           "type": "string"
          },
          "confidence": {
           "type": "string"
          },
          "deadline": {
           "type": "string"
          },
          "deadline_basis": {
           "type": "string"
          },
          "check": {
           "type": "object",
           "properties": {
            "invoice_date": {
             "type": "string"
            },
            "deadline": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "days_late": {
             "type": "number"
            }
           }
          },
          "signing": {
           "type": "object",
           "properties": {
            "rule_vi": {
             "type": "string"
            },
            "latest_signing_date": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-input-vat-check": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam input VAT check",
    "description": "Send the purchase invoices as `invoices` (JSON: date, seller_tax_code, amount / vat / vat_rate / total, payment_method, optional due_date, purpose, asset, seller_status) or as an XLSX / CSV purchase list in `file` (columns recognised by their Vietnamese or English headers). Each line gets a status (deductible, deductible_check, partly_deductible, not_deductible), the deductible and non-deductible VAT, the CIT non-deductible expense and the issues with their article.\n\nChecks: non-cash payment for invoices from 5 million VND including VAT (20 million before 1/7/2025), several purchases from one seller on one day totalling 5 million, cash deposited into the seller's account, mixed cash / transfer, deferred and instalment purchases whose due date passed without a non-cash payment (Công văn 5486/CT-CS), employees paying and reimbursed in cash, sales invoices (no VAT to deduct), buyer tax code mismatch, sellers that had ceased operating (when you send seller_status), passenger cars above 1.6 billion, purchases used for non-taxable activities (with taxable_ratio for mixed use) and invoices of earlier periods.\n\nTotals by month and by status. Based on Luật Thuế GTGT 48/2024/QH15 Điều 14, Nghị định 181/2025/NĐ-CP Điều 25–26 and Nghị định 320/2025/NĐ-CP Điều 9. The seller's status at the tax office is not looked up (the portal has a captcha).\n\nDocs: https://apibox.io.vn/docs/vn-input-vat-check/",
    "operationId": "vnInputVatCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-input-vat-check/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "invoices": {
          "type": "array",
          "items": {},
          "description": "Purchase invoices: {number, symbol, date, seller_tax_code, seller_name, amount, vat or vat_rate, total, payment_method (CK, TM, mixed, trả góp, bù trừ…), cash_amount, payment_date, due_date, invoice_type (vat|sales), purpose (taxable|exempt|mixed), asset (car), car_value, seller_status, seller_ceased_date, buyer_tax_code}. Max 20,000."
         },
         "buyer_tax_code": {
          "type": "string",
          "description": "Your tax code, to flag invoices issued to another code."
         },
         "taxable_ratio": {
          "type": "number",
          "description": "Taxable revenue / total revenue (0–1) for purchases used for both."
         },
         "period_start": {
          "type": "string",
          "description": "First day of the return period (flags invoices of earlier periods)."
         },
         "as_of": {
          "type": "string",
          "description": "Date for the due-date checks (default today)."
         }
        }
       },
       "example": {
        "buyer_tax_code": "0101234567",
        "as_of": "2026-11-11",
        "invoices": [
         {
          "number": "15",
          "date": "2026-10-02",
          "seller_tax_code": "0312345678",
          "amount": 10000000,
          "vat_rate": 8,
          "payment_method": "tiền mặt"
         },
         {
          "number": "88",
          "date": "2026-10-05",
          "seller_tax_code": "0109999999",
          "amount": 50000000,
          "vat": 5000000,
          "payment_method": "CK"
         },
         {
          "number": "102",
          "date": "2026-08-05",
          "seller_tax_code": "0109999998",
          "total": 22000000,
          "vat_rate": 10,
          "payment_method": "trả góp",
          "due_date": "2026-10-30"
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "invoices": {
          "type": "array",
          "items": {},
          "description": "Purchase invoices: {number, symbol, date, seller_tax_code, seller_name, amount, vat or vat_rate, total, payment_method (CK, TM, mixed, trả góp, bù trừ…), cash_amount, payment_date, due_date, invoice_type (vat|sales), purpose (taxable|exempt|mixed), asset (car), car_value, seller_status, seller_ceased_date, buyer_tax_code}. Max 20,000."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Or an XLSX / CSV purchase list (multipart, raw body or `file_base64`)."
         },
         "buyer_tax_code": {
          "type": "string",
          "description": "Your tax code, to flag invoices issued to another code."
         },
         "taxable_ratio": {
          "type": "number",
          "description": "Taxable revenue / total revenue (0–1) for purchases used for both."
         },
         "period_start": {
          "type": "string",
          "description": "First day of the return period (flags invoices of earlier periods)."
         },
         "as_of": {
          "type": "string",
          "description": "Date for the due-date checks (default today)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "invoices": {
           "type": "number"
          },
          "as_of": {
           "type": "string"
          },
          "totals": {
           "type": "object",
           "properties": {
            "amount": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "deductible_vat": {
             "type": "number"
            },
            "non_deductible_vat": {
             "type": "number"
            },
            "cit_non_deductible_expense": {
             "type": "number"
            }
           }
          },
          "status_counts": {
           "type": "object",
           "properties": {
            "not_deductible": {
             "type": "number"
            },
            "deductible": {
             "type": "number"
            }
           }
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "number": {
              "type": "string"
             },
             "symbol": {},
             "date": {
              "type": "string"
             },
             "seller_tax_code": {
              "type": "string"
             },
             "seller_name": {},
             "amount": {
              "type": "number"
             },
             "vat": {
              "type": "number"
             },
             "total": {
              "type": "number"
             },
             "payment_method": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "deductible_vat": {
              "type": "number"
             },
             "non_deductible_vat": {
              "type": "number"
             },
             "cit_non_deductible_expense": {
              "type": "number"
             },
             "issues": {
              "type": "array"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "source": "json",
         "invoices": 3,
         "as_of": "2026-11-11",
         "totals": {
          "amount": 80000000,
          "vat": 7800000,
          "deductible_vat": 5000000,
          "non_deductible_vat": 2800000,
          "cit_non_deductible_expense": 10000000
         },
         "status_counts": {
          "not_deductible": 2,
          "deductible": 1
         },
         "lines": [
          {
           "no": 1,
           "number": "15",
           "symbol": null,
           "date": "2026-10-02",
           "seller_tax_code": "0312345678",
           "seller_name": null,
           "amount": 10000000,
           "vat": 800000,
           "total": 10800000,
           "payment_method": "cash",
           "status": "not_deductible",
           "deductible_vat": 0,
           "non_deductible_vat": 800000,
           "cit_non_deductible_expense": 10000000,
           "issues": [
            {
             "code": "cash_over_threshold",
             "vat_effect": "not_deductible",
             "vi": "Hóa đơn từ 5.000.000 đồng trở lên (đã có thuế) thanh toán bằng tiền mặt: không được khấu trừ thuế GTGT đầu vào.",
             "ref": "NĐ 181/2025/NĐ-CP Điều 26"
            }
           ]
          },
          {
           "no": 2,
           "number": "88",
           "symbol": null,
           "date": "2026-10-05",
           "seller_tax_code": "0109999999",
           "seller_name": null,
           "amount": 50000000,
           "vat": 5000000,
           "total": 55000000,
           "payment_method": "non_cash",
           "status": "deductible",
           "deductible_vat": 5000000,
           "non_deductible_vat": 0,
           "cit_non_deductible_expense": 0,
           "issues": []
          }
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-hkd-books": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Household business books",
    "description": "Send the `transactions` (date, doc_no, description, type = sale / expense / purchase / stock_in / stock_out / cash_in / cash_out / other_tax, amount, sector, payment cash or bank, item / quantity / unit_price for stock) or a simple XLSX / CSV cash book in `file`. The API picks the book set of Thông tư 152/2025/TT-BTC (in force 1/1/2026, replaces TT 88/2021) from the annual revenue: S1a-HKD up to the 1 billion VND threshold (no VAT / PIT), S2a-HKD for VAT and PIT as a % of revenue, and S2b + S2c + S2d + S2e-HKD for the taxable-income method (compulsory above 3 billion); S3a-HKD when other taxes are recorded.\n\nS2a groups revenue by business line with the VAT and PIT of each (PIT only on revenue above the threshold, from the highest-rate line first, with prior_revenue_in_year; −30% PIT in 2026–2027 for revenue ≤ 10 billion). S2c lists revenue and reasonable expenses in the six groups of the form and the PIT at 15 / 17 / 20%. S2d keeps quantity and value per item (weighted-average issues), S2e the cash and each bank account with opening and closing balances.\n\n`format=xlsx` returns a workbook with one sheet per book laid out like the form (header block, column letters, totals, signature). Feed it the hkd_rows of /v1/vn-marketplace-settlement for platform sales.\n\nDocs: https://apibox.io.vn/docs/vn-hkd-books/",
    "operationId": "vnHkdBooksPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hkd-books/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "transactions": {
          "type": "array",
          "items": {},
          "description": "Transactions: {date, doc_no, description, type, amount, sector (distribution, services, production, asset_leasing, real_estate_leasing, agency, digital_content, other), expense_group (materials, wages, depreciation, services, interest, other), payment (cash | bank | none), bank, item, unit, quantity, unit_price}. Max 50,000."
         },
         "household": {
          "type": "object",
          "description": "{name, address, tax_code, location} printed in the book headers."
         },
         "tax_method": {
          "type": "string",
          "default": "auto",
          "description": "auto, exempt (S1a), revenue (S2a) or income (S2b–S2e) (alias `method`)."
         },
         "annual_revenue": {
          "type": "number",
          "description": "Expected revenue of the year (decides the book set and taxes)."
         },
         "prior_revenue_in_year": {
          "type": "number",
          "default": 0,
          "description": "Revenue of the year before this period (uses up the threshold)."
         },
         "opening_cash / opening_bank / opening_stock": {
          "type": "object",
          "description": "Opening balances: number, {bank: amount}, [{item, unit, quantity, amount}]."
         },
         "period_from / period_to / period_label": {
          "type": "string",
          "description": "Period shown as \"Kỳ kê khai\" (default from the dates)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         }
        }
       },
       "example": {
        "household": {
         "name": "Hộ kinh doanh Nguyễn Văn A",
         "tax_code": "079123456789",
         "address": "Phường Bến Thành, TP. Hồ Chí Minh"
        },
        "annual_revenue": 1800000000,
        "prior_revenue_in_year": 900000000,
        "transactions": [
         {
          "date": "2026-10-01",
          "doc_no": "PT01",
          "description": "Bán hàng tạp hóa",
          "amount": 300000000,
          "sector": "distribution",
          "payment": "cash"
         },
         {
          "date": "2026-10-05",
          "doc_no": "PT02",
          "description": "Sửa chữa xe máy",
          "amount": 120000000,
          "sector": "services",
          "payment": "bank",
          "bank": "Vietcombank"
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "transactions": {
          "type": "array",
          "items": {},
          "description": "Transactions: {date, doc_no, description, type, amount, sector (distribution, services, production, asset_leasing, real_estate_leasing, agency, digital_content, other), expense_group (materials, wages, depreciation, services, interest, other), payment (cash | bank | none), bank, item, unit, quantity, unit_price}. Max 50,000."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Or an XLSX / CSV with date, description and amount (or revenue / expense) columns."
         },
         "household": {
          "type": "object",
          "description": "{name, address, tax_code, location} printed in the book headers."
         },
         "tax_method": {
          "type": "string",
          "default": "auto",
          "description": "auto, exempt (S1a), revenue (S2a) or income (S2b–S2e) (alias `method`)."
         },
         "annual_revenue": {
          "type": "number",
          "description": "Expected revenue of the year (decides the book set and taxes)."
         },
         "prior_revenue_in_year": {
          "type": "number",
          "default": 0,
          "description": "Revenue of the year before this period (uses up the threshold)."
         },
         "opening_cash / opening_bank / opening_stock": {
          "type": "object",
          "description": "Opening balances: number, {bank: amount}, [{item, unit, quantity, amount}]."
         },
         "period_from / period_to / period_label": {
          "type": "string",
          "description": "Period shown as \"Kỳ kê khai\" (default from the dates)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "revenue": {
           "type": "number"
          },
          "prior_revenue_in_year": {
           "type": "number"
          },
          "annual_revenue_used": {
           "type": "number"
          },
          "threshold": {
           "type": "number"
          },
          "below_threshold": {
           "type": "boolean"
          },
          "period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "label": {
             "type": "string"
            }
           }
          },
          "books": {
           "type": "object",
           "properties": {
            "S2a-HKD": {
             "type": "object",
             "properties": {
              "form": {
               "type": "string"
              },
              "title": {
               "type": "string"
              },
              "columns": {
               "type": "array"
              },
              "total_vat": {
               "type": "number"
              },
              "total_pit": {
               "type": "number"
              },
              "sectors": {
               "type": "array"
              }
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "group": 2,
         "method": "revenue",
         "revenue": 420000000,
         "prior_revenue_in_year": 900000000,
         "annual_revenue_used": 1800000000,
         "threshold": 1000000000,
         "below_threshold": false,
         "period": {
          "from": "2026-10-01",
          "to": "2026-10-05",
          "label": "Tháng 10/2026"
         },
         "books": {
          "S2a-HKD": {
           "form": "S2a-HKD",
           "title": "SỔ DOANH THU BÁN HÀNG HÓA, DỊCH VỤ",
           "columns": [
            "Số hiệu chứng từ (A)",
            "Ngày, tháng (B)",
            "Diễn giải (C)"
           ],
           "total_vat": 9000000,
           "total_pit": 1330000,
           "sectors": [
            {
             "sector": "distribution",
             "name_vi": "Phân phối, cung cấp hàng hóa",
             "rows": [
              {
               "doc_no": "PT01",
               "date": "2026-10-01",
               "description": "Bán hàng tạp hóa",
               "amount": 300000000
              }
             ],
             "total": 300000000,
             "vat_rate": 1,
             "pit_rate": 0.5,
             "vat": 3000000,
             "pit_taxable_revenue": 300000000,
             "pit": 1050000
            },
            {
             "sector": "services",
             "name_vi": "Dịch vụ, xây dựng không bao thầu nguyên vật liệu",
             "rows": [
              {
               "doc_no": "PT02",
               "date": "2026-10-05",
               "description": "Sửa chữa xe máy",
               "amount": 120000000
              }
             ],
             "total": 120000000,
             "vat_rate": 5,
             "pit_rate": 2,
             "vat": 6000000,
             "pit_taxable_revenue": 20000000,
             "pit": 280000
            }
           ]
          }
         },
         "notes": [
          "PIT reduced by 30% (tax years 2026–2027, annual revenue ≤ 10 billion: NĐ 398/2026/NĐ-CP)."
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-journal-entries": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam journal entries",
    "description": "Search with `q` in Vietnamese (accents optional) or English – \"mua hàng nhập kho chưa thanh toán\", \"trích khấu hao\", \"trả lương\", \"chiết khấu thương mại\", \"kết chuyển doanh thu\" – and get the matching entries with their Nợ / Có lines, account names from the chart of the circular and the guidance they follow (`basis`). Send `amount` with `vat_rate` (and `inclusive`) to fill the values and VAT, or `amounts` per role for multi-line entries (insurance: bhxh, bhyt, bhtn, kpcd). `id` returns one entry, `list=true` (or `group`) the library.\n\n`chart=tt99` (default) uses Thông tư 99/2025/TT-BTC, in force from 1/1/2026 (e.g. 242 \"chi phí chờ phân bổ\", 3387 \"doanh thu chờ phân bổ\", 621/622/627 kept, no 611); `chart=tt133` maps to Thông tư 133/2016/TT-BTC for SMEs (154 for production costs, 6421/6422, no 521, 3385 for unemployment insurance) with notes where the treatment differs.\n\nPOST `entry` (lines with side Nợ/Có, account, amount) to check it: accounts exist in the chart, debits equal credits, and the pairing matches an entry of the library. A reference written from the account guidance of the circulars – not an official template: several treatments can be valid, have your accountant review it.\n\nDocs: https://apibox.io.vn/docs/vn-journal-entries/",
    "operationId": "vnJournalEntriesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-journal-entries/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Transaction description (Vietnamese with or without accents, or English).",
      "schema": {
       "type": "string"
      },
      "example": "mua hàng nhập kho chưa thanh toán"
     },
     {
      "name": "chart",
      "in": "query",
      "required": false,
      "description": "`tt99` (TT 99/2025) or `tt133` (TT 133/2016).",
      "schema": {
       "type": "string",
       "default": "tt99"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Amount before VAT (or including VAT with inclusive=true).",
      "schema": {
       "type": "number"
      },
      "example": 10000000
     },
     {
      "name": "vat_rate",
      "in": "query",
      "required": false,
      "description": "VAT rate (0, 5, 8, 10) to split / add the VAT line.",
      "schema": {
       "type": "number"
      },
      "example": 10
     },
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "One entry by id (list=true for ids).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list / group",
      "in": "query",
      "required": false,
      "description": "List the library (groups: cash, purchase, sales, inventory, assets, payroll, tax, finance, equity, closing, other).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for q (1–10).",
      "schema": {
       "type": "number",
       "default": 3
      },
      "example": 1
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "score": {
              "type": "number"
             },
             "id": {
              "type": "string"
             },
             "group": {
              "type": "string"
             },
             "description_vi": {
              "type": "string"
             },
             "lines": {
              "type": "array"
             },
             "totals": {
              "type": "object"
             },
             "basis": {
              "type": "string"
             }
            }
           }
          },
          "chart": {
           "type": "string"
          },
          "reference_only": {
           "type": "boolean"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "q": "mua hàng nhập kho chưa thanh toán",
         "count": 1,
         "results": [
          {
           "score": 2.71,
           "id": "buy_goods_credit",
           "group": "purchase",
           "description_vi": "Mua hàng hóa nhập kho chưa thanh toán (có hóa đơn GTGT)",
           "lines": [
            {
             "side": "debit",
             "side_vi": "Nợ",
             "account": "156",
             "account_name": "Hàng hóa",
             "role": "amount",
             "value": 10000000
            },
            {
             "side": "debit",
             "side_vi": "Nợ",
             "account": "1331",
             "account_name": "Thuế GTGT được khấu trừ của hàng hóa, dịch vụ",
             "role": "vat",
             "value": 1000000
            },
            {
             "side": "credit",
             "side_vi": "Có",
             "account": "331",
             "account_name": "Phải trả cho người bán",
             "role": "total",
             "value": 11000000
            }
           ],
           "totals": {
            "debit": 11000000,
            "credit": 11000000,
            "balanced": true
           },
           "basis": "Thông tư 99/2025/TT-BTC, Phụ lục II – hướng dẫn kế toán các tài khoản 156, 133, 331"
          }
         ],
         "chart": "tt99",
         "reference_only": true,
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam journal entries",
    "description": "Search with `q` in Vietnamese (accents optional) or English – \"mua hàng nhập kho chưa thanh toán\", \"trích khấu hao\", \"trả lương\", \"chiết khấu thương mại\", \"kết chuyển doanh thu\" – and get the matching entries with their Nợ / Có lines, account names from the chart of the circular and the guidance they follow (`basis`). Send `amount` with `vat_rate` (and `inclusive`) to fill the values and VAT, or `amounts` per role for multi-line entries (insurance: bhxh, bhyt, bhtn, kpcd). `id` returns one entry, `list=true` (or `group`) the library.\n\n`chart=tt99` (default) uses Thông tư 99/2025/TT-BTC, in force from 1/1/2026 (e.g. 242 \"chi phí chờ phân bổ\", 3387 \"doanh thu chờ phân bổ\", 621/622/627 kept, no 611); `chart=tt133` maps to Thông tư 133/2016/TT-BTC for SMEs (154 for production costs, 6421/6422, no 521, 3385 for unemployment insurance) with notes where the treatment differs.\n\nPOST `entry` (lines with side Nợ/Có, account, amount) to check it: accounts exist in the chart, debits equal credits, and the pairing matches an entry of the library. A reference written from the account guidance of the circulars – not an official template: several treatments can be valid, have your accountant review it.\n\nDocs: https://apibox.io.vn/docs/vn-journal-entries/",
    "operationId": "vnJournalEntriesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-journal-entries/"
    },
    "parameters": [
     {
      "name": "list / group",
      "in": "query",
      "required": false,
      "description": "List the library (groups: cash, purchase, sales, inventory, assets, payroll, tax, finance, equity, closing, other).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for q (1–10).",
      "schema": {
       "type": "number",
       "default": 3
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "q": {
          "type": "string",
          "description": "Transaction description (Vietnamese with or without accents, or English)."
         },
         "chart": {
          "type": "string",
          "default": "tt99",
          "description": "`tt99` (TT 99/2025) or `tt133` (TT 133/2016)."
         },
         "amount": {
          "type": "number",
          "description": "Amount before VAT (or including VAT with inclusive=true)."
         },
         "vat_rate": {
          "type": "number",
          "description": "VAT rate (0, 5, 8, 10) to split / add the VAT line."
         },
         "amounts": {
          "type": "object",
          "description": "Values per role for multi-line entries, e.g. {bhxh, bhyt, bhtn, kpcd, total}."
         },
         "id": {
          "type": "string",
          "description": "One entry by id (list=true for ids)."
         },
         "entry": {
          "type": "array",
          "items": {},
          "description": "Check an entry: [{side: \"Nợ\"|\"Có\", account, amount}]."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "score": {
              "type": "number"
             },
             "id": {
              "type": "string"
             },
             "group": {
              "type": "string"
             },
             "description_vi": {
              "type": "string"
             },
             "lines": {
              "type": "array"
             },
             "totals": {
              "type": "object"
             },
             "basis": {
              "type": "string"
             }
            }
           }
          },
          "chart": {
           "type": "string"
          },
          "reference_only": {
           "type": "boolean"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-marketplace-settlement": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Marketplace settlement reader",
    "description": "Upload one or more exports as `file`, `file2`… (XLSX or CSV; Shopee \"Báo cáo thu nhập\", TikTok Shop statements, Lazada transaction overview) or send `rows` as JSON. The platform and the columns are recognised from the header words in Vietnamese or English (the header row may be below a title block); Lazada's one-row-per-fee format is grouped by order. Columns that were not recognised are listed, and `column_map` (role → header text) overrides the detection when a platform changes its export.\n\nEvery order is normalised: product price, refunds, seller and platform discounts, shipping paid / charged / subsidised, fees (commission, service, payment, affiliate, other), VAT and PIT withheld by the platform, payout, the payout recomputed from the parts and the difference. Totals by month and quarter give the taxable revenue, fees, tax withheld and money received; issues flag payout mismatches, a withholding rate different from the 1% + 0.5% (goods), 5% + 2% (services) or 3% + 1.5% of NĐ 117/2025, and tax withheld on fully refunded orders.\n\n`bank_receipts` matches payout batches (platform + settlement date) with bank receipts; `orders` lists shop orders not yet settled. `hkd_rows` are ready for /v1/vn-hkd-books. Platforms change their files without notice: check the recognised columns.\n\nDocs: https://apibox.io.vn/docs/vn-marketplace-settlement/",
    "operationId": "vnMarketplaceSettlementPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-marketplace-settlement/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "rows": {
          "type": "array",
          "items": {},
          "description": "Or the export rows as JSON objects (export column names as keys)."
         },
         "platform": {
          "type": "string",
          "description": "Force shopee, tiktok or lazada (default: detected)."
         },
         "column_map": {
          "type": "object",
          "description": "Role → header text, e.g. {\"payout\": \"Số tiền quyết toán\"}. Roles: order_id, order_date, settled_date, gross, refund, seller_discount, platform_subsidy, shipping_buyer, shipping_actual, shipping_subsidy, fee_fixed, fee_service, fee_payment, fee_affiliate, fee_other, fee_total, vat, pit, payout, amount, fee_name, status."
         },
         "seller_type": {
          "type": "string",
          "default": "household",
          "description": "household, individual or enterprise (no withholding)."
         },
         "tax_category": {
          "type": "string",
          "default": "goods",
          "description": "goods (1% + 0.5%), services (5% + 2%) or goods_services (3% + 1.5%)."
         },
         "bank_receipts": {
          "type": "array",
          "items": {},
          "description": "[{date, amount, reference}] to match payout batches."
         },
         "orders": {
          "type": "array",
          "items": {},
          "description": "Shop order IDs to find orders not settled yet."
         },
         "tolerance": {
          "type": "number",
          "default": 1000,
          "description": "Tolerance in VND for the payout and bank checks."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Income / settlement export (XLSX or CSV); more files as file2, file3… (max 12)."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Or the export rows as JSON objects (export column names as keys)."
         },
         "platform": {
          "type": "string",
          "description": "Force shopee, tiktok or lazada (default: detected)."
         },
         "column_map": {
          "type": "object",
          "description": "Role → header text, e.g. {\"payout\": \"Số tiền quyết toán\"}. Roles: order_id, order_date, settled_date, gross, refund, seller_discount, platform_subsidy, shipping_buyer, shipping_actual, shipping_subsidy, fee_fixed, fee_service, fee_payment, fee_affiliate, fee_other, fee_total, vat, pit, payout, amount, fee_name, status."
         },
         "seller_type": {
          "type": "string",
          "default": "household",
          "description": "household, individual or enterprise (no withholding)."
         },
         "tax_category": {
          "type": "string",
          "default": "goods",
          "description": "goods (1% + 0.5%), services (5% + 2%) or goods_services (3% + 1.5%)."
         },
         "bank_receipts": {
          "type": "array",
          "items": {},
          "description": "[{date, amount, reference}] to match payout batches."
         },
         "orders": {
          "type": "array",
          "items": {},
          "description": "Shop order IDs to find orders not settled yet."
         },
         "tolerance": {
          "type": "number",
          "default": 1000,
          "description": "Tolerance in VND for the payout and bank checks."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "platform": {
              "type": "string"
             },
             "format": {
              "type": "string"
             },
             "header_row": {
              "type": "number"
             },
             "orders": {
              "type": "number"
             },
             "unknown_columns": {
              "type": "array"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "orders": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "refund": {
             "type": "number"
            },
            "seller_discount": {
             "type": "number"
            },
            "revenue": {
             "type": "number"
            },
            "fees": {
             "type": "number"
            },
            "vat_withheld": {
             "type": "number"
            },
            "pit_withheld": {
             "type": "number"
            },
            "payout": {
             "type": "number"
            }
           }
          },
          "months": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "month": {
              "type": "string"
             },
             "orders": {
              "type": "number"
             },
             "gross": {
              "type": "number"
             },
             "refund": {
              "type": "number"
             },
             "seller_discount": {
              "type": "number"
             },
             "revenue": {
              "type": "number"
             },
             "fees": {
              "type": "number"
             },
             "vat_withheld": {
              "type": "number"
             },
             "pit_withheld": {
              "type": "number"
             },
             "payout": {
              "type": "number"
             }
            }
           }
          },
          "tax": {
           "type": "object",
           "properties": {
            "seller_type": {
             "type": "string"
            },
            "category": {
             "type": "string"
            },
            "rates": {
             "type": "object",
             "properties": {
              "vat_percent": {
               "type": "number"
              },
              "pit_percent": {
               "type": "number"
              }
             }
            },
            "withheld_total": {
             "type": "number"
            }
           }
          },
          "issue_count": {
           "type": "number"
          },
          "reconciliation": {
           "type": "object",
           "properties": {
            "matched": {
             "type": "number"
            },
            "unmatched_batches": {
             "type": "number"
            }
           }
          },
          "hkd_rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "doc_no": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "sector": {
              "type": "string"
             },
             "payment": {
              "type": "string"
             }
            }
           }
          },
          "orders": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "platform": {
              "type": "string"
             },
             "file": {
              "type": "string"
             },
             "row": {
              "type": "number"
             },
             "order_id": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "order_date": {
              "type": "string"
             },
             "settled_date": {
              "type": "string"
             },
             "gross": {
              "type": "number"
             },
             "refund": {
              "type": "number"
             },
             "seller_discount": {
              "type": "number"
             },
             "platform_subsidy": {
              "type": "number"
             },
             "revenue": {
              "type": "number"
             },
             "shipping": {
              "type": "object"
             },
             "fees": {
              "type": "object"
             },
             "fee_total": {
              "type": "number"
             },
             "tax_withheld": {
              "type": "object"
             },
             "expected_tax": {
              "type": "object"
             },
             "payout": {
              "type": "number"
             },
             "payout_computed": {
              "type": "number"
             },
             "payout_difference": {
              "type": "number"
             },
             "status": {}
            }
           }
          }
         }
        },
        "example": {
         "files": [
          {
           "platform": "shopee",
           "format": "wide (one row per order)",
           "header_row": 3,
           "orders": 3,
           "unknown_columns": [
            "Mã yêu cầu hoàn tiền"
           ]
          }
         ],
         "totals": {
          "orders": 3,
          "gross": 1800000,
          "refund": 300000,
          "seller_discount": 20000,
          "revenue": 1480000,
          "fees": 292000,
          "vat_withheld": 14800,
          "pit_withheld": 7400,
          "payout": 1140800
         },
         "months": [
          {
           "month": "2026-10",
           "orders": 2,
           "gross": 800000,
           "refund": 300000,
           "seller_discount": 20000,
           "revenue": 480000,
           "fees": 92000,
           "vat_withheld": 4800,
           "pit_withheld": 2400,
           "payout": 355800
          }
         ],
         "tax": {
          "seller_type": "household",
          "category": "goods",
          "rates": {
           "vat_percent": 1,
           "pit_percent": 0.5
          },
          "withheld_total": 22200
         },
         "issue_count": 0,
         "reconciliation": {
          "matched": 1,
          "unmatched_batches": 2
         },
         "hkd_rows": [
          {
           "date": "2026-10-31",
           "doc_no": "SAN-2026-10",
           "description": "Doanh thu bán hàng qua sàn TMĐT tháng 10/2026",
           "type": "sale",
           "amount": 480000,
           "sector": "distribution",
           "payment": "bank"
          }
         ],
         "orders": [
          {
           "platform": "shopee",
           "file": "file",
           "row": 4,
           "order_id": "2610010ABC",
           "kind": "order",
           "order_date": "2026-10-01",
           "settled_date": "2026-10-06",
           "gross": 500000,
           "refund": 0,
           "seller_discount": 20000,
           "platform_subsidy": 0,
           "revenue": 480000,
           "shipping": {
            "buyer_paid": 30000,
            "actual": 30000,
            "subsidy": 0,
            "return": 0
           },
           "fees": {
            "fixed": 48000,
            "service": 20000,
            "payment": 24000,
            "affiliate": 0,
            "other": 0
           },
           "fee_total": 92000,
           "tax_withheld": {
            "vat": 4800,
            "pit": 2400,
            "total": 7200
           },
           "expected_tax": {
            "vat": 4800,
            "pit": 2400
           },
           "payout": 380800,
           "payout_computed": 380800,
           "payout_difference": 0,
           "status": null
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-tax-treaty": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam tax treaties",
    "description": "`country` (ISO code or name in English or Vietnamese) returns the treaty: status (78 in force, 4 signed but not in force such as the USA), signing and entry-into-force dates, the date it applies in Vietnam, protocols, dividend rates with their holding conditions, interest and its exemptions, royalty categories, a technical-fees article when there is one, the construction and services PE periods, the basis of the 183-day test and the teachers / students article. `comparison` sets each cap against the Vietnamese withholding rate (foreign company: interest 5%, royalties 10%, services 5%, no tax on dividends; non-resident individual: 5% / 5% / 20% employment) and gives the effective rate – often the domestic rate is already lower, the treaty matters for royalty tiers, the PE test and employees.\n\n`income_type` with `amount` computes one payment: dividends (with `holding_percent`), interest, royalties (`royalty_type` picks a category), technical_fees, `services` with `days_in_vn` (PE test; `activity=construction` for building projects) and `employment` with `days_in_vn` (Article 15). Every answer has the relief procedure (Mẫu 01/HTQT, certificate of residence, TT 89/2026 and TT 95/2026), the verification level of the data (read from the treaty text, or one / two secondary sources) and the sources.\n\nRates read from the treaty texts (VCCI WTO centre, luatvietnam, partner governments) and cross-checked with PwC; the official list of the Tax Department is checked weekly. `list=true` lists all partners.\n\nDocs: https://apibox.io.vn/docs/vn-tax-treaty/",
    "operationId": "vnTaxTreatyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-treaty/"
    },
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Partner: ISO alpha-2 code or name (English / Vietnamese). Also /v1/vn-tax-treaty/{code}.",
      "schema": {
       "type": "string"
      },
      "example": "SG"
     },
     {
      "name": "income_type",
      "in": "query",
      "required": false,
      "description": "dividends, interest, royalties, technical_fees, services or employment.",
      "schema": {
       "type": "string"
      },
      "example": "royalties"
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Gross payment (VND) to compute the tax.",
      "schema": {
       "type": "number"
      },
      "example": 100000000
     },
     {
      "name": "recipient",
      "in": "query",
      "required": false,
      "description": "company or individual (decides the domestic rates).",
      "schema": {
       "type": "string",
       "default": "company"
      }
     },
     {
      "name": "holding_percent",
      "in": "query",
      "required": false,
      "description": "Dividends: % of capital held by the recipient.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "royalty_type",
      "in": "query",
      "required": false,
      "description": "Words of the royalty category (e.g. patent, software, equipment).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "days_in_vn",
      "in": "query",
      "required": false,
      "description": "services / employment: days in Vietnam in the relevant period.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "activity",
      "in": "query",
      "required": false,
      "description": "services: `construction` to use the construction-PE period.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Payment date (default today): treaty in force, domestic law version.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "List all partners (status=in_force to filter).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "country": {
           "type": "object",
           "properties": {
            "iso2": {
             "type": "string"
            },
            "name_en": {
             "type": "string"
            },
            "name_vi": {
             "type": "string"
            }
           }
          },
          "status": {
           "type": "string"
          },
          "in_force": {
           "type": "string"
          },
          "applies_from_vn": {
           "type": "string"
          },
          "treaty_applies_on_date": {
           "type": "boolean"
          },
          "recipient": {
           "type": "string"
          },
          "comparison": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "income": {
              "type": "string"
             },
             "domestic_rate": {
              "type": "number"
             },
             "domestic_ref": {
              "type": "string"
             },
             "treaty_rate": {
              "type": "number"
             },
             "effective_rate": {
              "type": "number"
             },
             "treaty_reduces": {
              "type": "boolean"
             },
             "treaty_categories": {
              "type": "array"
             }
            }
           }
          },
          "result": {
           "type": "object",
           "properties": {
            "income": {
             "type": "string"
            },
            "domestic_rate": {
             "type": "number"
            },
            "treaty_rate": {
             "type": "number"
            },
            "effective_rate": {
             "type": "number"
            },
            "amount": {
             "type": "number"
            },
            "tax": {
             "type": "number"
            },
            "net": {
             "type": "number"
            }
           }
          },
          "pe": {
           "type": "object",
           "properties": {
            "construction": {
             "type": "string"
            },
            "services_pe": {
             "type": "string"
            },
            "notes": {}
           }
          },
          "verification": {
           "type": "string"
          },
          "procedure": {
           "type": "object",
           "properties": {
            "form": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "country": {
          "iso2": "SG",
          "name_en": "Singapore",
          "name_vi": "Xinh-ga-po"
         },
         "status": "in_force",
         "in_force": "1994-09-09",
         "applies_from_vn": "1995-01-01",
         "treaty_applies_on_date": true,
         "recipient": "company",
         "comparison": [
          {
           "income": "interest",
           "domestic_rate": 5,
           "domestic_ref": "NĐ 320/2025/NĐ-CP Điều 12 khoản 3 điểm e (CIT part of foreign contractor tax)",
           "treaty_rate": 10,
           "effective_rate": 5,
           "treaty_reduces": false
          },
          {
           "income": "royalties",
           "domestic_rate": 10,
           "domestic_ref": "NĐ 320/2025/NĐ-CP Điều 12 khoản 3 điểm c",
           "treaty_rate": 10,
           "effective_rate": 10,
           "treaty_reduces": false,
           "treaty_categories": [
            {
             "rate": 5,
             "applies_to": "patent, design/model, plan, secret formula/process, industrial/commercial/scientific equipment or experience"
            },
            {
             "rate": 10,
             "applies_to": "all other royalties (15% in the 1994 text; replaced by 10% by Art. VI of the 2012 Protocol)"
            }
           ]
          }
         ],
         "result": {
          "income": "royalties",
          "domestic_rate": 10,
          "treaty_rate": 10,
          "effective_rate": 10,
          "amount": 100000000,
          "tax": 10000000,
          "net": 90000000
         },
         "pe": {
          "construction": "6 months (Art. 5(3)(a) as replaced by the 2012 Protocol)",
          "services_pe": "more than 183 days within any 12-month period (added by the 2012 Protocol, Art. II)",
          "notes": null
         },
         "verification": "text",
         "procedure": {
          "form": "Mẫu 01/HTQT – Văn bản đề nghị miễn, giảm thuế theo Hiệp định thuế"
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-incentive-areas": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam investment incentive areas",
    "description": "Look up a commune by `ward` code, by name (`q`, optionally with `province`) or by a pre-2025 commune code (`old_ward`), or list a whole `province`. The answer gives the category from the provincial list – `extremely_difficult`, `difficult` or `none` – with the decision of the provincial People's Committee and its source, and the CIT incentive of the category: 10% for 15 years with 4 years exempt and 50% off for 9 years, or 17% for 10 years with 2 + 4 years (Luật Thuế TNDN 67/2025/QH15, Nghị định 320/2025/NĐ-CP), for new investment projects.\n\nSince 1/3/2026 there is no national commune list: Luật Đầu tư 143/2025/QH15 and Nghị định 96/2026/NĐ-CP Điều 22 set the criteria (old district category, ethnic-minority zone I / II / III, majority of the old communes for merged ones, ties to the higher category) and each province publishes its list. The data covers the provinces whose list has been imported (`coverage`); for the others the API returns `unknown` / `pending` with the rule and the old communes the new one was formed from, so you can apply it.\n\nAlso returned: the zone rules (economic and high-tech zones; industrial zones are not an area incentive for CIT any more), the transition rule for projects licensed before 1/10/2025 and the legal references. The right of a specific project to an incentive is decided by the tax office.\n\nDocs: https://apibox.io.vn/docs/vn-incentive-areas/",
    "operationId": "vnIncentiveAreasGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-incentive-areas/"
    },
    "parameters": [
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "Current (post-1/7/2025) ward / commune code, 5 digits.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Commune / ward name (accents optional).",
      "schema": {
       "type": "string"
      },
      "example": "Sa Pa"
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or code: narrows q, or alone lists the province (category= to filter).",
      "schema": {
       "type": "string"
      },
      "example": "Lào Cai"
     },
     {
      "name": "old_ward",
      "in": "query",
      "required": false,
      "description": "Pre-2025 commune code: converted to the new commune(s).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "With province: extremely_difficult, difficult or none.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ward": {
              "type": "object"
             },
             "category": {
              "type": "string"
             },
             "category_vi": {
              "type": "string"
             },
             "coverage": {
              "type": "string"
             },
             "source": {
              "type": "object"
             },
             "cit_incentive": {
              "type": "object"
             },
             "formed_from": {
              "type": "array"
             }
            }
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "provinces_total": {
             "type": "number"
            },
            "provinces_listed": {
             "type": "number"
            },
            "communes_listed": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "query": "Sa Pa",
         "count": 1,
         "results": [
          {
           "ward": {
            "code": "03006",
            "name": "Phường Sa Pa",
            "province_code": "15",
            "province": "Lào Cai"
           },
           "category": "extremely_difficult",
           "category_vi": "Địa bàn có điều kiện kinh tế - xã hội đặc biệt khó khăn",
           "coverage": "listed",
           "source": {
            "decision": "QĐ 1894/QĐ-UBND 07/11/2025",
            "url": "https://cdn.thuviennhadat.vn/upload/hinh-anh-bai-viet/2026/nhom1/NNTD/thang-1/dia-ban-uu-dai-dau-tu-cap-xa-lao-cai.pdf"
           },
           "cit_incentive": {
            "rate_percent": 10,
            "rate_years": 15,
            "exemption_years": 4,
            "reduction_50_years": 9,
            "refs": [
             "Luật Thuế TNDN 67/2025/QH15 Điều 13 khoản 1 điểm c, Điều 14 khoản 1 điểm a",
             "NĐ 320/2025/NĐ-CP Điều 19 khoản 1 điểm c, Điều 20 khoản 1 điểm a"
            ]
           },
           "formed_from": [
            {
             "code": "03001",
             "name": "Phường Sa Pa",
             "district": "Thị xã Sa Pa",
             "province": "Tỉnh Lào Cai"
            },
            {
             "code": "03002",
             "name": "Phường Sa Pả",
             "district": "Thị xã Sa Pa",
             "province": "Tỉnh Lào Cai"
            }
           ]
          }
         ],
         "coverage": {
          "provinces_total": 34,
          "provinces_listed": 11,
          "communes_listed": 814
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vat-rates": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "World VAT / GST rates",
    "description": "`country` (ISO alpha-2 or English name; also /v1/vat-rates/{code}) returns the tax name, the standard rate in force on `date` (history since 2019 and scheduled changes such as Thailand 7% → 10% or the end of Vietnam's 8%), the reduced, super-reduced and parking rates with the usual categories (food, books, hotels, restaurants, medicines, transport…), zero-rated and exempt supplies, regional rates, Canadian provinces (GST / HST / PST / QST) and the components for Brazil (ICMS, ISS, PIS / COFINS, the 2026 CBS / IBS test rates).\n\n`digital_services` tells whether non-resident sellers of digital services must register and collect, from when and above which threshold (EU OSS, UK, Norway VOEC, Switzerland, Australia A$75,000, New Zealand, Japan, India, Indonesia, Thailand, the Philippines from June 2025…). `category=books` finds the matching reduced rate, and `amount` with `inclusive` computes net, tax and gross at the standard, a reduced or a given rate. `list=true` (`region=eu`, `digital_services=true`) lists every country.\n\nEU rates come from the European Commission's TEDB database (© European Union, CC BY 4.0) and refresh weekly; other countries are maintained from tax-authority pages and adviser guides, each with its verification level and sources. Category lists are indicative: check the national list for a specific product.\n\nDocs: https://apibox.io.vn/docs/vat-rates/",
    "operationId": "vatRatesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vat-rates/"
    },
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "ISO 3166 alpha-2 code (GB, DE, VN…; UK and EL accepted) or English name.",
      "schema": {
       "type": "string"
      },
      "example": "FR"
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date (YYYY-MM-DD, default today) for the standard rate in force.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Product category words (books, food, hotel, medicine…) to find a reduced rate.",
      "schema": {
       "type": "string"
      },
      "example": "books"
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Amount to compute the tax.",
      "schema": {
       "type": "number"
      },
      "example": 100
     },
     {
      "name": "inclusive",
      "in": "query",
      "required": false,
      "description": "amount already includes the tax.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "rate_type",
      "in": "query",
      "required": false,
      "description": "standard, reduced, super_reduced, parking or a number.",
      "schema": {
       "type": "string",
       "default": "standard"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "All countries (region=eu, digital_services=true to filter).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "iso2": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "tax_name": {
           "type": "string"
          },
          "currency": {
           "type": "string"
          },
          "standard": {
           "type": "number"
          },
          "standard_since": {
           "type": "string"
          },
          "reduced": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rate": {
              "type": "number"
             },
             "applies_to": {
              "type": "string"
             }
            }
           }
          },
          "super_reduced": {
           "type": "object",
           "properties": {
            "rate": {
             "type": "number"
            },
            "applies_to": {
             "type": "string"
            }
           }
          },
          "category": {
           "type": "object",
           "properties": {
            "query": {
             "type": "string"
            },
            "matches": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "result": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "calculation": {
           "type": "object",
           "properties": {
            "amount": {
             "type": "number"
            },
            "inclusive": {
             "type": "boolean"
            },
            "rate_percent": {
             "type": "number"
            },
            "net": {
             "type": "number"
            },
            "tax": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "currency": {
             "type": "string"
            }
           }
          },
          "eu_member": {
           "type": "boolean"
          },
          "verification": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "iso2": "FR",
         "name": "France",
         "tax_name": "TVA",
         "currency": "EUR",
         "standard": 20,
         "standard_since": "2019-01-01",
         "reduced": [
          {
           "rate": 10,
           "applies_to": "restaurants/catering; passenger transport; hotel accommodation; non-reimbursed pharmaceuticals; renovation of dwellings; cultural events (some); firewood"
          },
          {
           "rate": 5.5,
           "applies_to": "most foodstuffs; books; energy-saving renovation; admission to cultural/sport events; gas/electricity subscriptions; sanitary protection; disability equipment"
          }
         ],
         "super_reduced": {
          "rate": 2.1,
          "applies_to": "reimbursable medicines; press publications; first 140 performances of new shows; TV licence"
         },
         "category": {
          "query": "books",
          "matches": [
           {
            "kind": "reduced",
            "rate": 5.5,
            "applies_to": "most foodstuffs; books; energy-saving renovation; admission to cultural/sport events; gas/electricity subscriptions; sanitary protection; disability equipment"
           }
          ],
          "result": 5.5,
          "note": "Indicative match on the category text; check the exact scope in the national list."
         },
         "calculation": {
          "amount": 100,
          "inclusive": false,
          "rate_percent": 5.5,
          "net": 100,
          "tax": 5.5,
          "gross": 105.5,
          "currency": "EUR"
         },
         "eu_member": true,
         "verification": "official",
         "attribution": "EU rates: © European Union, TEDB (CC BY 4.0), modified; other rates compiled by APIBox from official and adviser sources"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-labour-report": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Labour Use Report 01/PLI (VN)",
    "description": "Send your employee list as a JSON array (`employees`), CSV text or an uploaded CSV / XLSX file with English or Vietnamese headers (Họ tên, Giới tính, Ngày sinh, Mã số BHXH, Số CCCD, Chức vụ, Trình độ, Loại HĐ, Ngày vào làm, Ngày nghỉ việc, Ngày bắt đầu đóng BHXH…). The API keeps the employees who worked during the period, maps each one to the job-position groups of the form (manager, high-skilled with a university degree, mid-skilled with college / intermediate training, other; inferred from the position and education when you do not send `job_group`) and to the contract columns (indefinite, definite, other: under 1 month or probation).\n\n`format=xlsx` returns the 27-column table of Mẫu số 01/PLI Phụ lục I Nghị định 145/2020/NĐ-CP with the official header, numbering row, totals and signature block, plus a summary sheet (start, hired, left, end of period, women, over 35, compulsory BHXH, contract types) and a list of foreign workers. `format=json` returns the same data, the deadline (before 05/06 for the 6-month report, before 05/12 for the annual one) and the checks: missing dates or gender, definite contracts longer than 36 months, CCCD / BHXH code formats, missing BHXH start dates, foreign workers without a work permit number.\n\nThe decree fixes the deadlines but not the months covered: by default the period runs from 1 December of the previous year to 31 May (6 months) or 30 November (annual); change it with `period_from` / `period_to`. Reports go to Sở Nội vụ and the BHXH office through the National Public Service Portal. Employee data is processed in memory only and never stored.\n\nDocs: https://apibox.io.vn/docs/vn-labour-report/",
    "operationId": "vnLabourReportPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-labour-report/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "employees": {
          "type": "array",
          "items": {},
          "description": "Employee rows: [{ name, gender, dob, bhxh_code?, id_number?, position?, education?, job_group? (manager|high|mid|other), salary?, contract_type, contract_start, contract_end?, hire_date?, leave_date?, insurance_start?, insurance_end?, hazardous_start?, nationality?, work_permit?, note? }], CSV text, or upload `file` (CSV / XLSX). Vietnamese headers accepted."
         },
         "period": {
          "type": "string",
          "description": "`h1` (6-month report, due before 05/06) or `year` (due before 05/12). Default depends on today."
         },
         "year": {
          "type": "number",
          "description": "Report year (default this year)."
         },
         "period_from": {
          "type": "string",
          "description": "Start of the period (default 1 December of the previous year)."
         },
         "period_to": {
          "type": "string",
          "description": "End of the period (default 31 May or 30 November)."
         },
         "company": {
          "type": "object",
          "description": "{ name, tax_code, address, phone, email, website, business_line, recipient, place } for the form header."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         },
         "force": {
          "type": "boolean",
          "default": false,
          "description": "Build the XLSX even when rows have errors."
         }
        },
        "required": [
         "employees"
        ]
       },
       "example": {
        "period": "year",
        "year": 2026,
        "company": {
         "name": "Công ty TNHH Ví Dụ",
         "tax_code": "0101234567"
        },
        "employees": [
         {
          "name": "Nguyễn Văn An",
          "gender": "Nam",
          "dob": "1985-03-02",
          "position": "Giám đốc",
          "contract_type": "không xác định thời hạn",
          "contract_start": "2020-01-01",
          "insurance_start": "2020-01-01"
         },
         {
          "name": "Trần Thị Bình",
          "gender": "Nữ",
          "dob": "1995-07-10",
          "position": "Kế toán",
          "education": "Đại học",
          "contract_type": "xác định thời hạn",
          "contract_start": "2026-01-05",
          "contract_end": "2027-01-04",
          "insurance_start": "2026-01-01"
         },
         {
          "name": "Lê Văn Cường",
          "gender": "Nam",
          "dob": "2000-01-01",
          "position": "Kỹ thuật viên",
          "education": "Cao đẳng",
          "contract_type": "xác định thời hạn",
          "contract_start": "2025-06-01",
          "contract_end": "2026-05-31",
          "leave_date": "2026-06-01",
          "insurance_start": "2025-06-01"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "report": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "deadline": {
           "type": "object",
           "properties": {
            "deadline": {
             "type": "string"
            },
            "rule": {
             "type": "string"
            },
            "days_left": {
             "type": "number"
            },
            "channel": {
             "type": "string"
            }
           }
          },
          "summary": {
           "type": "object",
           "properties": {
            "period": {
             "type": "object",
             "properties": {
              "type": {
               "type": "string"
              },
              "from": {
               "type": "string"
              },
              "to": {
               "type": "string"
              }
             }
            },
            "at_start": {
             "type": "number"
            },
            "hired": {
             "type": "number"
            },
            "left": {
             "type": "number"
            },
            "at_end": {
             "type": "number"
            },
            "at_end_breakdown": {
             "type": "object",
             "properties": {
              "female": {
               "type": "number"
              },
              "over_35": {
               "type": "number"
              },
              "compulsory_social_insurance": {
               "type": "number"
              },
              "foreign": {
               "type": "number"
              },
              "job_groups": {
               "type": "object"
              },
              "contracts": {
               "type": "object"
              },
              "hazardous_jobs": {
               "type": "number"
              }
             }
            },
            "job_group_inferred": {
             "type": "number"
            }
           }
          },
          "employees": {
           "type": "array",
           "items": {}
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "report": "Mẫu số 01/PLI – Báo cáo tình hình sử dụng lao động",
         "source": "json",
         "deadline": {
          "deadline": "2026-12-04",
          "rule": "trước ngày 05/12",
          "days_left": 23,
          "channel": "Cổng Dịch vụ công quốc gia (dichvucong.gov.vn), gửi Sở Nội vụ và cơ quan BHXH nơi đặt trụ sở / chi nhánh"
         },
         "summary": {
          "period": {
           "type": "year",
           "from": "2025-12-01",
           "to": "2026-11-30"
          },
          "at_start": 2,
          "hired": 1,
          "left": 1,
          "at_end": 2,
          "at_end_breakdown": {
           "female": 1,
           "over_35": 1,
           "compulsory_social_insurance": 2,
           "foreign": 0,
           "job_groups": {
            "manager": 1,
            "high_skilled": 1,
            "mid_skilled": 0,
            "other": 0
           },
           "contracts": {
            "indefinite": 1,
            "definite": 1,
            "other_under_1_month_or_probation": 0
           },
           "hazardous_jobs": 0
          },
          "job_group_inferred": 3
         },
         "employees": [
          {
           "no": 1,
           "name": "Nguyễn Văn An",
           "dob": "02/03/1985",
           "gender": "Nam",
           "position": "Giám đốc",
           "job_group": "manager",
           "contract_type": "indefinite",
           "contract_start": "01/01/2020",
           "insurance_start": "01/01/2020",
           "status": "continuing"
          },
          "…"
         ],
         "errors": [],
         "warnings": [],
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-labour-terms": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Labour Time Limits (VN)",
    "description": "`topic=probation`: the maximum probation for the job level (180 days for enterprise managers, 60 days for jobs needing a college degree or higher, 30 days for intermediate / technical jobs, 6 working days for others – Bộ luật Lao động Điều 25), the latest end date from `start_date`, the 85 % minimum probation wage and checks for a second probation or a contract under one month.\n\n`topic=notice`: the notice an `employee` or `employer` must give (45 days for indefinite contracts, 30 days for 12–36 months, 3 working days under 12 months, 120 days or a quarter of the term for the special jobs of NĐ 145/2020 Điều 7), the termination date, the last working day and the 14-working-day settlement deadline, with the cases where no notice is needed. Working days skip weekends and Vietnamese public holidays (official schedules, including 24/11 from 2026) from /v1/vn-holidays; set `saturday_off=false` for a six-day week.\n\n`topic=renewal` tells whether the next contract may be definite (only one more definite-term contract, sign within 30 days of expiry) and `topic=settlement` gives the final-payment deadline (14 working days, up to 30 days in special cases) and optionally severance or job-loss allowance. Without a topic you get the rule table with the fines of Nghị định 283/2026/NĐ-CP.\n\nDocs: https://apibox.io.vn/docs/vn-labour-terms/",
    "operationId": "vnLabourTermsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-labour-terms/"
    },
    "parameters": [
     {
      "name": "topic",
      "in": "query",
      "required": false,
      "description": "`probation`, `notice`, `renewal`, `settlement` or `rules`.",
      "schema": {
       "type": "string",
       "default": "rules"
      },
      "example": "notice"
     },
     {
      "name": "job_level",
      "in": "query",
      "required": false,
      "description": "probation: `manager`, `college`, `intermediate` or `other`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "probation: start date (default today); also `end_date`, `salary`, `probation_salary`, `contract_months`, `previous_probation`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "party",
      "in": "query",
      "required": false,
      "description": "notice: `employee` or `employer`.",
      "schema": {
       "type": "string",
       "default": "employee"
      },
      "example": "employee"
     },
     {
      "name": "contract_type",
      "in": "query",
      "required": false,
      "description": "notice: `indefinite`, `definite` (with `contract_months`) or `probation`.",
      "schema": {
       "type": "string",
       "default": "indefinite"
      },
      "example": "indefinite"
     },
     {
      "name": "notice_date",
      "in": "query",
      "required": false,
      "description": "notice: date the notice is given (default today); also `special_job`, `illness_ground`, `agreed_notice_days`.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "expiry_date",
      "in": "query",
      "required": false,
      "description": "renewal: expiry of the current contract; with `definite_contracts_signed` and `exception`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "termination_date",
      "in": "query",
      "required": false,
      "description": "settlement: termination date; `extended_reason`, `years`, `average_salary`, `allowance` (severance|job_loss).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "saturday_off",
      "in": "query",
      "required": false,
      "description": "Saturdays are days off (false = six-day week).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "topic": {
           "type": "string"
          },
          "party": {
           "type": "string"
          },
          "contract_type": {
           "type": "string"
          },
          "contract_months": {},
          "special_job": {
           "type": "boolean"
          },
          "notice_date": {
           "type": "string"
          },
          "notice": {
           "type": "number"
          },
          "unit": {
           "type": "string"
          },
          "ref": {
           "type": "string"
          },
          "termination_date": {
           "type": "string"
          },
          "last_working_day": {
           "type": "string"
          },
          "settlement_deadline": {
           "type": "string"
          },
          "settlement_deadline_extended": {
           "type": "string"
          },
          "workweek": {
           "type": "string"
          },
          "no_notice_cases": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "topic": "notice",
         "party": "employee",
         "contract_type": "indefinite",
         "contract_months": null,
         "special_job": false,
         "notice_date": "2026-11-11",
         "notice": 45,
         "unit": "days",
         "ref": "Bộ luật Lao động, Điều 35.1.a",
         "termination_date": "2026-12-26",
         "last_working_day": "2026-12-25",
         "settlement_deadline": "2027-01-15",
         "settlement_deadline_extended": "2027-01-25",
         "workweek": "Monday–Friday (saturday_off=true)",
         "no_notice_cases": [
          "Không được bố trí đúng công việc, địa điểm làm việc hoặc không được bảo đảm điều kiện làm việc đã thoả thuận (trừ Điều 29)",
          "…"
         ],
         "notes": [
          "…"
         ],
         "legal": [
          {
           "ref": "Bộ luật Lao động 45/2019/QH14 (VBHN 125/VBHN-VPQH)",
           "effective_from": "2021-01-01"
          },
          "…"
         ],
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Labour Time Limits (VN)",
    "description": "`topic=probation`: the maximum probation for the job level (180 days for enterprise managers, 60 days for jobs needing a college degree or higher, 30 days for intermediate / technical jobs, 6 working days for others – Bộ luật Lao động Điều 25), the latest end date from `start_date`, the 85 % minimum probation wage and checks for a second probation or a contract under one month.\n\n`topic=notice`: the notice an `employee` or `employer` must give (45 days for indefinite contracts, 30 days for 12–36 months, 3 working days under 12 months, 120 days or a quarter of the term for the special jobs of NĐ 145/2020 Điều 7), the termination date, the last working day and the 14-working-day settlement deadline, with the cases where no notice is needed. Working days skip weekends and Vietnamese public holidays (official schedules, including 24/11 from 2026) from /v1/vn-holidays; set `saturday_off=false` for a six-day week.\n\n`topic=renewal` tells whether the next contract may be definite (only one more definite-term contract, sign within 30 days of expiry) and `topic=settlement` gives the final-payment deadline (14 working days, up to 30 days in special cases) and optionally severance or job-loss allowance. Without a topic you get the rule table with the fines of Nghị định 283/2026/NĐ-CP.\n\nDocs: https://apibox.io.vn/docs/vn-labour-terms/",
    "operationId": "vnLabourTermsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-labour-terms/"
    },
    "parameters": [
     {
      "name": "topic",
      "in": "query",
      "required": false,
      "description": "`probation`, `notice`, `renewal`, `settlement` or `rules`.",
      "schema": {
       "type": "string",
       "default": "rules"
      }
     },
     {
      "name": "job_level",
      "in": "query",
      "required": false,
      "description": "probation: `manager`, `college`, `intermediate` or `other`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "probation: start date (default today); also `end_date`, `salary`, `probation_salary`, `contract_months`, `previous_probation`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "party",
      "in": "query",
      "required": false,
      "description": "notice: `employee` or `employer`.",
      "schema": {
       "type": "string",
       "default": "employee"
      }
     },
     {
      "name": "contract_type",
      "in": "query",
      "required": false,
      "description": "notice: `indefinite`, `definite` (with `contract_months`) or `probation`.",
      "schema": {
       "type": "string",
       "default": "indefinite"
      }
     },
     {
      "name": "notice_date",
      "in": "query",
      "required": false,
      "description": "notice: date the notice is given (default today); also `special_job`, `illness_ground`, `agreed_notice_days`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expiry_date",
      "in": "query",
      "required": false,
      "description": "renewal: expiry of the current contract; with `definite_contracts_signed` and `exception`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "termination_date",
      "in": "query",
      "required": false,
      "description": "settlement: termination date; `extended_reason`, `years`, `average_salary`, `allowance` (severance|job_loss).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "saturday_off",
      "in": "query",
      "required": false,
      "description": "Saturdays are days off (false = six-day week).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "topic": {
           "type": "string"
          },
          "party": {
           "type": "string"
          },
          "contract_type": {
           "type": "string"
          },
          "contract_months": {},
          "special_job": {
           "type": "boolean"
          },
          "notice_date": {
           "type": "string"
          },
          "notice": {
           "type": "number"
          },
          "unit": {
           "type": "string"
          },
          "ref": {
           "type": "string"
          },
          "termination_date": {
           "type": "string"
          },
          "last_working_day": {
           "type": "string"
          },
          "settlement_deadline": {
           "type": "string"
          },
          "settlement_deadline_extended": {
           "type": "string"
          },
          "workweek": {
           "type": "string"
          },
          "no_notice_cases": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-civil-salary": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Civil Servant Salary (VN)",
    "description": "Choose the table (`cong_chuc` – civil servants, `vien_chuc` – public employees, `chuyen_gia_cao_cap`), the grade (A3.1, A3.2, A2.1, A2.2, A1, A0, B, C1–C3 of Nghị định 204/2004/NĐ-CP) and the step, or send the `coefficient` directly. The base salary follows the date: 2,340,000 VND (NĐ 73/2024) and 2,530,000 VND from 1 July 2026 (Nghị định 161/2026/NĐ-CP, Thông tư 13/2026/TT-BNV); the response also shows the gross under the previous base and the monthly increase.\n\nAllowances: coefficient-based ones are multiplied by the base salary (`leadership_coef`, `regional_coef` 0.1–1.0, `responsibility_coef` 0.1–0.5, `other_coef`); percentage-based ones are applied to salary + leadership + TNVK (`tnvk_pct` or `last_step_since` to compute 5 % + 1 % a year, `seniority_pct` for thâm niên nghề, `preferential_pct` for ưu đãi nghề, e.g. teachers 25–80 % under NĐ 182/2026, health workers 30–80 % under NĐ 350/2026). Employee contributions: BHXH 8 %, BHYT 1.5 % and, for public employees only, BHTN 1 %, on salary + leadership + TNVK + thâm niên nghề; optional union fee 1 %.\n\n`step_since` gives the next regular step-up date (3 years for A0–A3, 2 years for B and C, 5 years for senior experts) and `action=tables` returns the full coefficient tables with the salary of every step. Personal income tax is not computed; use /v1/vn-salary.\n\nDocs: https://apibox.io.vn/docs/vn-civil-salary/",
    "operationId": "vnCivilSalaryGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-civil-salary/"
    },
    "parameters": [
     {
      "name": "table",
      "in": "query",
      "required": false,
      "description": "`cong_chuc`, `vien_chuc` or `chuyen_gia_cao_cap`.",
      "schema": {
       "type": "string",
       "default": "cong_chuc"
      },
      "example": "vien_chuc"
     },
     {
      "name": "grade",
      "in": "query",
      "required": false,
      "description": "A3.1, A3.2, A2.1, A2.2, A1, A0, B, C1, C2, C3.",
      "schema": {
       "type": "string"
      },
      "example": "A1"
     },
     {
      "name": "step",
      "in": "query",
      "required": false,
      "description": "Salary step (bậc).",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 4
     },
     {
      "name": "coefficient",
      "in": "query",
      "required": false,
      "description": "Salary coefficient instead of grade + step.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date for the base salary (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "leadership_coef",
      "in": "query",
      "required": false,
      "description": "Leadership allowance coefficient.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "regional_coef",
      "in": "query",
      "required": false,
      "description": "Regional allowance: 0.1, 0.2, 0.3, 0.4, 0.5, 0.7 or 1.0.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "responsibility_coef",
      "in": "query",
      "required": false,
      "description": "Responsibility allowance: 0.1, 0.2, 0.3 or 0.5.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "tnvk_pct",
      "in": "query",
      "required": false,
      "description": "Over-the-top seniority (TNVK) %, or `last_step_since` (date) to compute it.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seniority_pct",
      "in": "query",
      "required": false,
      "description": "Professional seniority allowance % (thâm niên nghề).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "preferential_pct",
      "in": "query",
      "required": false,
      "description": "Occupational preferential allowance % (ưu đãi nghề).",
      "schema": {
       "type": "number"
      },
      "example": 35
     },
     {
      "name": "other_coef",
      "in": "query",
      "required": false,
      "description": "Other coefficient-based allowances; also `other_pct`, `fixed_allowances` (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "step_since",
      "in": "query",
      "required": false,
      "description": "Date the current step was reached (gives next_step_date).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "unemployment_insurance",
      "in": "query",
      "required": false,
      "description": "Deduct BHTN 1 % (default: only for vien_chuc); `union_fee` adds 1 %.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`tables`: full coefficient tables.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "table": {
           "type": "string"
          },
          "grade": {
           "type": "string"
          },
          "grade_name_vi": {
           "type": "string"
          },
          "step": {
           "type": "number"
          },
          "steps_in_grade": {
           "type": "number"
          },
          "coefficient": {
           "type": "number"
          },
          "base_salary": {
           "type": "number"
          },
          "base_salary_from": {
           "type": "string"
          },
          "base_salary_ref": {
           "type": "string"
          },
          "salary": {
           "type": "number"
          },
          "allowances": {
           "type": "object",
           "properties": {
            "leadership": {
             "type": "number"
            },
            "tnvk": {
             "type": "number"
            },
            "regional": {
             "type": "number"
            },
            "responsibility": {
             "type": "number"
            },
            "other_coefficient": {
             "type": "number"
            },
            "seniority": {
             "type": "number"
            },
            "preferential": {
             "type": "number"
            },
            "other_percentage": {
             "type": "number"
            },
            "fixed": {
             "type": "number"
            }
           }
          },
          "allowances_total": {
           "type": "number"
          },
          "gross": {
           "type": "number"
          },
          "insurance_base": {
           "type": "number"
          },
          "employee_deductions": {
           "type": "object",
           "properties": {
            "bhxh": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "union": {
             "type": "number"
            }
           }
          },
          "deductions_total": {
           "type": "number"
          },
          "net_before_pit": {
           "type": "number"
          },
          "previous_base": {
           "type": "object",
           "properties": {
            "base_salary": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "increase_per_month": {
             "type": "number"
            }
           }
          },
          "step_up": {
           "type": "object",
           "properties": {
            "period_years": {
             "type": "number"
            },
            "next_step": {
             "type": "number"
            },
            "next_coefficient": {
             "type": "number"
            },
            "next_step_date": {},
            "ref": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "table": "vien_chuc",
         "grade": "A1",
         "grade_name_vi": "Loại A1 (chuyên viên và tương đương)",
         "step": 4,
         "steps_in_grade": 9,
         "coefficient": 3.33,
         "base_salary": 2530000,
         "base_salary_from": "2026-07-01",
         "base_salary_ref": "Nghị định 161/2026/NĐ-CP; Thông tư 13/2026/TT-BNV",
         "salary": 8424900,
         "allowances": {
          "leadership": 0,
          "tnvk": 0,
          "regional": 0,
          "responsibility": 0,
          "other_coefficient": 0,
          "seniority": 0,
          "preferential": 2948715,
          "other_percentage": 0,
          "fixed": 0
         },
         "allowances_total": 2948715,
         "gross": 11373615,
         "insurance_base": 8424900,
         "employee_deductions": {
          "bhxh": 673992,
          "bhyt": 126374,
          "bhtn": 84249,
          "union": 0
         },
         "deductions_total": 884615,
         "net_before_pit": 10489000,
         "previous_base": {
          "base_salary": 2340000,
          "gross": 10519470,
          "increase_per_month": 854145
         },
         "step_up": {
          "period_years": 3,
          "next_step": 5,
          "next_coefficient": 3.66,
          "next_step_date": null,
          "ref": "Thông tư 08/2013/TT-BNV (sửa đổi bởi Thông tư 03/2021/TT-BNV)"
         },
         "notes": [
          "Personal income tax is not deducted: use /v1/vn-salary with the taxable allowances of your unit."
         ],
         "legal": [
          "…"
         ],
         "disclaimer": "Reference calculation, not legal or financial advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Civil Servant Salary (VN)",
    "description": "Choose the table (`cong_chuc` – civil servants, `vien_chuc` – public employees, `chuyen_gia_cao_cap`), the grade (A3.1, A3.2, A2.1, A2.2, A1, A0, B, C1–C3 of Nghị định 204/2004/NĐ-CP) and the step, or send the `coefficient` directly. The base salary follows the date: 2,340,000 VND (NĐ 73/2024) and 2,530,000 VND from 1 July 2026 (Nghị định 161/2026/NĐ-CP, Thông tư 13/2026/TT-BNV); the response also shows the gross under the previous base and the monthly increase.\n\nAllowances: coefficient-based ones are multiplied by the base salary (`leadership_coef`, `regional_coef` 0.1–1.0, `responsibility_coef` 0.1–0.5, `other_coef`); percentage-based ones are applied to salary + leadership + TNVK (`tnvk_pct` or `last_step_since` to compute 5 % + 1 % a year, `seniority_pct` for thâm niên nghề, `preferential_pct` for ưu đãi nghề, e.g. teachers 25–80 % under NĐ 182/2026, health workers 30–80 % under NĐ 350/2026). Employee contributions: BHXH 8 %, BHYT 1.5 % and, for public employees only, BHTN 1 %, on salary + leadership + TNVK + thâm niên nghề; optional union fee 1 %.\n\n`step_since` gives the next regular step-up date (3 years for A0–A3, 2 years for B and C, 5 years for senior experts) and `action=tables` returns the full coefficient tables with the salary of every step. Personal income tax is not computed; use /v1/vn-salary.\n\nDocs: https://apibox.io.vn/docs/vn-civil-salary/",
    "operationId": "vnCivilSalaryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-civil-salary/"
    },
    "parameters": [
     {
      "name": "table",
      "in": "query",
      "required": false,
      "description": "`cong_chuc`, `vien_chuc` or `chuyen_gia_cao_cap`.",
      "schema": {
       "type": "string",
       "default": "cong_chuc"
      }
     },
     {
      "name": "grade",
      "in": "query",
      "required": false,
      "description": "A3.1, A3.2, A2.1, A2.2, A1, A0, B, C1, C2, C3.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "step",
      "in": "query",
      "required": false,
      "description": "Salary step (bậc).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "coefficient",
      "in": "query",
      "required": false,
      "description": "Salary coefficient instead of grade + step.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date for the base salary (default today).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "leadership_coef",
      "in": "query",
      "required": false,
      "description": "Leadership allowance coefficient.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "regional_coef",
      "in": "query",
      "required": false,
      "description": "Regional allowance: 0.1, 0.2, 0.3, 0.4, 0.5, 0.7 or 1.0.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "responsibility_coef",
      "in": "query",
      "required": false,
      "description": "Responsibility allowance: 0.1, 0.2, 0.3 or 0.5.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "tnvk_pct",
      "in": "query",
      "required": false,
      "description": "Over-the-top seniority (TNVK) %, or `last_step_since` (date) to compute it.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seniority_pct",
      "in": "query",
      "required": false,
      "description": "Professional seniority allowance % (thâm niên nghề).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "preferential_pct",
      "in": "query",
      "required": false,
      "description": "Occupational preferential allowance % (ưu đãi nghề).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "other_coef",
      "in": "query",
      "required": false,
      "description": "Other coefficient-based allowances; also `other_pct`, `fixed_allowances` (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "step_since",
      "in": "query",
      "required": false,
      "description": "Date the current step was reached (gives next_step_date).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "unemployment_insurance",
      "in": "query",
      "required": false,
      "description": "Deduct BHTN 1 % (default: only for vien_chuc); `union_fee` adds 1 %.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`tables`: full coefficient tables.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "table": {
           "type": "string"
          },
          "grade": {
           "type": "string"
          },
          "grade_name_vi": {
           "type": "string"
          },
          "step": {
           "type": "number"
          },
          "steps_in_grade": {
           "type": "number"
          },
          "coefficient": {
           "type": "number"
          },
          "base_salary": {
           "type": "number"
          },
          "base_salary_from": {
           "type": "string"
          },
          "base_salary_ref": {
           "type": "string"
          },
          "salary": {
           "type": "number"
          },
          "allowances": {
           "type": "object",
           "properties": {
            "leadership": {
             "type": "number"
            },
            "tnvk": {
             "type": "number"
            },
            "regional": {
             "type": "number"
            },
            "responsibility": {
             "type": "number"
            },
            "other_coefficient": {
             "type": "number"
            },
            "seniority": {
             "type": "number"
            },
            "preferential": {
             "type": "number"
            },
            "other_percentage": {
             "type": "number"
            },
            "fixed": {
             "type": "number"
            }
           }
          },
          "allowances_total": {
           "type": "number"
          },
          "gross": {
           "type": "number"
          },
          "insurance_base": {
           "type": "number"
          },
          "employee_deductions": {
           "type": "object",
           "properties": {
            "bhxh": {
             "type": "number"
            },
            "bhyt": {
             "type": "number"
            },
            "bhtn": {
             "type": "number"
            },
            "union": {
             "type": "number"
            }
           }
          },
          "deductions_total": {
           "type": "number"
          },
          "net_before_pit": {
           "type": "number"
          },
          "previous_base": {
           "type": "object",
           "properties": {
            "base_salary": {
             "type": "number"
            },
            "gross": {
             "type": "number"
            },
            "increase_per_month": {
             "type": "number"
            }
           }
          },
          "step_up": {
           "type": "object",
           "properties": {
            "period_years": {
             "type": "number"
            },
            "next_step": {
             "type": "number"
            },
            "next_coefficient": {
             "type": "number"
            },
            "next_step_date": {},
            "ref": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-travel-allowance": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Travel & Conference Allowance (VN)",
    "description": "`mode=trip` (send `from` / `to` or `days`): per diem of 300,000 VND a day (400,000 on sea and island duty), lodging as a lump sum (1,600,000 for ministers, deputy ministers and leaders with a coefficient of 1.25 or more; 800,000 / 600,000 for leaders with 0.8–1.2; 600,000 / 500,000 for other staff, in centrally-run cities / provinces) or by invoice up to the room ceilings (4,000,000 / 2,000,000–1,800,000 / 1,200,000–800,000 single rooms, 1,400,000–1,100,000 per twin room for staff), plus your transport and other costs. Same-day trips have no fixed rate since TT 12/2025: send `same_day_rate` from your internal spending rules.\n\n`mode=conference` (send `participants`): refreshments 50,000 VND per delegate per half day and meal support for invited guests not on the state payroll (300,000 / 200,000 / 150,000 by venue level), with the 130 % group-meal ceiling. `mode=rates` lists every rate, the flight class by rank and the 700,000 VND monthly lump sum.\n\n`regime=custom` with `rates` applies the rates of your unit or province (warning when they exceed the circular) and `format=xlsx` returns a payment sheet. A replacement circular was in public consultation in July 2026 and has not been issued; rates are reviewed every quarter.\n\nDocs: https://apibox.io.vn/docs/vn-travel-allowance/",
    "operationId": "vnTravelAllowanceGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-travel-allowance/"
    },
    "parameters": [
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`trip`, `conference` or `rates` (guessed from the parameters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "trip: first day; `to` last day (or `days`, `nights`).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-16"
     },
     {
      "name": "rank",
      "in": "query",
      "required": false,
      "description": "`minister`, `deputy_minister` (or coefficient ≥ 1.25), `leader` (0.8–1.2) or `staff`.",
      "schema": {
       "type": "string",
       "default": "staff"
      },
      "example": "staff"
     },
     {
      "name": "destination",
      "in": "query",
      "required": false,
      "description": "`central_city` or `province` (city names such as ha_noi accepted).",
      "schema": {
       "type": "string",
       "default": "province"
      },
      "example": "central_city"
     },
     {
      "name": "lodging",
      "in": "query",
      "required": false,
      "description": "`lump_sum`, `invoice` (with `room_cost_per_night`, `single_room`) or `none`.",
      "schema": {
       "type": "string",
       "default": "lump_sum"
      }
     },
     {
      "name": "travellers",
      "in": "query",
      "required": false,
      "description": "Number of travellers; also `sea_island_days`, `same_day_rate`, `transport_cost`, `other_costs`.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "participants",
      "in": "query",
      "required": false,
      "description": "conference: delegates; `half_days`, `unpaid_guests`, `venue` (central_city|province|commune).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "regime",
      "in": "query",
      "required": false,
      "description": "`tt40` or `custom` with `rates` {per_diem, sea_island, lodging_lump, refreshment_half_day, monthly_lump_max}.",
      "schema": {
       "type": "string",
       "default": "tt40"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `xlsx`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "days": {
           "type": "number"
          },
          "nights": {
           "type": "number"
          },
          "travellers": {
           "type": "number"
          },
          "title": {
           "type": "string"
          },
          "title_vi": {
           "type": "string"
          },
          "destination": {
           "type": "string"
          },
          "lodging": {
           "type": "string"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "item": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "total": {
           "type": "number"
          },
          "flight_class": {
           "type": "string"
          },
          "monthly_lump_sum_max": {
           "type": "number"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "warnings": {
           "type": "array"
          },
          "status": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "mode": "trip",
         "regime": "tt40",
         "from": "2026-11-16",
         "to": "2026-11-18",
         "days": 3,
         "nights": 2,
         "travellers": 1,
         "title": "staff",
         "title_vi": "Các đối tượng còn lại",
         "destination": "central_city",
         "lodging": "lump_sum",
         "lines": [
          {
           "item": "Phụ cấp lưu trú",
           "basis": "1 người × 3 ngày × 300.000",
           "amount": 900000,
           "ref": "Điều 6.1"
          },
          {
           "item": "Khoán tiền thuê phòng nghỉ",
           "basis": "1 người × 2 đêm × 600.000",
           "amount": 1200000,
           "ref": "Điều 7.2"
          }
         ],
         "total": 2100000,
         "flight_class": "economy",
         "monthly_lump_sum_max": 700000,
         "notes": [
          "…"
         ],
         "warnings": [],
         "status": "In force. A replacement circular was published as a draft in 07/2026 and had not been issued at the review date.",
         "legal": [
          {
           "ref": "Thông tư 40/2017/TT-BTC, sửa đổi bởi Thông tư 12/2025/TT-BTC (VBHN 35/VBHN-BTC)",
           "effective_from": "2025-05-04"
          },
          "…"
         ],
         "disclaimer": "Reference calculation, not legal or financial advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Travel & Conference Allowance (VN)",
    "description": "`mode=trip` (send `from` / `to` or `days`): per diem of 300,000 VND a day (400,000 on sea and island duty), lodging as a lump sum (1,600,000 for ministers, deputy ministers and leaders with a coefficient of 1.25 or more; 800,000 / 600,000 for leaders with 0.8–1.2; 600,000 / 500,000 for other staff, in centrally-run cities / provinces) or by invoice up to the room ceilings (4,000,000 / 2,000,000–1,800,000 / 1,200,000–800,000 single rooms, 1,400,000–1,100,000 per twin room for staff), plus your transport and other costs. Same-day trips have no fixed rate since TT 12/2025: send `same_day_rate` from your internal spending rules.\n\n`mode=conference` (send `participants`): refreshments 50,000 VND per delegate per half day and meal support for invited guests not on the state payroll (300,000 / 200,000 / 150,000 by venue level), with the 130 % group-meal ceiling. `mode=rates` lists every rate, the flight class by rank and the 700,000 VND monthly lump sum.\n\n`regime=custom` with `rates` applies the rates of your unit or province (warning when they exceed the circular) and `format=xlsx` returns a payment sheet. A replacement circular was in public consultation in July 2026 and has not been issued; rates are reviewed every quarter.\n\nDocs: https://apibox.io.vn/docs/vn-travel-allowance/",
    "operationId": "vnTravelAllowancePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-travel-allowance/"
    },
    "parameters": [
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`trip`, `conference` or `rates` (guessed from the parameters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "trip: first day; `to` last day (or `days`, `nights`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "rank",
      "in": "query",
      "required": false,
      "description": "`minister`, `deputy_minister` (or coefficient ≥ 1.25), `leader` (0.8–1.2) or `staff`.",
      "schema": {
       "type": "string",
       "default": "staff"
      }
     },
     {
      "name": "destination",
      "in": "query",
      "required": false,
      "description": "`central_city` or `province` (city names such as ha_noi accepted).",
      "schema": {
       "type": "string",
       "default": "province"
      }
     },
     {
      "name": "lodging",
      "in": "query",
      "required": false,
      "description": "`lump_sum`, `invoice` (with `room_cost_per_night`, `single_room`) or `none`.",
      "schema": {
       "type": "string",
       "default": "lump_sum"
      }
     },
     {
      "name": "travellers",
      "in": "query",
      "required": false,
      "description": "Number of travellers; also `sea_island_days`, `same_day_rate`, `transport_cost`, `other_costs`.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "participants",
      "in": "query",
      "required": false,
      "description": "conference: delegates; `half_days`, `unpaid_guests`, `venue` (central_city|province|commune).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "regime",
      "in": "query",
      "required": false,
      "description": "`tt40` or `custom` with `rates` {per_diem, sea_island, lodging_lump, refreshment_half_day, monthly_lump_max}.",
      "schema": {
       "type": "string",
       "default": "tt40"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `xlsx`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "mode": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "days": {
           "type": "number"
          },
          "nights": {
           "type": "number"
          },
          "travellers": {
           "type": "number"
          },
          "title": {
           "type": "string"
          },
          "title_vi": {
           "type": "string"
          },
          "destination": {
           "type": "string"
          },
          "lodging": {
           "type": "string"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "item": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "total": {
           "type": "number"
          },
          "flight_class": {
           "type": "string"
          },
          "monthly_lump_sum_max": {
           "type": "number"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "warnings": {
           "type": "array"
          },
          "status": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-work-permit": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Work Permit Checker (VN)",
    "description": "Send the `position` (manager, executive_director, expert, technical_worker), `degree`, `experience_years` and, when relevant, the exemption `case` (LLC owner or JSC board member with ≥ 3 billion VND, service seller or technical-incident handler under 3 months, spouse of a Vietnamese citizen, intra-company transferee in the 11 WTO sectors, ODA expert, volunteer, intern…; `GET` without parameters lists all 21 cases with their article). Working less than 90 days a year (`days_in_year`) is detected automatically.\n\nThe result is `work_permit_required`, `exempt_certificate_required` (apply for a confirmation of exemption), `exempt_notify_only` (notify the labour authority 3 working days before) or `not_eligible`, with the qualification rule of Nghị định 219/2025/NĐ-CP Điều 3 (executive directors 3 years’ experience; experts a bachelor’s degree + 2 years, 1 year in priority fields; technical workers 1 year of training + 2 years or 3 years’ experience), the dossier, the steps and time limits (file 10–60 days before the start, 10 working days processing, extension 10–45 days before expiry) and the maximum duration (2 years, extendable once).\n\nNghị định 393/2026/NĐ-CP replaces Decree 219 from 5 December 2026: for later `date` values the result flags the announced changes (shorter experience for directors and experts, permits for short paid assignments, new extension window). Those points are marked unverified until the official text is checked; the rules are reviewed monthly.\n\nDocs: https://apibox.io.vn/docs/vn-work-permit/",
    "operationId": "vnWorkPermitGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-work-permit/"
    },
    "parameters": [
     {
      "name": "position",
      "in": "query",
      "required": false,
      "description": "`manager`, `executive_director`, `expert`, `technical_worker` or `other`.",
      "schema": {
       "type": "string"
      },
      "example": "expert"
     },
     {
      "name": "degree",
      "in": "query",
      "required": false,
      "description": "`none`, `vocational`, `bachelor`, `master` or `phd`; also `degree_matches_job`, `training_years`.",
      "schema": {
       "type": "string",
       "default": "none"
      },
      "example": "bachelor"
     },
     {
      "name": "experience_years",
      "in": "query",
      "required": false,
      "description": "Years of relevant experience.",
      "schema": {
       "type": "number",
       "default": 0
      },
      "example": 3
     },
     {
      "name": "priority_field",
      "in": "query",
      "required": false,
      "description": "Works in a priority field (finance, science & technology, innovation, digital transformation…).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "case",
      "in": "query",
      "required": false,
      "description": "Exemption case key (llc_owner, jsc_board, service_offer, spouse, intra_company_wto…) or `labour_contract`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "capital_contribution",
      "in": "query",
      "required": false,
      "description": "Capital contribution in VND (owner / board cases).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "days_in_year",
      "in": "query",
      "required": false,
      "description": "Days of work in Vietnam in the calendar year; `months_with_employer` for transfers.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date the rules apply (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "outcome": {
           "type": "string"
          },
          "exemption": {},
          "position": {
           "type": "string"
          },
          "qualification": {
           "type": "object",
           "properties": {
            "qualified": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            },
            "degree": {
             "type": "string"
            },
            "experience_years": {
             "type": "number"
            },
            "training_years": {
             "type": "number"
            },
            "priority_field": {
             "type": "boolean"
            }
           }
          },
          "duration": {
           "type": "object",
           "properties": {
            "max_years": {
             "type": "number"
            },
            "extension": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "dossier": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "fee": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "regime": "NĐ 219/2025",
         "outcome": "work_permit_required",
         "exemption": null,
         "position": "expert",
         "qualification": {
          "qualified": true,
          "rule": "Bachelor’s degree (or equivalent) + at least 2 years’ experience in the job (Điều 3.3)",
          "degree": "bachelor",
          "experience_years": 3,
          "training_years": 4,
          "priority_field": false
         },
         "duration": {
          "max_years": 2,
          "extension": "once, up to 2 more years",
          "ref": "Bộ luật Lao động, Điều 155; NĐ 219/2025, Điều 21, 29"
         },
         "dossier": [
          "Văn bản đề nghị kèm báo cáo giải trình nhu cầu sử dụng người lao động nước ngoài (Mẫu số 03)",
          "Giấy chứng nhận sức khoẻ (trong 12 tháng)",
          "…"
         ],
         "steps": [
          "…",
          "File Mẫu 03 + dossier 10–60 days before the expected start date (Điều 22.1); processing 10 working days (Điều 22.3)",
          "…"
         ],
         "fee": "Set by each province (HĐND resolution); some provinces charge nothing for online filing.",
         "warnings": [],
         "legal": [
          "…"
         ],
         "disclaimer": "Reference only, not legal or immigration advice; check the official text and the provincial labour authority."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Work Permit Checker (VN)",
    "description": "Send the `position` (manager, executive_director, expert, technical_worker), `degree`, `experience_years` and, when relevant, the exemption `case` (LLC owner or JSC board member with ≥ 3 billion VND, service seller or technical-incident handler under 3 months, spouse of a Vietnamese citizen, intra-company transferee in the 11 WTO sectors, ODA expert, volunteer, intern…; `GET` without parameters lists all 21 cases with their article). Working less than 90 days a year (`days_in_year`) is detected automatically.\n\nThe result is `work_permit_required`, `exempt_certificate_required` (apply for a confirmation of exemption), `exempt_notify_only` (notify the labour authority 3 working days before) or `not_eligible`, with the qualification rule of Nghị định 219/2025/NĐ-CP Điều 3 (executive directors 3 years’ experience; experts a bachelor’s degree + 2 years, 1 year in priority fields; technical workers 1 year of training + 2 years or 3 years’ experience), the dossier, the steps and time limits (file 10–60 days before the start, 10 working days processing, extension 10–45 days before expiry) and the maximum duration (2 years, extendable once).\n\nNghị định 393/2026/NĐ-CP replaces Decree 219 from 5 December 2026: for later `date` values the result flags the announced changes (shorter experience for directors and experts, permits for short paid assignments, new extension window). Those points are marked unverified until the official text is checked; the rules are reviewed monthly.\n\nDocs: https://apibox.io.vn/docs/vn-work-permit/",
    "operationId": "vnWorkPermitPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-work-permit/"
    },
    "parameters": [
     {
      "name": "position",
      "in": "query",
      "required": false,
      "description": "`manager`, `executive_director`, `expert`, `technical_worker` or `other`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "degree",
      "in": "query",
      "required": false,
      "description": "`none`, `vocational`, `bachelor`, `master` or `phd`; also `degree_matches_job`, `training_years`.",
      "schema": {
       "type": "string",
       "default": "none"
      }
     },
     {
      "name": "experience_years",
      "in": "query",
      "required": false,
      "description": "Years of relevant experience.",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "priority_field",
      "in": "query",
      "required": false,
      "description": "Works in a priority field (finance, science & technology, innovation, digital transformation…).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "case",
      "in": "query",
      "required": false,
      "description": "Exemption case key (llc_owner, jsc_board, service_offer, spouse, intra_company_wto…) or `labour_contract`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "capital_contribution",
      "in": "query",
      "required": false,
      "description": "Capital contribution in VND (owner / board cases).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "days_in_year",
      "in": "query",
      "required": false,
      "description": "Days of work in Vietnam in the calendar year; `months_with_employer` for transfers.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date the rules apply (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "outcome": {
           "type": "string"
          },
          "exemption": {},
          "position": {
           "type": "string"
          },
          "qualification": {
           "type": "object",
           "properties": {
            "qualified": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            },
            "degree": {
             "type": "string"
            },
            "experience_years": {
             "type": "number"
            },
            "training_years": {
             "type": "number"
            },
            "priority_field": {
             "type": "boolean"
            }
           }
          },
          "duration": {
           "type": "object",
           "properties": {
            "max_years": {
             "type": "number"
            },
            "extension": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "dossier": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "fee": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-procurement-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Procurement Rules (VN)",
    "description": "Send the `package_type` (consulting, non_consulting, goods, works, mixed), the package `value` and `funding` (`project` or `recurrent` procurement). The API returns every selection method with whether it is allowed: open bidding, small purchases (≤ 100 million VND), direct award (≤ 1 billion for recurrent procurement, ≤ 3 billion for consulting and ≤ 5 billion for other packages in projects since Nghị định 349/2026/NĐ-CP of 9/9/2026; 500 million / 800 million / 2 billion before), competitive quotation (≤ 10 billion, simple packages), online price quotation, online shopping, direct purchase and community participation, plus a recommended method.\n\nIt also gives the minimum bidding periods of NĐ 214/2025 Điều 28 (18 days domestic / 35 international, 9 / 18 for small packages), clarification and amendment cut-offs, bid security (1–1.5 % for works ≤ 20 billion and goods ≤ 10 billion, 1.5–3 % otherwise; none for consulting) with amounts, performance security (2–10 %), the reserved works packages ≤ 5 billion for small enterprises, domestic preference, and selection costs (0.2 % / 0.1 % with their minimum and maximum) and e-procurement fees.\n\nThe `date` picks the rules in force (from 4/8/2025); packages issued before 9/9/2026 keep the old thresholds. Sources: Luật Đấu thầu 22/2023 as amended by Luật 57/2024 and 90/2025, NĐ 214/2025 consolidated in VBHN 36/2026. Reviewed every quarter.\n\nDocs: https://apibox.io.vn/docs/vn-procurement-rules/",
    "operationId": "vnProcurementRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-procurement-rules/"
    },
    "parameters": [
     {
      "name": "package_type",
      "in": "query",
      "required": false,
      "description": "`consulting`, `non_consulting`, `goods`, `works` or `mixed` (none: threshold table).",
      "schema": {
       "type": "string"
      },
      "example": "goods"
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "Package price in VND.",
      "schema": {
       "type": "number"
      },
      "example": 3000000000
     },
     {
      "name": "funding",
      "in": "query",
      "required": false,
      "description": "`project` or `recurrent` (dự toán mua sắm).",
      "schema": {
       "type": "string",
       "default": "project"
      }
     },
     {
      "name": "international",
      "in": "query",
      "required": false,
      "description": "International bidding.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "simple",
      "in": "query",
      "required": false,
      "description": "Package is simple / standardised (for competitive quotation).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date the rules apply (default today, from 2025-08-04).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "package_type": {
           "type": "string"
          },
          "package_type_vi": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "funding": {
           "type": "string"
          },
          "international": {
           "type": "boolean"
          },
          "forms": {
           "type": "array",
           "items": {}
          },
          "recommended_form": {
           "type": "string"
          },
          "time_limits": {
           "type": "object",
           "properties": {
            "open_bidding_min_days": {
             "type": "number"
            },
            "open_bidding_basis": {
             "type": "string"
            },
            "amend_bidding_documents_before_closing": {
             "type": "string"
            },
            "clarification_request_before_closing": {
             "type": "string"
            },
            "competitive_quotation_min_working_days": {
             "type": "number"
            },
            "online_price_quotation_min_working_days": {
             "type": "number"
            },
            "bid_opening": {
             "type": "string"
            },
            "result_notice": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "bid_security": {
           "type": "object",
           "properties": {
            "pct_range": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "amount_range": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "validity": {
             "type": "string"
            },
            "refund": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "performance_security": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "reason": {
             "type": "string"
            }
           }
          },
          "selection_costs": {
           "type": "object",
           "properties": {
            "items": {
             "type": "array",
             "items": {}
            },
            "total": {
             "type": "number"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-11",
         "package_type": "goods",
         "package_type_vi": "Hàng hoá",
         "value": 3000000000,
         "funding": "project",
         "international": false,
         "forms": [
          {
           "form": "open_bidding",
           "form_vi": "Đấu thầu rộng rãi",
           "allowed": true,
           "condition": "Always allowed; the default form.",
           "ref": "Luật Đấu thầu, Điều 21"
          },
          {
           "form": "direct_award",
           "form_vi": "Chỉ định thầu (rút gọn)",
           "allowed": true,
           "condition": "≤ 5 tỷ đồng (phi tư vấn, hàng hoá, xây lắp, hỗn hợp trong dự án); other cases of Luật Điều 23 (emergencies, strategic sectors, science & technology…) have no value cap",
           "ref": "Nghị định 214/2025/NĐ-CP, Điều 78.4, 80.4 (sửa đổi bởi Nghị định 349/2026/NĐ-CP)"
          },
          "…"
         ],
         "recommended_form": "direct_award",
         "time_limits": {
          "open_bidding_min_days": 9,
          "open_bidding_basis": "small package (works/mixed ≤ 20 tỷ, goods/non-consulting ≤ 10 tỷ): ≥ 9 days domestic, 18 international",
          "amend_bidding_documents_before_closing": "3 working days",
          "clarification_request_before_closing": "3 working days",
          "competitive_quotation_min_working_days": 7,
          "online_price_quotation_min_working_days": 5,
          "bid_opening": "within 2 hours after closing",
          "result_notice": "within 5 working days after approval",
          "ref": "Nghị định 214/2025, Điều 28.2, 33, 81, 101"
         },
         "bid_security": {
          "pct_range": [
           1,
           1.5
          ],
          "amount_range": [
           30000000,
           45000000
          ],
          "validity": "bid validity + 30 days",
          "refund": "within 14 days after the result is approved",
          "ref": "Luật Đấu thầu, Điều 14.4–14.8"
         },
         "performance_security": {
          "required": false,
          "reason": "Not required for packages within the direct-award threshold (Điều 68.2)"
         },
         "selection_costs": {
          "items": [
           {
            "item": "Lập hồ sơ mời thầu / hồ sơ yêu cầu",
            "rate_pct": 0.2,
            "amount": 6000000,
            "min": 3000000,
            "max": 60000000
           },
           "…"
          ],
          "total": 18000000
         },
         "legal": [
          "…"
         ],
         "disclaimer": "Reference calculation, not legal or financial advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Procurement Rules (VN)",
    "description": "Send the `package_type` (consulting, non_consulting, goods, works, mixed), the package `value` and `funding` (`project` or `recurrent` procurement). The API returns every selection method with whether it is allowed: open bidding, small purchases (≤ 100 million VND), direct award (≤ 1 billion for recurrent procurement, ≤ 3 billion for consulting and ≤ 5 billion for other packages in projects since Nghị định 349/2026/NĐ-CP of 9/9/2026; 500 million / 800 million / 2 billion before), competitive quotation (≤ 10 billion, simple packages), online price quotation, online shopping, direct purchase and community participation, plus a recommended method.\n\nIt also gives the minimum bidding periods of NĐ 214/2025 Điều 28 (18 days domestic / 35 international, 9 / 18 for small packages), clarification and amendment cut-offs, bid security (1–1.5 % for works ≤ 20 billion and goods ≤ 10 billion, 1.5–3 % otherwise; none for consulting) with amounts, performance security (2–10 %), the reserved works packages ≤ 5 billion for small enterprises, domestic preference, and selection costs (0.2 % / 0.1 % with their minimum and maximum) and e-procurement fees.\n\nThe `date` picks the rules in force (from 4/8/2025); packages issued before 9/9/2026 keep the old thresholds. Sources: Luật Đấu thầu 22/2023 as amended by Luật 57/2024 and 90/2025, NĐ 214/2025 consolidated in VBHN 36/2026. Reviewed every quarter.\n\nDocs: https://apibox.io.vn/docs/vn-procurement-rules/",
    "operationId": "vnProcurementRulesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-procurement-rules/"
    },
    "parameters": [
     {
      "name": "package_type",
      "in": "query",
      "required": false,
      "description": "`consulting`, `non_consulting`, `goods`, `works` or `mixed` (none: threshold table).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "Package price in VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "funding",
      "in": "query",
      "required": false,
      "description": "`project` or `recurrent` (dự toán mua sắm).",
      "schema": {
       "type": "string",
       "default": "project"
      }
     },
     {
      "name": "international",
      "in": "query",
      "required": false,
      "description": "International bidding.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "simple",
      "in": "query",
      "required": false,
      "description": "Package is simple / standardised (for competitive quotation).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date the rules apply (default today, from 2025-08-04).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "package_type": {
           "type": "string"
          },
          "package_type_vi": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "funding": {
           "type": "string"
          },
          "international": {
           "type": "boolean"
          },
          "forms": {
           "type": "array",
           "items": {}
          },
          "recommended_form": {
           "type": "string"
          },
          "time_limits": {
           "type": "object",
           "properties": {
            "open_bidding_min_days": {
             "type": "number"
            },
            "open_bidding_basis": {
             "type": "string"
            },
            "amend_bidding_documents_before_closing": {
             "type": "string"
            },
            "clarification_request_before_closing": {
             "type": "string"
            },
            "competitive_quotation_min_working_days": {
             "type": "number"
            },
            "online_price_quotation_min_working_days": {
             "type": "number"
            },
            "bid_opening": {
             "type": "string"
            },
            "result_notice": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "bid_security": {
           "type": "object",
           "properties": {
            "pct_range": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "amount_range": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "validity": {
             "type": "string"
            },
            "refund": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "performance_security": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "reason": {
             "type": "string"
            }
           }
          },
          "selection_costs": {
           "type": "object",
           "properties": {
            "items": {
             "type": "array",
             "items": {}
            },
            "total": {
             "type": "number"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-pdp-dossier": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Personal Data Protection Dossier (VN)",
    "description": "Describe your organisation (`organization`: name, tax code, representative, data-protection contact, `type` enterprise / small / micro / startup / household / state_agency, `role` controller / processor / controller_processor), your processing `activities` (purpose, legal basis, data-subject groups and counts, basic and sensitive data categories using the keys listed by `GET`, sources, storage, retention, recipients, children’s data, automated decisions), any `cross_border` recipients and your `security_measures`. Only a description of the processing is sent; no personal data is needed and nothing is stored.\n\nThe API decides which dossiers apply under Luật Bảo vệ dữ liệu cá nhân 91/2025/QH15: the processing impact assessment (Điều 21, within 60 days of starting; small enterprises and start-ups may opt out for 5 years and household / micro businesses are exempt unless they process sensitive data, have 100,000+ data subjects or sell processing services) and the cross-border transfer impact assessment (Điều 20, no small-business exemption). It returns deadlines, update rules, a checklist of gaps (missing purpose, legal basis, retention, DPO, contract with foreign recipients…), a rule-based risk table and the fines of the Law and Nghị định 330/2026/NĐ-CP.\n\n`format=docx` / `pdf` / `zip` builds the drafts following the section headings of Mẫu 10 (processing), Mẫu 09 (cross-border) and the filing notices Mẫu 02a / 01a of Nghị định 356/2025/NĐ-CP, addressed to A05 (Bộ Công an); choose one with `document`. They are drafts for review by your legal team.\n\nDocs: https://apibox.io.vn/docs/vn-pdp-dossier/",
    "operationId": "vnPdpDossierGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pdp-dossier/"
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "organization": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "role": {
             "type": "string"
            },
            "role_vi": {
             "type": "string"
            }
           }
          },
          "applicability": {
           "type": "object",
           "properties": {
            "processing_impact_assessment": {
             "type": "object",
             "properties": {
              "required": {
               "type": "boolean"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "cross_border_impact_assessment": {
             "type": "object",
             "properties": {
              "required": {
               "type": "boolean"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "total_data_subjects": {
             "type": "number"
            },
            "sensitive_data": {
             "type": "boolean"
            }
           }
          },
          "deadlines": {
           "type": "object",
           "properties": {
            "dpia": {},
            "cross_border": {
             "type": "string"
            },
            "submit_to": {
             "type": "string"
            }
           }
          },
          "documents": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "document": {
              "type": "string"
             },
             "file": {
              "type": "string"
             }
            }
           }
          },
          "checklist": {
           "type": "array"
          },
          "risks": {
           "type": "array",
           "items": {}
          },
          "stored": {
           "type": "boolean"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Personal Data Protection Dossier (VN)",
    "description": "Describe your organisation (`organization`: name, tax code, representative, data-protection contact, `type` enterprise / small / micro / startup / household / state_agency, `role` controller / processor / controller_processor), your processing `activities` (purpose, legal basis, data-subject groups and counts, basic and sensitive data categories using the keys listed by `GET`, sources, storage, retention, recipients, children’s data, automated decisions), any `cross_border` recipients and your `security_measures`. Only a description of the processing is sent; no personal data is needed and nothing is stored.\n\nThe API decides which dossiers apply under Luật Bảo vệ dữ liệu cá nhân 91/2025/QH15: the processing impact assessment (Điều 21, within 60 days of starting; small enterprises and start-ups may opt out for 5 years and household / micro businesses are exempt unless they process sensitive data, have 100,000+ data subjects or sell processing services) and the cross-border transfer impact assessment (Điều 20, no small-business exemption). It returns deadlines, update rules, a checklist of gaps (missing purpose, legal basis, retention, DPO, contract with foreign recipients…), a rule-based risk table and the fines of the Law and Nghị định 330/2026/NĐ-CP.\n\n`format=docx` / `pdf` / `zip` builds the drafts following the section headings of Mẫu 10 (processing), Mẫu 09 (cross-border) and the filing notices Mẫu 02a / 01a of Nghị định 356/2025/NĐ-CP, addressed to A05 (Bộ Công an); choose one with `document`. They are drafts for review by your legal team.\n\nDocs: https://apibox.io.vn/docs/vn-pdp-dossier/",
    "operationId": "vnPdpDossierPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pdp-dossier/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "organization": {
          "type": "object",
          "description": "{ name, tax_code?, address?, representative?, title?, phone?, email?, dpo_name?, dpo_contact?, type, role, processing_service?, controller?, processors? }."
         },
         "activities": {
          "type": "array",
          "items": {},
          "description": "[{ name, purpose, legal_basis, data_subjects[], subjects_count, basic_data[], sensitive_data[], children?, sources?, storage, retention, recipients[], automated? }] (max 50)."
         },
         "cross_border": {
          "type": "object",
          "description": "{ recipients: [{ name, country, address?, role?, purpose? }], contract, purpose?, method?, safeguards?, on_behalf?, others? }."
         },
         "security_measures": {
          "type": "array",
          "items": {},
          "description": "Technical and organisational measures."
         },
         "start_date": {
          "type": "string",
          "description": "Date processing started (60-day deadline); `transfer_start_date` for transfers."
         },
         "document": {
          "type": "string",
          "default": "all",
          "description": "`all`, `dpia`, `cross_border`, `notice_dpia`, `notice_cross_border` (comma-separated)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `docx`, `pdf` or `zip`."
         }
        },
        "required": [
         "organization",
         "activities"
        ]
       },
       "example": {
        "organization": {
         "name": "Công ty CP Ví Dụ Số",
         "tax_code": "0109999999",
         "representative": "Nguyễn Văn A",
         "dpo_name": "Phòng Pháp chế",
         "type": "small",
         "role": "controller"
        },
        "activities": [
         {
          "name": "Quản lý khách hàng",
          "purpose": "Cung cấp dịch vụ",
          "legal_basis": "Sự đồng ý; thực hiện hợp đồng",
          "data_subjects": [
           "Khách hàng"
          ],
          "subjects_count": 5000,
          "basic_data": [
           "name",
           "phone_id_numbers",
           "email"
          ],
          "storage": "Máy chủ tại Việt Nam",
          "retention": "5 năm"
         }
        ],
        "cross_border": {
         "recipients": [
          {
           "name": "Nhà cung cấp email",
           "country": "Singapore",
           "role": "Bên xử lý"
          }
         ],
         "contract": "DPA ký 01/03/2026"
        },
        "security_measures": [
         "Mã hoá",
         "Phân quyền, MFA",
         "Sao lưu"
        ],
        "start_date": "2026-11-01"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "organization": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "type": {
             "type": "string"
            },
            "role": {
             "type": "string"
            },
            "role_vi": {
             "type": "string"
            }
           }
          },
          "applicability": {
           "type": "object",
           "properties": {
            "processing_impact_assessment": {
             "type": "object",
             "properties": {
              "required": {
               "type": "boolean"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "cross_border_impact_assessment": {
             "type": "object",
             "properties": {
              "required": {
               "type": "boolean"
              },
              "basis": {
               "type": "string"
              }
             }
            },
            "total_data_subjects": {
             "type": "number"
            },
            "sensitive_data": {
             "type": "boolean"
            }
           }
          },
          "deadlines": {
           "type": "object",
           "properties": {
            "dpia": {},
            "cross_border": {
             "type": "string"
            },
            "submit_to": {
             "type": "string"
            }
           }
          },
          "documents": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "document": {
              "type": "string"
             },
             "file": {
              "type": "string"
             }
            }
           }
          },
          "checklist": {
           "type": "array"
          },
          "risks": {
           "type": "array",
           "items": {}
          },
          "stored": {
           "type": "boolean"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "organization": {
          "name": "Công ty CP Ví Dụ Số",
          "type": "small",
          "role": "controller",
          "role_vi": "Bên kiểm soát dữ liệu cá nhân"
         },
         "applicability": {
          "processing_impact_assessment": {
           "required": false,
           "basis": "Small enterprises and start-ups may choose not to apply Điều 21, 22 and 33.2 for 5 years from 01/01/2026 (Điều 38)."
          },
          "cross_border_impact_assessment": {
           "required": true,
           "basis": "Transfers abroad need the cross-border transfer impact assessment, filed within 60 days of the first transfer; the small-business exemption does not cover it (Điều 20, 38)."
          },
          "total_data_subjects": 5000,
          "sensitive_data": false
         },
         "deadlines": {
          "dpia": null,
          "cross_border": "2026-12-31",
          "submit_to": "Cục An ninh mạng và phòng, chống tội phạm sử dụng công nghệ cao (A05), Bộ Công an"
         },
         "documents": [
          {
           "document": "cross_border",
           "file": "ho-so-danh-gia-chuyen-dlcn-xuyen-bien-gioi"
          },
          {
           "document": "notice_cross_border",
           "file": "thong-bao-gui-ho-so-mau-01a"
          }
         ],
         "checklist": [],
         "risks": [
          {
           "risk": "Transfer of personal data abroad",
           "level": "high",
           "mitigation": "Transfer contract with protection clauses, recipient due diligence, encryption in transit"
          },
          "…"
         ],
         "stored": false,
         "disclaimer": "Reference template, not legal advice: have a lawyer review it and check the official text before signing or filing."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-doc-templates": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "Vietnamese Document Templates",
    "description": "`GET /v1/vn-doc-templates` lists the templates (labour and HR: fixed-term and indefinite labour contracts, probation contract, annex, freelance agreement, termination agreement / decision / notice, resignation and leave requests, handover minutes, hiring, raise, appointment and disciplinary decisions, NDA, employment confirmation, training agreement, holiday notice; civil: power of attorney and its contract, residential lease, loan, deposit, equipment rental, cash receipt, undertaking; commercial: sale of goods, services, processing, acceptance and liquidation minutes; administrative: introduction letter, meeting minutes, decision, official letter, proposal memo, request letter; accounting: advance and payment requests, travel policy). `?template=<id>` returns its fields, types and legal basis.\n\n`POST` with `template` and `data` fills it: amounts are written in figures and in Vietnamese words, dates as “ngày … tháng … năm …”, list fields become tables, empty optional lines are dropped and missing required fields are reported (or rejected with `strict=true`). Each template cites its legal basis, and legal checks flag common mistakes: definite-term contracts over 36 months, wages below the regional minimum, probation pay below 85 % or longer than allowed, loan interest above 20 % a year, contract penalties above 8 %, fines used as discipline.\n\n`format=json` (default) returns the text preview and checks (`base64=true` adds the DOCX), `format=docx` a Word file in Times New Roman 13 with A4 margins of Nghị định 30/2020, and `format=pdf` a PDF. The templates are APIBox’s own reference drafts; have a lawyer review them before signing.\n\nDocs: https://apibox.io.vn/docs/vn-doc-templates/",
    "operationId": "vnDocTemplatesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-doc-templates/"
    },
    "parameters": [
     {
      "name": "template",
      "in": "query",
      "required": false,
      "description": "Template id (empty: list templates; `category`, `q` filter the list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `docx`, `pdf` or `fields` (field list).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "strict",
      "in": "query",
      "required": false,
      "description": "Reject when required fields are missing.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "base64",
      "in": "query",
      "required": false,
      "description": "JSON format: include docx_base64.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "no_footer",
      "in": "query",
      "required": false,
      "description": "Omit the reference-template footer.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of field labels (`vi` or `en`).",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "template": {
           "type": "string"
          },
          "title_vi": {
           "type": "string"
          },
          "title_en": {
           "type": "string"
          },
          "legal": {
           "type": "string"
          },
          "missing_fields": {
           "type": "array"
          },
          "unknown_fields": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "text": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Vietnamese Document Templates",
    "description": "`GET /v1/vn-doc-templates` lists the templates (labour and HR: fixed-term and indefinite labour contracts, probation contract, annex, freelance agreement, termination agreement / decision / notice, resignation and leave requests, handover minutes, hiring, raise, appointment and disciplinary decisions, NDA, employment confirmation, training agreement, holiday notice; civil: power of attorney and its contract, residential lease, loan, deposit, equipment rental, cash receipt, undertaking; commercial: sale of goods, services, processing, acceptance and liquidation minutes; administrative: introduction letter, meeting minutes, decision, official letter, proposal memo, request letter; accounting: advance and payment requests, travel policy). `?template=<id>` returns its fields, types and legal basis.\n\n`POST` with `template` and `data` fills it: amounts are written in figures and in Vietnamese words, dates as “ngày … tháng … năm …”, list fields become tables, empty optional lines are dropped and missing required fields are reported (or rejected with `strict=true`). Each template cites its legal basis, and legal checks flag common mistakes: definite-term contracts over 36 months, wages below the regional minimum, probation pay below 85 % or longer than allowed, loan interest above 20 % a year, contract penalties above 8 %, fines used as discipline.\n\n`format=json` (default) returns the text preview and checks (`base64=true` adds the DOCX), `format=docx` a Word file in Times New Roman 13 with A4 margins of Nghị định 30/2020, and `format=pdf` a PDF. The templates are APIBox’s own reference drafts; have a lawyer review them before signing.\n\nDocs: https://apibox.io.vn/docs/vn-doc-templates/",
    "operationId": "vnDocTemplatesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-doc-templates/"
    },
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Language of field labels (`vi` or `en`).",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "template": {
          "type": "string",
          "description": "Template id (empty: list templates; `category`, `q` filter the list)."
         },
         "data": {
          "type": "object",
          "description": "Field values; fields may also be sent as top-level parameters. Common fields: doc_no, place, date."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `docx`, `pdf` or `fields` (field list)."
         },
         "strict": {
          "type": "boolean",
          "default": false,
          "description": "Reject when required fields are missing."
         },
         "base64": {
          "type": "boolean",
          "default": false,
          "description": "JSON format: include docx_base64."
         },
         "no_footer": {
          "type": "boolean",
          "default": false,
          "description": "Omit the reference-template footer."
         }
        }
       },
       "example": {
        "template": "giay-uy-quyen",
        "data": {
         "principal_name": "Nguyễn Văn An",
         "principal_id_number": "001085000123",
         "principal_address": "Phường Ba Đình, Hà Nội",
         "agent_name": "Trần Thị Bình",
         "agent_id_number": "001195000456",
         "agent_address": "Phường Cầu Giấy, Hà Nội",
         "scope": "Nhận hồ sơ và kết quả thủ tục hành chính tại Trung tâm phục vụ hành chính công.",
         "from_date": "2026-11-11",
         "to_date": "2026-12-31",
         "place": "Hà Nội",
         "date": "2026-11-11"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "template": {
           "type": "string"
          },
          "title_vi": {
           "type": "string"
          },
          "title_en": {
           "type": "string"
          },
          "legal": {
           "type": "string"
          },
          "missing_fields": {
           "type": "array"
          },
          "unknown_fields": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "text": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "template": "giay-uy-quyen",
         "title_vi": "Giấy uỷ quyền",
         "title_en": "Power of attorney (unilateral)",
         "legal": "Bộ luật Dân sự 2015, Điều 135, 138–143 (đại diện theo uỷ quyền), Điều 562–569; một số việc phải lập hợp đồng uỷ quyền có công chứng (ví dụ chuyển nhượng bất động sản)",
         "missing_fields": [],
         "unknown_fields": [],
         "warnings": [],
         "text": "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM\nĐộc lập - Tự do - Hạnh phúc\n———————\nHà Nội, ngày 11 tháng 11 năm 2026\nGIẤY UỶ QUYỀN\n- Căn cứ Bộ luật Dân sự số 91/2015/QH13;\nI. Người uỷ quyền\nHọ tên: Nguyễn Văn An\nSố CCCD / hộ chiếu: 001085000123; nơi cư trú: Phường Ba Đình, Hà Nội\nII. Người được uỷ quyền\nHọ tên: Trần Thị Bình\n…\nIV. Thời hạn uỷ quyền\nTừ ngày 11/11/2026 đến ngày 31/12/2026.\n…",
         "disclaimer": "Reference template, not legal advice: have a lawyer review it and check the official text before signing or filing."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-chemicals": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Chemical Lists (CAS)",
    "description": "Look up one or many `cas` numbers (check digit validated) or a name (`q`, Vietnamese or English, accents optional) in the lists of Decree 24/2026/NĐ-CP under the Law on Chemicals 69/2025/QH15: Annex I (basic chemicals of the key chemical industry), Annex II (conditional production and trading), Annex III (special control: group 1 – industrial precursors IVB, Chemical Weapons Convention Schedule 2 and other toxic chemicals; group 2 – precursors IVC, CWC Schedule 3, Rotterdam / Stockholm chemicals), Annex IV (accident prevention and response plan, with the storage threshold in kg) and the chemicals banned from business by Annex II of the Investment Law 143/2025/QH15. Each hit comes with what follows from the list (certificate, licence, plan) and the legal reference.\n\n`mixture` (array of `{cas or name, percent}`) applies the mixture rules: a mixture is conditional when a listed component exceeds 5 % by mass, and under special control when a group-1 or convention chemical exceeds 1 % or a group-2 precursor exceeds 5 %. Add `hs` (and `import_kg`) to see whether the import must be declared on the National Single Window (HS chapters 28 and 29, Decree 26/2026 Article 6, exempt below 10 kg).\n\nData is read from the Word files of the Official Gazette and rebuilt weekly. Group entries without a CAS number (compounds of lead, mercury, arsenic, chromium VI, cyanides…) are found by name only. Three CAS numbers printed in the decree fail the check digit; they are still searchable and flagged.\n\nDocs: https://apibox.io.vn/docs/vn-chemicals/",
    "operationId": "vnChemicalsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-chemicals/"
    },
    "parameters": [
     {
      "name": "cas",
      "in": "query",
      "required": false,
      "description": "One or more CAS numbers, comma-separated (max 100).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name search (Vietnamese or English, min 3 letters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hs",
      "in": "query",
      "required": false,
      "description": "HS code of the import, for the import-declaration check.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "import_kg",
      "in": "query",
      "required": false,
      "description": "Quantity imported (kg); below 10 kg the declaration is exempt.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results for `q` (1–50).",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "stats",
      "in": "query",
      "required": false,
      "description": "Return the row counts of each list.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mixture": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "input": {
              "type": "string"
             },
             "cas_check": {
              "type": "object",
              "properties": {}
             },
             "percent": {
              "type": "number"
             },
             "lists": {
              "type": "array"
             }
            }
           }
          },
          "total_percent": {
           "type": "number"
          },
          "classification": {
           "type": "string"
          },
          "classification_vi": {
           "type": "string"
          },
          "triggered": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "component": {
              "type": "string"
             },
             "list": {
              "type": "string"
             },
             "group": {
              "type": "number"
             },
             "percent": {
              "type": "number"
             },
             "threshold_percent": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             }
            }
           }
          },
          "import_declaration": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "hs_chapter": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Chemical Lists (CAS)",
    "description": "Look up one or many `cas` numbers (check digit validated) or a name (`q`, Vietnamese or English, accents optional) in the lists of Decree 24/2026/NĐ-CP under the Law on Chemicals 69/2025/QH15: Annex I (basic chemicals of the key chemical industry), Annex II (conditional production and trading), Annex III (special control: group 1 – industrial precursors IVB, Chemical Weapons Convention Schedule 2 and other toxic chemicals; group 2 – precursors IVC, CWC Schedule 3, Rotterdam / Stockholm chemicals), Annex IV (accident prevention and response plan, with the storage threshold in kg) and the chemicals banned from business by Annex II of the Investment Law 143/2025/QH15. Each hit comes with what follows from the list (certificate, licence, plan) and the legal reference.\n\n`mixture` (array of `{cas or name, percent}`) applies the mixture rules: a mixture is conditional when a listed component exceeds 5 % by mass, and under special control when a group-1 or convention chemical exceeds 1 % or a group-2 precursor exceeds 5 %. Add `hs` (and `import_kg`) to see whether the import must be declared on the National Single Window (HS chapters 28 and 29, Decree 26/2026 Article 6, exempt below 10 kg).\n\nData is read from the Word files of the Official Gazette and rebuilt weekly. Group entries without a CAS number (compounds of lead, mercury, arsenic, chromium VI, cyanides…) are found by name only. Three CAS numbers printed in the decree fail the check digit; they are still searchable and flagged.\n\nDocs: https://apibox.io.vn/docs/vn-chemicals/",
    "operationId": "vnChemicalsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-chemicals/"
    },
    "parameters": [
     {
      "name": "cas",
      "in": "query",
      "required": false,
      "description": "One or more CAS numbers, comma-separated (max 100).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name search (Vietnamese or English, min 3 letters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hs",
      "in": "query",
      "required": false,
      "description": "HS code of the import, for the import-declaration check.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "import_kg",
      "in": "query",
      "required": false,
      "description": "Quantity imported (kg); below 10 kg the declaration is exempt.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results for `q` (1–50).",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "stats",
      "in": "query",
      "required": false,
      "description": "Return the row counts of each list.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "mixture": {
          "type": "array",
          "items": {},
          "description": "Mixture components `[{\"cas\": \"67-64-1\", \"percent\": 30}]` (or `name`)."
         }
        }
       },
       "example": {
        "mixture": [
         {
          "cas": "67-64-1",
          "percent": 30
         },
         {
          "cas": "75-07-0",
          "percent": 4
         }
        ],
        "hs": "3814"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mixture": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "input": {
              "type": "string"
             },
             "cas_check": {
              "type": "object",
              "properties": {}
             },
             "percent": {
              "type": "number"
             },
             "lists": {
              "type": "array"
             }
            }
           }
          },
          "total_percent": {
           "type": "number"
          },
          "classification": {
           "type": "string"
          },
          "classification_vi": {
           "type": "string"
          },
          "triggered": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "component": {
              "type": "string"
             },
             "list": {
              "type": "string"
             },
             "group": {
              "type": "number"
             },
             "percent": {
              "type": "number"
             },
             "threshold_percent": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             }
            }
           }
          },
          "import_declaration": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "hs_chapter": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "mixture": [
          {
           "input": "67-64-1",
           "cas_check": {
            "cas": "67-64-1",
            "valid": true
           },
           "percent": 30,
           "lists": [
            {
             "list": "III",
             "group": 2,
             "section": "precursor",
             "name_vi": "Acetone",
             "threshold_percent": 5,
             "over_threshold": true
            }
           ]
          },
          {
           "input": "75-07-0",
           "cas_check": {
            "cas": "75-07-0",
            "valid": true
           },
           "percent": 4,
           "lists": [
            {
             "list": "II",
             "name_vi": "Axetandehit",
             "threshold_percent": 5,
             "over_threshold": false
            },
            {
             "list": "IV",
             "section": "table_a",
             "name_vi": "Axetaldehit",
             "threshold_percent": null,
             "over_threshold": null
            }
           ]
          }
         ],
         "total_percent": 34,
         "classification": "special_control",
         "classification_vi": "Hỗn hợp chất cần kiểm soát đặc biệt",
         "triggered": [
          {
           "component": "67-64-1",
           "list": "III",
           "group": 2,
           "percent": 30,
           "threshold_percent": 5,
           "rule": "NĐ 24/2026/NĐ-CP Phụ lục III mục II: tiền chất công nghiệp nhóm 2 > 5% khối lượng"
          }
         ],
         "import_declaration": {
          "required": false,
          "hs_chapter": "38",
          "ref": "NĐ 26/2026/NĐ-CP Điều 6"
         },
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-business-conditions": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Conditional Business Lines",
    "description": "Send VSIC 2025 codes (`vsic`, comma-separated, as declared when registering a company) or a description (`q`). The endpoint suggests the matching lines of the conditional business list (Investment Law 143/2025/QH15 Appendix IV, in force from 1 July 2026; replaced on 1 March 2027 by the appendix of Law 24/2026/QH16, picked by `date`) and, for foreign investors (`foreign`, default true), the market-access lists of Decree 96/2026/NĐ-CP Appendix I: A. sectors not yet open, B. sectors open with conditions.\n\nMatching is by text similarity between the VSIC name (with its sub-codes) and the legal wording, with a few synonyms (e.g. retail of medicines → pharmaceutical business). It is a suggestion: conditional lines do not map one-to-one to VSIC codes, so each match carries a score and the line number to confirm in the law. `list=conditional`, `foreign_closed`, `foreign_conditional` return the full lists; `list=changes_2027` compares the 2026 and 2027 appendices.\n\nThe lists are read from the Official Gazette Word files and checked weekly.\n\nDocs: https://apibox.io.vn/docs/vn-business-conditions/",
    "operationId": "vnBusinessConditionsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-business-conditions/"
    },
    "parameters": [
     {
      "name": "vsic",
      "in": "query",
      "required": false,
      "description": "VSIC 2025 codes, comma-separated (max 50).",
      "schema": {
       "type": "string"
      },
      "example": "4730"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Description of the business activity.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "foreign",
      "in": "query",
      "required": false,
      "description": "Also check market access for foreign investors.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date (YYYY-MM-DD) choosing the list in force; default today.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`conditional`, `foreign_closed`, `foreign_conditional` or `changes_2027`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_score",
      "in": "query",
      "required": false,
      "description": "Minimum similarity score (0.1–0.9).",
      "schema": {
       "type": "number",
       "default": 0.4
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "regime": {
           "type": "object",
           "properties": {
            "law": {
             "type": "string"
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "conditional_lines": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vsic": {
              "type": "string"
             },
             "vsic_name": {
              "type": "string"
             },
             "conditional": {
              "type": "object"
             },
             "foreign_investor": {
              "type": "object"
             }
            }
           }
          },
          "matching": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "regime": {
          "law": "143/2025/QH15",
          "from": "2026-07-01",
          "to": "2027-02-28",
          "conditional_lines": 198
         },
         "results": [
          {
           "vsic": "4730",
           "vsic_name": "Bán lẻ nhiên liệu động cơ",
           "conditional": {
            "likely": true,
            "matches": [
             {
              "appendix_iv_no": 35,
              "line": "Kinh doanh xăng dầu",
              "score": 0.852
             }
            ]
           },
           "foreign_investor": {
            "access": "open_like_domestic",
            "access_vi": "Không thấy trong Danh mục hạn chế: tiếp cận như nhà đầu tư trong nước (NĐ 96/2026 Điều 17 khoản 1)",
            "closed_matches": [],
            "conditional_matches": []
           }
          }
         ],
         "matching": "Suggested by text similarity between the VSIC name (with its sub-codes) or your description and the legal lists; not an official mapping. Conditional business lines do not map 1:1 to VSIC codes: confirm with the cited law for each line.",
         "date": "2026-11-11",
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Conditional Business Lines",
    "description": "Send VSIC 2025 codes (`vsic`, comma-separated, as declared when registering a company) or a description (`q`). The endpoint suggests the matching lines of the conditional business list (Investment Law 143/2025/QH15 Appendix IV, in force from 1 July 2026; replaced on 1 March 2027 by the appendix of Law 24/2026/QH16, picked by `date`) and, for foreign investors (`foreign`, default true), the market-access lists of Decree 96/2026/NĐ-CP Appendix I: A. sectors not yet open, B. sectors open with conditions.\n\nMatching is by text similarity between the VSIC name (with its sub-codes) and the legal wording, with a few synonyms (e.g. retail of medicines → pharmaceutical business). It is a suggestion: conditional lines do not map one-to-one to VSIC codes, so each match carries a score and the line number to confirm in the law. `list=conditional`, `foreign_closed`, `foreign_conditional` return the full lists; `list=changes_2027` compares the 2026 and 2027 appendices.\n\nThe lists are read from the Official Gazette Word files and checked weekly.\n\nDocs: https://apibox.io.vn/docs/vn-business-conditions/",
    "operationId": "vnBusinessConditionsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-business-conditions/"
    },
    "parameters": [
     {
      "name": "vsic",
      "in": "query",
      "required": false,
      "description": "VSIC 2025 codes, comma-separated (max 50).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Description of the business activity.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "foreign",
      "in": "query",
      "required": false,
      "description": "Also check market access for foreign investors.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date (YYYY-MM-DD) choosing the list in force; default today.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`conditional`, `foreign_closed`, `foreign_conditional` or `changes_2027`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_score",
      "in": "query",
      "required": false,
      "description": "Minimum similarity score (0.1–0.9).",
      "schema": {
       "type": "number",
       "default": 0.4
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "regime": {
           "type": "object",
           "properties": {
            "law": {
             "type": "string"
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "conditional_lines": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vsic": {
              "type": "string"
             },
             "vsic_name": {
              "type": "string"
             },
             "conditional": {
              "type": "object"
             },
             "foreign_investor": {
              "type": "object"
             }
            }
           }
          },
          "matching": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-ecom-compliance": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam E-commerce Law Checker",
    "description": "`role` returns the obligations of one actor under the E-commerce Law 122/2025/QH15 (in force 1 July 2026) and Decree 248/2026/NĐ-CP: `seller`, `livestream_seller`, `livestreamer`, `affiliate`, `affiliate_service`, `own_website`, `marketplace`, `social_commerce`, `integrated_platform`, `foreign_platform`. Options: `ordering` (online ordering function, default true), `large_platform`, `small_business` (1-year contract data retention for micro firms and household businesses), `foreign`. Each item has its article and deadline (24-hour takedowns, annual report before 15 February, 100,000-transaction threshold for foreign platforms…).\n\n`listing` (JSON) checks one product listing: seller name and address, title, price and shipping fee, proof for conditional business lines, the mandatory label information of Decree 37/2026/NĐ-CP for the `product_group` (date, lot and chassis numbers are not required online), mandatory phrases, and risky advertising claims through the vn-ad-check lexicon (absolute claims, medical claims, off-platform contact).\n\nIdentity verification (VNeID) is done by the platform; this endpoint does not touch personal data.\n\nDocs: https://apibox.io.vn/docs/vn-ecom-compliance/",
    "operationId": "vnEcomComplianceGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ecom-compliance/"
    },
    "parameters": [
     {
      "name": "role",
      "in": "query",
      "required": false,
      "description": "Actor: seller, livestream_seller, livestreamer, affiliate, affiliate_service, own_website, marketplace, social_commerce, integrated_platform, foreign_platform.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ordering",
      "in": "query",
      "required": false,
      "description": "The platform has an online ordering function.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "large_platform",
      "in": "query",
      "required": false,
      "description": "Large digital platform under consumer protection law.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "small_business",
      "in": "query",
      "required": false,
      "description": "Micro firm, household business or innovative start-up (own website).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "foreign",
      "in": "query",
      "required": false,
      "description": "Foreign seller.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "summary": {
           "type": "object",
           "properties": {
            "high": {
             "type": "number"
            },
            "medium": {
             "type": "number"
            },
            "low": {
             "type": "number"
            }
           }
          },
          "product_group": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "imported": {
           "type": "boolean"
          },
          "issues": {
           "type": "array",
           "items": {}
          },
          "note": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam E-commerce Law Checker",
    "description": "`role` returns the obligations of one actor under the E-commerce Law 122/2025/QH15 (in force 1 July 2026) and Decree 248/2026/NĐ-CP: `seller`, `livestream_seller`, `livestreamer`, `affiliate`, `affiliate_service`, `own_website`, `marketplace`, `social_commerce`, `integrated_platform`, `foreign_platform`. Options: `ordering` (online ordering function, default true), `large_platform`, `small_business` (1-year contract data retention for micro firms and household businesses), `foreign`. Each item has its article and deadline (24-hour takedowns, annual report before 15 February, 100,000-transaction threshold for foreign platforms…).\n\n`listing` (JSON) checks one product listing: seller name and address, title, price and shipping fee, proof for conditional business lines, the mandatory label information of Decree 37/2026/NĐ-CP for the `product_group` (date, lot and chassis numbers are not required online), mandatory phrases, and risky advertising claims through the vn-ad-check lexicon (absolute claims, medical claims, off-platform contact).\n\nIdentity verification (VNeID) is done by the platform; this endpoint does not touch personal data.\n\nDocs: https://apibox.io.vn/docs/vn-ecom-compliance/",
    "operationId": "vnEcomCompliancePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ecom-compliance/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "role": {
          "type": "string",
          "description": "Actor: seller, livestream_seller, livestreamer, affiliate, affiliate_service, own_website, marketplace, social_commerce, integrated_platform, foreign_platform."
         },
         "ordering": {
          "type": "boolean",
          "default": true,
          "description": "The platform has an online ordering function."
         },
         "large_platform": {
          "type": "boolean",
          "default": false,
          "description": "Large digital platform under consumer protection law."
         },
         "small_business": {
          "type": "boolean",
          "default": false,
          "description": "Micro firm, household business or innovative start-up (own website)."
         },
         "foreign": {
          "type": "boolean",
          "default": false,
          "description": "Foreign seller."
         },
         "listing": {
          "type": "object",
          "description": "Listing to check: title, description, price, shipping_fee, seller_name, seller_address, product_group, imported, conditional_business, conditional_proof, label {field: value}."
         },
         "date": {
          "type": "string",
          "description": "Reference date (YYYY-MM-DD)."
         }
        }
       },
       "example": {
        "listing": {
         "title": "Kem dưỡng trắng da số 1",
         "description": "Cam kết hiệu quả 100%, inbox zalo",
         "price": 199000,
         "product_group": "cosmetics",
         "imported": true,
         "label": {
          "origin": "Hàn Quốc",
          "quantity": "50 ml"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "summary": {
           "type": "object",
           "properties": {
            "high": {
             "type": "number"
            },
            "medium": {
             "type": "number"
            },
            "low": {
             "type": "number"
            }
           }
          },
          "product_group": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "imported": {
           "type": "boolean"
          },
          "issues": {
           "type": "array",
           "items": {}
          },
          "note": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "ok": false,
         "summary": {
          "high": 3,
          "medium": 8,
          "low": 1
         },
         "product_group": {
          "id": "cosmetics",
          "vi": "Mỹ phẩm",
          "en": "Cosmetics"
         },
         "imported": true,
         "issues": [
          {
           "field": "seller_name",
           "severity": "high",
           "vi": "Thiếu tên người bán (tên doanh nghiệp / hộ kinh doanh theo đăng ký hoặc họ tên cá nhân)",
           "en": "Seller name missing",
           "ref": "Luật TMĐT 122/2025/QH15 Điều 21 khoản 1 điểm b"
          },
          {
           "field": "shipping_fee",
           "severity": "low",
           "vi": "Nên ghi phí vận chuyển (tổng tiền phải hiển thị trước khi đặt hàng)",
           "en": "State the shipping fee (the full amount must be shown before ordering)",
           "ref": "Luật TMĐT 122/2025/QH15 Điều 12 khoản 1 điểm d"
          },
          {
           "field": "label.importer",
           "severity": "medium",
           "vi": "Thiếu thông tin bắt buộc trên nhãn: Tên, địa chỉ tổ chức, cá nhân nhập khẩu",
           "en": "Mandatory label information missing: Importer name and address",
           "ref": "Luật TMĐT 122/2025/QH15 Điều 21 khoản 1 điểm c; NĐ 37/2026/NĐ-CP (Điều 42 khoản 1 điểm b, Điều 44 khoản 2)"
          },
          "…"
         ],
         "note": "Lot-specific label data (production / expiry date, lot, chassis and engine numbers) need not be shown on the listing (Luật TMĐT Điều 21 khoản 1 điểm c). Identity verification is done by the platform, not here.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-epr-fee": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam EPR Recycling Fee",
    "description": "Send `items` placed on the market in the obligation `year` (2026 onwards): recycling groups by code or keyword (`{\"group\": \"A.3.1\", \"kg\": 100000}` – PET, paper, aluminium, glass, flexible plastics, batteries, engine oil, tyres, electrical and electronic equipment, PV panels, and from 2027 trucks and buses) with the recycling rate R of Decree 110/2026/NĐ-CP Appendix I and the Fs of Circular 24/2026/TT-BNNMT Appendix I, and waste-treatment items of Appendix II (`{\"type\": \"cigarettes\", \"sticks\": …}`, pesticide packaging by format and size, single-use batteries / diapers / chewing gum at 1 % of net revenue, plastic products at 1,500 đ per kg of plastic).\n\nThe result gives the recycling obligation in kg, F per group (less `recycled_kg` if you recycle part yourself), the waste-treatment contribution, exemptions (exports, packaging when the revenue from the packaged goods is below 30 billion VND – pass `packaged_goods_revenue` and `annex2_revenue`) and the deadlines: register / declare before 1 April of the following year, pay before 20 April. Without `items` it lists all rates.\n\nObligation years up to 2025 follow Decree 08/2022 and are refused. R and Fs are revised every 3 years from 2029.\n\nDocs: https://apibox.io.vn/docs/vn-epr-fee/",
    "operationId": "vnEprFeeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-epr-fee/"
    },
    "parameters": [
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Obligation year (products placed on the market), 2026 or later; default this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "packaged_goods_revenue",
      "in": "query",
      "required": false,
      "description": "Yearly revenue (VND) from the packaged goods in scope; below 30 billion the packaging is exempt.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "annex2_revenue",
      "in": "query",
      "required": false,
      "description": "Yearly revenue (VND) from pesticides and Annex II products; below 30 billion they are exempt.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "recycling": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "group_vi": {
              "type": "string"
             },
             "group_en": {
              "type": "string"
             },
             "kg": {
              "type": "number"
             },
             "R_percent": {
              "type": "number"
             },
             "Fs_vnd_per_kg": {
              "type": "number"
             },
             "recycling_obligation_kg": {
              "type": "number"
             },
             "contribution_F": {
              "type": "number"
             },
             "formula": {
              "type": "string"
             }
            }
           }
          },
          "waste_treatment": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "recycling_obligation_kg": {
             "type": "number"
            },
            "recycling_contribution": {
             "type": "number"
            },
            "waste_treatment_contribution": {
             "type": "number"
            },
            "total_if_paying_fund": {
             "type": "number"
            }
           }
          },
          "deadlines": {
           "type": "object",
           "properties": {
            "obligation_year": {
             "type": "number"
            },
            "register_or_declare_by": {
             "type": "string"
            },
            "pay_by": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam EPR Recycling Fee",
    "description": "Send `items` placed on the market in the obligation `year` (2026 onwards): recycling groups by code or keyword (`{\"group\": \"A.3.1\", \"kg\": 100000}` – PET, paper, aluminium, glass, flexible plastics, batteries, engine oil, tyres, electrical and electronic equipment, PV panels, and from 2027 trucks and buses) with the recycling rate R of Decree 110/2026/NĐ-CP Appendix I and the Fs of Circular 24/2026/TT-BNNMT Appendix I, and waste-treatment items of Appendix II (`{\"type\": \"cigarettes\", \"sticks\": …}`, pesticide packaging by format and size, single-use batteries / diapers / chewing gum at 1 % of net revenue, plastic products at 1,500 đ per kg of plastic).\n\nThe result gives the recycling obligation in kg, F per group (less `recycled_kg` if you recycle part yourself), the waste-treatment contribution, exemptions (exports, packaging when the revenue from the packaged goods is below 30 billion VND – pass `packaged_goods_revenue` and `annex2_revenue`) and the deadlines: register / declare before 1 April of the following year, pay before 20 April. Without `items` it lists all rates.\n\nObligation years up to 2025 follow Decree 08/2022 and are refused. R and Fs are revised every 3 years from 2029.\n\nDocs: https://apibox.io.vn/docs/vn-epr-fee/",
    "operationId": "vnEprFeePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-epr-fee/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "year": {
          "type": "number",
          "description": "Obligation year (products placed on the market), 2026 or later; default this year."
         },
         "items": {
          "type": "array",
          "items": {},
          "description": "Recycling items `{group, kg, recycled_kg?, exported?}` and Annex II items `{type, …}` (pesticide_packaging, disposable_batteries, diapers_wipes, chewing_gum, cigarettes, plastic_products)."
         },
         "packaged_goods_revenue": {
          "type": "number",
          "description": "Yearly revenue (VND) from the packaged goods in scope; below 30 billion the packaging is exempt."
         },
         "annex2_revenue": {
          "type": "number",
          "description": "Yearly revenue (VND) from pesticides and Annex II products; below 30 billion they are exempt."
         }
        }
       },
       "example": {
        "year": 2026,
        "items": [
         {
          "group": "A.3.1",
          "kg": 100000
         },
         {
          "group": "Đ.3.2",
          "kg": 5000
         },
         {
          "type": "cigarettes",
          "sticks": 2000000
         }
        ],
        "packaged_goods_revenue": 50000000000
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "recycling": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "group_vi": {
              "type": "string"
             },
             "group_en": {
              "type": "string"
             },
             "kg": {
              "type": "number"
             },
             "R_percent": {
              "type": "number"
             },
             "Fs_vnd_per_kg": {
              "type": "number"
             },
             "recycling_obligation_kg": {
              "type": "number"
             },
             "contribution_F": {
              "type": "number"
             },
             "formula": {
              "type": "string"
             }
            }
           }
          },
          "waste_treatment": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          },
          "totals": {
           "type": "object",
           "properties": {
            "recycling_obligation_kg": {
             "type": "number"
            },
            "recycling_contribution": {
             "type": "number"
            },
            "waste_treatment_contribution": {
             "type": "number"
            },
            "total_if_paying_fund": {
             "type": "number"
            }
           }
          },
          "deadlines": {
           "type": "object",
           "properties": {
            "obligation_year": {
             "type": "number"
            },
            "register_or_declare_by": {
             "type": "string"
            },
            "pay_by": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "recycling": [
          {
           "code": "A.3.1",
           "group_vi": "Bao bì PET cứng",
           "group_en": "Rigid PET packaging",
           "kg": 100000,
           "R_percent": 22,
           "Fs_vnd_per_kg": 1940,
           "recycling_obligation_kg": 22000,
           "contribution_F": 42680000,
           "formula": "22% × 100000 kg × 1940 đ/kg"
          },
          {
           "code": "Đ.3.2",
           "group_vi": "Điện thoại di động",
           "group_en": "Mobile phones",
           "kg": 5000,
           "R_percent": 15,
           "Fs_vnd_per_kg": 15960,
           "recycling_obligation_kg": 750,
           "contribution_F": 11970000,
           "formula": "15% × 5000 kg × 15960 đ/kg"
          }
         ],
         "waste_treatment": [
          {
           "type": "cigarettes",
           "name_vi": "Thuốc lá điếu",
           "basis": "2000000 sticks / 20 × 60 đ",
           "amount": 6000000
          }
         ],
         "totals": {
          "recycling_obligation_kg": 22750,
          "recycling_contribution": 54650000,
          "waste_treatment_contribution": 6000000,
          "total_if_paying_fund": 60650000
         },
         "deadlines": {
          "obligation_year": 2026,
          "register_or_declare_by": "2027-03-31",
          "pay_by": "2027-04-19"
         },
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-solar-roi": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Rooftop Solar ROI",
    "description": "Give the `province` (34 provinces; old pre-2025 names are mapped), the size (`kwp`, or `roof_m2` at 5.5 m² per kWp) and the consumption (`monthly_kwh` as one number or 12 values, or `monthly_bill` for households). Monthly generation uses EVN’s theoretical PVout coefficients for 2026 (kWh/kWp per month for each province, the values used by law to cap surplus sales), with an `orientation` factor.\n\nSelf-consumption is the part of generation used during the day (`daytime_share`, default 35 % of consumption for households, 65 % for businesses). Bill savings come from the vn-electricity engine (5-tier household tariff from 1 November 2026, VAT included; business savings at the normal-hour rate). Surplus is sold up to 50 % of the theoretical output (Decree 58/2025 Article 14 as amended by Decree 243/2026) at the previous year’s average market energy price, 844.8 đ/kWh for 2026 (`surplus_price` to override).\n\nWith `cost` (or `cost_per_kwp`; otherwise an assumed 11 million đ/kWp is flagged) the result gives payback, NPV (`discount_percent`, default 8) and IRR over `years` (default 25) with degradation and O&M, plus the notification or registration procedure for the size and connection.\n\nDocs: https://apibox.io.vn/docs/vn-solar-roi/",
    "operationId": "vnSolarRoiGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-solar-roi/"
    },
    "parameters": [
     {
      "name": "province",
      "in": "query",
      "required": true,
      "description": "Province or city (34 after 1/7/2025; old names accepted).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "kwp",
      "in": "query",
      "required": false,
      "description": "Installed panel capacity (kWp).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "roof_m2",
      "in": "query",
      "required": false,
      "description": "Usable roof area instead of kwp (`m2_per_kwp`, default 5.5).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "monthly_kwh",
      "in": "query",
      "required": false,
      "description": "Monthly consumption: one number or an array of 12.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "monthly_bill",
      "in": "query",
      "required": false,
      "description": "Household monthly bill (VND) instead of monthly_kwh.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "customer",
      "in": "query",
      "required": false,
      "description": "`household`, `business` or `production` (with `voltage`).",
      "schema": {
       "type": "string",
       "default": "household"
      }
     },
     {
      "name": "orientation",
      "in": "query",
      "required": false,
      "description": "south, southeast, southwest, east, west, flat, northeast, northwest, north.",
      "schema": {
       "type": "string",
       "default": "south"
      }
     },
     {
      "name": "daytime_share",
      "in": "query",
      "required": false,
      "description": "Share of consumption during sunshine hours (%).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sell_surplus",
      "in": "query",
      "required": false,
      "description": "Sell surplus to the grid.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "sell_percent",
      "in": "query",
      "required": false,
      "description": "Agreed cap of surplus sales (% of theoretical output).",
      "schema": {
       "type": "number",
       "default": 50
      }
     },
     {
      "name": "surplus_price",
      "in": "query",
      "required": false,
      "description": "Surplus price (đ/kWh, excl. VAT).",
      "schema": {
       "type": "number",
       "default": 844.8
      }
     },
     {
      "name": "cost",
      "in": "query",
      "required": false,
      "description": "Total investment (VND); or `cost_per_kwp`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "connection",
      "in": "query",
      "required": false,
      "description": "`low_voltage` or `medium_voltage` (for the procedure); `grid_connected=false` for off-grid.",
      "schema": {
       "type": "string",
       "default": "low_voltage"
      }
     },
     {
      "name": "years",
      "in": "query",
      "required": false,
      "description": "Analysis period; also `degradation_percent` (0.5), `om_percent` (1), `tariff_escalation_percent` (0), `discount_percent` (8), `cash_flow=true`.",
      "schema": {
       "type": "number",
       "default": 25
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "province": {
           "type": "string"
          },
          "kwp": {
           "type": "number"
          },
          "orientation": {
           "type": "string"
          },
          "customer": {
           "type": "string"
          },
          "annual": {
           "type": "object",
           "properties": {
            "generation_kwh": {
             "type": "number"
            },
            "specific_yield_kwh_per_kwp": {
             "type": "number"
            },
            "self_consumed_kwh": {
             "type": "number"
            },
            "sold_kwh": {
             "type": "number"
            },
            "curtailed_kwh": {
             "type": "number"
            },
            "bill_saving": {
             "type": "number"
            },
            "surplus_revenue": {
             "type": "number"
            },
            "total_benefit_year1": {
             "type": "number"
            }
           }
          },
          "investment": {
           "type": "object",
           "properties": {
            "cost": {
             "type": "number"
            },
            "years": {
             "type": "number"
            },
            "payback_years": {
             "type": "number"
            },
            "npv": {
             "type": "number"
            },
            "discount_percent": {
             "type": "number"
            },
            "irr_percent": {
             "type": "number"
            }
           }
          },
          "surplus": {
           "type": "object",
           "properties": {
            "allowed": {
             "type": "boolean"
            },
            "sell_percent_cap": {
             "type": "number"
            },
            "price_vnd_per_kwh": {
             "type": "number"
            }
           }
          },
          "procedure": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "months": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Rooftop Solar ROI",
    "description": "Give the `province` (34 provinces; old pre-2025 names are mapped), the size (`kwp`, or `roof_m2` at 5.5 m² per kWp) and the consumption (`monthly_kwh` as one number or 12 values, or `monthly_bill` for households). Monthly generation uses EVN’s theoretical PVout coefficients for 2026 (kWh/kWp per month for each province, the values used by law to cap surplus sales), with an `orientation` factor.\n\nSelf-consumption is the part of generation used during the day (`daytime_share`, default 35 % of consumption for households, 65 % for businesses). Bill savings come from the vn-electricity engine (5-tier household tariff from 1 November 2026, VAT included; business savings at the normal-hour rate). Surplus is sold up to 50 % of the theoretical output (Decree 58/2025 Article 14 as amended by Decree 243/2026) at the previous year’s average market energy price, 844.8 đ/kWh for 2026 (`surplus_price` to override).\n\nWith `cost` (or `cost_per_kwp`; otherwise an assumed 11 million đ/kWp is flagged) the result gives payback, NPV (`discount_percent`, default 8) and IRR over `years` (default 25) with degradation and O&M, plus the notification or registration procedure for the size and connection.\n\nDocs: https://apibox.io.vn/docs/vn-solar-roi/",
    "operationId": "vnSolarRoiPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-solar-roi/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "province": {
          "type": "string",
          "description": "Province or city (34 after 1/7/2025; old names accepted)."
         },
         "kwp": {
          "type": "number",
          "description": "Installed panel capacity (kWp)."
         },
         "roof_m2": {
          "type": "number",
          "description": "Usable roof area instead of kwp (`m2_per_kwp`, default 5.5)."
         },
         "monthly_kwh": {
          "type": "number",
          "description": "Monthly consumption: one number or an array of 12."
         },
         "monthly_bill": {
          "type": "number",
          "description": "Household monthly bill (VND) instead of monthly_kwh."
         },
         "customer": {
          "type": "string",
          "default": "household",
          "description": "`household`, `business` or `production` (with `voltage`)."
         },
         "orientation": {
          "type": "string",
          "default": "south",
          "description": "south, southeast, southwest, east, west, flat, northeast, northwest, north."
         },
         "daytime_share": {
          "type": "number",
          "description": "Share of consumption during sunshine hours (%)."
         },
         "sell_surplus": {
          "type": "boolean",
          "default": true,
          "description": "Sell surplus to the grid."
         },
         "sell_percent": {
          "type": "number",
          "default": 50,
          "description": "Agreed cap of surplus sales (% of theoretical output)."
         },
         "surplus_price": {
          "type": "number",
          "default": 844.8,
          "description": "Surplus price (đ/kWh, excl. VAT)."
         },
         "cost": {
          "type": "number",
          "description": "Total investment (VND); or `cost_per_kwp`."
         },
         "connection": {
          "type": "string",
          "default": "low_voltage",
          "description": "`low_voltage` or `medium_voltage` (for the procedure); `grid_connected=false` for off-grid."
         },
         "years": {
          "type": "number",
          "default": 25,
          "description": "Analysis period; also `degradation_percent` (0.5), `om_percent` (1), `tariff_escalation_percent` (0), `discount_percent` (8), `cash_flow=true`."
         }
        },
        "required": [
         "province"
        ]
       },
       "example": {
        "province": "Hà Nội",
        "kwp": 5,
        "monthly_kwh": 500,
        "cost": 60000000
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "province": {
           "type": "string"
          },
          "kwp": {
           "type": "number"
          },
          "orientation": {
           "type": "string"
          },
          "customer": {
           "type": "string"
          },
          "annual": {
           "type": "object",
           "properties": {
            "generation_kwh": {
             "type": "number"
            },
            "specific_yield_kwh_per_kwp": {
             "type": "number"
            },
            "self_consumed_kwh": {
             "type": "number"
            },
            "sold_kwh": {
             "type": "number"
            },
            "curtailed_kwh": {
             "type": "number"
            },
            "bill_saving": {
             "type": "number"
            },
            "surplus_revenue": {
             "type": "number"
            },
            "total_benefit_year1": {
             "type": "number"
            }
           }
          },
          "investment": {
           "type": "object",
           "properties": {
            "cost": {
             "type": "number"
            },
            "years": {
             "type": "number"
            },
            "payback_years": {
             "type": "number"
            },
            "npv": {
             "type": "number"
            },
            "discount_percent": {
             "type": "number"
            },
            "irr_percent": {
             "type": "number"
            }
           }
          },
          "surplus": {
           "type": "object",
           "properties": {
            "allowed": {
             "type": "boolean"
            },
            "sell_percent_cap": {
             "type": "number"
            },
            "price_vnd_per_kwh": {
             "type": "number"
            }
           }
          },
          "procedure": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "months": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "province": "Hà Nội",
         "kwp": 5,
         "orientation": "south",
         "customer": "household",
         "annual": {
          "generation_kwh": 4560,
          "specific_yield_kwh_per_kwp": 912,
          "self_consumed_kwh": 2090,
          "sold_kwh": 2014,
          "curtailed_kwh": 459,
          "bill_saving": 7260689,
          "surplus_revenue": 1701426,
          "total_benefit_year1": 8362115
         },
         "investment": {
          "cost": 60000000,
          "years": 25,
          "payback_years": 7.3,
          "npv": 25449438,
          "discount_percent": 8,
          "irr_percent": 12.8
         },
         "surplus": {
          "allowed": true,
          "sell_percent_cap": 50,
          "price_vnd_per_kwh": 844.8
         },
         "procedure": {
          "en": "Low-voltage connection: file notice form 01 with the commune People’s Committee online (national public service portal or VNeID) at least 10 working days before installation",
          "ref": "NĐ 58/2025 Điều 15 khoản 2, 4 (sửa đổi bởi NĐ 243/2026)"
         },
         "months": [
          {
           "month": 6,
           "pvout_kwh_per_kwp": 105,
           "generation_kwh": 525,
           "self_consumed_kwh": 175,
           "surplus_kwh": 350,
           "sold_kwh": 263,
           "curtailed_kwh": 88,
           "consumption_kwh": 500,
           "grid_kwh_after": 325,
           "bill_before": 1450872,
           "bill_after": 843210,
           "saving": 607662,
           "surplus_revenue": 222182
          },
          "…"
         ],
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-food-additives": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Food Additives (INS)",
    "description": "Data from the consolidated text 09/VBHN-BYT (Circular 24/2019/TT-BYT as amended by Circular 17/2023/TT-BYT), read from the Official Gazette: the 400 permitted additives of Appendix 1 (INS, Vietnamese and English names, functions), the maximum levels (ML, mg/kg) of Appendix 2A for 246 additive groups × food-category codes, the named food groups of Appendix 2B, the additives used at GMP (Appendix 3), the food-category tree of Appendix 4 and the 458 numbered notes.\n\n`ins` or `q` finds an additive (`E211`, `INS 160a(ii)`, `natri benzoat`, `sodium benzoate`); add `category` (e.g. `14.1.4`) to get the level that applies to that food, inherited from the parent category when the sub-category has no own row (Article 6.3.a). `category` alone lists every additive group with a level for that food and whether GMP additives may be used. `check` (JSON array of `{additive, mg_kg}`) with `category` reports for each additive: `ok`, `over_limit`, `gmp`, `gmp_not_for_category`, `not_listed_for_category` or `not_permitted`, with the notes explained.\n\nArticle 5.4 of the circular makes Appendix 2A and 3 follow the latest Codex GSFA tables; levels changed by Codex after the consolidated text are not included, so treat `not_listed_for_category` as “check Codex”. The dataset is rebuilt weekly from the Gazette and the build fails when a newer amending text appears.\n\nDocs: https://apibox.io.vn/docs/vn-food-additives/",
    "operationId": "vnFoodAdditivesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-food-additives/"
    },
    "parameters": [
     {
      "name": "ins",
      "in": "query",
      "required": false,
      "description": "INS / E-number (`211`, `E211`, `160a(ii)`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Additive name in Vietnamese or English (accents optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Food-category code of Appendix 4 (e.g. `01.1.4`, `05.2`, `14.1.4`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`additives`, `categories` or `gmp`: full lists.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results of a name search (1–50).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "category": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "chain": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "result": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "additive": {
              "type": "string"
             },
             "ins": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "mg_kg": {},
             "group": {
              "type": "string"
             },
             "ml": {
              "type": "string"
             },
             "ml_mg_kg": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "notes": {
              "type": "array"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "group_ins": {
              "type": "array"
             }
            }
           }
          },
          "source": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Food Additives (INS)",
    "description": "Data from the consolidated text 09/VBHN-BYT (Circular 24/2019/TT-BYT as amended by Circular 17/2023/TT-BYT), read from the Official Gazette: the 400 permitted additives of Appendix 1 (INS, Vietnamese and English names, functions), the maximum levels (ML, mg/kg) of Appendix 2A for 246 additive groups × food-category codes, the named food groups of Appendix 2B, the additives used at GMP (Appendix 3), the food-category tree of Appendix 4 and the 458 numbered notes.\n\n`ins` or `q` finds an additive (`E211`, `INS 160a(ii)`, `natri benzoat`, `sodium benzoate`); add `category` (e.g. `14.1.4`) to get the level that applies to that food, inherited from the parent category when the sub-category has no own row (Article 6.3.a). `category` alone lists every additive group with a level for that food and whether GMP additives may be used. `check` (JSON array of `{additive, mg_kg}`) with `category` reports for each additive: `ok`, `over_limit`, `gmp`, `gmp_not_for_category`, `not_listed_for_category` or `not_permitted`, with the notes explained.\n\nArticle 5.4 of the circular makes Appendix 2A and 3 follow the latest Codex GSFA tables; levels changed by Codex after the consolidated text are not included, so treat `not_listed_for_category` as “check Codex”. The dataset is rebuilt weekly from the Gazette and the build fails when a newer amending text appears.\n\nDocs: https://apibox.io.vn/docs/vn-food-additives/",
    "operationId": "vnFoodAdditivesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-food-additives/"
    },
    "parameters": [
     {
      "name": "ins",
      "in": "query",
      "required": false,
      "description": "INS / E-number (`211`, `E211`, `160a(ii)`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Additive name in Vietnamese or English (accents optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Food-category code of Appendix 4 (e.g. `01.1.4`, `05.2`, `14.1.4`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`additives`, `categories` or `gmp`: full lists.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results of a name search (1–50).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "check": {
          "type": "array",
          "items": {},
          "description": "Recipe: `[{\"additive\": \"E211\", \"mg_kg\": 300}, …]` (max 100), requires `category`."
         }
        }
       },
       "example": {
        "category": "14.1.4",
        "check": [
         {
          "additive": "E211",
          "mg_kg": 300
         },
         {
          "additive": "Kali sorbat",
          "mg_kg": 100
         },
         {
          "additive": "E330"
         },
         {
          "additive": "E128",
          "mg_kg": 5
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "category": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "chain": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "result": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "additive": {
              "type": "string"
             },
             "ins": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "mg_kg": {},
             "group": {
              "type": "string"
             },
             "ml": {
              "type": "string"
             },
             "ml_mg_kg": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "notes": {
              "type": "array"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "group_ins": {
              "type": "array"
             }
            }
           }
          },
          "source": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "category": {
          "code": "14.1.4",
          "name": "Đồ uống hương liệu, bao gồm đồ uống “thể thao”, “năng lượng” hoặc “điện giải” và các đồ uống đặc biệt khác",
          "chain": [
           "14.1.4",
           "14.1",
           "14.0"
          ]
         },
         "result": "fail",
         "items": [
          {
           "additive": "E211",
           "ins": "211",
           "name_vi": "Natri benzoat",
           "name_en": "Sodium benzoate",
           "mg_kg": 300,
           "group": "BENZOATES",
           "ml": "250",
           "ml_mg_kg": 250,
           "unit": "mg/kg",
           "notes": [
            {
             "note": "13",
             "text": "Tính theo acid benzoic"
            },
            {
             "note": "301",
             "text": "Mức tối đa tạm thời"
            }
           ],
           "status": "over_limit",
           "status_vi": "Vượt mức sử dụng tối đa (ML)",
           "group_ins": [
            "210",
            "211",
            "212",
            "213"
           ]
          },
          {
           "additive": "Kali sorbat",
           "ins": "202",
           "name_vi": "Kali sorbat",
           "name_en": "Potassium sorbate",
           "mg_kg": 100,
           "group": "SORBATES",
           "ml": "500",
           "ml_mg_kg": 500,
           "unit": "mg/kg",
           "status": "ok",
           "status_vi": "Trong giới hạn ML"
          },
          {
           "additive": "E330",
           "ins": "330",
           "name_vi": "Acid citric",
           "name_en": "Citric acid",
           "mg_kg": null,
           "status": "gmp",
           "status_vi": "Phụ gia dùng theo GMP (Phụ lục 3 Mục 1) cho nhóm thực phẩm thuộc Mục 2"
          },
          {
           "additive": "E128",
           "status": "not_permitted",
           "status_vi": "Không có trong danh mục phụ gia được phép (Phụ lục 1)",
           "mg_kg": 5
          }
         ],
         "source": "09/VBHN-BYT",
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only, not legal advice; check the official text and the latest Codex GSFA before a product declaration."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cosmetic-ingredients": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Cosmetic Ingredient Checker (INCI)",
    "description": "Paste an ingredient list (`Aqua (Water), Glycerin, Phenoxyethanol, …`) as text or an array. Each ingredient is matched exactly by INCI name, chemical name or CAS number (alternatives such as `Aqua (Water)`, `Water/Aqua/Eau` and `CI 77891` are tried) against the latest consolidated Annexes of Regulation (EC) No 1223/2009: II prohibited (1,761 entries), III restricted (357), IV colorants (154), V preservatives (57) and VI UV filters (34).\n\nFor each match you get the annex and reference number, the conditions (product type / body part, maximum concentration in the ready-for-use product, other limitations, mandatory warnings) and `max_percent`. Send `concentrations` (`{\"Phenoxyethanol\": 1.2}`) to flag `over_limit`, and `product_type` (`leave_on`, `rinse_off`, `oral`, `hair`, `eye`, `lip`, …) to narrow the conditions. Fragrance allergens of Annex III are flagged, with `allergen_label_required` when the concentration exceeds 0.001 % (leave-on) or 0.01 % (rinse-off).\n\nCoverage: EU annexes only. The ASEAN Cosmetic Directive annexes applied in Vietnam (TT 06/2011/TT-BYT) largely mirror them but are not included; ingredient functions (CosIng) are not provided. “Not listed” is not a safety assessment. The data is rebuilt weekly from the EU Publications Office.\n\nDocs: https://apibox.io.vn/docs/cosmetic-ingredients/",
    "operationId": "cosmeticIngredientsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cosmetic-ingredients/"
    },
    "parameters": [
     {
      "name": "inci",
      "in": "query",
      "required": true,
      "description": "Ingredient list (comma / new-line separated) or a JSON array (max 200).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "product_type",
      "in": "query",
      "required": false,
      "description": "`leave_on`, `rinse_off`, `oral`, `hair`, `nail`, `eye`, `lip`, `face`, `skin`, `sunscreen`, `deodorant`, `children`, `spray`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "summary": {
           "type": "object",
           "properties": {
            "ingredients": {
             "type": "number"
            },
            "prohibited": {
             "type": "array"
            },
            "over_limit": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "check_product_limit": {
             "type": "array"
            },
            "restricted": {
             "type": "number"
            },
            "preservatives": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "uv_filters": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "colorants": {
             "type": "array"
            },
            "fragrance_allergens": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "not_listed": {
             "type": "number"
            }
           }
          },
          "product_type": {
           "type": "string"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "position": {
              "type": "number"
             },
             "input": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "flags": {
              "type": "array"
             },
             "entries": {
              "type": "array"
             },
             "concentration_percent": {
              "type": "number"
             }
            }
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "eu": {
             "type": "boolean"
            },
            "eu_version": {
             "type": "string"
            },
            "asean": {
             "type": "string"
            },
            "functions": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Cosmetic Ingredient Checker (INCI)",
    "description": "Paste an ingredient list (`Aqua (Water), Glycerin, Phenoxyethanol, …`) as text or an array. Each ingredient is matched exactly by INCI name, chemical name or CAS number (alternatives such as `Aqua (Water)`, `Water/Aqua/Eau` and `CI 77891` are tried) against the latest consolidated Annexes of Regulation (EC) No 1223/2009: II prohibited (1,761 entries), III restricted (357), IV colorants (154), V preservatives (57) and VI UV filters (34).\n\nFor each match you get the annex and reference number, the conditions (product type / body part, maximum concentration in the ready-for-use product, other limitations, mandatory warnings) and `max_percent`. Send `concentrations` (`{\"Phenoxyethanol\": 1.2}`) to flag `over_limit`, and `product_type` (`leave_on`, `rinse_off`, `oral`, `hair`, `eye`, `lip`, …) to narrow the conditions. Fragrance allergens of Annex III are flagged, with `allergen_label_required` when the concentration exceeds 0.001 % (leave-on) or 0.01 % (rinse-off).\n\nCoverage: EU annexes only. The ASEAN Cosmetic Directive annexes applied in Vietnam (TT 06/2011/TT-BYT) largely mirror them but are not included; ingredient functions (CosIng) are not provided. “Not listed” is not a safety assessment. The data is rebuilt weekly from the EU Publications Office.\n\nDocs: https://apibox.io.vn/docs/cosmetic-ingredients/",
    "operationId": "cosmeticIngredientsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cosmetic-ingredients/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "inci": {
          "type": "string",
          "description": "Ingredient list (comma / new-line separated) or a JSON array (max 200)."
         },
         "concentrations": {
          "type": "object",
          "description": "Percent by ingredient name, e.g. `{\"Phenoxyethanol\": 1.2}`."
         },
         "product_type": {
          "type": "string",
          "description": "`leave_on`, `rinse_off`, `oral`, `hair`, `nail`, `eye`, `lip`, `face`, `skin`, `sunscreen`, `deodorant`, `children`, `spray`."
         }
        },
        "required": [
         "inci"
        ]
       },
       "example": {
        "inci": "Aqua (Water), Glycerin, Phenoxyethanol, Titanium Dioxide, Limonene",
        "concentrations": {
         "Phenoxyethanol": 1.2,
         "Limonene": 0.05
        },
        "product_type": "leave_on"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "summary": {
           "type": "object",
           "properties": {
            "ingredients": {
             "type": "number"
            },
            "prohibited": {
             "type": "array"
            },
            "over_limit": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "check_product_limit": {
             "type": "array"
            },
            "restricted": {
             "type": "number"
            },
            "preservatives": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "uv_filters": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "colorants": {
             "type": "array"
            },
            "fragrance_allergens": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "not_listed": {
             "type": "number"
            }
           }
          },
          "product_type": {
           "type": "string"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "position": {
              "type": "number"
             },
             "input": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "flags": {
              "type": "array"
             },
             "entries": {
              "type": "array"
             },
             "concentration_percent": {
              "type": "number"
             }
            }
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "eu": {
             "type": "boolean"
            },
            "eu_version": {
             "type": "string"
            },
            "asean": {
             "type": "string"
            },
            "functions": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "summary": {
          "ingredients": 5,
          "prohibited": [],
          "over_limit": [
           "Phenoxyethanol"
          ],
          "check_product_limit": [],
          "restricted": 1,
          "preservatives": [
           "Phenoxyethanol"
          ],
          "uv_filters": [
           "Titanium Dioxide"
          ],
          "colorants": [],
          "fragrance_allergens": [
           "Limonene"
          ],
          "not_listed": 2
         },
         "product_type": "leave_on",
         "results": [
          {
           "position": 1,
           "input": "Aqua (Water)",
           "status": "not_listed",
           "status_vi": "Không có trong Phụ lục II–VI (không bị cấm/hạn chế riêng)",
           "flags": [],
           "entries": []
          },
          {
           "position": 3,
           "input": "Phenoxyethanol",
           "status": "preservative",
           "status_vi": "Chất bảo quản được phép (Phụ lục V)",
           "concentration_percent": 1.2,
           "flags": [
            "over_limit"
           ],
           "entries": [
            {
             "annex": "V",
             "ref": "29",
             "status": "preservative",
             "chemical_name": "2-Phenoxyethanol",
             "inci": "Phenoxyethanol",
             "cas": [
              "122-99-6"
             ],
             "ec": [
              "204-589-7"
             ],
             "conditions": [
              {
               "product_type": null,
               "max_concentration": "1,0 %",
               "other": null,
               "warnings": null
              }
             ],
             "max_percent": 1,
             "matched_by": "name"
            }
           ]
          },
          {
           "position": 5,
           "input": "Limonene",
           "status": "restricted",
           "status_vi": "Chất bị hạn chế (Phụ lục III)",
           "concentration_percent": 0.05,
           "flags": [
            "allergen_label_required"
           ],
           "entries": [
            {
             "annex": "III",
             "ref": "88",
             "inci": "Limonene",
             "cas": [
              "138-86-3",
              "7705-14-8",
              "5989-27-5",
              "5989-54-8"
             ],
             "conditions": [
              {
               "product_type": null,
               "max_concentration": null,
               "other": "The presence of the substance shall be indicated in the list of ingredients referred to in Article 19(1), point (g), when its concentration exceeds: — 0,001 % in leave-on products — 0,01 % in rinse-off products. The peroxide value for each substance shall be less than 20 mmoles/L",
               "warnings": null
              }
             ],
             "fragrance_allergen": true,
             "label_threshold": {
              "leave_on": 0.001,
              "rinse_off": 0.01
             },
             "matched_by": "name"
            }
           ]
          }
         ],
         "coverage": {
          "eu": true,
          "eu_version": "2026-05-18",
          "asean": "not included – the ASEAN Cosmetic Directive annexes (applied in Vietnam by TT 06/2011/TT-BYT) largely mirror the EU annexes but differ for some substances; check the ASEAN / DAV lists",
          "functions": "not provided (CosIng not used)"
         },
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only, not regulatory or safety advice; check the official text and the ASEAN / national lists."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-jurisdiction": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Court & Tax Office by Ward",
    "description": "Send a ward / commune as `ward` (5-digit code or name, with `province`) or a full `address` (new or pre-2025 format; old addresses are converted with the vn-provinces data). The response gives the regional people's court (Toà án nhân dân khu vực) from the appendix of Resolution 81/2025/UBTVQH15 (355 courts, every one of the 3,321 units), the provincial court, the district courts it succeeded, and the courts with specialised territorial jurisdiction: bankruptcy and restructuring (3 courts), intellectual-property cases (2 courts) and ad-hoc arbitral awards (3 provincial courts).\n\nIt also gives the grassroots tax office (Thuế cơ sở) of Decision 1378/QĐ-CT with its head-office commune, updated with the 2026 head-office moves. Reverse lookup: `office=KV3&province=Hà Nội` or `office=Thuế cơ sở 5 Gia Lai` lists the units of a court or tax office; `list=courts|tax_offices&province=` lists all offices of a province.\n\nThe data is rebuilt weekly from the published appendices with cross-checks (355 courts, 350 offices, every unit covered once). `coverage` reports what is included: courts 100 %, tax offices ≈ 99 % (a few units are named with old spellings in the decision), grassroots social-insurance offices not yet (the provincial office is returned). Court street addresses are set by the Chief Justice and are not included.\n\nDocs: https://apibox.io.vn/docs/vn-jurisdiction/",
    "operationId": "vnJurisdictionGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-jurisdiction/"
    },
    "parameters": [
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "5-digit ward code or ward / commune name (new units).",
      "schema": {
       "type": "string"
      },
      "example": "Bến Thành"
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or code (34 provinces); narrows a ward name, required with list / short office names.",
      "schema": {
       "type": "string"
      },
      "example": "Hồ Chí Minh"
     },
     {
      "name": "address",
      "in": "query",
      "required": false,
      "description": "Full address, new or pre-2025 format.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "office",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: a court (\"Tòa án nhân dân khu vực 3 - Hà Nội\", \"KV3\") or tax office (\"Thuế cơ sở 5 Gia Lai\", \"TCS5\").",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`courts` or `tax_offices` of a province.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: maximum units returned.",
      "schema": {
       "type": "number",
       "default": 500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "unit": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            }
           }
          },
          "resolved_from": {
           "type": "string"
          },
          "court": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "number": {
             "type": "number"
            },
            "province_code": {
             "type": "string"
            },
            "provincial_court": {
             "type": "string"
            },
            "unit_count": {
             "type": "number"
            },
            "succeeds_district_courts": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "address": {},
            "address_note": {
             "type": "string"
            }
           }
          },
          "specialised_jurisdiction": {
           "type": "object",
           "properties": {
            "bankruptcy_restructuring": {
             "type": "object",
             "properties": {
              "court": {
               "type": "string"
              },
              "legal": {
               "type": "string"
              },
              "en": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              }
             }
            },
            "intellectual_property": {
             "type": "object",
             "properties": {
              "court": {
               "type": "string"
              },
              "legal": {
               "type": "string"
              },
              "en": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              }
             }
            },
            "arbitration_awards": {
             "type": "object",
             "properties": {
              "court": {
               "type": "string"
              },
              "legal": {
               "type": "string"
              },
              "en": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              }
             }
            }
           }
          },
          "tax_office": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "number": {
             "type": "number"
            },
            "province_code": {
             "type": "string"
            },
            "parent": {
             "type": "string"
            },
            "head_office_unit": {
             "type": "string"
            },
            "head_office_unit_code": {
             "type": "string"
            },
            "unit_count": {
             "type": "number"
            }
           }
          },
          "social_insurance": {
           "type": "object",
           "properties": {
            "office": {},
            "provincial_office": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "admin_version": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "court": {
             "type": "number"
            },
            "tax_office": {
             "type": "number"
            },
            "social_insurance": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "unit": {
          "code": "26743",
          "name": "Phường Bến Thành",
          "province": "Thành phố Hồ Chí Minh",
          "province_code": "79"
         },
         "resolved_from": "name",
         "court": {
          "name": "Tòa án nhân dân khu vực 1 - Thành phố Hồ Chí Minh",
          "number": 1,
          "province_code": "79",
          "provincial_court": "Tòa án nhân dân Thành phố Hồ Chí Minh",
          "unit_count": 10,
          "succeeds_district_courts": [
           "Quận 3",
           "Quận 1",
           "Quận 4"
          ],
          "address": null,
          "address_note": "Head-office addresses are set by the Chief Justice of the Supreme People's Court (NQ 81/2025 Điều 4 khoản 4); see toaan.gov.vn."
         },
         "specialised_jurisdiction": {
          "bankruptcy_restructuring": {
           "court": "Tòa án nhân dân khu vực 1 - Thành phố Hồ Chí Minh",
           "legal": "NQ 81/2025/UBTVQH15 Điều 4 khoản 2 (sửa đổi bởi NQ 04/2026/UBTVQH16: thêm vụ việc phục hồi)",
           "en": "Bankruptcy and restructuring cases",
           "vi": "Vụ việc phá sản, phục hồi"
          },
          "intellectual_property": {
           "court": "Tòa án nhân dân khu vực 1 - Thành phố Hồ Chí Minh",
           "legal": "NQ 81/2025/UBTVQH15 Điều 4 khoản 3",
           "en": "Civil, business and commercial disputes and administrative cases on intellectual property and technology transfer",
           "vi": "Vụ việc dân sự, kinh doanh, thương mại, vụ án hành chính về sở hữu trí tuệ, chuyển giao công nghệ"
          },
          "arbitration_awards": {
           "court": "Tòa án nhân dân Thành phố Hồ Chí Minh",
           "legal": "NQ 81/2025/UBTVQH15 Điều 2",
           "en": "Requests to set aside / register ad-hoc arbitral awards",
           "vi": "Yêu cầu hủy phán quyết trọng tài, đăng ký phán quyết trọng tài vụ việc"
          }
         },
         "tax_office": {
          "name": "Thuế cơ sở 1 Thành phố Hồ Chí Minh",
          "number": 1,
          "province_code": "79",
          "parent": "Thuế Thành phố Hồ Chí Minh",
          "head_office_unit": "Phường Tân Định",
          "head_office_unit_code": "26737",
          "unit_count": 4
         },
         "social_insurance": {
          "office": null,
          "provincial_office": "Bảo hiểm xã hội Thành phố Hồ Chí Minh",
          "note": "Grassroots BHXH offices are assigned by each provincial BHXH; not covered yet."
         },
         "data_version": "2026-11-11",
         "admin_version": "v5.2.0",
         "coverage": {
          "court": 1,
          "tax_office": 0.9919,
          "social_insurance": 0,
          "note": "Courts: all 3,321 units (NQ 81/2025 appendix). Tax offices: units the QĐ 1378 transcription names unambiguously. Grassroots social-insurance offices (BHXH cơ sở) are set by each provincial BHXH and are not covered yet."
         },
         "legal": [
          {
           "ref": "Nghị quyết 81/2025/UBTVQH15 (Phụ lục: tên gọi, phạm vi thẩm quyền theo lãnh thổ của 355 TAND khu vực)",
           "effective_from": "2025-07-01",
           "url": "https://cdn.nhandan.vn/files/8c7b09d44d49419e59b236170af5ab4303c7381b5d42807a471e8df9a1809f1af511fc0ebc00b89d4ab4100ea56105831e047eee7ffce7ec1f58cb11af29bf5627ae6353da32bd748fb773b9c984d3d0/nq-81-ubtvqh-thanh-lap-takv-phat-hanh.pdf"
          }
         ],
         "disclaimer": "Reference only, not legal or tax advice; check the official text and the agency before filing.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý / thuế; hãy đối chiếu văn bản chính thức và cơ quan trước khi nộp hồ sơ.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Court & Tax Office by Ward",
    "description": "Send a ward / commune as `ward` (5-digit code or name, with `province`) or a full `address` (new or pre-2025 format; old addresses are converted with the vn-provinces data). The response gives the regional people's court (Toà án nhân dân khu vực) from the appendix of Resolution 81/2025/UBTVQH15 (355 courts, every one of the 3,321 units), the provincial court, the district courts it succeeded, and the courts with specialised territorial jurisdiction: bankruptcy and restructuring (3 courts), intellectual-property cases (2 courts) and ad-hoc arbitral awards (3 provincial courts).\n\nIt also gives the grassroots tax office (Thuế cơ sở) of Decision 1378/QĐ-CT with its head-office commune, updated with the 2026 head-office moves. Reverse lookup: `office=KV3&province=Hà Nội` or `office=Thuế cơ sở 5 Gia Lai` lists the units of a court or tax office; `list=courts|tax_offices&province=` lists all offices of a province.\n\nThe data is rebuilt weekly from the published appendices with cross-checks (355 courts, 350 offices, every unit covered once). `coverage` reports what is included: courts 100 %, tax offices ≈ 99 % (a few units are named with old spellings in the decision), grassroots social-insurance offices not yet (the provincial office is returned). Court street addresses are set by the Chief Justice and are not included.\n\nDocs: https://apibox.io.vn/docs/vn-jurisdiction/",
    "operationId": "vnJurisdictionPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-jurisdiction/"
    },
    "parameters": [
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "5-digit ward code or ward / commune name (new units).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or code (34 provinces); narrows a ward name, required with list / short office names.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "address",
      "in": "query",
      "required": false,
      "description": "Full address, new or pre-2025 format.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "office",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: a court (\"Tòa án nhân dân khu vực 3 - Hà Nội\", \"KV3\") or tax office (\"Thuế cơ sở 5 Gia Lai\", \"TCS5\").",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`courts` or `tax_offices` of a province.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: maximum units returned.",
      "schema": {
       "type": "number",
       "default": 500
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "unit": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "province": {
             "type": "string"
            },
            "province_code": {
             "type": "string"
            }
           }
          },
          "resolved_from": {
           "type": "string"
          },
          "court": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "number": {
             "type": "number"
            },
            "province_code": {
             "type": "string"
            },
            "provincial_court": {
             "type": "string"
            },
            "unit_count": {
             "type": "number"
            },
            "succeeds_district_courts": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "address": {},
            "address_note": {
             "type": "string"
            }
           }
          },
          "specialised_jurisdiction": {
           "type": "object",
           "properties": {
            "bankruptcy_restructuring": {
             "type": "object",
             "properties": {
              "court": {
               "type": "string"
              },
              "legal": {
               "type": "string"
              },
              "en": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              }
             }
            },
            "intellectual_property": {
             "type": "object",
             "properties": {
              "court": {
               "type": "string"
              },
              "legal": {
               "type": "string"
              },
              "en": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              }
             }
            },
            "arbitration_awards": {
             "type": "object",
             "properties": {
              "court": {
               "type": "string"
              },
              "legal": {
               "type": "string"
              },
              "en": {
               "type": "string"
              },
              "vi": {
               "type": "string"
              }
             }
            }
           }
          },
          "tax_office": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "number": {
             "type": "number"
            },
            "province_code": {
             "type": "string"
            },
            "parent": {
             "type": "string"
            },
            "head_office_unit": {
             "type": "string"
            },
            "head_office_unit_code": {
             "type": "string"
            },
            "unit_count": {
             "type": "number"
            }
           }
          },
          "social_insurance": {
           "type": "object",
           "properties": {
            "office": {},
            "provincial_office": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "data_version": {
           "type": "string"
          },
          "admin_version": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "court": {
             "type": "number"
            },
            "tax_office": {
             "type": "number"
            },
            "social_insurance": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-build-permit": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Construction Permit Check",
    "description": "A rule engine over Construction Law 135/2025/QH15 (in force 1/7/2026; the permit exemptions of Article 43(2)–(3) since 1/1/2026) and Decree 217/2026/ND-CP. Describe the works with `type` (`house` for a detached house, `grade_iv`, `other`, or an exempt group such as `emergency`, `temporary`, `telecom_passive`, `advertising`, `public_investment`, `appraised_project`…), `work` (`new`, `repair`, `relocate`), `floors`, `floor_area` (total floor area, m²) and `planned_area` (true if the site is in a functional / urban-development area of a general plan, a construction area of a commune plan or an area with architecture management regulations).\n\nThe response says `permit_required` (true, false or `depends` when a fact is missing), the exempting clause (e.g. houses under 7 floors and under 500 m² outside planned areas, Article 43(2)(g); interior repairs without structural change, (h)), whether a start notice must be sent (not for houses of households), the start conditions, and for permits: the authority (commune People's Committee for houses and grade III–IV works), the time limit (7 working days for houses, 10 / 9 for other works, 5 for extension or reissue), online submission, the dossier, the 12-month start window and extensions.\n\nWhether a site lies in a planned area is not in any open dataset: ask the commune People's Committee. The Ministry of Construction notes that most urban houses are inside such areas and still need a permit.\n\nDocs: https://apibox.io.vn/docs/vn-build-permit/",
    "operationId": "vnBuildPermitGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-build-permit/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`house`, `grade_iv`, `other` or an exempt group (`state_secret`, `emergency`, `temporary`, `special_public`, `defence_land`, `public_investment`, `linear`, `offshore_airport`, `advertising`, `telecom_passive`, `appraised_project`).",
      "schema": {
       "type": "string",
       "default": "house"
      },
      "example": "house"
     },
     {
      "name": "work",
      "in": "query",
      "required": false,
      "description": "`new`, `repair` or `relocate`.",
      "schema": {
       "type": "string",
       "default": "new"
      }
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Number of floors (houses).",
      "schema": {
       "type": "number"
      },
      "example": 4
     },
     {
      "name": "floor_area",
      "in": "query",
      "required": false,
      "description": "Total floor area, m².",
      "schema": {
       "type": "number"
      },
      "example": 320
     },
     {
      "name": "planned_area",
      "in": "query",
      "required": false,
      "description": "Site lies in a planned / architecture-managed area (Art. 43(2)(g)).",
      "schema": {
       "type": "boolean"
      },
      "example": true
     },
     {
      "name": "owner",
      "in": "query",
      "required": false,
      "description": "`household` or `organisation`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "interior_only",
      "in": "query",
      "required": false,
      "description": "Repair: only inside the building.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "facade_on_managed_street",
      "in": "query",
      "required": false,
      "description": "Repair: the facade faces an urban street with architecture management.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "structural",
      "in": "query",
      "required": false,
      "description": "Repair affects load-bearing structure.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "change_use",
      "in": "query",
      "required": false,
      "description": "Repair changes the use.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "heritage",
      "in": "query",
      "required": false,
      "description": "Site in a heritage protection zone.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "permit_required": {
           "type": "boolean"
          },
          "exemption": {},
          "reasoning": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "start_notice": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            }
           }
          },
          "start_conditions": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "legal_ref": {
             "type": "string"
            }
           }
          },
          "permit": {
           "type": "object",
           "properties": {
            "kind": {
             "type": "string"
            },
            "authority": {
             "type": "string"
            },
            "processing_working_days": {
             "type": "number"
            },
            "extension_or_reissue_working_days": {
             "type": "number"
            },
            "submit": {
             "type": "string"
            },
            "dossier": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "start_within_months": {
             "type": "number"
            },
            "extensions": {
             "type": "string"
            },
            "fee": {
             "type": "string"
            },
            "legal_ref": {
             "type": "string"
            }
           }
          },
          "input": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "work": {
             "type": "string"
            },
            "owner": {
             "type": "string"
            },
            "floors": {
             "type": "number"
            },
            "floor_area": {
             "type": "number"
            },
            "planned_area": {
             "type": "boolean"
            }
           }
          },
          "transition": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "permit_required": true,
         "exemption": null,
         "reasoning": [
          "The site lies in a planned / architecture-managed area listed in Điều 43 khoản 2 điểm g → permit required."
         ],
         "start_notice": {
          "required": false
         },
         "start_conditions": {
          "vi": "Có giấy phép xây dựng (nếu thuộc diện phải có) và xây trên đất ở hợp pháp",
          "en": "A permit where required, and legal residential land",
          "legal_ref": "Điều 48 khoản 3"
         },
         "permit": {
          "kind": "new",
          "authority": "Commune People's Committee (UBND cấp xã)",
          "processing_working_days": 7,
          "extension_or_reissue_working_days": 5,
          "submit": "Online, end-to-end, on the National Public Service Portal (dichvucong.gov.vn); in person only when the online system fails (NĐ 217/2026 Điều 54, 56).",
          "dossier": [
           {
            "vi": "Đơn đề nghị cấp giấy phép xây dựng (Mẫu số 01 Phụ lục II NĐ 217/2026)",
            "en": "Application form (Form 01, Annex II, Decree 217/2026)"
           },
           {
            "vi": "Một trong các giấy tờ hợp pháp về đất đai (Điều 55 NĐ 217/2026); không phải nộp nếu đã có trên cơ sở dữ liệu quốc gia",
            "en": "A legal land-use document (Art. 55) — not needed if already in the national database"
           },
           {
            "vi": "Bản vẽ: mặt bằng công trình trên lô đất kèm sơ đồ vị trí; mặt bằng các tầng, mặt đứng, mặt cắt chính; mặt bằng móng, mặt cắt móng kèm sơ đồ đấu nối cấp nước, thoát nước, cấp điện",
            "en": "Drawings: site plan with location map; floor plans, main elevations and sections; foundation plan / section with water, drainage and power connections"
           }
          ],
          "start_within_months": 12,
          "extensions": "At most 2 extensions of 12 months each (NĐ 217/2026 Điều 63)",
          "fee": "Permit fee (lệ phí cấp giấy phép xây dựng) is set by each provincial People's Council.",
          "legal_ref": "NĐ 217/2026/NĐ-CP Điều 53, 54, 60, 61, 63"
         },
         "input": {
          "type": "house",
          "work": "new",
          "owner": "household",
          "floors": 4,
          "floor_area": 320,
          "planned_area": true
         },
         "transition": "Works exempt under the 2014 law that met the start conditions before 1/1/2026 remain exempt; permitted works now exempt need no permit amendment when the design changes (Điều 95 khoản 3).",
         "legal": [
          {
           "ref": "Luật Xây dựng số 135/2025/QH15, Điều 43 (khoản 2, 3 có hiệu lực từ 01/01/2026), Điều 44, 48, 95",
           "effective_from": "2026-07-01"
          }
         ],
         "disclaimer": "Reference only, not legal advice; whether a site lies in a planned area must be confirmed with the commune People's Committee.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; việc khu đất có thuộc khu vực quy hoạch / có quy chế quản lý kiến trúc hay không cần hỏi UBND cấp xã.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Construction Permit Check",
    "description": "A rule engine over Construction Law 135/2025/QH15 (in force 1/7/2026; the permit exemptions of Article 43(2)–(3) since 1/1/2026) and Decree 217/2026/ND-CP. Describe the works with `type` (`house` for a detached house, `grade_iv`, `other`, or an exempt group such as `emergency`, `temporary`, `telecom_passive`, `advertising`, `public_investment`, `appraised_project`…), `work` (`new`, `repair`, `relocate`), `floors`, `floor_area` (total floor area, m²) and `planned_area` (true if the site is in a functional / urban-development area of a general plan, a construction area of a commune plan or an area with architecture management regulations).\n\nThe response says `permit_required` (true, false or `depends` when a fact is missing), the exempting clause (e.g. houses under 7 floors and under 500 m² outside planned areas, Article 43(2)(g); interior repairs without structural change, (h)), whether a start notice must be sent (not for houses of households), the start conditions, and for permits: the authority (commune People's Committee for houses and grade III–IV works), the time limit (7 working days for houses, 10 / 9 for other works, 5 for extension or reissue), online submission, the dossier, the 12-month start window and extensions.\n\nWhether a site lies in a planned area is not in any open dataset: ask the commune People's Committee. The Ministry of Construction notes that most urban houses are inside such areas and still need a permit.\n\nDocs: https://apibox.io.vn/docs/vn-build-permit/",
    "operationId": "vnBuildPermitPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-build-permit/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`house`, `grade_iv`, `other` or an exempt group (`state_secret`, `emergency`, `temporary`, `special_public`, `defence_land`, `public_investment`, `linear`, `offshore_airport`, `advertising`, `telecom_passive`, `appraised_project`).",
      "schema": {
       "type": "string",
       "default": "house"
      }
     },
     {
      "name": "work",
      "in": "query",
      "required": false,
      "description": "`new`, `repair` or `relocate`.",
      "schema": {
       "type": "string",
       "default": "new"
      }
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Number of floors (houses).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "floor_area",
      "in": "query",
      "required": false,
      "description": "Total floor area, m².",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "planned_area",
      "in": "query",
      "required": false,
      "description": "Site lies in a planned / architecture-managed area (Art. 43(2)(g)).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "owner",
      "in": "query",
      "required": false,
      "description": "`household` or `organisation`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "interior_only",
      "in": "query",
      "required": false,
      "description": "Repair: only inside the building.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "facade_on_managed_street",
      "in": "query",
      "required": false,
      "description": "Repair: the facade faces an urban street with architecture management.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "structural",
      "in": "query",
      "required": false,
      "description": "Repair affects load-bearing structure.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "change_use",
      "in": "query",
      "required": false,
      "description": "Repair changes the use.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "heritage",
      "in": "query",
      "required": false,
      "description": "Site in a heritage protection zone.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "permit_required": {
           "type": "boolean"
          },
          "exemption": {},
          "reasoning": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "start_notice": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            }
           }
          },
          "start_conditions": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "legal_ref": {
             "type": "string"
            }
           }
          },
          "permit": {
           "type": "object",
           "properties": {
            "kind": {
             "type": "string"
            },
            "authority": {
             "type": "string"
            },
            "processing_working_days": {
             "type": "number"
            },
            "extension_or_reissue_working_days": {
             "type": "number"
            },
            "submit": {
             "type": "string"
            },
            "dossier": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "start_within_months": {
             "type": "number"
            },
            "extensions": {
             "type": "string"
            },
            "fee": {
             "type": "string"
            },
            "legal_ref": {
             "type": "string"
            }
           }
          },
          "input": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "work": {
             "type": "string"
            },
            "owner": {
             "type": "string"
            },
            "floors": {
             "type": "number"
            },
            "floor_area": {
             "type": "number"
            },
            "planned_area": {
             "type": "boolean"
            }
           }
          },
          "transition": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-license-class": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Driving Licence Classes",
    "description": "Rules of the Law on Road Traffic Order and Safety 36/2024/QH15 (in force 1/1/2025): Article 57 (classes A1, A, B1, B, C1, C, D1, D2, D, BE, C1E, CE, D1E, D2E, DE and their validity), Article 59 (minimum age 18 / 21 / 24 / 27, age limit 57 men / 55 women for buses over 29 seats) and Article 89 (licences issued before 2025: continued use and exchange — A1 → A restricted under 175 cm³, B1 / B2 → B or C1, D → D2, E → D, FC → CE…).\n\nModes: `vehicle` (`motorcycle` with `cc` / `kw`, `car` / `bus` with `seats` excluding the driver, `truck` / `special` with `gvw` design gross weight, `trailer_kg`, `tractor_unit`, `articulated_bus`, `moped`) returns the minimum class; `class` returns what it allows; `class` + `vehicle` checks if the licence covers the vehicle; `class` + `issued` (+ `birth`, `sex`) computes the expiry and what a renewal needs today: no test if expired under 30 days, theory test from 30 days to under 1 year, theory and practical tests from 1 year (Circular 108/2026/TT-BCA, in force 1/7/2026).\n\nOld classes are recognised (`old=1` for A1 / B1 / C / D issued before 2025, or an `issued` date before 2025); their printed expiry date prevails. No personal licence is looked up.\n\nDocs: https://apibox.io.vn/docs/vn-license-class/",
    "operationId": "vnLicenseClassGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-license-class/"
    },
    "parameters": [
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Licence class (new: A1…DE; old: A1, A2, A3, A4, B1, B1-AT, B2, C, D, E, FB2, FC, FD, FE).",
      "schema": {
       "type": "string"
      },
      "example": "B2"
     },
     {
      "name": "old",
      "in": "query",
      "required": false,
      "description": "Treat A1 / B1 / C / D as an old (pre-2025) class.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "issued",
      "in": "query",
      "required": false,
      "description": "Issue date (YYYY-MM-DD) for the expiry.",
      "schema": {
       "type": "string"
      },
      "example": "2016-05-10"
     },
     {
      "name": "birth",
      "in": "query",
      "required": false,
      "description": "Date of birth (age checks, old B1 expiry).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sex",
      "in": "query",
      "required": false,
      "description": "`male` / `female` (age limits).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`moped`, `motorcycle`, `tricycle`, `car`, `bus`, `sleeper_bus`, `truck`, `special`, `tractor_unit`, `articulated_bus`.",
      "schema": {
       "type": "string"
      },
      "example": "truck"
     },
     {
      "name": "cc",
      "in": "query",
      "required": false,
      "description": "Engine capacity, cm³ (motorcycles).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "kw",
      "in": "query",
      "required": false,
      "description": "Electric motor power, kW.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Passenger seats, not counting the driver.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gvw",
      "in": "query",
      "required": false,
      "description": "Design gross vehicle weight, kg.",
      "schema": {
       "type": "number"
      },
      "example": 5000
     },
     {
      "name": "trailer_kg",
      "in": "query",
      "required": false,
      "description": "Trailer design gross weight, kg.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "class": {
           "type": "string"
          },
          "system": {
           "type": "string"
          },
          "use_en": {
           "type": "string"
          },
          "use_vi": {
           "type": "string"
          },
          "may_drive_new_classes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "exchange_to": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "exchange_note_en": {
           "type": "string"
          },
          "exchange_note_vi": {
           "type": "string"
          },
          "exchange_required": {
           "type": "boolean"
          },
          "exchange_note": {
           "type": "string"
          },
          "legal_ref": {
           "type": "string"
          },
          "validity": {
           "type": "object",
           "properties": {
            "as_of": {
             "type": "string"
            },
            "expires": {
             "type": "string"
            },
            "expired": {
             "type": "boolean"
            },
            "days_overdue": {
             "type": "number"
            },
            "days_left": {
             "type": "number"
            },
            "retest_if_renewed_now": {
             "type": "string"
            },
            "retest_en": {
             "type": "string"
            },
            "retest_vi": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "check": {
           "type": "object",
           "properties": {
            "vehicle": {
             "type": "string"
            },
            "required_class": {
             "type": "string"
            },
            "allowed": {
             "type": "boolean"
            },
            "reasoning": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "expired": {
             "type": "boolean"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "class": "B2",
         "system": "old (issued before 1/1/2025)",
         "use_en": "Cars up to 8 seats; trucks and tractors under 3,500 kg (professional drivers)",
         "use_vi": "Ô tô chở người đến 08 chỗ; ô tô tải, máy kéo dưới 3.500 kg (người hành nghề lái xe)",
         "may_drive_new_classes": [
          "B"
         ],
         "exchange_to": [
          "B",
          "C1"
         ],
         "exchange_note_en": "Plus a special-purpose machinery certificate for tractors up to 3,500 kg",
         "exchange_note_vi": "Kèm chứng chỉ điều khiển xe máy chuyên dùng cho máy kéo đến 3.500 kg",
         "exchange_required": false,
         "exchange_note": "Exchange is optional: an old licence keeps being used until its printed expiry (Điều 89 khoản 1, 2).",
         "legal_ref": "Điều 89 khoản 2 điểm g, khoản 3 điểm e",
         "validity": {
          "as_of": "2026-11-11",
          "expires": "2026-05-10",
          "expired": true,
          "days_overdue": 185,
          "days_left": 0,
          "retest_if_renewed_now": "theory",
          "retest_en": "Re-take the theory test (expired 30 days to under 1 year)",
          "retest_vi": "Sát hạch lại lý thuyết (quá hạn từ 30 ngày đến dưới 1 năm)",
          "basis": "Old rules: 10 years from issue (TT 12/2017/TT-BGTVT Điều 17)",
          "note": "Licences issued before 1/1/2025 stay valid until the date printed on them (Điều 89 khoản 1); the printed date prevails over this estimate."
         },
         "check": {
          "vehicle": "truck",
          "required_class": "C1",
          "allowed": false,
          "reasoning": [
           "Gross vehicle weight 5,000 kg → C1"
          ],
          "expired": true
         },
         "legal": [
          {
           "ref": "Luật Trật tự, an toàn giao thông đường bộ số 36/2024/QH15, Điều 57, 59, 89",
           "effective_from": "2025-01-01",
           "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=210986"
          }
         ],
         "disclaimer": "Reference only, not legal advice; check the official text and the licensing authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và cơ quan cấp GPLX.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Driving Licence Classes",
    "description": "Rules of the Law on Road Traffic Order and Safety 36/2024/QH15 (in force 1/1/2025): Article 57 (classes A1, A, B1, B, C1, C, D1, D2, D, BE, C1E, CE, D1E, D2E, DE and their validity), Article 59 (minimum age 18 / 21 / 24 / 27, age limit 57 men / 55 women for buses over 29 seats) and Article 89 (licences issued before 2025: continued use and exchange — A1 → A restricted under 175 cm³, B1 / B2 → B or C1, D → D2, E → D, FC → CE…).\n\nModes: `vehicle` (`motorcycle` with `cc` / `kw`, `car` / `bus` with `seats` excluding the driver, `truck` / `special` with `gvw` design gross weight, `trailer_kg`, `tractor_unit`, `articulated_bus`, `moped`) returns the minimum class; `class` returns what it allows; `class` + `vehicle` checks if the licence covers the vehicle; `class` + `issued` (+ `birth`, `sex`) computes the expiry and what a renewal needs today: no test if expired under 30 days, theory test from 30 days to under 1 year, theory and practical tests from 1 year (Circular 108/2026/TT-BCA, in force 1/7/2026).\n\nOld classes are recognised (`old=1` for A1 / B1 / C / D issued before 2025, or an `issued` date before 2025); their printed expiry date prevails. No personal licence is looked up.\n\nDocs: https://apibox.io.vn/docs/vn-license-class/",
    "operationId": "vnLicenseClassPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-license-class/"
    },
    "parameters": [
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Licence class (new: A1…DE; old: A1, A2, A3, A4, B1, B1-AT, B2, C, D, E, FB2, FC, FD, FE).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "old",
      "in": "query",
      "required": false,
      "description": "Treat A1 / B1 / C / D as an old (pre-2025) class.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "issued",
      "in": "query",
      "required": false,
      "description": "Issue date (YYYY-MM-DD) for the expiry.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "birth",
      "in": "query",
      "required": false,
      "description": "Date of birth (age checks, old B1 expiry).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sex",
      "in": "query",
      "required": false,
      "description": "`male` / `female` (age limits).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`moped`, `motorcycle`, `tricycle`, `car`, `bus`, `sleeper_bus`, `truck`, `special`, `tractor_unit`, `articulated_bus`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cc",
      "in": "query",
      "required": false,
      "description": "Engine capacity, cm³ (motorcycles).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "kw",
      "in": "query",
      "required": false,
      "description": "Electric motor power, kW.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Passenger seats, not counting the driver.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gvw",
      "in": "query",
      "required": false,
      "description": "Design gross vehicle weight, kg.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "trailer_kg",
      "in": "query",
      "required": false,
      "description": "Trailer design gross weight, kg.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "class": {
           "type": "string"
          },
          "system": {
           "type": "string"
          },
          "use_en": {
           "type": "string"
          },
          "use_vi": {
           "type": "string"
          },
          "may_drive_new_classes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "exchange_to": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "exchange_note_en": {
           "type": "string"
          },
          "exchange_note_vi": {
           "type": "string"
          },
          "exchange_required": {
           "type": "boolean"
          },
          "exchange_note": {
           "type": "string"
          },
          "legal_ref": {
           "type": "string"
          },
          "validity": {
           "type": "object",
           "properties": {
            "as_of": {
             "type": "string"
            },
            "expires": {
             "type": "string"
            },
            "expired": {
             "type": "boolean"
            },
            "days_overdue": {
             "type": "number"
            },
            "days_left": {
             "type": "number"
            },
            "retest_if_renewed_now": {
             "type": "string"
            },
            "retest_en": {
             "type": "string"
            },
            "retest_vi": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "check": {
           "type": "object",
           "properties": {
            "vehicle": {
             "type": "string"
            },
            "required_class": {
             "type": "string"
            },
            "allowed": {
             "type": "boolean"
            },
            "reasoning": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "expired": {
             "type": "boolean"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-vaccine-schedule": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Child Vaccination Schedule",
    "description": "From `birth` (and doses already `given`), computes every dose of the Expanded Programme on Immunization: hepatitis B birth dose, BCG, the pentavalent DTP-HepB-Hib vaccine at 2-3-4 months, oral polio, rotavirus (2 doses, the second before 6 months), pneumococcal (2 months + 2 months, pilot provinces), IPV at 5 and 9 months, measles at 9 months, Japanese encephalitis (1 year, +1–2 weeks, +1 year), DTP booster and MR at 18 months, Td at 7 years and HPV for girls (2026 pilot). The 13 mandatory diseases are those of Circular 13/2026/TT-BYT (from 1/7/2026); ages, minimum intervals (one month = 28 days) and catch-up rules come from the annex of Circular 52/2025/TT-BYT, to which the Department of Disease Prevention guidance still refers.\n\nEach dose has a status (`done`, `due`, `overdue`, `upcoming`, `missed_window` when the latest age has passed, `not_needed`), the recommended date, the earliest allowed date and the latest age where one applies; `next_visit` groups doses due on the same day. Common paid vaccines (influenza, varicella, hepatitis A, MMR, meningococcal) are listed with their minimum age only. `format=ics` returns a calendar with a reminder the day before each pending dose.\n\nReference only: the health station sets the actual appointments.\n\nDocs: https://apibox.io.vn/docs/vn-vaccine-schedule/",
    "operationId": "vnVaccineScheduleGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vaccine-schedule/"
    },
    "parameters": [
     {
      "name": "birth",
      "in": "query",
      "required": true,
      "description": "Date of birth (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      },
      "example": "2026-09-01"
     },
     {
      "name": "given",
      "in": "query",
      "required": false,
      "description": "Doses already given: `{\"dtp_hepb_hib\": [\"2026-11-02\"], \"bcg\": [\"2026-09-03\"]}` (keys: hepb_birth, bcg, dtp_hepb_hib, opv, rota, pcv, ipv, measles, je, dtp_booster, mr, td, hpv).",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "sex",
      "in": "query",
      "required": false,
      "description": "`female` adds HPV.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pcv",
      "in": "query",
      "required": false,
      "description": "Include pneumococcal (pilot provinces).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`ics` for a calendar of pending doses.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "birth": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "age_months": {
           "type": "number"
          },
          "next_visit": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "vaccines": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "overdue": {
           "type": "number"
          },
          "missed_window": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "schedule": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vaccine": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "dose": {
              "type": "number"
             },
             "label_vi": {
              "type": "string"
             },
             "route": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "due_date": {
              "type": "string"
             },
             "recommended_date": {
              "type": "string"
             },
             "latest_date": {
              "type": "string"
             },
             "note": {
              "type": "string"
             }
            }
           }
          },
          "optional_vaccines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "key": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "from_months": {
              "type": "number"
             },
             "note_en": {
              "type": "string"
             },
             "note_vi": {
              "type": "string"
             },
             "earliest_date": {
              "type": "string"
             },
             "programme": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "birth": "2026-09-01",
         "as_of": "2026-11-11",
         "age_months": 2,
         "next_visit": {
          "date": "2026-11-11",
          "vaccines": [
           "bcg #1",
           "dtp_hepb_hib #1",
           "opv #1",
           "rota #1"
          ]
         },
         "overdue": 5,
         "missed_window": [
          "hepb_birth #1"
         ],
         "schedule": [
          {
           "vaccine": "bcg",
           "name_vi": "Lao (BCG)",
           "name_en": "Tuberculosis (BCG)",
           "dose": 1,
           "label_vi": "Một lần",
           "route": "injection",
           "status": "overdue",
           "due_date": "2026-11-11",
           "recommended_date": "2026-09-01",
           "latest_date": "2027-09-01",
           "note": "Within 1 month of birth; if missed, once as soon as possible before 12 months of age."
          },
          {
           "vaccine": "dtp_hepb_hib",
           "name_vi": "Bạch hầu - Ho gà - Uốn ván - Viêm gan B - Hib (vắc xin phối hợp 5 trong 1)",
           "name_en": "DTP-HepB-Hib (pentavalent)",
           "dose": 1,
           "label_vi": "Lần 1",
           "route": "injection",
           "status": "overdue",
           "due_date": "2026-11-11",
           "recommended_date": "2026-11-01"
          },
          {
           "vaccine": "opv",
           "name_vi": "Bại liệt uống (OPV)",
           "name_en": "Oral polio (OPV)",
           "dose": 1,
           "label_vi": "Uống lần 1",
           "route": "oral",
           "status": "overdue",
           "due_date": "2026-11-11",
           "recommended_date": "2026-11-01"
          },
          {
           "vaccine": "rota",
           "name_vi": "Tiêu chảy do vi rút Rota (uống)",
           "name_en": "Rotavirus (oral)",
           "dose": 1,
           "label_vi": "Uống lần 1",
           "route": "oral",
           "status": "overdue",
           "due_date": "2026-11-11",
           "recommended_date": "2026-11-01",
           "latest_date": "2027-02-28",
           "note": "Dose 2 at least 1 month after dose 1 and before 6 months of age."
          }
         ],
         "optional_vaccines": [
          {
           "key": "influenza",
           "vi": "Cúm mùa",
           "en": "Seasonal influenza",
           "from_months": 6,
           "note_en": "Every year; children under 9 years vaccinated for the first time need 2 doses at least 4 weeks apart (WHO).",
           "note_vi": "Tiêm hằng năm; trẻ dưới 9 tuổi tiêm lần đầu cần 2 liều cách nhau ít nhất 4 tuần (WHO).",
           "earliest_date": "2027-03-01",
           "programme": "paid (dịch vụ)"
          },
          {
           "key": "varicella",
           "vi": "Thuỷ đậu",
           "en": "Varicella",
           "from_months": 12,
           "note_en": "1–2 doses depending on the product.",
           "note_vi": "1–2 liều tuỳ loại vắc xin.",
           "earliest_date": "2027-09-01",
           "programme": "paid (dịch vụ)"
          },
          {
           "key": "hepa",
           "vi": "Viêm gan A",
           "en": "Hepatitis A",
           "from_months": 12,
           "note_en": "2 doses 6–12 months apart for most products.",
           "note_vi": "Đa số vắc xin: 2 liều cách nhau 6–12 tháng.",
           "earliest_date": "2027-09-01",
           "programme": "paid (dịch vụ)"
          },
          {
           "key": "mmr",
           "vi": "Sởi - Quai bị - Rubella (MMR)",
           "en": "MMR",
           "from_months": 9,
           "note_en": "Paid alternative / complement to the EPI measles and MR doses; check the leaflet.",
           "note_vi": "Vắc xin dịch vụ thay thế / bổ sung cho mũi sởi, MR của TCMR; xem tờ hướng dẫn.",
           "earliest_date": "2027-06-01",
           "programme": "paid (dịch vụ)"
          }
         ],
         "notes": [
          "Doses due on the same day can be given in one visit (pentavalent + OPV + Rota + PCV at 2 months, etc.), as the health station schedules.",
          "Pregnant women: tetanus (uốn ván) vaccination follows the separate schedule of the programme.",
          "One month between doses = at least 28 days."
         ],
         "legal": [
          {
           "ref": "Thông tư 13/2026/TT-BYT quy định về hoạt động tiêm chủng, Điều 3 (13 bệnh tiêm chủng bắt buộc), Điều 5–6",
           "effective_from": "2026-07-01"
          }
         ],
         "disclaimer": "Reference only, not medical advice; the health worker decides. Check the official text.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn y khoa; quyết định thuộc về nhân viên y tế. Hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Child Vaccination Schedule",
    "description": "From `birth` (and doses already `given`), computes every dose of the Expanded Programme on Immunization: hepatitis B birth dose, BCG, the pentavalent DTP-HepB-Hib vaccine at 2-3-4 months, oral polio, rotavirus (2 doses, the second before 6 months), pneumococcal (2 months + 2 months, pilot provinces), IPV at 5 and 9 months, measles at 9 months, Japanese encephalitis (1 year, +1–2 weeks, +1 year), DTP booster and MR at 18 months, Td at 7 years and HPV for girls (2026 pilot). The 13 mandatory diseases are those of Circular 13/2026/TT-BYT (from 1/7/2026); ages, minimum intervals (one month = 28 days) and catch-up rules come from the annex of Circular 52/2025/TT-BYT, to which the Department of Disease Prevention guidance still refers.\n\nEach dose has a status (`done`, `due`, `overdue`, `upcoming`, `missed_window` when the latest age has passed, `not_needed`), the recommended date, the earliest allowed date and the latest age where one applies; `next_visit` groups doses due on the same day. Common paid vaccines (influenza, varicella, hepatitis A, MMR, meningococcal) are listed with their minimum age only. `format=ics` returns a calendar with a reminder the day before each pending dose.\n\nReference only: the health station sets the actual appointments.\n\nDocs: https://apibox.io.vn/docs/vn-vaccine-schedule/",
    "operationId": "vnVaccineSchedulePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-vaccine-schedule/"
    },
    "parameters": [
     {
      "name": "birth",
      "in": "query",
      "required": false,
      "description": "Date of birth (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sex",
      "in": "query",
      "required": false,
      "description": "`female` adds HPV.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pcv",
      "in": "query",
      "required": false,
      "description": "Include pneumococcal (pilot provinces).",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`ics` for a calendar of pending doses.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "given": {
          "type": "object",
          "description": "Doses already given: `{\"dtp_hepb_hib\": [\"2026-11-02\"], \"bcg\": [\"2026-09-03\"]}` (keys: hepb_birth, bcg, dtp_hepb_hib, opv, rota, pcv, ipv, measles, je, dtp_booster, mr, td, hpv)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "birth": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "age_months": {
           "type": "number"
          },
          "next_visit": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "vaccines": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "overdue": {
           "type": "number"
          },
          "missed_window": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "schedule": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vaccine": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "dose": {
              "type": "number"
             },
             "label_vi": {
              "type": "string"
             },
             "route": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "due_date": {
              "type": "string"
             },
             "recommended_date": {
              "type": "string"
             },
             "latest_date": {
              "type": "string"
             },
             "note": {
              "type": "string"
             }
            }
           }
          },
          "optional_vaccines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "key": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "from_months": {
              "type": "number"
             },
             "note_en": {
              "type": "string"
             },
             "note_vi": {
              "type": "string"
             },
             "earliest_date": {
              "type": "string"
             },
             "programme": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-eprescription": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "E-prescription Check & PDF",
    "description": "Send the prescription as JSON: `facility` (name, address, phone, 5-character `code`), `prescriber`, `patient` (name, personal ID, birth date, sex, address, weight and caregiver for children under 72 months), `diagnosis` (text + ICD-10, checked against the Ministry of Health list) and `drugs` (`inn`, optional `brand`, `strength`, `unit`, `dose` per use, `times_per_day`, `days`, `route`, `timing`, optional `quantity` and `class`).\n\nThe validator applies Circular 26/2025/TT-BYT (in force 1/7/2025): required fields (birth date and sex may be omitted with a 12-digit personal ID), single-ingredient drugs written by INN (optionally \"INN (brand)\"), quantity = dose × times × days with a leading 0 under 10 and in words for narcotics, at most 30 days per drug (90 for chronic diseases of Annex VII with `chronic=true`), narcotic \"N\" prescriptions 7 days for acute disease or 3 periods of up to 10 days for cancer pain, psychotropic / precursor \"H\" prescriptions 10 or 30 days, poisons first, the 5-day collection window, and the e-prescription code format `xxxxxyyyyyyy-z` (5-character facility code, 7 random characters, type N / H / C) — a code is generated from `facility.code` when none is sent.\n\nErrors and warnings cite the article. `format=pdf` renders an A5 prescription in the form of Annex I / II / III with a QR code of the prescription code (Be Vietnam Pro font). Nothing is stored and nothing is sent to the national prescription system; the drug class hint covers only common active ingredients, so send `class` from Circular 20/2017.\n\nDocs: https://apibox.io.vn/docs/vn-eprescription/",
    "operationId": "vnEprescriptionPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-eprescription/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "facility": {
          "type": "object",
          "description": "Facility: name, address, phone, code (5 characters)."
         },
         "prescriber": {
          "type": "object",
          "description": "Prescriber: name, title (bác sỹ / y sỹ)."
         },
         "patient": {
          "type": "object",
          "description": "Patient: name, id_number, birth, sex, address, insurance_number, phone, weight_kg and caregiver (under 72 months)."
         },
         "diagnosis": {
          "type": "array",
          "items": {},
          "description": "Diagnoses: text or `{text, icd10}`."
         },
         "drugs": {
          "type": "array",
          "items": {},
          "description": "Drugs: inn, brand, strength, unit, dose, times_per_day, days, route, timing, quantity, class (N / H), poison, multi_ingredient."
         },
         "date": {
          "type": "string",
          "description": "Prescription date (default today)."
         },
         "code": {
          "type": "string",
          "description": "Existing e-prescription code to validate."
         },
         "chronic": {
          "type": "boolean",
          "description": "Disease of Annex VII (up to 90 days)."
         },
         "cancer_pain": {
          "type": "boolean",
          "description": "Narcotics for cancer pain (with 3 `periods`)."
         },
         "long_term": {
          "type": "boolean",
          "description": "Psychotropics for long-term treatment (30 days)."
         },
         "advice": {
          "type": "string",
          "description": "Advice printed on the PDF."
         },
         "format": {
          "type": "string",
          "description": "`pdf` to render (rejects prescriptions with errors unless `force=true`)."
         }
        },
        "required": [
         "facility",
         "prescriber",
         "patient",
         "diagnosis",
         "drugs"
        ]
       },
       "example": {
        "facility": {
         "name": "Phòng khám Đa khoa An Bình",
         "address": "12 Lê Lợi, Phường Sài Gòn, TP. Hồ Chí Minh",
         "phone": "028 3822 0000",
         "code": "79123"
        },
        "prescriber": {
         "name": "BS. Nguyễn Văn An",
         "title": "Bác sỹ"
        },
        "patient": {
         "name": "Trần Thị Bình",
         "id_number": "079190000001",
         "address": "Phường Bến Thành, TP. Hồ Chí Minh"
        },
        "diagnosis": [
         {
          "text": "Viêm họng cấp",
          "icd10": "J02.9"
         }
        ],
        "date": "2026-11-11",
        "drugs": [
         {
          "inn": "paracetamol",
          "strength": "500mg",
          "unit": "viên",
          "dose": 1,
          "times_per_day": 3,
          "days": 5,
          "route": "uống",
          "timing": "sau ăn"
         },
         {
          "inn": "amoxicillin",
          "brand": "Augmentin",
          "strength": "500mg",
          "unit": "viên",
          "dose": 1,
          "times_per_day": 2,
          "days": 7,
          "route": "uống",
          "timing": "sau ăn sáng, tối"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "prescription_type": {
           "type": "string"
          },
          "prescription_type_vi": {
           "type": "string"
          },
          "form": {
           "type": "string"
          },
          "code": {
           "type": "string"
          },
          "code_generated": {
           "type": "boolean"
          },
          "date": {
           "type": "string"
          },
          "collect_by": {
           "type": "string"
          },
          "collect_note": {
           "type": "string"
          },
          "drugs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "n": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "strength": {
              "type": "string"
             },
             "form": {},
             "class": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "quantity_text": {
              "type": "string"
             },
             "usage_vi": {
              "type": "string"
             }
            }
           }
          },
          "icd10": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "name_vi": {
              "type": "string"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": true,
         "errors": [],
         "warnings": [],
         "prescription_type": "C",
         "prescription_type_vi": "Đơn thuốc thường",
         "form": "Phụ lục I",
         "code": "79123k4m2x9p-C",
         "code_generated": true,
         "date": "2026-11-11",
         "collect_by": "2026-11-16",
         "collect_note": "The patient collects / buys the drugs within 5 days of the prescription date (Điều 12 khoản 9 điểm b).",
         "drugs": [
          {
           "n": 1,
           "name": "paracetamol",
           "strength": "500mg",
           "form": null,
           "class": "C",
           "quantity": 15,
           "unit": "viên",
           "quantity_text": "15",
           "usage_vi": "uống mỗi lần 01 viên, ngày 03 lần, sau ăn — 05 ngày"
          },
          {
           "n": 2,
           "name": "amoxicillin (Augmentin)",
           "strength": "500mg",
           "form": null,
           "class": "C",
           "quantity": 14,
           "unit": "viên",
           "quantity_text": "14",
           "usage_vi": "uống mỗi lần 01 viên, ngày 02 lần, sau ăn sáng, tối — 07 ngày"
          }
         ],
         "icd10": [
          {
           "code": "J02.9",
           "valid": true,
           "name_vi": "Viêm họng cấp tính, không xác định"
          }
         ],
         "legal": [
          {
           "ref": "Thông tư 26/2025/TT-BYT quy định về đơn thuốc và việc kê đơn thuốc hóa dược, sinh phẩm trong điều trị ngoại trú (Điều 2, 6–10, 12; Phụ lục I–III)",
           "effective_from": "2025-07-01"
          }
         ],
         "disclaimer": "Reference only, not medical advice; the health worker decides. Check the official text.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn y khoa; quyết định thuộc về nhân viên y tế. Hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-school-calendar": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "School Year Calendar",
    "description": "Combines the national framework of Decision 2308/QĐ-BGDĐT (6/8/2026, from 2026–2027 on: opening ceremony on 5/9, pupils back at most 1 week before — 2 weeks for grades 1, 9 and 12 —, semester I ends before 18/1, the year ends before 31/5, 35 weeks, THPT graduation exam on 11–12/6) with the provincial school-year decisions published so far: back-to-school dates per level and for the early grades, semester dates and the Tết holiday for pupils where set.\n\n`province` + `level` (`preschool`, `primary`, `lower_secondary`, `upper_secondary`) returns the dates, the decision and its source, and a `status`: `official`, `partial` (some dates such as Tết not published yet) or `framework_only`. `date=` answers whether pupils go to school that day (school year, Tết holiday, public holidays of the Labour Code, Sundays; Saturdays depend on the school). `format=ics` exports the milestones as a calendar. Without `province` the list of 34 provinces with their status is returned; `coverage` counts the provinces entered.\n\nProvinces publish their decisions in August and the Tết dates between November and January; the table is reviewed monthly during the school year.\n\nDocs: https://apibox.io.vn/docs/vn-school-calendar/",
    "operationId": "vnSchoolCalendarGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-school-calendar/"
    },
    "parameters": [
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province name or code (34 provinces); empty = list all.",
      "schema": {
       "type": "string"
      },
      "example": "Cần Thơ"
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "`preschool`, `primary`, `lower_secondary`, `upper_secondary`.",
      "schema": {
       "type": "string",
       "default": "primary"
      },
      "example": "upper_secondary"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "School year (2026-2027 … 2030-2031; provincial dates for 2026-2027).",
      "schema": {
       "type": "string",
       "default": "2026-2027"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Check whether pupils go to school that day.",
      "schema": {
       "type": "string"
      },
      "example": "2027-02-05"
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`ics` to download the milestones.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "school_year": {
           "type": "string"
          },
          "framework": {
           "type": "object",
           "properties": {
            "decision": {
             "type": "string"
            },
            "opening": {
             "type": "string"
            },
            "back_earliest": {
             "type": "string"
            },
            "back_earliest_grades_1_9_12": {
             "type": "string"
            },
            "hk1_end_before": {
             "type": "string"
            },
            "year_end_before": {
             "type": "string"
            },
            "completion_recognition_before": {
             "type": "string"
            },
            "admissions_done_before": {
             "type": "string"
            },
            "thpt_exam": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "weeks": {
             "type": "object",
             "properties": {
              "total": {
               "type": "number"
              },
              "hk1": {
               "type": "number"
              },
              "hk2": {
               "type": "number"
              }
             }
            }
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "provinces_with_decision": {
             "type": "number"
            },
            "provinces_with_tet_dates": {
             "type": "number"
            },
            "total_provinces": {
             "type": "number"
            },
            "school_year": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "province": {
           "type": "string"
          },
          "province_code": {
           "type": "string"
          },
          "level": {
           "type": "string"
          },
          "level_vi": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "decision": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "dates": {
           "type": "object",
           "properties": {
            "back_to_school": {
             "type": "string"
            },
            "back_to_school_early_grades": {
             "type": "string"
            },
            "early_grades": {
             "type": "string"
            },
            "opening": {
             "type": "string"
            },
            "hk1_start": {
             "type": "string"
            },
            "hk1_end_before": {
             "type": "string"
            },
            "hk2_start": {
             "type": "string"
            },
            "hk2_end_before": {
             "type": "string"
            },
            "year_end_before": {
             "type": "string"
            }
           }
          },
          "tet_holiday": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "days": {
             "type": "number"
            }
           }
          },
          "check": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "school_day": {
             "type": "boolean"
            },
            "reason": {
             "type": "string"
            },
            "holiday": {
             "type": "object",
             "properties": {
              "key": {
               "type": "string"
              },
              "name_vi": {
               "type": "string"
              },
              "name_en": {
               "type": "string"
              },
              "source": {
               "type": "string"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "school_year": "2026-2027",
         "framework": {
          "decision": "QĐ 2308/QĐ-BGDĐT (06/8/2026)",
          "opening": "2026-09-05",
          "back_earliest": "2026-08-29",
          "back_earliest_grades_1_9_12": "2026-08-22",
          "hk1_end_before": "2027-01-18",
          "year_end_before": "2027-05-31",
          "completion_recognition_before": "2027-06-30",
          "admissions_done_before": "2027-07-31",
          "thpt_exam": [
           "2027-06-11",
           "2027-06-12"
          ],
          "weeks": {
           "total": 35,
           "hk1": 18,
           "hk2": 17
          }
         },
         "coverage": {
          "provinces_with_decision": 5,
          "provinces_with_tet_dates": 2,
          "total_provinces": 34,
          "school_year": "2026-2027"
         },
         "legal": [
          {
           "ref": "Quyết định 2308/QĐ-BGDĐT ngày 06/8/2026 ban hành Khung kế hoạch thời gian năm học (áp dụng từ năm học 2026–2027)",
           "effective_from": "2026-08-06"
          }
         ],
         "reviewed": "2026-11-11",
         "disclaimer": "Reference only; each school publishes its own timetable. Check the provincial Department of Education.",
         "disclaimer_vi": "Thông tin tham khảo; lịch cụ thể do Sở GD&ĐT và nhà trường công bố.",
         "province": "Thành phố Cần Thơ",
         "province_code": "92",
         "level": "upper_secondary",
         "level_vi": "Trung học phổ thông",
         "status": "official",
         "decision": "Quyết định 4103/QĐ-UBND (8/2026) — Cần Thơ",
         "source": "https://thsp.ctu.edu.vn/images/upload/DOANTHANHNIEN/Quyt-nh-4103-K-hoch-thi-gian-nm-hc-2026-2027-thnh-ph-Cn-Th.pdf",
         "dates": {
          "back_to_school": "2026-08-29",
          "back_to_school_early_grades": "2026-08-22",
          "early_grades": "lớp 12",
          "opening": "2026-09-05",
          "hk1_start": "2026-09-07",
          "hk1_end_before": "2027-01-17",
          "hk2_start": "2027-01-18",
          "hk2_end_before": "2027-05-31",
          "year_end_before": "2027-05-31"
         },
         "tet_holiday": {
          "from": "2027-02-01",
          "to": "2027-02-10",
          "days": 10
         },
         "check": {
          "date": "2027-02-05",
          "school_day": false,
          "reason": "Tết holiday for pupils.",
          "holiday": {
           "key": "tet",
           "name_vi": "Tết Nguyên đán",
           "name_en": "Lunar New Year (Tết)",
           "source": "estimated"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-report-comments": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Report Card Comments",
    "description": "Send a class as `students` (array) or `csv` (header `name` / `họ tên`, then one column per subject; optional `strengths`, `improve` columns). Primary (`level=primary`, Circular 27/2020 as amended by 10/2025) takes T / H / C (Hoàn thành tốt / Hoàn thành / Chưa hoàn thành) or periodic test scores, plus the five qualities (`yeu_nuoc`, `nhan_ai`, `cham_chi`, `trung_thuc`, `trach_nhiem`) and general competencies (`tu_chu`, `giao_tiep`, `giai_quyet`) rated T / Đ / C. Secondary (`level=secondary`, Circular 22/2021) takes scores 0–10 or Tốt / Khá / Đạt / Chưa đạt and Đạt / Chưa đạt subjects, and also returns the learning result per Article 9 (Tốt / Khá / Đạt / Chưa đạt) when at least 6 scored subjects are given.\n\nEach subject comment combines an opening matched to the level, a subject-specific skill (about 20 subjects: Toán, Tiếng Việt, Ngữ văn, Tiếng Anh, Khoa học, KHTN, Lịch sử và Địa lí, Tin học, Công nghệ, Âm nhạc, Mĩ thuật, GDTC, HĐTN…), an optional strength (`careful`, `creative`, `participation`, `focus`, `homework`, `handwriting`, `teamwork`, `reading`, `presentation`, `punctual`, `progress`, `helpful`) and advice. Sentences come from a phrase bank written for APIBox and are rotated so that pupils in one class do not get the same text; `seed` makes the result reproducible; `max_length` trims to the cell size of the digital school record; `address` adds \"Em\" / \"Con\" / the first name.\n\n`format=csv` returns a spreadsheet ready to paste (UTF-8 with BOM). No AI model is used and nothing is stored; teachers should read and adjust each comment.\n\nDocs: https://apibox.io.vn/docs/vn-report-comments/",
    "operationId": "vnReportCommentsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-report-comments/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "level": {
          "type": "string",
          "default": "primary",
          "description": "`primary` (TT 27/2020) or `secondary` (TT 22/2021)."
         },
         "students": {
          "type": "array",
          "items": {},
          "description": "Pupils: `{name, subjects: {\"Toán\": 8.5}, strengths, improve, qualities, competencies}` or `{name, score|level}` with `subject`."
         },
         "csv": {
          "type": "string",
          "description": "CSV / TSV with a name column and one column per subject."
         },
         "subject": {
          "type": "string",
          "description": "Subject when each pupil has only score / level."
         },
         "address": {
          "type": "string",
          "default": "none",
          "description": "`none`, `em`, `con` or `name`."
         },
         "max_length": {
          "type": "number",
          "default": 300,
          "description": "Maximum characters per comment (60–1000)."
         },
         "seed": {
          "type": "string",
          "description": "Seed for reproducible variation."
         },
         "format": {
          "type": "string",
          "description": "`csv` for a spreadsheet."
         }
        }
       },
       "example": {
        "level": "primary",
        "subject": "Toán",
        "students": [
         {
          "name": "Nguyễn An",
          "level": "T",
          "strengths": "careful"
         },
         {
          "name": "Lê Bình",
          "level": "H",
          "improve": "focus"
         },
         {
          "name": "Trần Chi",
          "score": 4.5,
          "qualities": {
           "cham_chi": "Đ",
           "trach_nhiem": "T"
          }
         }
        ],
        "seed": "lop-3a"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "level": {
           "type": "string"
          },
          "scale": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "max_length": {
           "type": "number"
          },
          "students": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "subjects": {
              "type": "array"
             },
             "general": {
              "type": "string"
             },
             "qualities_competencies": {
              "type": "string"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "level": "primary",
         "scale": "TT 27/2020/TT-BGDĐT: T / H / C (subjects), T / Đ / C (qualities, competencies)",
         "count": 3,
         "max_length": 300,
         "students": [
          {
           "name": "Nguyễn An",
           "subjects": [
            {
             "subject": "Toán",
             "level": "T",
             "comment": "Có tiến bộ rõ, kết quả học tập tốt, biết vận dụng công thức linh hoạt, làm bài cẩn thận. Cố gắng phát huy để đạt kết quả cao hơn."
            }
           ],
           "general": "Chăm ngoan, học tập tiến bộ."
          },
          {
           "name": "Lê Bình",
           "subjects": [
            {
             "subject": "Toán",
             "level": "H",
             "comment": "Tiếp thu bài tương đối tốt, tính toán nhanh, chính xác. Cần rèn thêm cách trình bày bài giải. Cần tập trung hơn trong giờ học."
            }
           ],
           "general": "Có ý thức học tập, cần đều tay hơn giữa các môn."
          },
          {
           "name": "Trần Chi",
           "subjects": [
            {
             "subject": "Toán",
             "score": 4.5,
             "level": "C",
             "comment": "Kết quả học tập chưa đạt yêu cầu. Cần rèn thêm việc ghi nhớ công thức, quy tắc tính. Cần được giáo viên và gia đình kèm cặp thêm."
            }
           ],
           "qualities_competencies": "Chăm học, chuẩn bị bài đầy đủ; có trách nhiệm với bản thân và tập thể, giữ gìn đồ dùng cẩn thận.",
           "general": "Cần sự quan tâm, kèm cặp của gia đình và thầy cô."
          }
         ],
         "legal": [
          {
           "ref": "Thông tư 27/2020/TT-BGDĐT đánh giá học sinh tiểu học (sửa đổi bởi Thông tư 10/2025/TT-BGDĐT)",
           "effective_from": "2020-10-20"
          }
         ],
         "note": "Sentences come from an APIBox phrase bank and are varied inside the class; the teacher reviews and edits before recording them.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-toll-fees": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Expressway Toll Calculator",
    "description": "Decree 130/2024/ND-CP sets the road-use fee on expressways owned and operated by the State: the actual distance × a rate per vehicle group. Groups (Article 5): 1 = under 12 seats, trucks under 2 t, public buses; 2 = 12–30 seats, trucks 2 to under 4 t; 3 = 31+ seats, trucks 4 to under 10 t, tractor units alone; 4 = trucks 10 to under 18 t, containers under 40 ft; 5 = trucks 18 t or more, containers 40 ft or more. \"Payload\" is the permitted cargo mass on the inspection certificate; a tractor with a semi-trailer pays by the towed unit. Rates (đồng/km): Level 1 1,300 / 1,950 / 2,600 / 3,250 / 5,200; Level 2 (sections without full expressway standards) 900 / 1,350 / 1,800 / 2,250 / 3,600.\n\nSend `vehicle` (`car`, `bus`, `public_bus`, `truck`, `special`, `semi_trailer`, `tractor_unit`, `container`) with `seats`, `payload_t` or `container_ft` — or `group` — and either `section` / `sections` (ids listed in `coverage`: the North–South sections charged since 2/3, 15/7 and 15/8/2026), `from_km` + `to_km` (chainage, Bãi Vọt – Cam Lộ corridor) for an entry/exit trip, or `km` + `rate_level` for any other distance-based State expressway. The response lists each leg (km, rate, fee), the total, the ETC-only payment rule and the 10 exempt vehicle categories of Article 6.\n\n`coverage` marks lengths that come from announcements rather than published fares (`length_verified: false`). BOT toll stations and VEC expressways use per-contract tariffs and are not included; no monthly or quarterly passes exist for these per-km fees.\n\nDocs: https://apibox.io.vn/docs/vn-toll-fees/",
    "operationId": "vnTollFeesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-toll-fees/"
    },
    "parameters": [
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`car`, `bus`, `public_bus`, `truck`, `special`, `semi_trailer`, `tractor_unit`, `container`.",
      "schema": {
       "type": "string"
      },
      "example": "truck"
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Permitted number of people (cars, buses).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "payload_t",
      "in": "query",
      "required": false,
      "description": "Permitted payload, tonnes (trucks; towed unit for semi-trailers).",
      "schema": {
       "type": "number"
      },
      "example": 15
     },
     {
      "name": "container_ft",
      "in": "query",
      "required": false,
      "description": "Container size, feet.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Vehicle group 1–5 instead of vehicle.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sections",
      "in": "query",
      "required": false,
      "description": "Comma list of section ids (see coverage); `section` for one, with optional `km` for part of it.",
      "schema": {
       "type": "string"
      },
      "example": "mai-son-ql45,ql45-nghi-son,nghi-son-dien-chau"
     },
     {
      "name": "from_km",
      "in": "query",
      "required": false,
      "description": "Entry chainage (km) with `to_km` — Bãi Vọt – Cam Lộ corridor.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "km",
      "in": "query",
      "required": false,
      "description": "Custom distance (with `rate_level` 1 / 2 or `rate_per_km`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Trip date (sections not yet charged cost 0).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-11"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle_group": {
           "type": "number"
          },
          "group_vi": {
           "type": "string"
          },
          "reasoning": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "legs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "section": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "km": {
              "type": "number"
             },
             "rate_per_km": {
              "type": "number"
             },
             "fee": {
              "type": "number"
             },
             "level": {
              "type": "number"
             },
             "charging_since": {
              "type": "string"
             },
             "length_verified": {
              "type": "boolean"
             }
            }
           }
          },
          "total_km": {
           "type": "number"
          },
          "total_fee": {
           "type": "number"
          },
          "currency": {
           "type": "string"
          },
          "payment": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "sections": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "count": {
             "type": "number"
            },
            "not_included": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "passes": {
             "type": "string"
            }
           }
          },
          "exempt_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "vehicle_group": 4,
         "group_vi": "Xe tải có tải trọng từ 10 tấn đến dưới 18 tấn; xe chở hàng bằng container dưới 40 feet",
         "reasoning": "Payload 15 t → group 4",
         "as_of": "2026-11-11",
         "legs": [
          {
           "section": "mai-son-ql45",
           "name": "Mai Sơn – Quốc lộ 45",
           "km": 61.01,
           "rate_per_km": 2250,
           "fee": 137273,
           "level": 2,
           "charging_since": "2026-03-02",
           "length_verified": true
          },
          {
           "section": "ql45-nghi-son",
           "name": "Quốc lộ 45 – Nghi Sơn",
           "km": 45.018,
           "rate_per_km": 2250,
           "fee": 101291,
           "level": 2,
           "charging_since": "2026-03-02",
           "length_verified": true
          },
          {
           "section": "nghi-son-dien-chau",
           "name": "Nghi Sơn – Diễn Châu",
           "km": 50.45,
           "rate_per_km": 2250,
           "fee": 113513,
           "level": 2,
           "charging_since": "2026-03-02",
           "length_verified": true
          }
         ],
         "total_km": 156.478,
         "total_fee": 352077,
         "currency": "VND",
         "payment": "ETC only (no cash lanes): free-flow entry, barrier at exit; a vehicle tag and a funded non-cash account are required.",
         "coverage": {
          "sections": [
           {
            "id": "mai-son-ql45",
            "name": "Mai Sơn – Quốc lộ 45",
            "level": 2,
            "km": 61.01,
            "since": "2026-03-02",
            "length_verified": true
           },
           {
            "id": "ql45-nghi-son",
            "name": "Quốc lộ 45 – Nghi Sơn",
            "level": 2,
            "km": 45.018,
            "since": "2026-03-02",
            "length_verified": true
           },
           {
            "id": "nghi-son-dien-chau",
            "name": "Nghi Sơn – Diễn Châu",
            "level": 2,
            "km": 50.45,
            "since": "2026-03-02",
            "length_verified": true
           }
          ],
          "count": 15,
          "not_included": [
           "BOT toll stations (per-contract tariffs)",
           "VEC expressways (Cầu Giẽ–Ninh Bình, Nội Bài–Lào Cai, TP.HCM–Long Thành–Dầu Giây, Đà Nẵng–Quảng Ngãi)",
           "Cần Thơ–Cà Mau (rates not published)"
          ],
          "passes": "No monthly / quarterly passes are published for State-owned expressways (fees are per km, ETC only)."
         },
         "exempt_vi": [
          "Xe cứu thương",
          "Xe chữa cháy",
          "Xe chuyên dùng phục vụ quốc phòng (biển đỏ), xe làm nhiệm vụ khẩn cấp"
         ],
         "legal": [
          {
           "ref": "Nghị định 130/2024/NĐ-CP quy định thu phí sử dụng đường bộ cao tốc đối với phương tiện lưu thông trên tuyến đường bộ cao tốc thuộc sở hữu toàn dân do Nhà nước đại diện chủ sở hữu và trực tiếp quản lý, khai thác (Điều 5, 6, 9, Phụ lục)",
           "effective_from": "2024-10-10",
           "url": "https://vcci.com.vn/legal-document/130-2024-nd-cp"
          }
         ],
         "disclaimer": "Reference only; the toll operator's ETC charge prevails (rounding, exact chainage).",
         "disclaimer_vi": "Thông tin tham khảo; số tiền thực trừ qua ETC là căn cứ cuối cùng.",
         "reviewed": "2026-11-11"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Expressway Toll Calculator",
    "description": "Decree 130/2024/ND-CP sets the road-use fee on expressways owned and operated by the State: the actual distance × a rate per vehicle group. Groups (Article 5): 1 = under 12 seats, trucks under 2 t, public buses; 2 = 12–30 seats, trucks 2 to under 4 t; 3 = 31+ seats, trucks 4 to under 10 t, tractor units alone; 4 = trucks 10 to under 18 t, containers under 40 ft; 5 = trucks 18 t or more, containers 40 ft or more. \"Payload\" is the permitted cargo mass on the inspection certificate; a tractor with a semi-trailer pays by the towed unit. Rates (đồng/km): Level 1 1,300 / 1,950 / 2,600 / 3,250 / 5,200; Level 2 (sections without full expressway standards) 900 / 1,350 / 1,800 / 2,250 / 3,600.\n\nSend `vehicle` (`car`, `bus`, `public_bus`, `truck`, `special`, `semi_trailer`, `tractor_unit`, `container`) with `seats`, `payload_t` or `container_ft` — or `group` — and either `section` / `sections` (ids listed in `coverage`: the North–South sections charged since 2/3, 15/7 and 15/8/2026), `from_km` + `to_km` (chainage, Bãi Vọt – Cam Lộ corridor) for an entry/exit trip, or `km` + `rate_level` for any other distance-based State expressway. The response lists each leg (km, rate, fee), the total, the ETC-only payment rule and the 10 exempt vehicle categories of Article 6.\n\n`coverage` marks lengths that come from announcements rather than published fares (`length_verified: false`). BOT toll stations and VEC expressways use per-contract tariffs and are not included; no monthly or quarterly passes exist for these per-km fees.\n\nDocs: https://apibox.io.vn/docs/vn-toll-fees/",
    "operationId": "vnTollFeesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-toll-fees/"
    },
    "parameters": [
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`car`, `bus`, `public_bus`, `truck`, `special`, `semi_trailer`, `tractor_unit`, `container`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Permitted number of people (cars, buses).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "payload_t",
      "in": "query",
      "required": false,
      "description": "Permitted payload, tonnes (trucks; towed unit for semi-trailers).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "container_ft",
      "in": "query",
      "required": false,
      "description": "Container size, feet.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Vehicle group 1–5 instead of vehicle.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sections",
      "in": "query",
      "required": false,
      "description": "Comma list of section ids (see coverage); `section` for one, with optional `km` for part of it.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from_km",
      "in": "query",
      "required": false,
      "description": "Entry chainage (km) with `to_km` — Bãi Vọt – Cam Lộ corridor.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "km",
      "in": "query",
      "required": false,
      "description": "Custom distance (with `rate_level` 1 / 2 or `rate_per_km`).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Trip date (sections not yet charged cost 0).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle_group": {
           "type": "number"
          },
          "group_vi": {
           "type": "string"
          },
          "reasoning": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "legs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "section": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "km": {
              "type": "number"
             },
             "rate_per_km": {
              "type": "number"
             },
             "fee": {
              "type": "number"
             },
             "level": {
              "type": "number"
             },
             "charging_since": {
              "type": "string"
             },
             "length_verified": {
              "type": "boolean"
             }
            }
           }
          },
          "total_km": {
           "type": "number"
          },
          "total_fee": {
           "type": "number"
          },
          "currency": {
           "type": "string"
          },
          "payment": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "sections": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "count": {
             "type": "number"
            },
            "not_included": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "passes": {
             "type": "string"
            }
           }
          },
          "exempt_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/template-render": {
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Template renderer",
    "description": "Send a `template` and `data` and get the rendered text. Two engines run as interpreters (no code generation, safe on a serverless runtime): Mustache (logic-less, `{{name}}`, `{{#items}}…{{/items}}`, `{{^empty}}`, partials `{{> header}}`) and Liquid (LiquidJS: `{% if %}`, `{% for %}`, `{% assign %}`, `{% render \"part\" %}`, 40+ standard filters). `engine=auto` picks Liquid when the template uses `{% %}` tags or `| filters`.\n\nVietnamese filters work in both engines: `vnd` (1.500.000 đ), `number_vi`, `vnd_words` / `so_thanh_chu` (Một triệu năm trăm nghìn đồng), `date_vn` / `ngay_vn` (20/11/2026), `date_vn_long` / `ngay_thang_nam` (ngày 20 tháng 11 năm 2026), `remove_accents` / `bo_dau`, `upcase_vi`, `slug_vi`. In Liquid they are filters (`{{ tong | vnd }}`); in Mustache they are sections (`{{#vnd}}{{tong}}{{/vnd}}`).\n\n`output=html` escapes values for HTML; the default `text` does not. `rows` renders the template once per object (up to 1,000, for SMS / Zalo / e-mail mail-merge). `partials` holds named templates for includes — no files or URLs are ever read. `action=variables` lists the variables a template uses. Limits: 200,000-character templates, 2 MB output, about 2 seconds of rendering; data is read through own properties only.\n\nDocs: https://apibox.io.vn/docs/template-render/",
    "operationId": "templateRenderPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/template-render/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "template": {
          "type": "string",
          "description": "The template (or a text/plain body)."
         },
         "data": {
          "type": "object",
          "description": "Data for one render (JSON object)."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch: render once per object (max 1,000), returns `outputs`."
         },
         "engine": {
          "type": "string",
          "default": "auto",
          "description": "`mustache`, `liquid` or `auto`."
         },
         "partials": {
          "type": "object",
          "description": "Named templates for `{{> name}}` / `{% render \"name\" %}` (max 50)."
         },
         "output": {
          "type": "string",
          "default": "text",
          "description": "`text` (no escaping) or `html` (values HTML-escaped)."
         },
         "strict": {
          "type": "boolean",
          "default": false,
          "description": "Liquid: error on undefined variables."
         },
         "delimiters": {
          "type": "string",
          "description": "Mustache: custom tags, e.g. `<% %>`."
         },
         "action": {
          "type": "string",
          "description": "`variables`: list the variables only."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `raw` (the text itself as text/plain or text/html)."
         }
        },
        "required": [
         "template"
        ]
       },
       "example": {
        "engine": "liquid",
        "template": "Kính gửi {{ khach.ten }},\nĐơn {{ don.ma }} gồm {% for sp in don.items %}{{ sp.ten }} x{{ sp.sl }}{% unless forloop.last %}, {% endunless %}{% endfor %}.\nTổng: {{ don.tong | vnd }} ({{ don.tong | so_thanh_chu }}), hạn thanh toán {{ don.han | ngay_vn }}.",
        "data": {
         "khach": {
          "ten": "Anh Minh"
         },
         "don": {
          "ma": "DH-1024",
          "items": [
           {
            "ten": "Áo thun",
            "sl": 2
           },
           {
            "ten": "Mũ",
            "sl": 1
           }
          ],
          "tong": 450000,
          "han": "2026-11-20"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "engine": {
           "type": "string"
          },
          "output": {
           "type": "string"
          },
          "result": {
           "type": "string"
          },
          "length": {
           "type": "number"
          },
          "variables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "engine": "liquid",
         "output": "text",
         "result": "Kính gửi Anh Minh,\nĐơn DH-1024 gồm Áo thun x2, Mũ x1.\nTổng: 450.000 đ (Bốn trăm năm mươi nghìn đồng), hạn thanh toán 20/11/2026.",
         "length": 128,
         "variables": [
          {
           "name": "khach",
           "kind": "variable"
          },
          {
           "name": "don",
           "kind": "variable"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/md-docx": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Markdown to Word",
    "description": "Send `markdown` (GitHub-flavoured: headings, bold / italic / strikethrough, inline code, links, nested bullet and numbered lists, task lists, tables with alignment, block quotes, code blocks, horizontal rules, images) or `html` and get a .docx built with real Word styles (Heading 1-6, List Paragraph, Quote, Source Code), so the navigation pane, table of contents and style changes work as in a hand-made document. Numbered lists keep their start number; table header rows repeat on each page.\n\nPresets: `default` (Calibri 11, 2.54 cm margins), `report` (Arial, justified) and `nd30` for Vietnamese administrative documents under Decree 30/2020/NĐ-CP: A4, Times New Roman 14 pt (13 with font_size=13), margins top / bottom 20 mm, left 30 mm, right 15 mm, justified text, first line indented 1.27 cm, 6 pt between paragraphs, page numbers centred in the top margin and hidden on the first page. Override any of `font`, `font_size`, `line_spacing`, `margins` (mm, \"top,right,bottom,left\"), `page` (a4, a5, a3, letter, legal), `orientation`, `page_numbers`, `header_text`, `footer_text`, `first_line_indent`; `toc=true` adds a table of contents field that Word fills when the file is opened.\n\nImages can be data URLs or public http(s) URLs (PNG, JPEG, GIF; up to 20 fetched, 5 MB each) and are scaled to the text width. The output is a .docx file, or JSON with base64 (`format=json`). Files are generated in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/md-docx/",
    "operationId": "mdDocxPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/md-docx/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "markdown": {
          "type": "string",
          "description": "Markdown text (or a text/plain body). Or send `html`."
         },
         "html": {
          "type": "string",
          "description": "HTML instead of Markdown (converted first)."
         },
         "preset": {
          "type": "string",
          "default": "default",
          "description": "`default`, `report` or `nd30` (Decree 30/2020)."
         },
         "font": {
          "type": "string",
          "description": "Font name, e.g. `Times New Roman`."
         },
         "font_size": {
          "type": "number",
          "description": "Body size in points (6-48)."
         },
         "line_spacing": {
          "type": "number",
          "description": "Line spacing in lines (0.8-3)."
         },
         "margins": {
          "type": "string",
          "description": "Millimetres: `top,right,bottom,left`, one value, or an object."
         },
         "page": {
          "type": "string",
          "default": "a4",
          "description": "`a4`, `a5`, `a3`, `letter` or `legal`."
         },
         "orientation": {
          "type": "string",
          "default": "portrait",
          "description": "`portrait` or `landscape`."
         },
         "page_numbers": {
          "type": "string",
          "description": "`none`, `footer` or `header` (preset default)."
         },
         "toc": {
          "type": "boolean",
          "default": false,
          "description": "Insert a table of contents field."
         },
         "header_text": {
          "type": "string",
          "description": "Text in the page header."
         },
         "footer_text": {
          "type": "string",
          "description": "Text in the page footer."
         },
         "format": {
          "type": "string",
          "default": "docx",
          "description": "`docx` (file) or `json` (base64 + summary)."
         }
        },
        "required": [
         "markdown"
        ]
       },
       "example": {
        "markdown": "# Báo cáo tuần\n\nNội dung **chính**.\n\n- Việc 1\n- Việc 2\n\n| Hạng mục | Tiến độ |\n|---|---:|\n| API | 90% |",
        "preset": "nd30",
        "format": "json"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "filename": {
           "type": "string"
          },
          "preset": {
           "type": "string"
          },
          "page": {
           "type": "object",
           "properties": {
            "size": {
             "type": "string"
            },
            "orientation": {
             "type": "string"
            },
            "margins_mm": {
             "type": "object",
             "properties": {
              "top": {
               "type": "number"
              },
              "right": {
               "type": "number"
              },
              "bottom": {
               "type": "number"
              },
              "left": {
               "type": "number"
              }
             }
            }
           }
          },
          "font": {
           "type": "string"
          },
          "font_size": {
           "type": "number"
          },
          "paragraphs": {
           "type": "number"
          },
          "images": {
           "type": "number"
          },
          "links": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          },
          "docx_base64": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          }
         }
        },
        "example": {
         "filename": "Báo cáo tuần.docx",
         "preset": "nd30",
         "page": {
          "size": "a4",
          "orientation": "portrait",
          "margins_mm": {
           "top": 20,
           "right": 15,
           "bottom": 20,
           "left": 30
          }
         },
         "font": "Times New Roman",
         "font_size": 14,
         "paragraphs": 6,
         "images": 0,
         "links": 0,
         "warnings": [],
         "docx_base64": "UEsDBBQAAAgIAAAAAADpEG/9ZAEAALkFAAATAAAAW0NvbnRlbnRfVHlwZXNd…",
         "bytes": 5587
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/xlsx-template": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Excel template filler",
    "description": "Upload your own .xlsx (the form your accountant or a government agency requires) with placeholders in cells and send the data as JSON. `{so_hd}` or `{{so_hd}}` inserts a value (dotted paths like `{khach.ten}` work, in any sheet); a cell that holds only a placeholder gets a real number, boolean or date (when the cell has a date format), so number formats such as `#,##0 ₫` still apply. Filters: `{tong|words}` (amount in Vietnamese words), `|money`, `|date` (dd/mm/yyyy), `|date_vi`, `|excel_date`, `|upper`, `|lower`, `|join`, `|default:…`.\n\nA row that refers to an array (`{items.ten}`, `{items.sl}`, with `{$index}` for the line number) is repeated for each element. The engine edits the workbook XML directly, so cell styles, column widths, other sheets, images and print settings are untouched, and rows below move down: formulas are shifted (`=SUM(E6:E6)` becomes `=SUM(E6:E8)`, `=C6*D6` follows each copy), merged cells, conditional formatting, data validation, print areas and references from other sheets are updated, and Excel recalculates on open.\n\nSend `rows` (an array) instead of `data` to produce one workbook per object in a ZIP, named with `filename` such as `BG_{so}`. `action=tags` lists the placeholders. Old .xls files, macros (.xlsm), pivot tables and Excel tables (ListObjects) over repeated rows are not adjusted. Files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/xlsx-template/",
    "operationId": "xlsxTemplatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/xlsx-template/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "object",
          "description": "Values for one workbook (JSON object)."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch: one workbook per object, returns a ZIP (max 500)."
         },
         "filename": {
          "type": "string",
          "default": "workbook",
          "description": "Output name, with placeholders: `BG_{so}`."
         },
         "output": {
          "type": "string",
          "default": "xlsx",
          "description": "`xlsx` (file) or `json` (tags, missing fields, base64)."
         },
         "action": {
          "type": "string",
          "description": "`tags`: list the placeholders only."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "template": {
          "type": "string",
          "format": "binary",
          "description": "The .xlsx template (multipart `template` or `file`, or `template_base64`)."
         },
         "data": {
          "type": "object",
          "description": "Values for one workbook (JSON object)."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "Batch: one workbook per object, returns a ZIP (max 500)."
         },
         "filename": {
          "type": "string",
          "default": "workbook",
          "description": "Output name, with placeholders: `BG_{so}`."
         },
         "output": {
          "type": "string",
          "default": "xlsx",
          "description": "`xlsx` (file) or `json` (tags, missing fields, base64)."
         },
         "action": {
          "type": "string",
          "description": "`tags`: list the placeholders only."
         }
        },
        "required": [
         "template"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "filename": {
           "type": "string"
          },
          "sheets": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "tags": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "cells": {
              "type": "array"
             }
            }
           }
          },
          "repeated_rows": {
           "type": "number"
          },
          "missing_fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "xlsx_base64": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          }
         }
        },
        "example": {
         "filename": "workbook.xlsx",
         "sheets": [
          "Bao_gia",
          "Ky"
         ],
         "tags": [
          {
           "name": "so",
           "cells": [
            "Bao_gia!A1"
           ]
          },
          {
           "name": "khach.ten",
           "cells": [
            "Bao_gia!A2"
           ]
          },
          {
           "name": "ngay",
           "cells": [
            "Bao_gia!B3"
           ]
          },
          {
           "name": "$index",
           "cells": [
            "Bao_gia!A6"
           ]
          },
          {
           "name": "items.ten",
           "cells": [
            "Bao_gia!B6"
           ]
          },
          {
           "name": "items.sl",
           "cells": [
            "Bao_gia!C6"
           ]
          },
          {
           "name": "items.gia",
           "cells": [
            "Bao_gia!D6"
           ]
          },
          {
           "name": "tong|words",
           "cells": [
            "Bao_gia!A8"
           ]
          },
          {
           "name": "ghi_chu",
           "cells": [
            "Bao_gia!A9"
           ]
          },
          {
           "name": "nguoi_lap",
           "cells": [
            "Ky!A1"
           ]
          }
         ],
         "repeated_rows": 1,
         "missing_fields": [
          "ghi_chu",
          "nguoi_lap"
         ],
         "xlsx_base64": "UEsDBBQAAAgIAAAAAACI4g+7GgEAALcDAAATAAAAW0NvbnRlbnRfVHlwZXNd…",
         "bytes": 3543
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pptx-generate": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "PowerPoint generator",
    "description": "Send `slides` as a JSON array — each slide may have `title`, `subtitle`, `bullets` (strings or `{text, level}`), `text`, `image` / `images` (data URL or http(s) URL), `table` (`{header, rows}`), `chart` and `notes` — or `markdown` where `---` separates slides: the first heading is the title, lists become bullets, GFM tables become tables, images are placed, a ```chart block holds chart JSON and a `Notes:` line starts the speaker notes. `layout: \"title\"` or `\"section\"` gives a cover or a divider slide.\n\nCharts are native PowerPoint charts you can edit (`type` bar, column, line, area, pie, doughnut, scatter, radar; `labels`, `series` [{name, values}], `stacked`, `show_values`). Text sits on the left and visuals on the right when a slide has both. Themes `light`, `dark`, `corporate` (title bar) and `green`, with your own `colors` (primary, accent, background, text, title), `font` (Arial by default, full Vietnamese support), `layout` 16x9, 16x10, 4x3 or wide, a `logo` on every slide and slide numbers.\n\nBuilt with PptxGenJS (MIT) in memory; up to 200 slides and 60 images (20 fetched, 5 MB each). The result is a .pptx file, or JSON with base64 and a per-slide summary (`format=json`). Custom slide masters from your own .pptx are not supported yet.\n\nDocs: https://apibox.io.vn/docs/pptx-generate/",
    "operationId": "pptxGeneratePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pptx-generate/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "slides": {
          "type": "array",
          "items": {},
          "description": "Slide objects: title, subtitle, layout, bullets, text, image(s), table, chart, notes, background."
         },
         "markdown": {
          "type": "string",
          "description": "Markdown deck, slides separated by `---` (instead of `slides`)."
         },
         "theme": {
          "type": "string",
          "default": "light",
          "description": "`light`, `dark`, `corporate` or `green`."
         },
         "colors": {
          "type": "object",
          "description": "Hex colours: primary, accent, background, text, title."
         },
         "font": {
          "type": "string",
          "default": "Arial",
          "description": "Font name."
         },
         "layout": {
          "type": "string",
          "default": "16x9",
          "description": "`16x9`, `16x10`, `4x3` or `wide`."
         },
         "logo": {
          "type": "string",
          "description": "Logo image (data URL or URL) on every slide."
         },
         "slide_numbers": {
          "type": "boolean",
          "default": true,
          "description": "Show slide numbers."
         },
         "title": {
          "type": "string",
          "description": "Presentation title (file properties and name)."
         },
         "format": {
          "type": "string",
          "default": "pptx",
          "description": "`pptx` (file) or `json` (summary + base64)."
         }
        }
       },
       "example": {
        "slides": [
         {
          "layout": "title",
          "title": "Báo cáo Q3/2026",
          "subtitle": "Phòng Kinh doanh"
         },
         {
          "title": "Điểm chính",
          "bullets": [
           "Doanh thu +18%",
           "Chi phí −5%"
          ]
         },
         {
          "title": "Doanh thu",
          "chart": {
           "type": "column",
           "labels": [
            "T7",
            "T8",
            "T9"
           ],
           "series": [
            {
             "name": "2026",
             "values": [
              140,
              160,
              178
             ]
            }
           ]
          }
         }
        ],
        "theme": "corporate",
        "format": "json"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "filename": {
           "type": "string"
          },
          "theme": {
           "type": "string"
          },
          "layout": {
           "type": "string"
          },
          "slides": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "title": {
              "type": "string"
             },
             "layout": {
              "type": "string"
             },
             "parts": {
              "type": "array"
             }
            }
           }
          },
          "charts": {
           "type": "number"
          },
          "images": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          },
          "pptx_base64": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          }
         }
        },
        "example": {
         "filename": "Báo cáo Q3_2026.pptx",
         "theme": "corporate",
         "layout": "16x9",
         "slides": [
          {
           "index": 1,
           "title": "Báo cáo Q3/2026",
           "layout": "title",
           "parts": [
            "title"
           ]
          },
          {
           "index": 2,
           "title": "Điểm chính",
           "layout": "content",
           "parts": [
            "title",
            "text"
           ]
          },
          {
           "index": 3,
           "title": "Doanh thu",
           "layout": "content",
           "parts": [
            "title",
            "chart:column"
           ]
          }
         ],
         "charts": 1,
         "images": 0,
         "warnings": [],
         "pptx_base64": "UEsDBAoAAAAAALtTa10AAAAAAAAAAAAAAAAGAAAAX3JlbHMvUEsDBAoAAAAA…",
         "bytes": 88557
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/subtitles": {
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "Subtitle converter",
    "description": "Send a subtitle file (`subtitle` text, a raw body or a file upload) and choose `to`: `srt`, `vtt`, `ass`, `sbv`, `ttml`, `json` (cues with start / end in ms) or `text` (plain transcript). The input format is detected automatically. Files in Windows-1258, TCVN3 (ABC) or VNI-Windows — common for old Vietnamese subtitles — are converted to Unicode (`encoding=auto`, or force it).\n\nRetiming: `shift` (`+1.5s`, `-500ms`, `00:00:02,000`), `fps_from` / `fps_to` (23.976 ↔ 25), and `sync` with two points to stretch a whole file that drifts. `fix_overlaps`, `wrap` (re-break lines at `max_chars`, balancing two lines), `strip_tags` and `remove_empty` clean the cues; `merge` with a second file (`merge_mode` interleave or append) and `split_at` (two parts, rebased to zero) combine or cut files.\n\nEvery response includes `checks`: overlaps, cues shorter than `min_duration_ms` (833) or longer than `max_duration_ms` (7000), reading speed above `max_cps` (20 characters per second), lines over `max_chars` (42) and more than `max_lines` (2), the usual Netflix / YouTube style limits. `format=file` returns the converted file for download.\n\nDocs: https://apibox.io.vn/docs/subtitles/",
    "operationId": "subtitlesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/subtitles/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "subtitle": {
          "type": "string",
          "description": "Subtitle text, or a file (multipart `file`, `subtitle_base64`) or a raw text body."
         },
         "to": {
          "type": "string",
          "description": "`srt`, `vtt`, `ass`, `sbv`, `ttml`, `json` or `text` (default: same as input)."
         },
         "from": {
          "type": "string",
          "default": "auto",
          "description": "Input format, detected by default."
         },
         "encoding": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `utf-8`, `windows-1258`, `tcvn3`, `vni`, `windows-1252`, `utf-16le`."
         },
         "shift": {
          "type": "string",
          "description": "Move all cues: `+1.5s`, `-500ms`, `00:00:02,000`."
         },
         "fps_from": {
          "type": "number",
          "description": "Frame-rate change: source fps (with `fps_to`)."
         },
         "fps_to": {
          "type": "number",
          "description": "Target fps."
         },
         "sync": {
          "type": "array",
          "items": {},
          "description": "Two points `[{\"from\":\"00:00:10,000\",\"to\":\"00:00:11,200\"}, {...}]`."
         },
         "fix_overlaps": {
          "type": "boolean",
          "default": false,
          "description": "End each cue before the next starts."
         },
         "wrap": {
          "type": "boolean",
          "default": false,
          "description": "Re-break long lines at `max_chars`."
         },
         "merge": {
          "type": "string",
          "description": "A second subtitle to merge (`merge_mode` interleave / append, `merge_offset`)."
         },
         "split_at": {
          "type": "string",
          "description": "Split into two parts at this time."
         },
         "max_chars": {
          "type": "number",
          "default": 42,
          "description": "Characters per line for checks and wrapping."
         },
         "max_cps": {
          "type": "number",
          "default": 20,
          "description": "Maximum reading speed (characters per second)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `file` (download the converted file)."
         }
        },
        "required": [
         "subtitle"
        ]
       },
       "example": {
        "subtitle": "1\n00:00:01,000 --> 00:00:03,500\nXin chào các bạn\n\n2\n00:00:03,400 --> 00:00:06,000\nHôm nay chúng ta học về phụ đề\n",
        "to": "vtt",
        "shift": "+2s"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "encoding": {},
          "cues": {
           "type": "number"
          },
          "duration_ms": {
           "type": "number"
          },
          "operations": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "warnings": {
           "type": "array"
          },
          "checks": {
           "type": "object",
           "properties": {
            "issues": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "counts": {
             "type": "object",
             "properties": {
              "overlap": {
               "type": "number"
              }
             }
            },
            "total": {
             "type": "number"
            }
           }
          },
          "content": {
           "type": "string"
          }
         }
        },
        "example": {
         "from": "srt",
         "to": "vtt",
         "encoding": null,
         "cues": 2,
         "duration_ms": 8000,
         "operations": [
          "shift:2000ms"
         ],
         "warnings": [],
         "checks": {
          "issues": [
           {
            "cue": 1,
            "start": "00:00:03,000",
            "type": "overlap",
            "message": "Overlaps the next cue by 100 ms",
            "value": 100
           }
          ],
          "counts": {
           "overlap": 1
          },
          "total": 1
         },
         "content": "WEBVTT\n\n00:00:03.000 --> 00:00:05.500\nXin chào các bạn\n\n00:00:05.400 --> 00:00:08.000\nHôm nay chúng ta học về phụ đề\n"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/csv-validate": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "CSV validator",
    "description": "Send a CSV (`csv` text, raw body or file; the delimiter and old Vietnamese encodings are detected) and either `rules` — `{\"email\": \"required|email\", \"luong\": \"integer|min:0\", \"sdt\": \"vn_phone\", \"phong\": \"enum:KT,HR\"}` — or a Frictionless `schema` (`fields` with `type`, `format`, `constraints` required / unique / minimum / maximum / minLength / maxLength / pattern / enum, plus `primaryKey`, `uniqueKeys` and `missingValues`).\n\nTypes: string, integer, number (also 1.234.567,5 style), boolean, date (`format` such as `%d/%m/%Y`, or `any`), datetime, time, year, yearmonth, duration, geopoint, object, array; string formats email, uri, uuid and Vietnamese checks: `vn_phone` (mobile / landline, +84 forms), `vn_cccd` (12-digit citizen ID with province code and birth year), `vn_tax_code` (10 or 13 digits with the check digit), `vn_bank_account`, `vn_plate`.\n\nThe report gives `valid`, error counts by code, per-column summaries (errors, missing values, min / max) and up to `max_errors` (1,000) errors with row number (as in a spreadsheet, header = row 1), column, field, value and message. Structure errors — missing or extra columns, duplicate headers, rows with too few / many cells, blank rows — are always checked. Up to 500,000 rows; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/csv-validate/",
    "operationId": "csvValidatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/csv-validate/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "csv": {
          "type": "string",
          "description": "CSV text, or a file (multipart `file`, `csv_base64`) or a text/csv body."
         },
         "rules": {
          "type": "object",
          "description": "Column rules: `{\"col\": \"required|integer|min:0\"}` or objects."
         },
         "schema": {
          "type": "object",
          "description": "Frictionless Table Schema (instead of rules)."
         },
         "delimiter": {
          "type": "string",
          "description": "Delimiter (auto-detected): `,` `;` `tab` `|`."
         },
         "header": {
          "type": "boolean",
          "default": true,
          "description": "The first row holds the column names."
         },
         "encoding": {
          "type": "string",
          "default": "auto",
          "description": "File encoding (auto: UTF-8, Windows-1258, TCVN3, VNI)."
         },
         "allow_extra_columns": {
          "type": "boolean",
          "default": false,
          "description": "With a schema: accept columns not in it."
         },
         "max_errors": {
          "type": "number",
          "default": 1000,
          "description": "Errors listed (1-10,000); counts are always complete."
         }
        },
        "required": [
         "csv"
        ]
       },
       "example": {
        "csv": "ma_nv,ho_ten,sdt,mst,luong\nNV001,Nguyễn Văn An,0912345678,0100109106,15000000\nNV002,,0123456,0100109107,-5\n",
        "rules": {
         "ma_nv": "required|unique",
         "ho_ten": "required",
         "sdt": "vn_phone",
         "mst": "vn_tax_code",
         "luong": "integer|min:0"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "rows": {
           "type": "number"
          },
          "columns": {
           "type": "number"
          },
          "headers": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "delimiter": {
           "type": "string"
          },
          "encoding": {},
          "error_count": {
           "type": "number"
          },
          "errors_by_code": {
           "type": "object",
           "properties": {
            "required": {
             "type": "number"
            },
            "type_error": {
             "type": "number"
            },
            "minimum": {
             "type": "number"
            }
           }
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "column": {
              "type": "number"
             },
             "errors": {
              "type": "number"
             },
             "missing": {
              "type": "number"
             },
             "format": {
              "type": "string"
             },
             "min": {
              "type": "number"
             },
             "max": {
              "type": "number"
             }
            }
           }
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "row": {
              "type": "number"
             },
             "column": {
              "type": "number"
             },
             "field": {
              "type": "string"
             },
             "value": {
              "type": "string"
             },
             "code": {
              "type": "string"
             },
             "message": {
              "type": "string"
             }
            }
           }
          },
          "truncated": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "valid": false,
         "rows": 2,
         "columns": 5,
         "headers": [
          "ma_nv",
          "ho_ten",
          "sdt",
          "mst",
          "luong"
         ],
         "delimiter": ",",
         "encoding": null,
         "error_count": 4,
         "errors_by_code": {
          "required": 1,
          "type_error": 2,
          "minimum": 1
         },
         "fields": [
          {
           "name": "ma_nv",
           "type": "string",
           "column": 1,
           "errors": 0,
           "missing": 0
          },
          {
           "name": "ho_ten",
           "type": "string",
           "column": 2,
           "errors": 1,
           "missing": 1
          },
          {
           "name": "sdt",
           "type": "string",
           "format": "vn_phone",
           "column": 3,
           "errors": 1,
           "missing": 0
          },
          {
           "name": "mst",
           "type": "string",
           "format": "vn_tax_code",
           "column": 4,
           "errors": 1,
           "missing": 0
          },
          {
           "name": "luong",
           "type": "integer",
           "column": 5,
           "errors": 1,
           "missing": 0,
           "min": -5,
           "max": 15000000
          }
         ],
         "errors": [
          {
           "row": 3,
           "column": 2,
           "field": "ho_ten",
           "value": "",
           "code": "required",
           "message": "Value is required"
          },
          {
           "row": 3,
           "column": 3,
           "field": "sdt",
           "value": "0123456",
           "code": "type_error",
           "message": "\"0123456\" is not a Vietnamese phone number"
          },
          {
           "row": 3,
           "column": 4,
           "field": "mst",
           "value": "0100109107",
           "code": "type_error",
           "message": "\"0100109107\" is not a valid tax code (check digit does not match)"
          },
          {
           "row": 3,
           "column": 5,
           "field": "luong",
           "value": "-5",
           "code": "minimum",
           "message": "-5 is below the minimum 0"
          }
         ],
         "truncated": false
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/html-extract": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "HTML data extractor",
    "description": "Send a public `url` (or `html`) and a `fields` map. A value is a CSS selector with an optional attribute and filters: `\"h1\"`, `\"a.more@href\"` (links and image sources become absolute URLs), `\".price | number\"`. A name ending in `[]` returns every match; an object `{\"selector\": \".product\", \"fields\": {...}}` returns a list of records, with selectors relative to each item. Filters: trim, lower, upper, oneline, number (150.000 ₫ → 150000), int, date (dd/mm/yyyy → ISO), url, remove_accents, `regex:…` (first group), `replace:a=>b`, `split:,`, `default:…`.\n\n`next` (a selector for the \"next page\" link) with `max_pages` (up to 3 on Free, 5 on paid plans) follows pagination on the same site and concatenates the lists. `format=rss` or `json_feed` turns a page without a feed into one: `feed` = `{\"item\": \"article\", \"title\": \"h2\", \"link\": \"a@href\", \"date\": \"time@datetime\", \"summary\": \"p\", \"image\": \"img@src\"}`.\n\nFair use: pages are fetched with our bot identity (APIBoxBot), robots.txt is respected (disallowed paths are refused), JavaScript is not executed, no cookies or logins, and sites whose terms forbid automated extraction or that sit behind captchas (search engines, social networks, large marketplaces, tax / business-registry portals, gold / fuel price and power-outage pages) are blocked. Pages up to 2 MB.\n\nDocs: https://apibox.io.vn/docs/html-extract/",
    "operationId": "htmlExtractGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-extract/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public page to fetch (or send `html`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fields",
      "in": "query",
      "required": true,
      "description": "Map of name → `selector[@attr] | filter` or `{selector, fields}`.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "next",
      "in": "query",
      "required": false,
      "description": "Selector of the next-page link (pagination).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "max_pages",
      "in": "query",
      "required": false,
      "description": "Pages to follow with `next` (Free 3, paid 5).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `rss` or `json_feed`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "feed",
      "in": "query",
      "required": false,
      "description": "Feed mode selectors: item, title, link, date, summary, image, author.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum matches per list (1-2,000).",
      "schema": {
       "type": "number",
       "default": 500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {},
          "title": {},
          "pages": {
           "type": "number"
          },
          "counts": {
           "type": "object",
           "properties": {
            "san_pham": {
             "type": "number"
            }
           }
          },
          "data": {
           "type": "object",
           "properties": {
            "tieu_de": {
             "type": "string"
            },
            "san_pham": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "HTML data extractor",
    "description": "Send a public `url` (or `html`) and a `fields` map. A value is a CSS selector with an optional attribute and filters: `\"h1\"`, `\"a.more@href\"` (links and image sources become absolute URLs), `\".price | number\"`. A name ending in `[]` returns every match; an object `{\"selector\": \".product\", \"fields\": {...}}` returns a list of records, with selectors relative to each item. Filters: trim, lower, upper, oneline, number (150.000 ₫ → 150000), int, date (dd/mm/yyyy → ISO), url, remove_accents, `regex:…` (first group), `replace:a=>b`, `split:,`, `default:…`.\n\n`next` (a selector for the \"next page\" link) with `max_pages` (up to 3 on Free, 5 on paid plans) follows pagination on the same site and concatenates the lists. `format=rss` or `json_feed` turns a page without a feed into one: `feed` = `{\"item\": \"article\", \"title\": \"h2\", \"link\": \"a@href\", \"date\": \"time@datetime\", \"summary\": \"p\", \"image\": \"img@src\"}`.\n\nFair use: pages are fetched with our bot identity (APIBoxBot), robots.txt is respected (disallowed paths are refused), JavaScript is not executed, no cookies or logins, and sites whose terms forbid automated extraction or that sit behind captchas (search engines, social networks, large marketplaces, tax / business-registry portals, gold / fuel price and power-outage pages) are blocked. Pages up to 2 MB.\n\nDocs: https://apibox.io.vn/docs/html-extract/",
    "operationId": "htmlExtractPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-extract/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public page to fetch (or send `html`)."
         },
         "html": {
          "type": "string",
          "description": "Raw HTML instead of a URL (with optional `base_url`)."
         },
         "fields": {
          "type": "object",
          "description": "Map of name → `selector[@attr] | filter` or `{selector, fields}`."
         },
         "next": {
          "type": "string",
          "description": "Selector of the next-page link (pagination)."
         },
         "max_pages": {
          "type": "number",
          "default": 1,
          "description": "Pages to follow with `next` (Free 3, paid 5)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `rss` or `json_feed`."
         },
         "feed": {
          "type": "object",
          "description": "Feed mode selectors: item, title, link, date, summary, image, author."
         },
         "limit": {
          "type": "number",
          "default": 500,
          "description": "Maximum matches per list (1-2,000)."
         }
        },
        "required": [
         "fields"
        ]
       },
       "example": {
        "html": "<h1>Cửa hàng</h1><div class=\"sp\"><a href=\"/p/1\">Áo thun</a><span class=\"gia\">150.000 ₫</span></div><div class=\"sp\"><a href=\"/p/2\">Quần jean</a><span class=\"gia\">1.250.000 ₫</span></div>",
        "base_url": "https://shop.example.vn/",
        "fields": {
         "tieu_de": "h1",
         "san_pham": {
          "selector": ".sp",
          "fields": {
           "ten": "a",
           "url": "a@href",
           "gia": ".gia | number"
          }
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {},
          "title": {},
          "pages": {
           "type": "number"
          },
          "counts": {
           "type": "object",
           "properties": {
            "san_pham": {
             "type": "number"
            }
           }
          },
          "data": {
           "type": "object",
           "properties": {
            "tieu_de": {
             "type": "string"
            },
            "san_pham": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          }
         }
        },
        "example": {
         "url": null,
         "title": null,
         "pages": 1,
         "counts": {
          "san_pham": 2
         },
         "data": {
          "tieu_de": "Cửa hàng",
          "san_pham": [
           {
            "ten": "Áo thun",
            "url": "https://shop.example.vn/p/1",
            "gia": 150000
           },
           {
            "ten": "Quần jean",
            "url": "https://shop.example.vn/p/2",
            "gia": 1250000
           }
          ]
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/webauthn/{operation}": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Passkey (WebAuthn) Server",
    "description": "A stateless passkey server built on SimpleWebAuthn. `POST /v1/webauthn/register/options` with `rp_id` (your domain) and `user_name` returns the `options` for `navigator.credentials.create()` (or `startRegistration()` of @simplewebauthn/browser), the `challenge` and a `challenge_token`: an HMAC-signed token that carries the challenge, the RP ID and a 5-minute expiry (`timeout_ms`, up to 10 minutes), so you do not need a session store. Then `POST /register/verify` with the browser `response`, the `challenge_token` (or your own stored `expected_challenge` + `rp_id`) and `expected_origin`: attestation formats none, packed, TPM, Android Key / SafetyNet, Apple and FIDO U2F are checked and you get `credential.id`, `credential.public_key` (COSE, base64url, plus JWK and PEM), `counter`, `transports`, the AAGUID with a provider name for well-known passkey managers, `user_verified`, `device_type` and `backed_up`.\n\nTo sign in, `POST /login/options` (optionally with `allow_credentials`) and `POST /login/verify` with the `response`, the token and the stored `credential` `{id, public_key, counter}`: the signature, origin, RP ID hash, user presence / verification (`require_user_verification`) and the signature counter are verified; save `new_counter`. Algorithms: EdDSA, ES256/384/512, RS256 and PS256 by default `[-8, -7, -257]`.\n\nNothing is stored on our side: you keep the credentials (one user can have several) and you decide what a successful verification means. Tokens are stateless and valid until they expire: mark them as used if you need strict one-time challenges. The FIDO Metadata Service is not included (its terms forbid redistribution), so authenticator models are not certified-checked.\n\nDocs: https://apibox.io.vn/docs/webauthn/",
    "operationId": "webauthnPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webauthn/"
    },
    "parameters": [
     {
      "name": "operation",
      "in": "path",
      "required": true,
      "description": "`register/options`, `register/verify`, `login/options` or `login/verify` (or send `op` in the body).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "rp_id": {
          "type": "string",
          "description": "Relying party ID: your domain without scheme (options; verify when using expected_challenge)."
         },
         "rp_name": {
          "type": "string",
          "description": "Name shown by the browser (register/options)."
         },
         "user_name": {
          "type": "string",
          "description": "Account name, e.g. an e-mail (register/options)."
         },
         "user_id": {
          "type": "string",
          "description": "Opaque user id, max 64 bytes (random when omitted; returned base64url)."
         },
         "user_display_name": {
          "type": "string",
          "description": "Display name (register/options)."
         },
         "attestation": {
          "type": "string",
          "default": "none",
          "description": "`none`, `direct` or `enterprise`."
         },
         "authenticator_attachment": {
          "type": "string",
          "description": "`platform` (device passkey) or `cross-platform` (security key)."
         },
         "resident_key": {
          "type": "string",
          "default": "preferred",
          "description": "`required`, `preferred` or `discouraged` (discoverable credential)."
         },
         "user_verification": {
          "type": "string",
          "default": "preferred",
          "description": "`required`, `preferred` or `discouraged`."
         },
         "exclude_credentials": {
          "type": "array",
          "items": {},
          "description": "Credential ids (or {id, transports}) the user already has (register/options)."
         },
         "allow_credentials": {
          "type": "array",
          "items": {},
          "description": "Credentials allowed to sign in (login/options); empty = discoverable passkeys."
         },
         "timeout_ms": {
          "type": "number",
          "default": 300000,
          "description": "Ceremony timeout and token lifetime, 30 000-600 000 ms."
         },
         "response": {
          "type": "object",
          "description": "The credential JSON from the browser (verify)."
         },
         "challenge_token": {
          "type": "string",
          "description": "Token from the options call (verify)."
         },
         "expected_challenge": {
          "type": "string",
          "description": "Your stored challenge instead of the token (verify, with rp_id)."
         },
         "expected_origin": {
          "type": "string",
          "description": "Allowed origin(s), e.g. https://example.com (default https://<rp_id>)."
         },
         "credential": {
          "type": "object",
          "description": "Stored credential {id, public_key, counter, transports} (login/verify)."
         },
         "require_user_verification": {
          "type": "boolean",
          "default": false,
          "description": "Fail when the authenticator did not verify the user (PIN / biometrics)."
         }
        },
        "required": [
         "rp_id",
         "user_name"
        ]
       },
       "example": {
        "rp_id": "example.com",
        "rp_name": "Example",
        "user_name": "an@example.vn",
        "user_id": "user-42"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "options": {
           "type": "object",
           "properties": {
            "challenge": {
             "type": "string"
            },
            "rp": {
             "type": "object",
             "properties": {
              "name": {
               "type": "string"
              },
              "id": {
               "type": "string"
              }
             }
            },
            "user": {
             "type": "object",
             "properties": {
              "id": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "displayName": {
               "type": "string"
              }
             }
            },
            "pubKeyCredParams": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "timeout": {
             "type": "number"
            },
            "attestation": {
             "type": "string"
            },
            "excludeCredentials": {
             "type": "array"
            },
            "authenticatorSelection": {
             "type": "object",
             "properties": {
              "residentKey": {
               "type": "string"
              },
              "userVerification": {
               "type": "string"
              },
              "requireResidentKey": {
               "type": "boolean"
              }
             }
            },
            "extensions": {
             "type": "object",
             "properties": {
              "credProps": {
               "type": "boolean"
              }
             }
            },
            "hints": {
             "type": "array"
            }
           }
          },
          "challenge": {
           "type": "string"
          },
          "challenge_token": {
           "type": "string"
          },
          "expires_at": {
           "type": "string"
          },
          "user_id": {
           "type": "string"
          },
          "next": {
           "type": "string"
          }
         }
        },
        "example": {
         "options": {
          "challenge": "Wbjgnz1u4oqN_OSWuvCfxO0QJ_E08LK0EM5t58J69w0",
          "rp": {
           "name": "Example",
           "id": "example.com"
          },
          "user": {
           "id": "dXNlci00Mg",
           "name": "an@example.vn",
           "displayName": "an@example.vn"
          },
          "pubKeyCredParams": [
           {
            "alg": -8,
            "type": "public-key"
           },
           {
            "alg": -7,
            "type": "public-key"
           },
           {
            "alg": -257,
            "type": "public-key"
           }
          ],
          "timeout": 300000,
          "attestation": "none",
          "excludeCredentials": [],
          "authenticatorSelection": {
           "residentKey": "preferred",
           "userVerification": "preferred",
           "requireResidentKey": false
          },
          "extensions": {
           "credProps": true
          },
          "hints": []
         },
         "challenge": "Wbjgnz1u4oqN_OSWuvCfxO0QJ_E08LK0EM5t58J69w0",
         "challenge_token": "eyJrIjoicmVnIiwiYyI6IldiamduejF1NG9xTl9PU1d1dkNmeE8wUUpfRTA4TEswRU01dDU4SjY5dzAiLCJyIjoiZXhhbXBsZS5jb20iLCJlIjoxNzk0Mzk0MzYyLCJvIjoiZGVtbyJ9.tT-u26UHsnaeEQj8K_fcWoIEi20XctaQPWXjveP0q7k",
         "expires_at": "2026-11-11T10:52:42.000Z",
         "user_id": "dXNlci00Mg",
         "next": "Pass `options` to navigator.credentials.create() (or startRegistration() of @simplewebauthn/browser), then POST the result as `response` with `challenge_token` to /v1/webauthn/register/verify."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/saml-tools": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "SAML Decoder and Validator",
    "description": "Paste a `saml` value — the base64 `SAMLResponse` / `SAMLRequest` of the POST binding, the base64 + DEFLATE value of the Redirect binding, or raw XML — or a full Redirect `url` with its query string. Responses come back as JSON: status, issuer, destination, InResponseTo, the assertion with NameID and format, SubjectConfirmationData (recipient, NotOnOrAfter), Conditions (NotBefore, NotOnOrAfter, audiences), AuthnStatement (session index, AuthnContextClassRef) and attributes as `name -> [values]`. AuthnRequest, LogoutRequest / LogoutResponse and metadata (`EntityDescriptor` / `EntitiesDescriptor`: SSO, SLO and ACS endpoints, NameID formats, signing / encryption certificates with fingerprints and expiry) are read too.\n\nEvery XML signature is verified: references by ID with the enveloped-signature transform, exclusive C14N (with InclusiveNamespaces) and inclusive C14N 1.0, SHA-1/256/384/512 digests, RSA and ECDSA signatures with WebCrypto. Give the IdP certificate as `cert` (PEM) or its `fingerprint` (SHA-256 / SHA-1) — a signature that only matches its own embedded certificate is reported as not trusted. Redirect-binding query signatures (`SigAlg`, `Signature`) are verified against `cert` as well.\n\nConfiguration checks become `errors` and `warnings`: unsigned messages, signatures over another element than the one that is read, nested or duplicated assertions and duplicate IDs (signature wrapping), comments inside NameID, SHA-1, expired or not-yet-valid conditions (`clock_skew_s`, default 180 s; `now` to test old samples), missing audience restriction and mismatches with `expected_audience`, `expected_recipient` (ACS URL), `expected_issuer` and `expected_request_id`. XML with a DOCTYPE is refused (XXE). `op=sp-metadata` generates SP metadata from `entity_id`, `acs_url`, `slo_url` and `cert`. Encrypted assertions are not decrypted; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/saml-tools/",
    "operationId": "samlToolsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/saml-tools/"
    },
    "parameters": [
     {
      "name": "saml",
      "in": "query",
      "required": true,
      "description": "Base64 SAMLResponse / SAMLRequest (POST), base64 + DEFLATE (Redirect), or XML (response, request, assertion, metadata). Max 1 MB of XML.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "A Redirect-binding URL with SAMLRequest / SAMLResponse, RelayState, SigAlg and Signature.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fingerprint",
      "in": "query",
      "required": false,
      "description": "SHA-256 or SHA-1 fingerprint of the trusted certificate (hex, colons allowed).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expected_audience",
      "in": "query",
      "required": false,
      "description": "Your SP entity ID.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expected_recipient",
      "in": "query",
      "required": false,
      "description": "Your ACS URL (checked against Recipient and Destination).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expected_issuer",
      "in": "query",
      "required": false,
      "description": "IdP entity ID.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "expected_request_id",
      "in": "query",
      "required": false,
      "description": "ID of your AuthnRequest (InResponseTo).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "clock_skew_s",
      "in": "query",
      "required": false,
      "description": "Allowed clock skew in seconds (0-3600).",
      "schema": {
       "type": "number",
       "default": 180
      }
     },
     {
      "name": "now",
      "in": "query",
      "required": false,
      "description": "Check time validity at this ISO time instead of now (testing old samples).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "op",
      "in": "query",
      "required": false,
      "description": "`decode` or `sp-metadata` (with entity_id, acs_url, slo_url, cert, name_id_format, want_assertions_signed, authn_requests_signed; format=xml for the file).",
      "schema": {
       "type": "string",
       "default": "decode"
      }
     },
     {
      "name": "include_xml",
      "in": "query",
      "required": false,
      "description": "Also return the decoded XML.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "encoding": {
           "type": "string"
          },
          "id": {
           "type": "string"
          },
          "issue_instant": {
           "type": "string"
          },
          "destination": {
           "type": "string"
          },
          "in_response_to": {
           "type": "string"
          },
          "issuer": {
           "type": "string"
          },
          "status": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "sub_code": {},
            "message": {},
            "success": {
             "type": "boolean"
            }
           }
          },
          "assertion": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "issue_instant": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "subject": {
             "type": "object",
             "properties": {
              "name_id": {
               "type": "object"
              },
              "confirmation_method": {
               "type": "string"
              },
              "recipient": {
               "type": "string"
              },
              "not_on_or_after": {
               "type": "string"
              },
              "in_response_to": {
               "type": "string"
              }
             }
            },
            "conditions": {
             "type": "object",
             "properties": {
              "not_before": {
               "type": "string"
              },
              "not_on_or_after": {
               "type": "string"
              },
              "audiences": {
               "type": "array"
              },
              "one_time_use": {
               "type": "boolean"
              }
             }
            },
            "authn": {
             "type": "object",
             "properties": {
              "authn_instant": {
               "type": "string"
              },
              "session_index": {
               "type": "string"
              },
              "session_not_on_or_after": {},
              "context_class": {
               "type": "string"
              }
             }
            },
            "attributes": {
             "type": "object",
             "properties": {
              "email": {
               "type": "array"
              },
              "groups": {
               "type": "array"
              }
             }
            }
           }
          },
          "signed": {
           "type": "object",
           "properties": {
            "response": {
             "type": "boolean"
            },
            "assertion": {
             "type": "boolean"
            }
           }
          },
          "age_seconds": {
           "type": "number"
          },
          "signatures": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "signed_element": {
              "type": "string"
             },
             "signed_id": {
              "type": "string"
             },
             "references": {
              "type": "array"
             },
             "canonicalization": {
              "type": "string"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "signature_valid": {
              "type": "boolean"
             },
             "valid": {
              "type": "boolean"
             },
             "key_source": {
              "type": "string"
             },
             "trusted": {
              "type": "boolean"
             }
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "SAML Decoder and Validator",
    "description": "Paste a `saml` value — the base64 `SAMLResponse` / `SAMLRequest` of the POST binding, the base64 + DEFLATE value of the Redirect binding, or raw XML — or a full Redirect `url` with its query string. Responses come back as JSON: status, issuer, destination, InResponseTo, the assertion with NameID and format, SubjectConfirmationData (recipient, NotOnOrAfter), Conditions (NotBefore, NotOnOrAfter, audiences), AuthnStatement (session index, AuthnContextClassRef) and attributes as `name -> [values]`. AuthnRequest, LogoutRequest / LogoutResponse and metadata (`EntityDescriptor` / `EntitiesDescriptor`: SSO, SLO and ACS endpoints, NameID formats, signing / encryption certificates with fingerprints and expiry) are read too.\n\nEvery XML signature is verified: references by ID with the enveloped-signature transform, exclusive C14N (with InclusiveNamespaces) and inclusive C14N 1.0, SHA-1/256/384/512 digests, RSA and ECDSA signatures with WebCrypto. Give the IdP certificate as `cert` (PEM) or its `fingerprint` (SHA-256 / SHA-1) — a signature that only matches its own embedded certificate is reported as not trusted. Redirect-binding query signatures (`SigAlg`, `Signature`) are verified against `cert` as well.\n\nConfiguration checks become `errors` and `warnings`: unsigned messages, signatures over another element than the one that is read, nested or duplicated assertions and duplicate IDs (signature wrapping), comments inside NameID, SHA-1, expired or not-yet-valid conditions (`clock_skew_s`, default 180 s; `now` to test old samples), missing audience restriction and mismatches with `expected_audience`, `expected_recipient` (ACS URL), `expected_issuer` and `expected_request_id`. XML with a DOCTYPE is refused (XXE). `op=sp-metadata` generates SP metadata from `entity_id`, `acs_url`, `slo_url` and `cert`. Encrypted assertions are not decrypted; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/saml-tools/",
    "operationId": "samlToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/saml-tools/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "saml": {
          "type": "string",
          "description": "Base64 SAMLResponse / SAMLRequest (POST), base64 + DEFLATE (Redirect), or XML (response, request, assertion, metadata). Max 1 MB of XML."
         },
         "url": {
          "type": "string",
          "description": "A Redirect-binding URL with SAMLRequest / SAMLResponse, RelayState, SigAlg and Signature."
         },
         "cert": {
          "type": "string",
          "description": "Trusted IdP certificate(s), PEM or base64 (up to 5)."
         },
         "fingerprint": {
          "type": "string",
          "description": "SHA-256 or SHA-1 fingerprint of the trusted certificate (hex, colons allowed)."
         },
         "expected_audience": {
          "type": "string",
          "description": "Your SP entity ID."
         },
         "expected_recipient": {
          "type": "string",
          "description": "Your ACS URL (checked against Recipient and Destination)."
         },
         "expected_issuer": {
          "type": "string",
          "description": "IdP entity ID."
         },
         "expected_request_id": {
          "type": "string",
          "description": "ID of your AuthnRequest (InResponseTo)."
         },
         "clock_skew_s": {
          "type": "number",
          "default": 180,
          "description": "Allowed clock skew in seconds (0-3600)."
         },
         "now": {
          "type": "string",
          "description": "Check time validity at this ISO time instead of now (testing old samples)."
         },
         "op": {
          "type": "string",
          "default": "decode",
          "description": "`decode` or `sp-metadata` (with entity_id, acs_url, slo_url, cert, name_id_format, want_assertions_signed, authn_requests_signed; format=xml for the file)."
         },
         "include_xml": {
          "type": "boolean",
          "default": false,
          "description": "Also return the decoded XML."
         }
        },
        "required": [
         "saml"
        ]
       },
       "example": {
        "saml": "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wi…",
        "cert": "-----BEGIN CERTIFICATE-----\nMIIDP…\n-----END CERTIFICATE-----",
        "expected_audience": "https://sp.example.vn/metadata",
        "expected_recipient": "https://sp.example.vn/acs",
        "expected_request_id": "_req42"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "encoding": {
           "type": "string"
          },
          "id": {
           "type": "string"
          },
          "issue_instant": {
           "type": "string"
          },
          "destination": {
           "type": "string"
          },
          "in_response_to": {
           "type": "string"
          },
          "issuer": {
           "type": "string"
          },
          "status": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "sub_code": {},
            "message": {},
            "success": {
             "type": "boolean"
            }
           }
          },
          "assertion": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "issue_instant": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "subject": {
             "type": "object",
             "properties": {
              "name_id": {
               "type": "object"
              },
              "confirmation_method": {
               "type": "string"
              },
              "recipient": {
               "type": "string"
              },
              "not_on_or_after": {
               "type": "string"
              },
              "in_response_to": {
               "type": "string"
              }
             }
            },
            "conditions": {
             "type": "object",
             "properties": {
              "not_before": {
               "type": "string"
              },
              "not_on_or_after": {
               "type": "string"
              },
              "audiences": {
               "type": "array"
              },
              "one_time_use": {
               "type": "boolean"
              }
             }
            },
            "authn": {
             "type": "object",
             "properties": {
              "authn_instant": {
               "type": "string"
              },
              "session_index": {
               "type": "string"
              },
              "session_not_on_or_after": {},
              "context_class": {
               "type": "string"
              }
             }
            },
            "attributes": {
             "type": "object",
             "properties": {
              "email": {
               "type": "array"
              },
              "groups": {
               "type": "array"
              }
             }
            }
           }
          },
          "signed": {
           "type": "object",
           "properties": {
            "response": {
             "type": "boolean"
            },
            "assertion": {
             "type": "boolean"
            }
           }
          },
          "age_seconds": {
           "type": "number"
          },
          "signatures": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "signed_element": {
              "type": "string"
             },
             "signed_id": {
              "type": "string"
             },
             "references": {
              "type": "array"
             },
             "canonicalization": {
              "type": "string"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "signature_valid": {
              "type": "boolean"
             },
             "valid": {
              "type": "boolean"
             },
             "key_source": {
              "type": "string"
             },
             "trusted": {
              "type": "boolean"
             }
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "type": "Response",
         "encoding": "base64 (POST binding)",
         "id": "_resp1",
         "issue_instant": "2026-11-11T10:00:00Z",
         "destination": "https://sp.example.vn/acs",
         "in_response_to": "_req42",
         "issuer": "https://idp.example.com/",
         "status": {
          "code": "Success",
          "sub_code": null,
          "message": null,
          "success": true
         },
         "assertion": {
          "id": "_assert1",
          "issue_instant": "2026-11-11T10:00:00Z",
          "version": "2.0",
          "issuer": "https://idp.example.com/",
          "subject": {
           "name_id": {
            "value": "an@example.vn",
            "format": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
            "name_qualifier": null,
            "sp_name_qualifier": null
           },
           "confirmation_method": "bearer",
           "recipient": "https://sp.example.vn/acs",
           "not_on_or_after": "2026-11-11T10:05:00Z",
           "in_response_to": "_req42"
          },
          "conditions": {
           "not_before": "2026-11-11T09:59:30Z",
           "not_on_or_after": "2026-11-11T10:05:00Z",
           "audiences": [
            "https://sp.example.vn/metadata"
           ],
           "one_time_use": false
          },
          "authn": {
           "authn_instant": "2026-11-11T09:59:58Z",
           "session_index": "_sess9",
           "session_not_on_or_after": null,
           "context_class": "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
          },
          "attributes": {
           "email": [
            "an@example.vn"
           ],
           "groups": [
            "dev",
            "admin & ops"
           ]
          }
         },
         "signed": {
          "response": false,
          "assertion": true
         },
         "age_seconds": 60,
         "signatures": [
          {
           "path": "/Response/Assertion/Signature",
           "signed_element": "/Response/Assertion",
           "signed_id": "_assert1",
           "references": [
            {
             "uri": "#_assert1",
             "digest_ok": true,
             "digest_algorithm": "sha256",
             "transforms": [
              "enveloped-signature",
              "exc-c14n"
             ]
            }
           ],
           "canonicalization": "exc-c14n",
           "signature_algorithm": "rsa-sha256",
           "signature_valid": true,
           "valid": true,
           "key_source": "cert parameter",
           "trusted": true
          }
         ],
         "valid": true,
         "errors": [],
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/mrz": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "MRZ Parser and Generator",
    "description": "Send the 2 or 3 lines of an MRZ as `mrz` (newlines, an array, or one string of 88 / 90 / 72 characters; spaces and « are cleaned) — the text that passport readers, OCR SDKs and hotel check-in scanners output. The format is detected: TD3 passports, TD1 identity cards (3 × 30), TD2 (2 × 36), MRV-A and MRV-B visas (ICAO Doc 9303 Part 7), plus French ID cards and Swiss / French driving licences. You get the document code and type, issuing state and nationality (ICAO codes with English and Vietnamese names, including D, XXA stateless, UN and EU codes), surname and given names, document number (long TD1 numbers rebuilt from the optional data), birth and expiry dates as ISO dates with age, `expired` and days to expiry, sex, personal number and optional data.\n\nEach check digit (document number, birth date, expiry, personal number, composite) is recomputed with the 7-3-1 weights and reported with the expected value; `autocorrect=true` fixes common OCR confusions (O/0, I/1, B/8, S/5, Z/2, G/6) by field type. For Vietnamese chip ID cards (CCCD / thẻ căn cước, IDVNM) the 12-digit personal number in the optional data is decoded (province, century / sex, birth year) and cross-checked.\n\n`op=create` builds an MRZ from `format` (TD1, TD2, TD3, MRVA, MRVB), `issuing_state`, `last_name` + `given_names` (or a Vietnamese `full_name`, family name first), `document_number`, `nationality`, `birth_date`, `sex`, `expiry_date` and optional data: names are transliterated to the ICAO form (Vietnamese diacritics removed, Đ → D, Ä → AE…) and truncated by the ICAO rules, check digits computed, and the result parsed back. Nothing is stored or logged; a valid MRZ does not prove a document is genuine.\n\nDocs: https://apibox.io.vn/docs/mrz/",
    "operationId": "mrzGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/mrz/"
    },
    "parameters": [
     {
      "name": "mrz",
      "in": "query",
      "required": true,
      "description": "The MRZ lines (newline separated, an array, or one string). Required for parsing.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "autocorrect",
      "in": "query",
      "required": false,
      "description": "Fix OCR letter / digit confusions by field type.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "op",
      "in": "query",
      "required": false,
      "description": "`parse`, `create` or `check-digit` (with `value`).",
      "schema": {
       "type": "string",
       "default": "parse"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "document_type": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "checks_valid": {
           "type": "boolean"
          },
          "fields": {
           "type": "object",
           "properties": {
            "document_code": {
             "type": "string"
            },
            "issuing_state": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "alpha2": {},
              "name": {
               "type": "string"
              },
              "name_vi": {
               "type": "string"
              }
             }
            },
            "last_name": {
             "type": "string"
            },
            "given_names": {
             "type": "string"
            },
            "document_number": {
             "type": "string"
            },
            "nationality": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "alpha2": {},
              "name": {
               "type": "string"
              },
              "name_vi": {
               "type": "string"
              }
             }
            },
            "birth_date": {
             "type": "string"
            },
            "sex": {
             "type": "string"
            },
            "expiry_date": {
             "type": "string"
            },
            "personal_number": {
             "type": "string"
            },
            "optional_data": {}
           }
          },
          "age": {
           "type": "number"
          },
          "expired": {
           "type": "boolean"
          },
          "days_to_expiry": {
           "type": "number"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "field": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "expected": {
              "type": "string"
             },
             "found": {
              "type": "string"
             }
            }
           }
          },
          "errors": {
           "type": "array"
          },
          "specimen": {
           "type": "boolean"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "MRZ Parser and Generator",
    "description": "Send the 2 or 3 lines of an MRZ as `mrz` (newlines, an array, or one string of 88 / 90 / 72 characters; spaces and « are cleaned) — the text that passport readers, OCR SDKs and hotel check-in scanners output. The format is detected: TD3 passports, TD1 identity cards (3 × 30), TD2 (2 × 36), MRV-A and MRV-B visas (ICAO Doc 9303 Part 7), plus French ID cards and Swiss / French driving licences. You get the document code and type, issuing state and nationality (ICAO codes with English and Vietnamese names, including D, XXA stateless, UN and EU codes), surname and given names, document number (long TD1 numbers rebuilt from the optional data), birth and expiry dates as ISO dates with age, `expired` and days to expiry, sex, personal number and optional data.\n\nEach check digit (document number, birth date, expiry, personal number, composite) is recomputed with the 7-3-1 weights and reported with the expected value; `autocorrect=true` fixes common OCR confusions (O/0, I/1, B/8, S/5, Z/2, G/6) by field type. For Vietnamese chip ID cards (CCCD / thẻ căn cước, IDVNM) the 12-digit personal number in the optional data is decoded (province, century / sex, birth year) and cross-checked.\n\n`op=create` builds an MRZ from `format` (TD1, TD2, TD3, MRVA, MRVB), `issuing_state`, `last_name` + `given_names` (or a Vietnamese `full_name`, family name first), `document_number`, `nationality`, `birth_date`, `sex`, `expiry_date` and optional data: names are transliterated to the ICAO form (Vietnamese diacritics removed, Đ → D, Ä → AE…) and truncated by the ICAO rules, check digits computed, and the result parsed back. Nothing is stored or logged; a valid MRZ does not prove a document is genuine.\n\nDocs: https://apibox.io.vn/docs/mrz/",
    "operationId": "mrzPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/mrz/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "mrz": {
          "type": "string",
          "description": "The MRZ lines (newline separated, an array, or one string). Required for parsing."
         },
         "autocorrect": {
          "type": "boolean",
          "default": false,
          "description": "Fix OCR letter / digit confusions by field type."
         },
         "op": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `create` or `check-digit` (with `value`)."
         },
         "format": {
          "type": "string",
          "default": "TD3",
          "description": "create: TD1, TD2, TD3, MRVA or MRVB."
         },
         "document_code": {
          "type": "string",
          "description": "create: P, PN, I, ID, AC, V… (default P for TD3, I for cards, V for visas)."
         },
         "issuing_state": {
          "type": "string",
          "description": "create: ICAO / ISO alpha-3 code (VNM) or alpha-2 (VN)."
         },
         "last_name": {
          "type": "string",
          "description": "create: primary identifier (surname)."
         },
         "given_names": {
          "type": "string",
          "description": "create: secondary identifier."
         },
         "full_name": {
          "type": "string",
          "description": "create: Vietnamese full name, family name first (alternative to last_name + given_names)."
         },
         "document_number": {
          "type": "string",
          "description": "create: document number (9 characters; longer in TD1 / TD2)."
         },
         "nationality": {
          "type": "string",
          "description": "create: nationality code (default: issuing state)."
         },
         "birth_date": {
          "type": "string",
          "description": "create: YYYY-MM-DD."
         },
         "sex": {
          "type": "string",
          "description": "create: M, F or X."
         },
         "expiry_date": {
          "type": "string",
          "description": "create: YYYY-MM-DD."
         },
         "personal_number": {
          "type": "string",
          "description": "create (TD3): personal number, up to 14 characters."
         },
         "optional_data": {
          "type": "string",
          "description": "create: optional data (TD1 line 1, TD2, visas); optional_data_2 for TD1 line 2."
         },
         "vn_cccd": {
          "type": "string",
          "description": "create (TD1): Vietnamese 12-digit personal number; fills the document number and optional data like issued cards."
         }
        },
        "required": [
         "mrz"
        ]
       },
       "example": {
        "mrz": "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<\nL898902C36UTO7408122F1204159ZE184226B<<<<<10"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "document_type": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "checks_valid": {
           "type": "boolean"
          },
          "fields": {
           "type": "object",
           "properties": {
            "document_code": {
             "type": "string"
            },
            "issuing_state": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "alpha2": {},
              "name": {
               "type": "string"
              },
              "name_vi": {
               "type": "string"
              }
             }
            },
            "last_name": {
             "type": "string"
            },
            "given_names": {
             "type": "string"
            },
            "document_number": {
             "type": "string"
            },
            "nationality": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "alpha2": {},
              "name": {
               "type": "string"
              },
              "name_vi": {
               "type": "string"
              }
             }
            },
            "birth_date": {
             "type": "string"
            },
            "sex": {
             "type": "string"
            },
            "expiry_date": {
             "type": "string"
            },
            "personal_number": {
             "type": "string"
            },
            "optional_data": {}
           }
          },
          "age": {
           "type": "number"
          },
          "expired": {
           "type": "boolean"
          },
          "days_to_expiry": {
           "type": "number"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "field": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "expected": {
              "type": "string"
             },
             "found": {
              "type": "string"
             }
            }
           }
          },
          "errors": {
           "type": "array"
          },
          "specimen": {
           "type": "boolean"
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "format": "TD3",
         "document_type": "passport",
         "valid": true,
         "checks_valid": true,
         "fields": {
          "document_code": "P",
          "issuing_state": {
           "code": "UTO",
           "alpha2": null,
           "name": "Utopia (ICAO specimen)",
           "name_vi": "Utopia (mẫu của ICAO)"
          },
          "last_name": "ERIKSSON",
          "given_names": "ANNA MARIA",
          "document_number": "L898902C3",
          "nationality": {
           "code": "UTO",
           "alpha2": null,
           "name": "Utopia (ICAO specimen)",
           "name_vi": "Utopia (mẫu của ICAO)"
          },
          "birth_date": "1974-08-12",
          "sex": "female",
          "expiry_date": "2012-04-15",
          "personal_number": "ZE184226B",
          "optional_data": null
         },
         "age": 52,
         "expired": true,
         "days_to_expiry": -5323,
         "checks": [
          {
           "field": "document_number",
           "valid": true,
           "expected": "6",
           "found": "6"
          },
          {
           "field": "birth_date",
           "valid": true,
           "expected": "2",
           "found": "2"
          },
          {
           "field": "expiry_date",
           "valid": true,
           "expected": "9",
           "found": "9"
          },
          {
           "field": "personal_number",
           "valid": true,
           "expected": "1",
           "found": "1"
          },
          {
           "field": "composite",
           "valid": true,
           "expected": "0",
           "found": "0"
          }
         ],
         "errors": [],
         "specimen": true,
         "lines": [
          "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<",
          "L898902C36UTO7408122F1204159ZE184226B<<<<<10"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pgp-tools": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "OpenPGP Key and Signature Checker",
    "description": "Send an ASCII-armored `public_key` (or base64) to get each certificate: key version (v4 and v6 of RFC 9580), algorithm and size or curve, fingerprint and key ID, creation and expiry dates, usage flags (certify, sign, encrypt, authenticate), revocation, user IDs with name, comment and e-mail, and subkeys with their own flags and expiry. Self-signatures (user ID certifications, direct-key and subkey binding signatures) are verified, so a tampered key shows up; the armor checksum is checked and `warnings` flag weak RSA, DSA / Elgamal, SHA-1 self-signatures, expired or revoked keys. Instead of a key you can give `email`: the key is looked up by Web Key Directory (WKD) and then keys.openpgp.org.\n\nTo verify a signature, add a detached `signature` with the `message` (text) or `message_base64` (file), or a `signed_message`: a cleartext signed message (-----BEGIN PGP SIGNED MESSAGE-----, dash-escaping and trailing spaces handled) or an inline-signed PGP MESSAGE (compressed with ZIP / ZLIB or not). Binary and text signatures (CRLF canonicalisation) are supported with RSA, Ed25519 (legacy EdDSA and v6) and ECDSA P-256 / P-384 / P-521 over SHA-1/256/384/512. Each signature reports the signer (primary key or subkey), creation and expiry, and notes such as a revoked or expired key.\n\nOur own implementation with WebCrypto (no GPL / LGPL code). Private keys are refused, encrypted messages are not decrypted and nothing is stored. A valid signature only proves the key signed it: confirm the fingerprint with its owner.\n\nDocs: https://apibox.io.vn/docs/pgp-tools/",
    "operationId": "pgpToolsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pgp-tools/"
    },
    "parameters": [
     {
      "name": "email",
      "in": "query",
      "required": false,
      "description": "Look the key up by WKD, then keys.openpgp.org (cached 1 hour).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "keys": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "version": {
              "type": "number"
             },
             "algorithm": {
              "type": "string"
             },
             "bits": {},
             "curve": {
              "type": "string"
             },
             "fingerprint": {
              "type": "string"
             },
             "fingerprint_formatted": {
              "type": "string"
             },
             "key_id": {
              "type": "string"
             },
             "created": {
              "type": "string"
             },
             "expires": {},
             "expired": {
              "type": "boolean"
             },
             "revoked": {
              "type": "boolean"
             },
             "flags": {
              "type": "array"
             },
             "user_ids": {
              "type": "array"
             },
             "subkeys": {
              "type": "array"
             },
             "direct_signatures": {
              "type": "number"
             }
            }
           }
          },
          "key_source": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "signature": {
           "type": "object",
           "properties": {
            "kind": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            },
            "signatures": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "message": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "OpenPGP Key and Signature Checker",
    "description": "Send an ASCII-armored `public_key` (or base64) to get each certificate: key version (v4 and v6 of RFC 9580), algorithm and size or curve, fingerprint and key ID, creation and expiry dates, usage flags (certify, sign, encrypt, authenticate), revocation, user IDs with name, comment and e-mail, and subkeys with their own flags and expiry. Self-signatures (user ID certifications, direct-key and subkey binding signatures) are verified, so a tampered key shows up; the armor checksum is checked and `warnings` flag weak RSA, DSA / Elgamal, SHA-1 self-signatures, expired or revoked keys. Instead of a key you can give `email`: the key is looked up by Web Key Directory (WKD) and then keys.openpgp.org.\n\nTo verify a signature, add a detached `signature` with the `message` (text) or `message_base64` (file), or a `signed_message`: a cleartext signed message (-----BEGIN PGP SIGNED MESSAGE-----, dash-escaping and trailing spaces handled) or an inline-signed PGP MESSAGE (compressed with ZIP / ZLIB or not). Binary and text signatures (CRLF canonicalisation) are supported with RSA, Ed25519 (legacy EdDSA and v6) and ECDSA P-256 / P-384 / P-521 over SHA-1/256/384/512. Each signature reports the signer (primary key or subkey), creation and expiry, and notes such as a revoked or expired key.\n\nOur own implementation with WebCrypto (no GPL / LGPL code). Private keys are refused, encrypted messages are not decrypted and nothing is stored. A valid signature only proves the key signed it: confirm the fingerprint with its owner.\n\nDocs: https://apibox.io.vn/docs/pgp-tools/",
    "operationId": "pgpToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pgp-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "public_key": {
          "type": "string",
          "description": "ASCII-armored public key block (or base64 of the binary key). Required unless `email` is given."
         },
         "email": {
          "type": "string",
          "description": "Look the key up by WKD, then keys.openpgp.org (cached 1 hour)."
         },
         "signature": {
          "type": "string",
          "description": "Detached signature (armored or base64), with `message` or `message_base64`."
         },
         "message": {
          "type": "string",
          "description": "Signed text for a detached signature."
         },
         "message_base64": {
          "type": "string",
          "description": "Signed file (base64) for a detached signature; or multipart field `message`."
         },
         "signed_message": {
          "type": "string",
          "description": "Cleartext signed message or inline-signed PGP MESSAGE."
         }
        }
       },
       "example": {
        "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nxioGY4d/4xsAAAAg+U2nu0jWCmHlZ3BqZYfQMxmZu52JGggkLq2EVD34laPCsQYf…\n-----END PGP PUBLIC KEY BLOCK-----",
        "signed_message": "-----BEGIN PGP SIGNED MESSAGE-----\n\nWhat we need from the grocery store:\n\n- - tofu\n- - vegetables\n- - noodles\n\n-----BEGIN PGP SIGNATURE-----\n…\n-----END PGP SIGNATURE-----"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "keys": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "version": {
              "type": "number"
             },
             "algorithm": {
              "type": "string"
             },
             "bits": {},
             "curve": {
              "type": "string"
             },
             "fingerprint": {
              "type": "string"
             },
             "fingerprint_formatted": {
              "type": "string"
             },
             "key_id": {
              "type": "string"
             },
             "created": {
              "type": "string"
             },
             "expires": {},
             "expired": {
              "type": "boolean"
             },
             "revoked": {
              "type": "boolean"
             },
             "flags": {
              "type": "array"
             },
             "user_ids": {
              "type": "array"
             },
             "subkeys": {
              "type": "array"
             },
             "direct_signatures": {
              "type": "number"
             }
            }
           }
          },
          "key_source": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "signature": {
           "type": "object",
           "properties": {
            "kind": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            },
            "signatures": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "message": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "keys": [
          {
           "version": 6,
           "algorithm": "Ed25519",
           "bits": null,
           "curve": "Ed25519",
           "fingerprint": "CB186C4F0609A697E4D52DFA6C722B0C1F1E27C18A56708F6525EC27BAD9ACC9",
           "fingerprint_formatted": "CB18 6C4F 0609 A697 E4D5 2DFA 6C72 2B0C 1F1E 27C1 8A56 708F 6525 EC27 BAD9 ACC9",
           "key_id": "CB186C4F0609A697",
           "created": "2022-11-30T16:08:03.000Z",
           "expires": null,
           "expired": false,
           "revoked": false,
           "flags": [
            "certify",
            "sign"
           ],
           "user_ids": [],
           "subkeys": [
            {
             "version": 6,
             "algorithm": "X25519",
             "curve": "X25519",
             "fingerprint": "12C83F1E706F6308FE151A417743A1F033790E93E9978488D1DB378DA9930885",
             "key_id": "12C83F1E706F6308",
             "created": "2022-11-30T16:08:03.000Z",
             "expires": null,
             "expired": false,
             "revoked": false,
             "flags": [
              "encrypt_communications",
              "encrypt_storage"
             ],
             "binding_signature": {
              "type": "subkey binding",
              "version": 6,
              "hash": "SHA-512",
              "created": "2022-11-30T16:08:03.000Z",
              "valid": true
             }
            }
           ],
           "direct_signatures": 1
          }
         ],
         "key_source": "public_key",
         "warnings": [],
         "signature": {
          "kind": "cleartext",
          "valid": true,
          "signatures": [
           {
            "valid": true,
            "signature_valid": true,
            "signature_type": "text",
            "version": 6,
            "hash": "SHA-512",
            "algorithm": "Ed25519",
            "created": "2022-12-13T16:08:03.000Z",
            "expires": null,
            "issuer_key_id": "CB186C4F0609A697",
            "issuer_fingerprint": "CB186C4F0609A697E4D52DFA6C722B0C1F1E27C18A56708F6525EC27BAD9ACC9",
            "signer": {
             "fingerprint": "CB186C4F0609A697E4D52DFA6C722B0C1F1E27C18A56708F6525EC27BAD9ACC9",
             "primary_fingerprint": "CB186C4F0609A697E4D52DFA6C722B0C1F1E27C18A56708F6525EC27BAD9ACC9",
             "user_ids": [],
             "subkey": false
            },
            "notes": []
           }
          ],
          "message": "What we need from the grocery store:\n\n- tofu\n- vegetables\n- noodles\n"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/spdx-license": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "SPDX License Detector",
    "description": "`op=detect` (or just `text`): paste a LICENSE / COPYING file or a file header. The text is normalised like the SPDX matching guidelines (case, punctuation, bullets, copyright lines, British / American spellings) and compared with every licence of the SPDX License List (~700 texts) by word 3-gram Dice similarity: you get the `best` match with a confidence (exact ≥ 0.95, high, medium, low), the top `candidates` with how much of the text and of the licence is covered, `multiple_licences` when a file holds several (e.g. MIT + Apache-2.0), `SPDX-License-Identifier` tags and standard notices such as the Apache-2.0 or GPL \"or any later version\" headers.\n\n`op=parse` with `expression`: \"MIT OR (Apache-2.0 AND BSD-3-Clause)\" becomes a tree with each licence’s category, OSI / deprecated flags and exceptions (`WITH Classpath-exception-2.0`); wrong names are corrected (\"Apache 2\" → Apache-2.0, \"GPLv3\" → GPL-3.0-or-later). `op=check` takes `dependencies` (`[{name, license}]` or `{name: expression}`), your `project_license` (an SPDX ID or `proprietary`), `distribution` (`binary`, `source`, `saas`, `internal`) and an optional `policy` (`allow`, `deny`, `deny_categories`): each dependency gets `ok`, `conditions` (attribution, NOTICE, file-level copyleft), `warning`, `conflict`, `denied` or `unknown` with reasons — e.g. GPL in a proprietary binary, AGPL in SaaS, Apache-2.0 under GPL-2.0-only; for OR the most permissive option is chosen.\n\n`op=notice` turns `packages` (`[{name, version, license, copyright, url}]`) into a THIRD-PARTY-NOTICES text with each licence text once (`format=text` downloads it). `op=info` with `id` returns a licence (and its text with `include_text=true`); without `id` it lists the SPDX licences (`q`, `category`). Compatibility results are a reference, not legal advice.\n\nDocs: https://apibox.io.vn/docs/spdx-license/",
    "operationId": "spdxLicenseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/spdx-license/"
    },
    "parameters": [
     {
      "name": "op",
      "in": "query",
      "required": false,
      "description": "`detect`, `parse`, `check`, `notice` or `info` (guessed from the other fields when omitted).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "top",
      "in": "query",
      "required": false,
      "description": "detect: number of candidates (1-20).",
      "schema": {
       "type": "number",
       "default": 5
      }
     },
     {
      "name": "expression",
      "in": "query",
      "required": false,
      "description": "parse: SPDX licence expression.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "info: SPDX licence ID (case-insensitive); add include_text=true for the text.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "project_license": {
           "type": "string"
          },
          "distribution": {
           "type": "string"
          },
          "overall": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "conditions": {
             "type": "number"
            },
            "conflict": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "license": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "chosen": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "reasons": {
              "type": "array"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "spdx_list_version": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "SPDX License Detector",
    "description": "`op=detect` (or just `text`): paste a LICENSE / COPYING file or a file header. The text is normalised like the SPDX matching guidelines (case, punctuation, bullets, copyright lines, British / American spellings) and compared with every licence of the SPDX License List (~700 texts) by word 3-gram Dice similarity: you get the `best` match with a confidence (exact ≥ 0.95, high, medium, low), the top `candidates` with how much of the text and of the licence is covered, `multiple_licences` when a file holds several (e.g. MIT + Apache-2.0), `SPDX-License-Identifier` tags and standard notices such as the Apache-2.0 or GPL \"or any later version\" headers.\n\n`op=parse` with `expression`: \"MIT OR (Apache-2.0 AND BSD-3-Clause)\" becomes a tree with each licence’s category, OSI / deprecated flags and exceptions (`WITH Classpath-exception-2.0`); wrong names are corrected (\"Apache 2\" → Apache-2.0, \"GPLv3\" → GPL-3.0-or-later). `op=check` takes `dependencies` (`[{name, license}]` or `{name: expression}`), your `project_license` (an SPDX ID or `proprietary`), `distribution` (`binary`, `source`, `saas`, `internal`) and an optional `policy` (`allow`, `deny`, `deny_categories`): each dependency gets `ok`, `conditions` (attribution, NOTICE, file-level copyleft), `warning`, `conflict`, `denied` or `unknown` with reasons — e.g. GPL in a proprietary binary, AGPL in SaaS, Apache-2.0 under GPL-2.0-only; for OR the most permissive option is chosen.\n\n`op=notice` turns `packages` (`[{name, version, license, copyright, url}]`) into a THIRD-PARTY-NOTICES text with each licence text once (`format=text` downloads it). `op=info` with `id` returns a licence (and its text with `include_text=true`); without `id` it lists the SPDX licences (`q`, `category`). Compatibility results are a reference, not legal advice.\n\nDocs: https://apibox.io.vn/docs/spdx-license/",
    "operationId": "spdxLicensePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/spdx-license/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "op": {
          "type": "string",
          "description": "`detect`, `parse`, `check`, `notice` or `info` (guessed from the other fields when omitted)."
         },
         "text": {
          "type": "string",
          "description": "detect: licence text or file header (max 500 000 characters; also a text/plain body)."
         },
         "top": {
          "type": "number",
          "default": 5,
          "description": "detect: number of candidates (1-20)."
         },
         "expression": {
          "type": "string",
          "description": "parse: SPDX licence expression."
         },
         "dependencies": {
          "type": "array",
          "items": {},
          "description": "check: [{name, license}] or {name: expression} (max 2000)."
         },
         "project_license": {
          "type": "string",
          "description": "check: your licence (SPDX ID) or `proprietary` (default)."
         },
         "distribution": {
          "type": "string",
          "default": "binary",
          "description": "check: `binary`, `source`, `saas` or `internal`."
         },
         "policy": {
          "type": "object",
          "description": "check: {allow: [ids], deny: [ids], deny_categories: [\"strong-copyleft\", \"network-copyleft\", …]}."
         },
         "packages": {
          "type": "array",
          "items": {},
          "description": "notice: [{name, version, license, copyright, url, text}] (max 2000)."
         },
         "id": {
          "type": "string",
          "description": "info: SPDX licence ID (case-insensitive); add include_text=true for the text."
         }
        }
       },
       "example": {
        "op": "check",
        "project_license": "proprietary",
        "distribution": "binary",
        "dependencies": [
         {
          "name": "react",
          "license": "MIT"
         },
         {
          "name": "readline-sync",
          "license": "GPL-3.0-only"
         },
         {
          "name": "sharp",
          "license": "Apache-2.0"
         },
         {
          "name": "dual-lib",
          "license": "GPL-2.0-only OR MIT"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "project_license": {
           "type": "string"
          },
          "distribution": {
           "type": "string"
          },
          "overall": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "conditions": {
             "type": "number"
            },
            "conflict": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "license": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "chosen": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "reasons": {
              "type": "array"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "spdx_list_version": {
           "type": "string"
          }
         }
        },
        "example": {
         "project_license": "proprietary",
         "distribution": "binary",
         "overall": "conflict",
         "summary": {
          "conditions": 3,
          "conflict": 1
         },
         "results": [
          {
           "name": "react",
           "license": "MIT",
           "status": "conditions",
           "chosen": "MIT",
           "category": "permissive",
           "reasons": [
            "Keep the copyright notice and licence text (attribution)"
           ]
          },
          {
           "name": "readline-sync",
           "license": "GPL-3.0-only",
           "status": "conflict",
           "chosen": "GPL-3.0-only",
           "category": "strong-copyleft",
           "reasons": [
            "GPL-3.0-only: distributing a combined work requires releasing it under the GPL — incompatible with a proprietary project"
           ]
          },
          {
           "name": "sharp",
           "license": "Apache-2.0",
           "status": "conditions",
           "chosen": "Apache-2.0",
           "category": "permissive",
           "reasons": [
            "Keep the copyright notice and licence text (attribution)",
            "Apache-2.0: also keep its NOTICE file and mark modified files"
           ]
          },
          {
           "name": "dual-lib",
           "license": "GPL-2.0-only OR MIT",
           "status": "conditions",
           "chosen": "MIT",
           "reasons": [
            "Keep the copyright notice and licence text (attribution)"
           ]
          }
         ],
         "disclaimer": "Reference only, not legal advice; licence compatibility depends on how the code is used and distributed. Check the licence texts or ask a lawyer.",
         "spdx_list_version": "3.29.0"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cve/{id}": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "CVE Lookup (CVSS, EPSS, KEV)",
    "description": "`GET /v1/cve/CVE-2024-3400` returns the CVE record: state, dates, title and description, all CVSS scores (v4.0, v3.1, v3.0, v2 from the CNA or the CISA ADP enrichment) with the preferred one in `cvss`, CWE IDs, affected vendors / products with version ranges and CPEs, references (exploit, patch and advisory links first) and CISA’s SSVC decision points (exploitation, automatable, technical impact). It adds the EPSS score and percentile (probability of exploitation in the next 30 days) and, when listed in CISA’s Known Exploited Vulnerabilities catalog, the date added, due date, known ransomware use and required action.\n\n`ids` (up to 100) returns short summaries ordered for patching: KEV first, then EPSS, then CVSS. Search with `q` (product or vendor words: \"nginx\", \"fortios\", \"wordpress\"; words of 4+ letters also match longer names), `vendor` + `product`, `cpe` (cpe:2.3:a:vendor:product:… — versions are not filtered, read `affected`) or `cwe`, filtered by `since` (publication date), `min_cvss`, `severity` and `kev=true`, sorted by `published` (default), `cvss`, `epss` or `priority`; `kev=true` alone lists the newest KEV entries. `limit` is 1-50 (default 10).\n\nData is rebuilt every day from the CVE List (CVE Program, cvelistV5, including CISA Vulnrichment), the CISA KEV catalog and FIRST EPSS, and served from our storage: no NVD rate limits. NVD-only CPE configurations are not included. Responses carry `data_version`, `epss_date`, `kev_version` and the attributions.\n\nDocs: https://apibox.io.vn/docs/cve/",
    "operationId": "cveGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cve/"
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "A CVE ID (`/v1/cve/CVE-2021-44228` or `?id=`).",
      "schema": {
       "type": "string"
      },
      "example": "CVE-2024-3400"
     },
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "description": "Comma-separated CVE IDs (max 100), returned in patch priority order.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Product / vendor words (all must match).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vendor",
      "in": "query",
      "required": false,
      "description": "Vendor name (with product: exact vendor:product).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "product",
      "in": "query",
      "required": false,
      "description": "Product name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cpe",
      "in": "query",
      "required": false,
      "description": "CPE 2.3 name; matched by vendor and product.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cwe",
      "in": "query",
      "required": false,
      "description": "CWE ID, e.g. CWE-79.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "description": "Published on or after this date (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_cvss",
      "in": "query",
      "required": false,
      "description": "Minimum CVSS base score (0-10).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "severity",
      "in": "query",
      "required": false,
      "description": "Minimum severity: low, medium, high, critical.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "kev",
      "in": "query",
      "required": false,
      "description": "Only CVEs in the CISA KEV catalog.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`published`, `cvss`, `epss` or `priority` (KEV, EPSS, CVSS).",
      "schema": {
       "type": "string",
       "default": "published"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results per search (1-50).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "state": {
           "type": "string"
          },
          "published": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "cvss": {
           "type": "object",
           "properties": {
            "score": {
             "type": "number"
            },
            "severity": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "vector": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "epss": {
           "type": "object",
           "properties": {
            "score": {
             "type": "number"
            },
            "percentile": {
             "type": "number"
            }
           }
          },
          "kev": {
           "type": "object",
           "properties": {
            "date_added": {
             "type": "string"
            },
            "due_date": {
             "type": "string"
            },
            "vendor": {
             "type": "string"
            },
            "product": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "ransomware_use": {
             "type": "string"
            },
            "description": {
             "type": "string"
            },
            "required_action": {
             "type": "string"
            },
            "cwes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "notes": {
             "type": "string"
            }
           }
          },
          "ssvc": {
           "type": "object",
           "properties": {
            "exploitation": {
             "type": "string"
            },
            "automatable": {
             "type": "string"
            },
            "technical_impact": {
             "type": "string"
            }
           }
          },
          "url": {
           "type": "string"
          },
          "description": {
           "type": "string"
          },
          "assigner": {
           "type": "string"
          },
          "reserved": {
           "type": "string"
          },
          "cwe": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "affected": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vendor": {
              "type": "string"
             },
             "product": {
              "type": "string"
             },
             "default_status": {
              "type": "string"
             },
             "versions": {
              "type": "array"
             },
             "source": {
              "type": "string"
             }
            }
           }
          },
          "references": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "tags": {
              "type": "array"
             }
            }
           }
          },
          "nvd_url": {
           "type": "string"
          },
          "data_version": {
           "type": "string"
          },
          "epss_date": {
           "type": "string"
          },
          "kev_version": {
           "type": "string"
          }
         }
        },
        "example": {
         "id": "CVE-2024-3400",
         "state": "PUBLISHED",
         "published": "2024-04-12",
         "updated": "2025-10-21",
         "title": "PAN-OS: Arbitrary File Creation Leads to OS Command Injection Vulnerability in GlobalProtect",
         "cvss": {
          "score": 10,
          "severity": "CRITICAL",
          "version": "3.1",
          "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
          "source": "cna"
         },
         "epss": {
          "score": 0.99999,
          "percentile": 1
         },
         "kev": {
          "date_added": "2024-04-12",
          "due_date": "2024-04-19",
          "vendor": "Palo Alto Networks",
          "product": "PAN-OS",
          "name": "Palo Alto Networks PAN-OS Command Injection Vulnerability",
          "ransomware_use": "Known",
          "description": "Palo Alto Networks PAN-OS GlobalProtect feature contains a command injection vulnerability that allows an unauthenticated attacker to execute commands with root privileges on the firewall.",
          "required_action": "Apply mitigations per vendor instructions as they become available. …",
          "cwes": [
           "CWE-20",
           "CWE-77"
          ],
          "notes": "https://security.paloaltonetworks.com/CVE-2024-3400 ;   https://nvd.nist.gov/vuln/detail/CVE-2024-3400"
         },
         "ssvc": {
          "exploitation": "active",
          "automatable": "yes",
          "technical_impact": "total"
         },
         "url": "https://www.cve.org/CVERecord?id=CVE-2024-3400",
         "description": "A command injection as a result of arbitrary file creation vulnerability in the GlobalProtect feature of Palo Alto Networks PAN-OS software for specific PAN-OS versions and distinct feature configurations may enable an unauthenticated attacker to execute arbitrary code with root privileges on the firewall. …",
         "assigner": "palo_alto",
         "reserved": "2024-04-05",
         "cwe": [
          "CWE-77",
          "CWE-20"
         ],
         "affected": [
          {
           "vendor": "Palo Alto Networks",
           "product": "PAN-OS",
           "default_status": "unaffected",
           "versions": [
            "unaffected: 9.0.0",
            "unaffected: 9.1.0",
            "unaffected: 10.0.0",
            "unaffected: 10.1.0",
            "affected: >= 10.2.0 < 10.2.9-h1",
            "affected: >= 11.0.0 < 11.0.4-h1",
            "affected: >= 11.1.0 < 11.1.2-h3"
           ],
           "source": "cna"
          }
         ],
         "references": [
          {
           "url": "https://security.paloaltonetworks.com/CVE-2024-3400",
           "tags": [
            "vendor-advisory"
           ]
          }
         ],
         "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2024-3400",
         "data_version": "2026-11-11",
         "epss_date": "2026-11-10T12:00:24Z",
         "kev_version": "2026.11.10"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "CVE Lookup (CVSS, EPSS, KEV)",
    "description": "`GET /v1/cve/CVE-2024-3400` returns the CVE record: state, dates, title and description, all CVSS scores (v4.0, v3.1, v3.0, v2 from the CNA or the CISA ADP enrichment) with the preferred one in `cvss`, CWE IDs, affected vendors / products with version ranges and CPEs, references (exploit, patch and advisory links first) and CISA’s SSVC decision points (exploitation, automatable, technical impact). It adds the EPSS score and percentile (probability of exploitation in the next 30 days) and, when listed in CISA’s Known Exploited Vulnerabilities catalog, the date added, due date, known ransomware use and required action.\n\n`ids` (up to 100) returns short summaries ordered for patching: KEV first, then EPSS, then CVSS. Search with `q` (product or vendor words: \"nginx\", \"fortios\", \"wordpress\"; words of 4+ letters also match longer names), `vendor` + `product`, `cpe` (cpe:2.3:a:vendor:product:… — versions are not filtered, read `affected`) or `cwe`, filtered by `since` (publication date), `min_cvss`, `severity` and `kev=true`, sorted by `published` (default), `cvss`, `epss` or `priority`; `kev=true` alone lists the newest KEV entries. `limit` is 1-50 (default 10).\n\nData is rebuilt every day from the CVE List (CVE Program, cvelistV5, including CISA Vulnrichment), the CISA KEV catalog and FIRST EPSS, and served from our storage: no NVD rate limits. NVD-only CPE configurations are not included. Responses carry `data_version`, `epss_date`, `kev_version` and the attributions.\n\nDocs: https://apibox.io.vn/docs/cve/",
    "operationId": "cvePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cve/"
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "A CVE ID (`/v1/cve/CVE-2021-44228` or `?id=`).",
      "schema": {
       "type": "string"
      },
      "example": "CVE-2024-3400"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Product / vendor words (all must match).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vendor",
      "in": "query",
      "required": false,
      "description": "Vendor name (with product: exact vendor:product).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "product",
      "in": "query",
      "required": false,
      "description": "Product name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cpe",
      "in": "query",
      "required": false,
      "description": "CPE 2.3 name; matched by vendor and product.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cwe",
      "in": "query",
      "required": false,
      "description": "CWE ID, e.g. CWE-79.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "description": "Published on or after this date (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_cvss",
      "in": "query",
      "required": false,
      "description": "Minimum CVSS base score (0-10).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "severity",
      "in": "query",
      "required": false,
      "description": "Minimum severity: low, medium, high, critical.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "kev",
      "in": "query",
      "required": false,
      "description": "Only CVEs in the CISA KEV catalog.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`published`, `cvss`, `epss` or `priority` (KEV, EPSS, CVSS).",
      "schema": {
       "type": "string",
       "default": "published"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results per search (1-50).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ids": {
          "type": "string",
          "description": "Comma-separated CVE IDs (max 100), returned in patch priority order."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "state": {
           "type": "string"
          },
          "published": {
           "type": "string"
          },
          "updated": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "cvss": {
           "type": "object",
           "properties": {
            "score": {
             "type": "number"
            },
            "severity": {
             "type": "string"
            },
            "version": {
             "type": "string"
            },
            "vector": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "epss": {
           "type": "object",
           "properties": {
            "score": {
             "type": "number"
            },
            "percentile": {
             "type": "number"
            }
           }
          },
          "kev": {
           "type": "object",
           "properties": {
            "date_added": {
             "type": "string"
            },
            "due_date": {
             "type": "string"
            },
            "vendor": {
             "type": "string"
            },
            "product": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "ransomware_use": {
             "type": "string"
            },
            "description": {
             "type": "string"
            },
            "required_action": {
             "type": "string"
            },
            "cwes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "notes": {
             "type": "string"
            }
           }
          },
          "ssvc": {
           "type": "object",
           "properties": {
            "exploitation": {
             "type": "string"
            },
            "automatable": {
             "type": "string"
            },
            "technical_impact": {
             "type": "string"
            }
           }
          },
          "url": {
           "type": "string"
          },
          "description": {
           "type": "string"
          },
          "assigner": {
           "type": "string"
          },
          "reserved": {
           "type": "string"
          },
          "cwe": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "affected": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vendor": {
              "type": "string"
             },
             "product": {
              "type": "string"
             },
             "default_status": {
              "type": "string"
             },
             "versions": {
              "type": "array"
             },
             "source": {
              "type": "string"
             }
            }
           }
          },
          "references": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "tags": {
              "type": "array"
             }
            }
           }
          },
          "nvd_url": {
           "type": "string"
          },
          "data_version": {
           "type": "string"
          },
          "epss_date": {
           "type": "string"
          },
          "kev_version": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/domain-check": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Domain Availability Checker",
    "description": "Give a `name` (or `q`) such as \"apibox\" or a Vietnamese phrase like \"Bánh mì Sài Gòn\" (turned into banhmisaigon, plus the Vietnamese IDN form for .vn and .com) and the `tlds` to try (default com, net, org, io, ai, dev, app, co, vn, com.vn, xyz, shop), or a list of full `domains`. Each domain gets a `status`: `registered` (with registrar, creation and expiry dates, status codes and name servers when the registry has RDAP), `probably_available` or `unknown`, and the `method` used.\n\nThe registry is found through the IANA RDAP bootstrap (cached for a day); TLDs without RDAP — .vn and .com.vn (VNNIC has no public RDAP), .io, .co, .me… — and failing registries fall back to DNS: a delegation (NS records) means registered, NXDOMAIN for the name means probably available. `suggest=true` adds available variants on the first two TLDs (prefixes get / try / my / use / go, suffixes app / hq / hub / labs / vn / online, a vowel-less form, the hyphenated Vietnamese slug). Labels are validated (length, hyphens, punycode).\n\nAt most 40 lookups per request, 6 at a time; results are cached for 30 minutes to spare the registries. \"Available\" is never certain — premium, reserved, blocked or just-deleted names can still be refused — so confirm with a registrar before you announce a brand.\n\nDocs: https://apibox.io.vn/docs/domain-check/",
    "operationId": "domainCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/domain-check/"
    },
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": false,
      "description": "Name to check on each TLD (words and Vietnamese allowed); alias `q`. Or a full domain.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "tlds",
      "in": "query",
      "required": false,
      "description": "Comma-separated TLDs (e.g. com,vn,com.vn,io).",
      "schema": {
       "type": "string"
      },
      "example": "com,io,vn,com.vn"
     },
     {
      "name": "domains",
      "in": "query",
      "required": false,
      "description": "Full domain names to check (comma / newline separated or array).",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "suggest",
      "in": "query",
      "required": false,
      "description": "Also check variants and return the available ones.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "registered": {
             "type": "number"
            },
            "probably_available": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "domain": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "method": {
              "type": "string"
             },
             "registrar": {
              "type": "string"
             },
             "created": {
              "type": "string"
             },
             "expires": {
              "type": "string"
             },
             "status_codes": {
              "type": "array"
             },
             "nameservers": {
              "type": "array"
             },
             "unicode": {},
             "note": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "query": "apibox",
         "count": 4,
         "summary": {
          "registered": 2,
          "probably_available": 2
         },
         "results": [
          {
           "domain": "apibox.com",
           "status": "registered",
           "method": "rdap",
           "registrar": "NameCheap, Inc.",
           "created": "2006-05-23T20:23:29Z",
           "expires": "2028-05-23T20:23:29Z",
           "status_codes": [
            "client transfer prohibited"
           ],
           "nameservers": [
            "ns1.afternic.com",
            "ns2.afternic.com"
           ],
           "unicode": null
          },
          {
           "domain": "apibox.io",
           "status": "registered",
           "method": "dns",
           "nameservers": [
            "ns-1404.awsdns-47.org",
            "ns-1847.awsdns-38.co.uk",
            "ns-382.awsdns-47.com",
            "ns-614.awsdns-12.net"
           ],
           "unicode": null
          },
          {
           "domain": "apibox.vn",
           "status": "probably_available",
           "method": "dns",
           "note": "No DNS delegation (no RDAP service for this TLD): a registered domain without name servers would look the same — confirm with the registrar or tracuutenmien.gov.vn",
           "unicode": null
          },
          {
           "domain": "apibox.com.vn",
           "status": "probably_available",
           "method": "dns",
           "note": "No DNS delegation (no RDAP service for this TLD): a registered domain without name servers would look the same — confirm with the registrar or tracuutenmien.gov.vn",
           "unicode": null
          }
         ],
         "note": "\"probably_available\" means the registry (RDAP) or DNS has no record: premium, reserved or just-deleted names can still be refused. Check with a registrar before you buy. .vn names are checked by DNS only (VNNIC has no public RDAP)."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Domain Availability Checker",
    "description": "Give a `name` (or `q`) such as \"apibox\" or a Vietnamese phrase like \"Bánh mì Sài Gòn\" (turned into banhmisaigon, plus the Vietnamese IDN form for .vn and .com) and the `tlds` to try (default com, net, org, io, ai, dev, app, co, vn, com.vn, xyz, shop), or a list of full `domains`. Each domain gets a `status`: `registered` (with registrar, creation and expiry dates, status codes and name servers when the registry has RDAP), `probably_available` or `unknown`, and the `method` used.\n\nThe registry is found through the IANA RDAP bootstrap (cached for a day); TLDs without RDAP — .vn and .com.vn (VNNIC has no public RDAP), .io, .co, .me… — and failing registries fall back to DNS: a delegation (NS records) means registered, NXDOMAIN for the name means probably available. `suggest=true` adds available variants on the first two TLDs (prefixes get / try / my / use / go, suffixes app / hq / hub / labs / vn / online, a vowel-less form, the hyphenated Vietnamese slug). Labels are validated (length, hyphens, punycode).\n\nAt most 40 lookups per request, 6 at a time; results are cached for 30 minutes to spare the registries. \"Available\" is never certain — premium, reserved, blocked or just-deleted names can still be refused — so confirm with a registrar before you announce a brand.\n\nDocs: https://apibox.io.vn/docs/domain-check/",
    "operationId": "domainCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/domain-check/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Name to check on each TLD (words and Vietnamese allowed); alias `q`. Or a full domain."
         },
         "tlds": {
          "type": "string",
          "description": "Comma-separated TLDs (e.g. com,vn,com.vn,io)."
         },
         "domains": {
          "type": "array",
          "items": {},
          "description": "Full domain names to check (comma / newline separated or array)."
         },
         "suggest": {
          "type": "boolean",
          "default": false,
          "description": "Also check variants and return the available ones."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "registered": {
             "type": "number"
            },
            "probably_available": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "domain": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "method": {
              "type": "string"
             },
             "registrar": {
              "type": "string"
             },
             "created": {
              "type": "string"
             },
             "expires": {
              "type": "string"
             },
             "status_codes": {
              "type": "array"
             },
             "nameservers": {
              "type": "array"
             },
             "unicode": {},
             "note": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/counter/{namespace}/{key}/hit": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Hit Counter and Badges",
    "description": "Counters belong to your account and live under a namespace: `POST /v1/counter/{namespace}/{key}/hit` adds 1 and returns the new `value` (the counter is created on the first hit), `/increment?by=5` and `/decrement` change it by any amount up to 1 000 000, `/set` (`value`) and `/reset` (optionally `clear_history=true`) overwrite it, `GET /v1/counter/{namespace}/{key}` reads it with `daily` hits for the last `days` (default 30, up to 365), `PATCH` changes options and `DELETE` removes it. `GET /v1/counter` lists your counters, `GET /v1/counter/{namespace}` one namespace with its total, and `POST /v1/counter` creates one explicitly with a start `value`. Increments are atomic, so concurrent hits are never lost.\n\nWith `unique_window_s` (up to 30 days) a hit counts once per visitor per window: the visitor is your `visitor` value (a session or user id) or the request IP, stored only as a short keyed hash that expires with the window; `hits_total` keeps every hit. With `public_read=true` the counter gets a public, read-only badge at `https://apibox.io.vn/c/{id}.svg` (shields-style; `label`, `color`, `style=flat-square`, `number_format=full|plain`) and JSON at `/c/{id}.json`: no API key, cached for 5 minutes, not counted in your quota. `?preview=badge&value=1234&label=views` renders a badge without an account.\n\nEvery /v1 call — including each hit — counts as one request of your monthly quota, so call `hit` from your server or page script for real events and use the free badge URL to display the number. Plans: Free 20 counters, Starter 500, Pro 5 000.\n\nDocs: https://apibox.io.vn/docs/counter/",
    "operationId": "counterGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/counter/"
    },
    "parameters": [
     {
      "name": "namespace",
      "in": "path",
      "required": true,
      "description": "Group name: 1-64 letters, digits, \"_\", \"-\", \".\".",
      "schema": {
       "type": "string"
      },
      "example": "blog"
     },
     {
      "name": "key",
      "in": "path",
      "required": true,
      "description": "Counter name (same characters). Followed by /hit, /increment, /decrement, /set or /reset.",
      "schema": {
       "type": "string"
      },
      "example": "hello-world"
     },
     {
      "name": "by",
      "in": "query",
      "required": false,
      "description": "increment / decrement: amount (1-1 000 000).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "set / reset / create: new value.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "visitor",
      "in": "query",
      "required": false,
      "description": "Visitor id for unique counting (default: request IP), hashed.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "unique_window_s",
      "in": "query",
      "required": false,
      "description": "Count each visitor once per window (0 = every hit, max 2 592 000).",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "public_read",
      "in": "query",
      "required": false,
      "description": "Enable the public badge /c/{id}.svg and /c/{id}.json.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "description": "GET: days of daily history (0-365).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "preview",
      "in": "query",
      "required": false,
      "description": "`badge`: render a badge from `value`, `label`, `color`, `style` without an account.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "namespace": {
           "type": "string"
          },
          "key": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "public_read": {
           "type": "boolean"
          },
          "unique_window_s": {
           "type": "number"
          },
          "hits_total": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "last_hit_at": {
           "type": "string"
          },
          "badge_url": {
           "type": "string"
          },
          "json_url": {
           "type": "string"
          },
          "counted": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Hit Counter and Badges",
    "description": "Counters belong to your account and live under a namespace: `POST /v1/counter/{namespace}/{key}/hit` adds 1 and returns the new `value` (the counter is created on the first hit), `/increment?by=5` and `/decrement` change it by any amount up to 1 000 000, `/set` (`value`) and `/reset` (optionally `clear_history=true`) overwrite it, `GET /v1/counter/{namespace}/{key}` reads it with `daily` hits for the last `days` (default 30, up to 365), `PATCH` changes options and `DELETE` removes it. `GET /v1/counter` lists your counters, `GET /v1/counter/{namespace}` one namespace with its total, and `POST /v1/counter` creates one explicitly with a start `value`. Increments are atomic, so concurrent hits are never lost.\n\nWith `unique_window_s` (up to 30 days) a hit counts once per visitor per window: the visitor is your `visitor` value (a session or user id) or the request IP, stored only as a short keyed hash that expires with the window; `hits_total` keeps every hit. With `public_read=true` the counter gets a public, read-only badge at `https://apibox.io.vn/c/{id}.svg` (shields-style; `label`, `color`, `style=flat-square`, `number_format=full|plain`) and JSON at `/c/{id}.json`: no API key, cached for 5 minutes, not counted in your quota. `?preview=badge&value=1234&label=views` renders a badge without an account.\n\nEvery /v1 call — including each hit — counts as one request of your monthly quota, so call `hit` from your server or page script for real events and use the free badge URL to display the number. Plans: Free 20 counters, Starter 500, Pro 5 000.\n\nDocs: https://apibox.io.vn/docs/counter/",
    "operationId": "counterPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/counter/"
    },
    "parameters": [
     {
      "name": "namespace",
      "in": "path",
      "required": true,
      "description": "Group name: 1-64 letters, digits, \"_\", \"-\", \".\".",
      "schema": {
       "type": "string"
      },
      "example": "blog"
     },
     {
      "name": "key",
      "in": "path",
      "required": true,
      "description": "Counter name (same characters). Followed by /hit, /increment, /decrement, /set or /reset.",
      "schema": {
       "type": "string"
      },
      "example": "hello-world"
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "description": "GET: days of daily history (0-365).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "preview",
      "in": "query",
      "required": false,
      "description": "`badge`: render a badge from `value`, `label`, `color`, `style` without an account.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "by": {
          "type": "number",
          "default": 1,
          "description": "increment / decrement: amount (1-1 000 000)."
         },
         "value": {
          "type": "number",
          "description": "set / reset / create: new value."
         },
         "visitor": {
          "type": "string",
          "description": "Visitor id for unique counting (default: request IP), hashed."
         },
         "unique_window_s": {
          "type": "number",
          "default": 0,
          "description": "Count each visitor once per window (0 = every hit, max 2 592 000)."
         },
         "public_read": {
          "type": "boolean",
          "default": false,
          "description": "Enable the public badge /c/{id}.svg and /c/{id}.json."
         },
         "clear_history": {
          "type": "boolean",
          "default": false,
          "description": "reset: also delete the daily history."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "namespace": {
           "type": "string"
          },
          "key": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "public_read": {
           "type": "boolean"
          },
          "unique_window_s": {
           "type": "number"
          },
          "hits_total": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "last_hit_at": {
           "type": "string"
          },
          "badge_url": {
           "type": "string"
          },
          "json_url": {
           "type": "string"
          },
          "counted": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "id": "cnt_lqeuenf28r8b7my7",
         "namespace": "blog",
         "key": "hello-world",
         "value": 2,
         "public_read": true,
         "unique_window_s": 86400,
         "hits_total": 3,
         "created_at": "2026-11-11T10:47:43.000Z",
         "updated_at": "2026-11-11T10:47:43.000Z",
         "last_hit_at": "2026-11-11T10:47:43.000Z",
         "badge_url": "https://apibox.io.vn/c/cnt_lqeuenf28r8b7my7.svg",
         "json_url": "https://apibox.io.vn/c/cnt_lqeuenf28r8b7my7.json",
         "counted": false,
         "note": "Already counted for this visitor within 86400 s"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "patch": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Hit Counter and Badges",
    "description": "Counters belong to your account and live under a namespace: `POST /v1/counter/{namespace}/{key}/hit` adds 1 and returns the new `value` (the counter is created on the first hit), `/increment?by=5` and `/decrement` change it by any amount up to 1 000 000, `/set` (`value`) and `/reset` (optionally `clear_history=true`) overwrite it, `GET /v1/counter/{namespace}/{key}` reads it with `daily` hits for the last `days` (default 30, up to 365), `PATCH` changes options and `DELETE` removes it. `GET /v1/counter` lists your counters, `GET /v1/counter/{namespace}` one namespace with its total, and `POST /v1/counter` creates one explicitly with a start `value`. Increments are atomic, so concurrent hits are never lost.\n\nWith `unique_window_s` (up to 30 days) a hit counts once per visitor per window: the visitor is your `visitor` value (a session or user id) or the request IP, stored only as a short keyed hash that expires with the window; `hits_total` keeps every hit. With `public_read=true` the counter gets a public, read-only badge at `https://apibox.io.vn/c/{id}.svg` (shields-style; `label`, `color`, `style=flat-square`, `number_format=full|plain`) and JSON at `/c/{id}.json`: no API key, cached for 5 minutes, not counted in your quota. `?preview=badge&value=1234&label=views` renders a badge without an account.\n\nEvery /v1 call — including each hit — counts as one request of your monthly quota, so call `hit` from your server or page script for real events and use the free badge URL to display the number. Plans: Free 20 counters, Starter 500, Pro 5 000.\n\nDocs: https://apibox.io.vn/docs/counter/",
    "operationId": "counterPatch",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/counter/"
    },
    "parameters": [
     {
      "name": "namespace",
      "in": "path",
      "required": true,
      "description": "Group name: 1-64 letters, digits, \"_\", \"-\", \".\".",
      "schema": {
       "type": "string"
      },
      "example": "blog"
     },
     {
      "name": "key",
      "in": "path",
      "required": true,
      "description": "Counter name (same characters). Followed by /hit, /increment, /decrement, /set or /reset.",
      "schema": {
       "type": "string"
      },
      "example": "hello-world"
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "description": "GET: days of daily history (0-365).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "preview",
      "in": "query",
      "required": false,
      "description": "`badge`: render a badge from `value`, `label`, `color`, `style` without an account.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "by": {
          "type": "number",
          "default": 1,
          "description": "increment / decrement: amount (1-1 000 000)."
         },
         "value": {
          "type": "number",
          "description": "set / reset / create: new value."
         },
         "visitor": {
          "type": "string",
          "description": "Visitor id for unique counting (default: request IP), hashed."
         },
         "unique_window_s": {
          "type": "number",
          "default": 0,
          "description": "Count each visitor once per window (0 = every hit, max 2 592 000)."
         },
         "public_read": {
          "type": "boolean",
          "default": false,
          "description": "Enable the public badge /c/{id}.svg and /c/{id}.json."
         },
         "clear_history": {
          "type": "boolean",
          "default": false,
          "description": "reset: also delete the daily history."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "namespace": {
           "type": "string"
          },
          "key": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "public_read": {
           "type": "boolean"
          },
          "unique_window_s": {
           "type": "number"
          },
          "hits_total": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "last_hit_at": {
           "type": "string"
          },
          "badge_url": {
           "type": "string"
          },
          "json_url": {
           "type": "string"
          },
          "counted": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "delete": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Hit Counter and Badges",
    "description": "Counters belong to your account and live under a namespace: `POST /v1/counter/{namespace}/{key}/hit` adds 1 and returns the new `value` (the counter is created on the first hit), `/increment?by=5` and `/decrement` change it by any amount up to 1 000 000, `/set` (`value`) and `/reset` (optionally `clear_history=true`) overwrite it, `GET /v1/counter/{namespace}/{key}` reads it with `daily` hits for the last `days` (default 30, up to 365), `PATCH` changes options and `DELETE` removes it. `GET /v1/counter` lists your counters, `GET /v1/counter/{namespace}` one namespace with its total, and `POST /v1/counter` creates one explicitly with a start `value`. Increments are atomic, so concurrent hits are never lost.\n\nWith `unique_window_s` (up to 30 days) a hit counts once per visitor per window: the visitor is your `visitor` value (a session or user id) or the request IP, stored only as a short keyed hash that expires with the window; `hits_total` keeps every hit. With `public_read=true` the counter gets a public, read-only badge at `https://apibox.io.vn/c/{id}.svg` (shields-style; `label`, `color`, `style=flat-square`, `number_format=full|plain`) and JSON at `/c/{id}.json`: no API key, cached for 5 minutes, not counted in your quota. `?preview=badge&value=1234&label=views` renders a badge without an account.\n\nEvery /v1 call — including each hit — counts as one request of your monthly quota, so call `hit` from your server or page script for real events and use the free badge URL to display the number. Plans: Free 20 counters, Starter 500, Pro 5 000.\n\nDocs: https://apibox.io.vn/docs/counter/",
    "operationId": "counterDelete",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/counter/"
    },
    "parameters": [
     {
      "name": "namespace",
      "in": "path",
      "required": true,
      "description": "Group name: 1-64 letters, digits, \"_\", \"-\", \".\".",
      "schema": {
       "type": "string"
      },
      "example": "blog"
     },
     {
      "name": "key",
      "in": "path",
      "required": true,
      "description": "Counter name (same characters). Followed by /hit, /increment, /decrement, /set or /reset.",
      "schema": {
       "type": "string"
      },
      "example": "hello-world"
     },
     {
      "name": "by",
      "in": "query",
      "required": false,
      "description": "increment / decrement: amount (1-1 000 000).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "set / reset / create: new value.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "visitor",
      "in": "query",
      "required": false,
      "description": "Visitor id for unique counting (default: request IP), hashed.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "unique_window_s",
      "in": "query",
      "required": false,
      "description": "Count each visitor once per window (0 = every hit, max 2 592 000).",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "public_read",
      "in": "query",
      "required": false,
      "description": "Enable the public badge /c/{id}.svg and /c/{id}.json.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "description": "GET: days of daily history (0-365).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "preview",
      "in": "query",
      "required": false,
      "description": "`badge`: render a badge from `value`, `label`, `color`, `style` without an account.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "namespace": {
           "type": "string"
          },
          "key": {
           "type": "string"
          },
          "value": {
           "type": "number"
          },
          "public_read": {
           "type": "boolean"
          },
          "unique_window_s": {
           "type": "number"
          },
          "hits_total": {
           "type": "number"
          },
          "created_at": {
           "type": "string"
          },
          "updated_at": {
           "type": "string"
          },
          "last_hit_at": {
           "type": "string"
          },
          "badge_url": {
           "type": "string"
          },
          "json_url": {
           "type": "string"
          },
          "counted": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/emv-qr": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "EMV Payment QR (PromptPay, KHQR, PayNow…)",
    "description": "`action=decode` with a `payload` (the text inside the QR; decode an image first with `/v1/qr-decode`) splits the EMVCo merchant-presented TLV tree, checks the CRC-16 of field 63 and the mandatory fields, and detects the scheme from the identifier in fields 26–51: VietQR / NAPAS 247, PromptPay (Thailand), KHQR / Bakong (Cambodia), Lao QR (LAPNet), QRIS (Indonesia), DuitNow (Malaysia), PayNow / SGQR (Singapore), QR Ph, FPS (Hong Kong), Pix and UPI. It returns the merchant name and city, category code, amount, currency (ISO 4217), tip / fee settings, additional data (bill number, reference, terminal…), the language template and scheme details such as the PromptPay proxy, the PayNow UEN or the Bakong account. `payable_from_vietnam` says whether Vietnamese bank apps can pay the code through the NAPAS cross-border QR links (Thailand, Cambodia, Laos, China).\n\n`action=create` builds a payload with the right CRC: `scheme=promptpay` (`proxy` = Thai mobile, 13-digit ID or e-wallet ID), `paynow` (mobile or UEN, `editable`, `expiry`), `khqr` (`bakong_account_id`, `merchant_name`, KHR or USD, creation / expiry timestamps), `vietqr` (`bank`, `account`) or `generic` with any tags in `fields`. Add `amount`, `merchant_name`, `merchant_city`, `bill_number`, `reference`… Add `format=png`, `svg` or `json_image` to get the QR image from the `qr` engine (size, colour, margin parameters).\n\nScheme identifiers come from the central bank / scheme documents; Lao QR and QR Ph are detected from observed codes (marked `confidence: observed`). `action=schemes` lists them.\n\nDocs: https://apibox.io.vn/docs/emv-qr/",
    "operationId": "emvQrGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/emv-qr/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`decode` (default when `payload` is given), `create` or `schemes`. Also as a path: /v1/emv-qr/decode.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "payload",
      "in": "query",
      "required": false,
      "description": "EMVCo QR text to decode (also accepts upi:// links).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scheme",
      "in": "query",
      "required": false,
      "description": "For create: `promptpay`, `paynow`, `khqr`, `vietqr` or `generic`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "proxy",
      "in": "query",
      "required": false,
      "description": "PromptPay mobile / ID / e-wallet ID, PayNow mobile or UEN.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "bakong_account_id",
      "in": "query",
      "required": false,
      "description": "KHQR Bakong account, e.g. `john_smith@aclb`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "bank",
      "in": "query",
      "required": false,
      "description": "VietQR: bank code, name or BIN (with `account`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Amount (makes a dynamic QR).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "currency",
      "in": "query",
      "required": false,
      "description": "KHQR only: `KHR` (default) or `USD`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "merchant_name",
      "in": "query",
      "required": false,
      "description": "Merchant name (ASCII, max 25).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "merchant_city",
      "in": "query",
      "required": false,
      "description": "Merchant city (max 15).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "bill_number",
      "in": "query",
      "required": false,
      "description": "Additional data: bill number; also `reference`, `store_label`, `terminal_label`, `mobile_number`, `purpose`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "Create: `png`, `svg` or `json_image` to also render the QR (default JSON payload only).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "emv_complete": {
           "type": "boolean"
          },
          "crc": {
           "type": "object",
           "properties": {
            "present": {
             "type": "boolean"
            },
            "value": {
             "type": "string"
            },
            "expected": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            }
           }
          },
          "payload_format_indicator": {
           "type": "string"
          },
          "initiation": {
           "type": "string"
          },
          "scheme": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "operator": {
             "type": "string"
            },
            "confidence": {
             "type": "string"
            }
           }
          },
          "merchant_accounts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tag": {
              "type": "string"
             },
             "guid": {
              "type": "string"
             },
             "scheme": {
              "type": "object"
             },
             "details": {
              "type": "object"
             },
             "sub": {
              "type": "array"
             }
            }
           }
          },
          "merchant": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "city": {
             "type": "string"
            },
            "country": {
             "type": "string"
            }
           }
          },
          "amount": {
           "type": "number"
          },
          "currency": {
           "type": "object",
           "properties": {
            "numeric": {
             "type": "string"
            },
            "code": {
             "type": "string"
            }
           }
          },
          "tip": {},
          "additional_data": {},
          "language_template": {},
          "payable_from_vietnam": {
           "type": "object",
           "properties": {
            "domestic": {
             "type": "boolean"
            },
            "napas_link": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "fields": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "EMV Payment QR (PromptPay, KHQR, PayNow…)",
    "description": "`action=decode` with a `payload` (the text inside the QR; decode an image first with `/v1/qr-decode`) splits the EMVCo merchant-presented TLV tree, checks the CRC-16 of field 63 and the mandatory fields, and detects the scheme from the identifier in fields 26–51: VietQR / NAPAS 247, PromptPay (Thailand), KHQR / Bakong (Cambodia), Lao QR (LAPNet), QRIS (Indonesia), DuitNow (Malaysia), PayNow / SGQR (Singapore), QR Ph, FPS (Hong Kong), Pix and UPI. It returns the merchant name and city, category code, amount, currency (ISO 4217), tip / fee settings, additional data (bill number, reference, terminal…), the language template and scheme details such as the PromptPay proxy, the PayNow UEN or the Bakong account. `payable_from_vietnam` says whether Vietnamese bank apps can pay the code through the NAPAS cross-border QR links (Thailand, Cambodia, Laos, China).\n\n`action=create` builds a payload with the right CRC: `scheme=promptpay` (`proxy` = Thai mobile, 13-digit ID or e-wallet ID), `paynow` (mobile or UEN, `editable`, `expiry`), `khqr` (`bakong_account_id`, `merchant_name`, KHR or USD, creation / expiry timestamps), `vietqr` (`bank`, `account`) or `generic` with any tags in `fields`. Add `amount`, `merchant_name`, `merchant_city`, `bill_number`, `reference`… Add `format=png`, `svg` or `json_image` to get the QR image from the `qr` engine (size, colour, margin parameters).\n\nScheme identifiers come from the central bank / scheme documents; Lao QR and QR Ph are detected from observed codes (marked `confidence: observed`). `action=schemes` lists them.\n\nDocs: https://apibox.io.vn/docs/emv-qr/",
    "operationId": "emvQrPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/emv-qr/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "`decode` (default when `payload` is given), `create` or `schemes`. Also as a path: /v1/emv-qr/decode."
         },
         "payload": {
          "type": "string",
          "description": "EMVCo QR text to decode (also accepts upi:// links)."
         },
         "scheme": {
          "type": "string",
          "description": "For create: `promptpay`, `paynow`, `khqr`, `vietqr` or `generic`."
         },
         "proxy": {
          "type": "string",
          "description": "PromptPay mobile / ID / e-wallet ID, PayNow mobile or UEN."
         },
         "bakong_account_id": {
          "type": "string",
          "description": "KHQR Bakong account, e.g. `john_smith@aclb`."
         },
         "bank": {
          "type": "string",
          "description": "VietQR: bank code, name or BIN (with `account`)."
         },
         "amount": {
          "type": "number",
          "description": "Amount (makes a dynamic QR)."
         },
         "currency": {
          "type": "string",
          "description": "KHQR only: `KHR` (default) or `USD`."
         },
         "merchant_name": {
          "type": "string",
          "description": "Merchant name (ASCII, max 25)."
         },
         "merchant_city": {
          "type": "string",
          "description": "Merchant city (max 15)."
         },
         "bill_number": {
          "type": "string",
          "description": "Additional data: bill number; also `reference`, `store_label`, `terminal_label`, `mobile_number`, `purpose`."
         },
         "fields": {
          "type": "object",
          "description": "Generic create: EMV tags, templates as nested objects, e.g. `{\"26\": {\"00\": \"SG.PAYNOW\", …}, \"52\": \"0000\"}`."
         },
         "format": {
          "type": "string",
          "description": "Create: `png`, `svg` or `json_image` to also render the QR (default JSON payload only)."
         }
        }
       },
       "example": {
        "action": "decode",
        "payload": "00020101021229370016A0000006770101110113006681234567853037645402505802TH5913Coffee Corner6007Bangkok63040854"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "emv_complete": {
           "type": "boolean"
          },
          "crc": {
           "type": "object",
           "properties": {
            "present": {
             "type": "boolean"
            },
            "value": {
             "type": "string"
            },
            "expected": {
             "type": "string"
            },
            "valid": {
             "type": "boolean"
            }
           }
          },
          "payload_format_indicator": {
           "type": "string"
          },
          "initiation": {
           "type": "string"
          },
          "scheme": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "country": {
             "type": "string"
            },
            "operator": {
             "type": "string"
            },
            "confidence": {
             "type": "string"
            }
           }
          },
          "merchant_accounts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "tag": {
              "type": "string"
             },
             "guid": {
              "type": "string"
             },
             "scheme": {
              "type": "object"
             },
             "details": {
              "type": "object"
             },
             "sub": {
              "type": "array"
             }
            }
           }
          },
          "merchant": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "city": {
             "type": "string"
            },
            "country": {
             "type": "string"
            }
           }
          },
          "amount": {
           "type": "number"
          },
          "currency": {
           "type": "object",
           "properties": {
            "numeric": {
             "type": "string"
            },
            "code": {
             "type": "string"
            }
           }
          },
          "tip": {},
          "additional_data": {},
          "language_template": {},
          "payable_from_vietnam": {
           "type": "object",
           "properties": {
            "domestic": {
             "type": "boolean"
            },
            "napas_link": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "fields": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "format": "emv_mpm",
         "valid": true,
         "emv_complete": false,
         "crc": {
          "present": true,
          "value": "0854",
          "expected": "0854",
          "valid": true
         },
         "payload_format_indicator": "01",
         "initiation": "dynamic",
         "scheme": {
          "id": "promptpay",
          "name": "PromptPay / Thai QR Payment",
          "country": "TH",
          "operator": "NITMX / Bank of Thailand",
          "confidence": "documented"
         },
         "merchant_accounts": [
          {
           "tag": "29",
           "guid": "A000000677010111",
           "scheme": {
            "id": "promptpay",
            "name": "PromptPay / Thai QR Payment",
            "country": "TH",
            "operator": "NITMX / Bank of Thailand",
            "confidence": "documented"
           },
           "details": {
            "type": "mobile",
            "proxy": "0066812345678",
            "mobile": "0812345678"
           },
           "sub": [
            {
             "id": "00",
             "value": "A000000677010111"
            },
            {
             "id": "01",
             "value": "0066812345678"
            }
           ]
          }
         ],
         "merchant": {
          "name": "Coffee Corner",
          "city": "Bangkok",
          "country": "TH"
         },
         "amount": 50,
         "currency": {
          "numeric": "764",
          "code": "THB"
         },
         "tip": null,
         "additional_data": null,
         "language_template": null,
         "payable_from_vietnam": {
          "domestic": false,
          "napas_link": "Thailand (PromptPay) - live since 2024",
          "note": "Payable from Vietnamese bank apps that joined the NAPAS cross-border QR programme; the amount is converted by your bank."
         },
         "warnings": [
          "Mandatory field 52 (merchant_category_code) is missing"
         ],
         "fields": [
          {
           "id": "00",
           "name": "payload_format_indicator",
           "length": 2,
           "value": "01"
          },
          {
           "id": "01",
           "name": "point_of_initiation",
           "length": 2,
           "value": "12"
          },
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/bank-formats": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Bank Statement Formats (MT940, camt, OFX, BAI2)",
    "description": "Send a statement as `text`, a `file` upload or a raw body. The format is detected (or set `from`): SWIFT MT940 / MT942 (with or without the {1:}{2:}{4:} blocks; field 86 in the German ?-structure with SEPA keywords EREF+ / MREF+ / SVWZ+, the /EREF/NAME/IBAN/REMI/ slash structure, or free text), ISO 20022 camt.052 / camt.053 / camt.054 (any version), OFX / QFX 1.x SGML and 2.x XML (bank and credit-card statements) and BAI2 (continuation records, funds types, amounts in minor units).\n\nEvery statement becomes `account` (IBAN, number, BIC, currency, owner), opening / closing / available balances and `transactions` with booking and value dates, a signed `amount`, `direction`, bank transaction code with description (ISO 20022 domain / family / sub-family, BAI type codes), bank and customer references, end-to-end ID, mandate and creditor IDs, counterparty name / IBAN / BIC and remittance information. `checks` recomputes opening + transactions = closing and compares stated counts. `format=csv` returns one row per transaction.\n\n`action=pain001` builds an ISO 20022 credit transfer (pain.001.001.09, or `version: \"03\"`) from JSON `debtor` and `payments`, checking IBANs (country length + mod 97), BICs and amounts; all-EUR / IBAN batches are marked SEPA. `action=iban` checks one IBAN.\n\nDocs: https://apibox.io.vn/docs/bank-formats/",
    "operationId": "bankFormatsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/bank-formats/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Statement content (or send a file / raw body)."
         },
         "from": {
          "type": "string",
          "description": "Force the input format: `mt940`, `mt942`, `camt`, `ofx`, `bai2`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `csv` (parse); `xml` returns the raw pain.001 file."
         },
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `pain001` or `iban`."
         },
         "debtor": {
          "type": "object",
          "description": "pain001: `{name, iban, bic}` of the paying account."
         },
         "payments": {
          "type": "array",
          "items": {},
          "description": "pain001: `[{amount, currency, creditor: {name, iban, bic}, end_to_end_id, remittance | structured_reference}]` (max 5000)."
         },
         "execution_date": {
          "type": "string",
          "description": "pain001: requested execution date (YYYY-MM-DD)."
         }
        }
       },
       "example": {
        "text": ":20:STMT20261111\n:25:DEUTDEFF/DE89370400440532013000\n:28C:00221/001\n:60F:C261110EUR1250,00\n:61:2611101110D45,50NDDTNONREF//BANKREF001\n:86:/EREF/INV-2026-001/NAME/Stadtwerke Musterstadt/IBAN/DE02120300000000202051/REMI/USTD//Strom November/\n:61:2611111111C1000,00NTRFINV7788//BANKREF002\n:86:/EREF/E2E-7788/NAME/ACME GmbH/IBAN/DE75512108001245126199/REMI/USTD//Invoice 7788/\n:62F:C261111EUR2204,50\n-"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "text": {
          "type": "string",
          "description": "Statement content (or send a file / raw body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Statement file (.sta, .mt940, .xml, .ofx, .qfx, .bai)."
         },
         "from": {
          "type": "string",
          "description": "Force the input format: `mt940`, `mt942`, `camt`, `ofx`, `bai2`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `csv` (parse); `xml` returns the raw pain.001 file."
         },
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `pain001` or `iban`."
         },
         "debtor": {
          "type": "object",
          "description": "pain001: `{name, iban, bic}` of the paying account."
         },
         "payments": {
          "type": "array",
          "items": {},
          "description": "pain001: `[{amount, currency, creditor: {name, iban, bic}, end_to_end_id, remittance | structured_reference}]` (max 5000)."
         },
         "execution_date": {
          "type": "string",
          "description": "pain001: requested execution date (YYYY-MM-DD)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "format": {
           "type": "string"
          },
          "statements_count": {
           "type": "number"
          },
          "transactions_count": {
           "type": "number"
          },
          "balance_ok": {
           "type": "boolean"
          },
          "statements": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "account": {
              "type": "object"
             },
             "transactions": {
              "type": "array"
             },
             "statement_id": {
              "type": "string"
             },
             "sequence": {
              "type": "string"
             },
             "opening_balance": {
              "type": "object"
             },
             "closing_balance": {
              "type": "object"
             },
             "period": {
              "type": "object"
             },
             "checks": {
              "type": "object"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "format": "mt940",
         "statements_count": 1,
         "transactions_count": 2,
         "balance_ok": true,
         "statements": [
          {
           "account": {
            "iban": "DE89370400440532013000",
            "bic": "DEUTDEFF",
            "number": "DE89370400440532013000",
            "currency": "EUR"
           },
           "transactions": [
            {
             "booking_date": "2026-11-10",
             "value_date": "2026-11-10",
             "amount": -45.5,
             "currency": "EUR",
             "direction": "debit",
             "code": "NDDT",
             "bank_reference": "BANKREF001",
             "end_to_end_id": "INV-2026-001",
             "counterparty": {
              "name": "Stadtwerke Musterstadt",
              "iban": "DE02120300000000202051"
             },
             "remittance": "Strom November",
             "description": "/EREF/INV-2026-001/NAME/Stadtwerke Musterstadt/IBAN/DE02120300000000202051/REMI/USTD//Strom November/"
            },
            {
             "booking_date": "2026-11-11",
             "value_date": "2026-11-11",
             "amount": 1000,
             "currency": "EUR",
             "direction": "credit",
             "code": "NTRF",
             "customer_reference": "INV7788",
             "bank_reference": "BANKREF002",
             "end_to_end_id": "E2E-7788",
             "counterparty": {
              "name": "ACME GmbH",
              "iban": "DE75512108001245126199"
             },
             "remittance": "Invoice 7788",
             "description": "…"
            }
           ],
           "statement_id": "STMT20261111",
           "sequence": "00221/001",
           "opening_balance": {
            "amount": 1250,
            "currency": "EUR",
            "date": "2026-11-10",
            "type": "final"
           },
           "closing_balance": {
            "amount": 2204.5,
            "currency": "EUR",
            "date": "2026-11-11",
            "type": "final"
           },
           "period": {
            "from": "2026-11-10",
            "to": "2026-11-11"
           },
           "checks": {
            "transactions": 2,
            "credits": {
             "count": 1,
             "amount": 1000
            },
            "debits": {
             "count": 1,
             "amount": 45.5
            },
            "net": 954.5,
            "computed_closing": 2204.5,
            "balance_ok": true
           }
          }
         ],
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/eu-einvoice": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "EU E-Invoice (Peppol, XRechnung, Factur-X)",
    "description": "`action=parse` (or `validate`) takes an XML invoice (`xml`, a `file` or a raw body) or a Factur-X / ZUGFeRD 2.x PDF (the embedded factur-x.xml / zugferd-invoice.xml is extracted). UBL 2.1 Invoice / CreditNote (Peppol BIS Billing 3.0, XRechnung UBL, plain EN 16931) and UN/CEFACT CII (Factur-X / ZUGFeRD profiles MINIMUM to EXTENDED, XRechnung CII) are normalised to one JSON: number, dates, type code, currencies, references, seller / buyer / payee / tax representative (VAT ID, legal ID, electronic address, address, contact), delivery, payment means (IBAN, BIC, card, mandate), document allowances and charges, VAT breakdown, totals and lines (quantity, unit, price, item identifiers, classification, VAT category).\n\nThe `validation` block is a pre-validation: our own JavaScript implementation of the main EN 16931 business rules — cardinality rules BR-01…BR-65, the calculation rules BR-CO-10…BR-CO-16 (line sum, allowances, charges, totals, VAT total, amount due), VAT category rules for S, Z, E, AE, K, G, O, L, M (taxable amount and tax per rate, exemption reasons, VAT identifiers), BR-DEC decimals — plus Peppol (PEPPOL-EN16931-R001, R003, R010, R020, R120…) and XRechnung (BR-DE-1…BR-DE-17) profile rules, chosen from the customization ID. It does not run the XSD or the official Schematron (EUPL): confirm with the official validator before going live.\n\n`action=create` builds UBL (`syntax=ubl`, `profile` peppol by default, xrechnung or en16931) or CII (`syntax=cii`, Factur-X EN 16931 / XRechnung) from the same JSON; missing line nets, VAT breakdown and totals are calculated, the result is re-parsed and validated. Send a `pdf` with `syntax=cii` to embed factur-x.xml into it (associated file + XMP metadata; the PDF itself is not converted to PDF/A-3).\n\nDocs: https://apibox.io.vn/docs/eu-einvoice/",
    "operationId": "euEinvoicePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/eu-einvoice/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `validate` (findings only) or `create`. Also as a path: /v1/eu-einvoice/validate."
         },
         "xml": {
          "type": "string",
          "description": "Invoice XML (UBL or CII)."
         },
         "invoice": {
          "type": "object",
          "description": "create: invoice JSON (same shape as the parse output)."
         },
         "syntax": {
          "type": "string",
          "default": "ubl",
          "description": "create: `ubl` or `cii`."
         },
         "profile": {
          "type": "string",
          "description": "create: `peppol` (UBL default), `xrechnung`, `en16931` (CII default) or `facturx`."
         },
         "format": {
          "type": "string",
          "description": "create: `xml` returns the raw XML file; `json` with a PDF returns it as base64."
         }
        }
       },
       "example": {
        "action": "create",
        "syntax": "ubl",
        "profile": "peppol",
        "invoice": {
         "number": "INV-2026-0042",
         "issue_date": "2026-11-11",
         "due_date": "2026-12-11",
         "currency": "EUR",
         "buyer_reference": "PO-778",
         "seller": {
          "name": "Saigon Software JSC",
          "vat_id": "VN0312345678",
          "electronic_address": {
           "id": "0312345678",
           "scheme": "9901"
          },
          "address": {
           "line1": "12 Nguyen Hue",
           "city": "Ho Chi Minh City",
           "postcode": "700000",
           "country": "VN"
          }
         },
         "buyer": {
          "name": "Brussels Retail SA",
          "vat_id": "BE0123456749",
          "electronic_address": {
           "id": "0123456749",
           "scheme": "0208"
          },
          "address": {
           "line1": "Rue Neuve 1",
           "city": "Brussels",
           "postcode": "1000",
           "country": "BE"
          }
         },
         "payment": {
          "means_code": "58",
          "accounts": [
           {
            "iban": "BE71096123456769"
           }
          ]
         },
         "lines": [
          {
           "quantity": 10,
           "unit": "HUR",
           "price": {
            "net": 45
           },
           "item": {
            "name": "Software development",
            "vat_category": "AE",
            "vat_rate": 0
           }
          }
         ]
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `validate` (findings only) or `create`. Also as a path: /v1/eu-einvoice/validate."
         },
         "xml": {
          "type": "string",
          "description": "Invoice XML (UBL or CII)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "XML file or Factur-X / ZUGFeRD PDF."
         },
         "invoice": {
          "type": "object",
          "description": "create: invoice JSON (same shape as the parse output)."
         },
         "syntax": {
          "type": "string",
          "default": "ubl",
          "description": "create: `ubl` or `cii`."
         },
         "profile": {
          "type": "string",
          "description": "create: `peppol` (UBL default), `xrechnung`, `en16931` (CII default) or `facturx`."
         },
         "pdf": {
          "type": "string",
          "format": "binary",
          "description": "create with `syntax=cii`: visual invoice PDF to embed factur-x.xml into (returns a PDF)."
         },
         "format": {
          "type": "string",
          "description": "create: `xml` returns the raw XML file; `json` with a PDF returns it as base64."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "syntax": {
           "type": "string"
          },
          "profile": {
           "type": "string"
          },
          "totals": {
           "type": "object",
           "properties": {
            "line_net": {
             "type": "number"
            },
            "tax_exclusive": {
             "type": "number"
            },
            "vat": {
             "type": "number"
            },
            "tax_inclusive": {
             "type": "number"
            },
            "payable": {
             "type": "number"
            }
           }
          },
          "vat_breakdown": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "category": {
              "type": "string"
             },
             "rate": {
              "type": "number"
             },
             "taxable": {
              "type": "number"
             },
             "tax": {
              "type": "number"
             },
             "exemption_reason": {
              "type": "string"
             }
            }
           }
          },
          "validation": {
           "type": "object",
           "properties": {
            "valid": {
             "type": "boolean"
            },
            "fatal": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "note": {
             "type": "string"
            },
            "findings": {
             "type": "array"
            }
           }
          },
          "xml": {
           "type": "string"
          }
         }
        },
        "example": {
         "syntax": "UBL",
         "profile": "peppol-bis-3",
         "totals": {
          "line_net": 450,
          "tax_exclusive": 450,
          "vat": 0,
          "tax_inclusive": 450,
          "payable": 450
         },
         "vat_breakdown": [
          {
           "category": "AE",
           "rate": 0,
           "taxable": 450,
           "tax": 0,
           "exemption_reason": "Reverse charge"
          }
         ],
         "validation": {
          "valid": true,
          "fatal": 0,
          "warnings": 0,
          "note": "Pre-validation: own implementation of the main EN 16931 business rules (BR-xx, BR-CO-xx, VAT category rules, BR-DEC) and Peppol / XRechnung profile rules, without XSD and without the official Schematron. Check with the official validator before go-live.",
          "findings": []
         },
         "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" …><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>…"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/edi-parse": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "EDI Parser (EDIFACT, X12)",
    "description": "Send an interchange as `edi`, a file or a raw body. The standard is detected: UN/EDIFACT (UNA service string advice with custom separators and release character, UNB / UNG / UNH envelopes) or ANSI X12 (separators read from the fixed-width ISA, ISA / GS / ST envelopes, repetition separator). Each EDIFACT segment comes with its elements and components (release characters removed) and the segment name for common segments; each message gets its type (ORDERS, INVOIC, DESADV, IFTMIN, COPARN, CUSCAR…), version and BGM document number. X12 transaction sets get their type title (850, 810, 856, 997…) and positional element ids (BEG01, BEG02…).\n\nEnvelope checks: UNT / SE segment counts and references, UNZ / UNE / GE / IEA counts and control numbers, missing trailers. `action=validate` returns only the checks.\n\n`action=ack` builds the acknowledgement for the received interchange: an X12 997 (AK1 / AK2 / AK5 / AK9 with accepted, partially accepted or rejected status and error codes) or an EDIFACT CONTRL (UCI / UCM with action codes 7 / 4 and syntax error codes 28 / 29). `action=generate` turns JSON into EDI: `messages` (EDIFACT) or `transactions` (X12) are wrapped with UNB / UNH / UNT / UNZ or ISA / GS / ST / SE / GE / IEA with correct counts and control numbers, or `segments` are serialised as given (with release-character escaping).\n\nDocs: https://apibox.io.vn/docs/edi-parse/",
    "operationId": "ediParsePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/edi-parse/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "edi": {
          "type": "string",
          "description": "EDI interchange text (or a file / raw body)."
         },
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `validate`, `ack` or `generate`. Also as a path: /v1/edi-parse/ack."
         },
         "standard": {
          "type": "string",
          "description": "`edifact` or `x12` (auto-detected when parsing)."
         },
         "messages": {
          "type": "array",
          "items": {},
          "description": "generate (EDIFACT): `[{type, version, release, agency, association, segments: [[\"BGM\",\"220\",\"PO1\",\"9\"], …]}]`, with `sender`, `recipient`, `control_reference`."
         },
         "transactions": {
          "type": "array",
          "items": {},
          "description": "generate (X12): `[{type: \"810\", segments: [[\"BIG\", …], …]}]`, with `sender`, `receiver`, `control_number`, `version`, `usage`."
         },
         "segments": {
          "type": "array",
          "items": {},
          "description": "generate: complete segment list serialised as is."
         },
         "format": {
          "type": "string",
          "description": "`edi` returns the raw EDI text (generate / ack)."
         }
        }
       },
       "example": {
        "edi": "UNA:+.? '\nUNB+UNOC:3+5412345000013:14+4012345000016:14+261111:1200+00000001++ORDERS'\nUNH+1+ORDERS:D:96A:UN:EAN008'\nBGM+220+PO-2026-778+9'\nDTM+137:20261111:102'\nDTM+2:20261120:102'\nFTX+AAI+++Please deliver to dock 3?: before 10?+00'\nNAD+BY+5412345000013::9'\nNAD+SU+4012345000016::9'\nLIN+1++4000862141404:SRS'\nQTY+21:48'\nPRI+AAA:12.50'\nLIN+2++4000862141411:SRS'\nQTY+21:12'\nUNS+S'\nCNT+2:2'\nUNT+15+1'\nUNZ+1+00000001'\n"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "edi": {
          "type": "string",
          "description": "EDI interchange text (or a file / raw body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "EDI file."
         },
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `validate`, `ack` or `generate`. Also as a path: /v1/edi-parse/ack."
         },
         "standard": {
          "type": "string",
          "description": "`edifact` or `x12` (auto-detected when parsing)."
         },
         "messages": {
          "type": "array",
          "items": {},
          "description": "generate (EDIFACT): `[{type, version, release, agency, association, segments: [[\"BGM\",\"220\",\"PO1\",\"9\"], …]}]`, with `sender`, `recipient`, `control_reference`."
         },
         "transactions": {
          "type": "array",
          "items": {},
          "description": "generate (X12): `[{type: \"810\", segments: [[\"BIG\", …], …]}]`, with `sender`, `receiver`, `control_number`, `version`, `usage`."
         },
         "segments": {
          "type": "array",
          "items": {},
          "description": "generate: complete segment list serialised as is."
         },
         "format": {
          "type": "string",
          "description": "`edi` returns the raw EDI text (generate / ack)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "standard": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "message_types": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "segment_count": {
           "type": "number"
          },
          "separators": {
           "type": "object",
           "properties": {
            "component": {
             "type": "string"
            },
            "element": {
             "type": "string"
            },
            "decimal": {
             "type": "string"
            },
            "release": {
             "type": "string"
            },
            "repetition": {
             "type": "string"
            },
            "segment": {
             "type": "string"
            }
           }
          },
          "errors": {
           "type": "array"
          },
          "warnings": {
           "type": "array"
          },
          "interchanges": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "una": {
              "type": "boolean"
             },
             "syntax": {
              "type": "object"
             },
             "sender": {
              "type": "object"
             },
             "recipient": {
              "type": "object"
             },
             "prepared": {
              "type": "object"
             },
             "control_reference": {
              "type": "string"
             },
             "application_reference": {
              "type": "string"
             },
             "ack_requested": {
              "type": "boolean"
             },
             "test": {
              "type": "boolean"
             },
             "groups": {
              "type": "array"
             },
             "messages": {
              "type": "array"
             },
             "trailer": {
              "type": "object"
             }
            }
           }
          }
         }
        },
        "example": {
         "standard": "edifact",
         "valid": true,
         "message_types": [
          "ORDERS Purchase order"
         ],
         "segment_count": 17,
         "separators": {
          "component": ":",
          "element": "+",
          "decimal": ".",
          "release": "?",
          "repetition": "*",
          "segment": "'"
         },
         "errors": [],
         "warnings": [],
         "interchanges": [
          {
           "una": true,
           "syntax": {
            "identifier": "UNOC",
            "version": "3"
           },
           "sender": {
            "id": "5412345000013",
            "qualifier": "14"
           },
           "recipient": {
            "id": "4012345000016",
            "qualifier": "14"
           },
           "prepared": {
            "date": "261111",
            "time": "1200"
           },
           "control_reference": "00000001",
           "application_reference": "ORDERS",
           "ack_requested": false,
           "test": false,
           "groups": [],
           "messages": [
            {
             "reference": "1",
             "type": "ORDERS",
             "version": "D",
             "release": "96A",
             "agency": "UN",
             "association": "EAN008",
             "name": "Purchase order",
             "segments": [
              {
               "tag": "UNH",
               "name": "Message header",
               "elements": [
                "1",
                [
                 "ORDERS",
                 "D",
                 "96A",
                 "UN",
                 "EAN008"
                ]
               ]
              },
              {
               "tag": "BGM",
               "name": "Beginning of message",
               "elements": [
                "220",
                "PO-2026-778",
                "9"
               ]
              },
              {
               "tag": "DTM",
               "name": "Date/time/period",
               "elements": [
                [
                 "137",
                 "20261111",
                 "102"
                ]
               ]
              },
              {
               "tag": "DTM",
               "name": "Date/time/period",
               "elements": [
                [
                 "2",
                 "20261120",
                 "102"
                ]
               ]
              },
              {
               "tag": "FTX",
               "name": "Free text",
               "elements": [
                "AAI",
                "",
                "",
                "Please deliver to dock 3: before 10+00"
               ]
              },
              "…"
             ],
             "trailer": {
              "segment_count": 15,
              "reference": "1"
             },
             "segment_count": 15,
             "document": {
              "code": "220",
              "number": "PO-2026-778",
              "function": "9"
             }
            }
           ],
           "trailer": {
            "count": 1,
            "reference": "00000001"
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/geo-convert": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Geodata Converter (KML, GPX, Shapefile, WKT)",
    "description": "Send the data as a `file` (KML, KMZ, GPX, Shapefile .zip with .shp / .dbf / .prj / .cpg, CSV, WKT, WKB, GeoJSON) or as `data` text; the format is detected or set with `from`. KML / KMZ placemarks keep their name, description and ExtendedData; GPX waypoints, routes and tracks (elevation and times) are read; Shapefiles are reprojected from their .prj to WGS84 and decoded with the .cpg code page; CSV needs lat / lon columns (also “vĩ độ” / “kinh độ”, or set `lat_column` / `lon_column`) or a WKT column; WKT and hex / base64 WKB (EWKB with SRID, Z) are one geometry per line.\n\n`to` chooses the output: `geojson` (default, as an object), `kml`, `gpx` (polygons become tracks of their outer ring), `csv` (lat / lon for points, otherwise a WKT column), `wkt` or `wkb` (hex). `simplify` applies Douglas–Peucker with a tolerance in metres, `precision` rounds coordinates. Reproject with `from_crs` / `to_crs`: EPSG:4326, EPSG:3857, UTM (EPSG:326xx / 327xx), VN-2000 UTM (EPSG:3405 / 3406) and VN-2000 TM-3 as `vn2000:<central meridian>` (e.g. `vn2000:105.5` for Hà Nội) with the national 7-parameter transformation (same as /v1/vn-vn2000), or any proj4 string / WKT.\n\nThe response gives the feature count, geometry types, coordinate count before / after simplification and the bbox; `download=true` returns the file itself.\n\nDocs: https://apibox.io.vn/docs/geo-convert/",
    "operationId": "geoConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/geo-convert/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "data": {
          "type": "string",
          "description": "Input as text (KML, GPX, GeoJSON, WKT, hex WKB, CSV)."
         },
         "from": {
          "type": "string",
          "description": "Input format: `geojson`, `kml`, `kmz`, `gpx`, `shp`, `wkt`, `wkb`, `csv` (auto-detected)."
         },
         "to": {
          "type": "string",
          "default": "geojson",
          "description": "Output: `geojson`, `kml`, `gpx`, `csv`, `wkt`, `wkb`."
         },
         "from_crs": {
          "type": "string",
          "description": "Source CRS when the data is not WGS84 lon/lat (EPSG code, `vn2000:105.5`, proj4 or WKT)."
         },
         "to_crs": {
          "type": "string",
          "description": "Target CRS (default EPSG:4326)."
         },
         "simplify": {
          "type": "number",
          "description": "Douglas–Peucker tolerance in metres (lon/lat output)."
         },
         "precision": {
          "type": "number",
          "description": "Decimals kept (default 7 for degrees, 3 for metres)."
         },
         "download": {
          "type": "boolean",
          "default": false,
          "description": "Return the converted file instead of JSON."
         }
        }
       },
       "example": {
        "data": "<kml xmlns=\"http://www.opengis.net/kml/2.2\"><Document><Placemark><name>Hồ Gươm</name><Point><coordinates>105.8523,21.0288</coordinates></Point></Placemark></Document></kml>",
        "to_crs": "vn2000:105.5"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Input file (KML, KMZ, GPX, Shapefile .zip, CSV, WKT, WKB, GeoJSON)."
         },
         "data": {
          "type": "string",
          "description": "Input as text (KML, GPX, GeoJSON, WKT, hex WKB, CSV)."
         },
         "from": {
          "type": "string",
          "description": "Input format: `geojson`, `kml`, `kmz`, `gpx`, `shp`, `wkt`, `wkb`, `csv` (auto-detected)."
         },
         "to": {
          "type": "string",
          "default": "geojson",
          "description": "Output: `geojson`, `kml`, `gpx`, `csv`, `wkt`, `wkb`."
         },
         "from_crs": {
          "type": "string",
          "description": "Source CRS when the data is not WGS84 lon/lat (EPSG code, `vn2000:105.5`, proj4 or WKT)."
         },
         "to_crs": {
          "type": "string",
          "description": "Target CRS (default EPSG:4326)."
         },
         "simplify": {
          "type": "number",
          "description": "Douglas–Peucker tolerance in metres (lon/lat output)."
         },
         "precision": {
          "type": "number",
          "description": "Decimals kept (default 7 for degrees, 3 for metres)."
         },
         "download": {
          "type": "boolean",
          "default": false,
          "description": "Return the converted file instead of JSON."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "crs": {
           "type": "string"
          },
          "features": {
           "type": "number"
          },
          "geometry_types": {
           "type": "object",
           "properties": {
            "Point": {
             "type": "number"
            }
           }
          },
          "coordinates": {
           "type": "object",
           "properties": {
            "before": {
             "type": "number"
            },
            "after": {
             "type": "number"
            }
           }
          },
          "bbox": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "warnings": {
           "type": "array"
          },
          "geojson": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "features": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          }
         }
        },
        "example": {
         "from": "kml",
         "to": "geojson",
         "crs": "vn2000:105.5",
         "features": 1,
         "geometry_types": {
          "Point": 1
         },
         "coordinates": {
          "before": 1,
          "after": 1
         },
         "bbox": [
          536422.326,
          2326182.02,
          536422.326,
          2326182.02
         ],
         "warnings": [],
         "geojson": {
          "type": "FeatureCollection",
          "features": [
           {
            "type": "Feature",
            "geometry": {
             "type": "Point",
             "coordinates": [
              536422.326,
              2326182.02
             ]
            },
            "properties": {
             "name": "Hồ Gươm"
            }
           }
          ]
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/k8s-validate": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Kubernetes Manifest Validator",
    "description": "Send one or more YAML (or JSON) documents as `yaml`, a file or a raw body; `List` kinds are expanded. Each object is validated against the OpenAPI schema of the chosen Kubernetes `version` (the last 8 minor releases, latest patch, default the newest; `/v1/k8s-validate/versions` lists them) with field types, required fields, enums and — in `strict` mode (default) — unknown fields such as a misspelled `imagePullPolice`. `null` values (e.g. `creationTimestamp: null` from kubectl) are ignored.\n\nAn apiVersion / kind not served by that version is reported as `not_served` with the release that removed it and the replacement (for example batch/v1beta1 CronJob → batch/v1 since 1.25), or the versions that serve it. Unknown kinds (custom resources) are skipped.\n\n`lint` (default on) checks workloads (Deployment, StatefulSet, DaemonSet, Job, CronJob, Pod…): image without tag or `:latest`, missing CPU / memory requests and memory limit, missing readiness / liveness probes, privileged containers, privilege escalation, running as root, hostNetwork / hostPID / hostIPC, hostPath volumes, dangerous capabilities, literal secrets in env, single replica, NodePort services. Schemas come from the Kubernetes OpenAPI spec (Apache-2.0) and are refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/k8s-validate/",
    "operationId": "k8sValidateGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/k8s-validate/"
    },
    "parameters": [
     {
      "name": "version",
      "in": "query",
      "required": false,
      "description": "Kubernetes minor version, e.g. `1.35` (default: newest bundled).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "strict",
      "in": "query",
      "required": false,
      "description": "Reject fields not in the schema.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "lint",
      "in": "query",
      "required": false,
      "description": "Run best-practice checks.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "kubernetes_version": {
           "type": "string"
          },
          "release": {
           "type": "string"
          },
          "strict": {
           "type": "boolean"
          },
          "valid": {
           "type": "boolean"
          },
          "summary": {
           "type": "object",
           "properties": {
            "objects": {
             "type": "number"
            },
            "valid": {
             "type": "number"
            },
            "invalid": {
             "type": "number"
            },
            "not_served": {
             "type": "number"
            },
            "skipped": {
             "type": "number"
            },
            "lint_errors": {
             "type": "number"
            },
            "lint_warnings": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "document": {
              "type": "number"
             },
             "kind": {
              "type": "string"
             },
             "api_version": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "errors": {
              "type": "array"
             },
             "lint": {
              "type": "array"
             },
             "available_in": {
              "type": "array"
             },
             "use_api_version": {
              "type": "array"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Kubernetes Manifest Validator",
    "description": "Send one or more YAML (or JSON) documents as `yaml`, a file or a raw body; `List` kinds are expanded. Each object is validated against the OpenAPI schema of the chosen Kubernetes `version` (the last 8 minor releases, latest patch, default the newest; `/v1/k8s-validate/versions` lists them) with field types, required fields, enums and — in `strict` mode (default) — unknown fields such as a misspelled `imagePullPolice`. `null` values (e.g. `creationTimestamp: null` from kubectl) are ignored.\n\nAn apiVersion / kind not served by that version is reported as `not_served` with the release that removed it and the replacement (for example batch/v1beta1 CronJob → batch/v1 since 1.25), or the versions that serve it. Unknown kinds (custom resources) are skipped.\n\n`lint` (default on) checks workloads (Deployment, StatefulSet, DaemonSet, Job, CronJob, Pod…): image without tag or `:latest`, missing CPU / memory requests and memory limit, missing readiness / liveness probes, privileged containers, privilege escalation, running as root, hostNetwork / hostPID / hostIPC, hostPath volumes, dangerous capabilities, literal secrets in env, single replica, NodePort services. Schemas come from the Kubernetes OpenAPI spec (Apache-2.0) and are refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/k8s-validate/",
    "operationId": "k8sValidatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/k8s-validate/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "yaml": {
          "type": "string",
          "description": "One or more YAML / JSON documents (or a file / raw body)."
         },
         "version": {
          "type": "string",
          "description": "Kubernetes minor version, e.g. `1.35` (default: newest bundled)."
         },
         "strict": {
          "type": "boolean",
          "default": true,
          "description": "Reject fields not in the schema."
         },
         "lint": {
          "type": "boolean",
          "default": true,
          "description": "Run best-practice checks."
         }
        },
        "required": [
         "yaml"
        ]
       },
       "example": {
        "yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: web\nspec:\n  replicas: 2\n  selector: {matchLabels: {app: web}}\n  template:\n    metadata: {labels: {app: web}}\n    spec:\n      containers:\n      - name: web\n        image: nginx:latest\n        ports: [{containerPort: \"80\"}]\n---\napiVersion: batch/v1beta1\nkind: CronJob\nmetadata: {name: report}\n",
        "version": "1.37"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "kubernetes_version": {
           "type": "string"
          },
          "release": {
           "type": "string"
          },
          "strict": {
           "type": "boolean"
          },
          "valid": {
           "type": "boolean"
          },
          "summary": {
           "type": "object",
           "properties": {
            "objects": {
             "type": "number"
            },
            "valid": {
             "type": "number"
            },
            "invalid": {
             "type": "number"
            },
            "not_served": {
             "type": "number"
            },
            "skipped": {
             "type": "number"
            },
            "lint_errors": {
             "type": "number"
            },
            "lint_warnings": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "document": {
              "type": "number"
             },
             "kind": {
              "type": "string"
             },
             "api_version": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "errors": {
              "type": "array"
             },
             "lint": {
              "type": "array"
             },
             "available_in": {
              "type": "array"
             },
             "use_api_version": {
              "type": "array"
             }
            }
           }
          }
         }
        },
        "example": {
         "kubernetes_version": "1.37",
         "release": "v1.37.2",
         "strict": true,
         "valid": false,
         "summary": {
          "objects": 2,
          "valid": 0,
          "invalid": 1,
          "not_served": 1,
          "skipped": 0,
          "lint_errors": 0,
          "lint_warnings": 6
         },
         "results": [
          {
           "document": 0,
           "kind": "Deployment",
           "api_version": "apps/v1",
           "name": "web",
           "status": "invalid",
           "errors": [
            {
             "path": "spec.template.spec.containers.0.ports.0.containerPort",
             "message": "type \"string\" is invalid. Expected \"integer\"."
            }
           ],
           "lint": [
            {
             "rule": "image-latest",
             "severity": "warning",
             "message": "container \"web\": image tag :latest is not reproducible; pin a version or digest",
             "path": "spec.template.spec.containers[0].image"
            },
            {
             "rule": "resources-requests",
             "severity": "warning",
             "message": "container \"web\" has no CPU / memory requests (scheduling and QoS are guessed)",
             "path": "spec.template.spec.containers[0].resources.requests"
            },
            "…"
           ]
          },
          {
           "document": 1,
           "kind": "CronJob",
           "api_version": "batch/v1beta1",
           "name": "report",
           "status": "not_served",
           "errors": [
            {
             "path": "apiVersion",
             "message": "batch/v1beta1/CronJob is not served by Kubernetes 1.37 (removed in 1.25; use batch/v1)"
            }
           ],
           "available_in": [],
           "use_api_version": [
            "batch/v1"
           ]
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/isbn-lookup": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "ISBN Lookup",
    "description": "`isbn` (with or without hyphens, `ISBN-13:` prefix, X check digit) is checked (check digit, 978 / 979 prefix), converted (ISBN-10 ↔ ISBN-13; 979 ISBNs have no ISBN-10) and hyphenated using the ranges published by the International ISBN Agency: prefix, registration group with its agency (language area or country, e.g. 604 = Vietnam), registrant (publisher) element, publication element and check digit. `ranges_valid: false` means the number has a correct check digit but falls in a range that is not assigned yet. The range file is refreshed weekly.\n\nWith `metadata` (default on) the book is looked up in Open Library: title, subtitle, authors, publishers, publication date and place, pages, subjects, cover image URLs and the Open Library link (cached 7 days). Coverage of Vietnamese books is limited; `metadata.found: false` when unknown.\n\n`isbns` checks up to 200 numbers at once (no metadata).\n\nDocs: https://apibox.io.vn/docs/isbn-lookup/",
    "operationId": "isbnLookupGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/isbn-lookup/"
    },
    "parameters": [
     {
      "name": "isbn",
      "in": "query",
      "required": true,
      "description": "ISBN-10 or ISBN-13 (also /v1/isbn-lookup/{isbn}).",
      "schema": {
       "type": "string"
      },
      "example": "0140328726"
     },
     {
      "name": "metadata",
      "in": "query",
      "required": false,
      "description": "Look the book up in Open Library.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "isbns",
      "in": "query",
      "required": false,
      "description": "Batch: up to 200 ISBNs (array or comma / newline separated).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "format": {
           "type": "string"
          },
          "isbn13": {
           "type": "string"
          },
          "isbn10": {
           "type": "string"
          },
          "prefix": {
           "type": "string"
          },
          "group": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "agency": {
             "type": "string"
            }
           }
          },
          "registrant": {
           "type": "string"
          },
          "publication": {
           "type": "string"
          },
          "check_digit": {
           "type": "string"
          },
          "hyphenated": {
           "type": "object",
           "properties": {
            "isbn13": {
             "type": "string"
            },
            "isbn10": {
             "type": "string"
            }
           }
          },
          "ranges_valid": {
           "type": "boolean"
          },
          "metadata": {
           "type": "object",
           "properties": {
            "found": {
             "type": "boolean"
            },
            "title": {
             "type": "string"
            },
            "authors": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "publishers": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "publish_date": {
             "type": "string"
            },
            "publish_places": {
             "type": "array"
            },
            "pages": {
             "type": "number"
            },
            "subjects": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "cover": {
             "type": "object",
             "properties": {
              "small": {
               "type": "string"
              },
              "medium": {
               "type": "string"
              },
              "large": {
               "type": "string"
              }
             }
            },
            "url": {
             "type": "string"
            },
            "identifiers": {
             "type": "object",
             "properties": {
              "openlibrary": {
               "type": "array"
              }
             }
            },
            "source": {
             "type": "string"
            }
           }
          },
          "ranges": {
           "type": "object",
           "properties": {
            "serial": {
             "type": "string"
            },
            "date": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "input": "0140328726",
         "valid": true,
         "format": "isbn10",
         "isbn13": "9780140328721",
         "isbn10": "0140328726",
         "prefix": "978",
         "group": {
          "code": "0",
          "agency": "English language"
         },
         "registrant": "14",
         "publication": "032872",
         "check_digit": "1",
         "hyphenated": {
          "isbn13": "978-0-14-032872-1",
          "isbn10": "0-14-032872-6"
         },
         "ranges_valid": true,
         "metadata": {
          "found": true,
          "title": "Fantastic Mr. Fox",
          "authors": [
           "Roald Dahl"
          ],
          "publishers": [
           "Puffin"
          ],
          "publish_date": "October 1, 1988",
          "publish_places": [],
          "pages": 96,
          "subjects": [
           "Animals",
           "Hunger",
           "Juvenile fiction",
           "Foxes",
           "…"
          ],
          "cover": {
           "small": "https://covers.openlibrary.org/b/id/15152634-S.jpg",
           "medium": "https://covers.openlibrary.org/b/id/15152634-M.jpg",
           "large": "https://covers.openlibrary.org/b/id/15152634-L.jpg"
          },
          "url": "http://openlibrary.org/books/OL7353617M/Fantastic_Mr._Fox",
          "identifiers": {
           "openlibrary": [
            "OL7353617M"
           ]
          },
          "source": "Open Library (openlibrary.org)"
         },
         "ranges": {
          "serial": "893e5b3e-dfd8-4518-9cfa-917bdf4c3623",
          "date": "Wed, 11 Nov 2026 10:31:07 UTC"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "ISBN Lookup",
    "description": "`isbn` (with or without hyphens, `ISBN-13:` prefix, X check digit) is checked (check digit, 978 / 979 prefix), converted (ISBN-10 ↔ ISBN-13; 979 ISBNs have no ISBN-10) and hyphenated using the ranges published by the International ISBN Agency: prefix, registration group with its agency (language area or country, e.g. 604 = Vietnam), registrant (publisher) element, publication element and check digit. `ranges_valid: false` means the number has a correct check digit but falls in a range that is not assigned yet. The range file is refreshed weekly.\n\nWith `metadata` (default on) the book is looked up in Open Library: title, subtitle, authors, publishers, publication date and place, pages, subjects, cover image URLs and the Open Library link (cached 7 days). Coverage of Vietnamese books is limited; `metadata.found: false` when unknown.\n\n`isbns` checks up to 200 numbers at once (no metadata).\n\nDocs: https://apibox.io.vn/docs/isbn-lookup/",
    "operationId": "isbnLookupPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/isbn-lookup/"
    },
    "parameters": [
     {
      "name": "isbn",
      "in": "query",
      "required": false,
      "description": "ISBN-10 or ISBN-13 (also /v1/isbn-lookup/{isbn}).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "metadata",
      "in": "query",
      "required": false,
      "description": "Look the book up in Open Library.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "isbns": {
          "type": "string",
          "description": "Batch: up to 200 ISBNs (array or comma / newline separated)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "format": {
           "type": "string"
          },
          "isbn13": {
           "type": "string"
          },
          "isbn10": {
           "type": "string"
          },
          "prefix": {
           "type": "string"
          },
          "group": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "agency": {
             "type": "string"
            }
           }
          },
          "registrant": {
           "type": "string"
          },
          "publication": {
           "type": "string"
          },
          "check_digit": {
           "type": "string"
          },
          "hyphenated": {
           "type": "object",
           "properties": {
            "isbn13": {
             "type": "string"
            },
            "isbn10": {
             "type": "string"
            }
           }
          },
          "ranges_valid": {
           "type": "boolean"
          },
          "metadata": {
           "type": "object",
           "properties": {
            "found": {
             "type": "boolean"
            },
            "title": {
             "type": "string"
            },
            "authors": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "publishers": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "publish_date": {
             "type": "string"
            },
            "publish_places": {
             "type": "array"
            },
            "pages": {
             "type": "number"
            },
            "subjects": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "cover": {
             "type": "object",
             "properties": {
              "small": {
               "type": "string"
              },
              "medium": {
               "type": "string"
              },
              "large": {
               "type": "string"
              }
             }
            },
            "url": {
             "type": "string"
            },
            "identifiers": {
             "type": "object",
             "properties": {
              "openlibrary": {
               "type": "array"
              }
             }
            },
            "source": {
             "type": "string"
            }
           }
          },
          "ranges": {
           "type": "object",
           "properties": {
            "serial": {
             "type": "string"
            },
            "date": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/proxy-list": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Free Proxy List (checked every 10 min)",
    "description": "Free proxy lists are mostly dead: a list scraped an hour ago is often 90 % timeouts. APIBox merges several public lists (proxifly, monosans, vakhov) and re-checks the proxies itself from Cloudflare's network every 10 minutes. A check connects to the proxy and fetches `http://apibox.io.vn/cdn-cgi/trace` through it (an HTTP proxy request, or a SOCKS4a / SOCKS5 tunnel): Cloudflare answers with the exit IP and a timestamp, so dead proxies, proxies that rewrite pages and cached fake answers all fail. HTTP proxies are then asked for a `CONNECT` tunnel to port 443 on the same connection and must relay a TLS ServerHello (`https: true`). Only proxies that passed within the last hour are returned.\n\nEach item gives `proxy` (ready to paste, e.g. `socks5://1.2.3.4:1080`), `exit_ip` (can differ from the entry IP), `country`, `asn` and `org` of the exit IP (DB-IP Lite), `type` (always `datacenter`), `https`, `latency_ms` of the last check, `uptime` (share of the last 12 checks that passed), `checked_at` and `first_seen`. Filter by `protocol`, `country`, `https=1`, `max_latency_ms`, `min_uptime`, `asn` or `port`; sort by `latency` (default), `uptime`, `checked`, `new` or `random`; get `json`, plain `txt` or `csv`.\n\nThe number of proxies per request depends on the plan: Free 20, Starter 200, Pro 1,000. These are free proxies run by unknown third parties: use them for testing, geo checks and scraping public pages, never for logins, payments or personal data.\n\nOnly proxies whose exit IP belongs to a hosting / cloud network are listed (ASN in brianhama/bad-asn-list plus the major clouds, or a data-centre network name). Open proxies on home or mobile networks are often misconfigured or hijacked consumer devices, so APIBox does not distribute them; residential proxies are not offered.\n\nDocs: https://apibox.io.vn/docs/proxy-list/",
    "operationId": "proxyListGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/proxy-list/"
    },
    "parameters": [
     {
      "name": "protocol",
      "in": "query",
      "required": false,
      "description": "`http`, `socks4`, `socks5` (comma-separated; `https` = `http`). Default all.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Exit-IP countries, ISO 3166-1 alpha-2, comma-separated (e.g. `VN,SG`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "exclude_country",
      "in": "query",
      "required": false,
      "description": "Countries to leave out.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "https",
      "in": "query",
      "required": false,
      "description": "`1`: only proxies usable for HTTPS (HTTP proxies whose CONNECT tunnel relayed TLS, plus SOCKS).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "max_latency_ms",
      "in": "query",
      "required": false,
      "description": "Only proxies whose last check answered within this time.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "min_uptime",
      "in": "query",
      "required": false,
      "description": "Minimum share of successful checks among the last 12 (0–100).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "asn",
      "in": "query",
      "required": false,
      "description": "Only these exit-IP ASNs (comma-separated).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "port",
      "in": "query",
      "required": false,
      "description": "Only this proxy port.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Number of proxies. Max per request: Free 20, Starter 200, Pro 1,000.",
      "schema": {
       "type": "number",
       "default": 20
      },
      "example": 2
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `txt` (one `protocol://ip:port` per line; `scheme=0` for bare `ip:port`) or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`latency`, `uptime`, `checked` (most recently checked), `new` (newest first) or `random`.",
      "schema": {
       "type": "string",
       "default": "latency"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "total_matching": {
           "type": "number"
          },
          "plan_max_per_request": {
           "type": "number"
          },
          "updated_at": {
           "type": "string"
          },
          "live_total": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "proxy": {
              "type": "string"
             },
             "protocol": {
              "type": "string"
             },
             "host": {
              "type": "string"
             },
             "port": {
              "type": "number"
             },
             "exit_ip": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "asn": {
              "type": "number"
             },
             "org": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "https": {},
             "latency_ms": {
              "type": "number"
             },
             "uptime": {
              "type": "number"
             },
             "checked_at": {
              "type": "string"
             },
             "first_seen": {
              "type": "string"
             }
            }
           }
          },
          "notice": {
           "type": "string"
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "attribution": {
           "type": "string"
          },
          "attribution_url": {
           "type": "string"
          }
         }
        },
        "example": {
         "count": 2,
         "total_matching": 66,
         "plan_max_per_request": 20,
         "updated_at": "2026-11-15T15:30:36.000Z",
         "live_total": 66,
         "items": [
          {
           "proxy": "http://97.74.87.226:80",
           "protocol": "http",
           "host": "97.74.87.226",
           "port": 80,
           "exit_ip": "97.74.87.226",
           "country": "SG",
           "asn": 26496,
           "org": "GoDaddy.com, LLC",
           "type": "datacenter",
           "https": false,
           "latency_ms": 173,
           "uptime": 100,
           "checked_at": "2026-11-15T15:29:53.000Z",
           "first_seen": "2026-11-15T15:16:37.000Z"
          },
          {
           "proxy": "socks5://162.254.178.133:1080",
           "protocol": "socks5",
           "host": "162.254.178.133",
           "port": 1080,
           "exit_ip": "162.254.178.133",
           "country": "US",
           "asn": 40676,
           "org": "Psychz Networks",
           "type": "datacenter",
           "https": null,
           "latency_ms": 412,
           "uptime": 100,
           "checked_at": "2026-11-15T15:30:12.000Z",
           "first_seen": "2026-11-15T15:16:37.000Z"
          }
         ],
         "notice": "Free public proxies found in open lists and re-checked by APIBox within the last hour (a fresh Cloudflare trace page fetched through each proxy; https = CONNECT tunnel to port 443 relayed TLS). They are run by unknown third parties and can disappear at any time: never send passwords or personal data through them. Only proxies whose exit IP is on a hosting / data-centre network (by ASN) are listed.",
         "sources": [
          "proxifly/free-proxy-list",
          "monosans/proxy-list",
          "vakhov/fresh-proxy-list"
         ],
         "attribution": "IP Geolocation by DB-IP",
         "attribution_url": "https://db-ip.com"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "Free Proxy List (checked every 10 min)",
    "description": "Free proxy lists are mostly dead: a list scraped an hour ago is often 90 % timeouts. APIBox merges several public lists (proxifly, monosans, vakhov) and re-checks the proxies itself from Cloudflare's network every 10 minutes. A check connects to the proxy and fetches `http://apibox.io.vn/cdn-cgi/trace` through it (an HTTP proxy request, or a SOCKS4a / SOCKS5 tunnel): Cloudflare answers with the exit IP and a timestamp, so dead proxies, proxies that rewrite pages and cached fake answers all fail. HTTP proxies are then asked for a `CONNECT` tunnel to port 443 on the same connection and must relay a TLS ServerHello (`https: true`). Only proxies that passed within the last hour are returned.\n\nEach item gives `proxy` (ready to paste, e.g. `socks5://1.2.3.4:1080`), `exit_ip` (can differ from the entry IP), `country`, `asn` and `org` of the exit IP (DB-IP Lite), `type` (always `datacenter`), `https`, `latency_ms` of the last check, `uptime` (share of the last 12 checks that passed), `checked_at` and `first_seen`. Filter by `protocol`, `country`, `https=1`, `max_latency_ms`, `min_uptime`, `asn` or `port`; sort by `latency` (default), `uptime`, `checked`, `new` or `random`; get `json`, plain `txt` or `csv`.\n\nThe number of proxies per request depends on the plan: Free 20, Starter 200, Pro 1,000. These are free proxies run by unknown third parties: use them for testing, geo checks and scraping public pages, never for logins, payments or personal data.\n\nOnly proxies whose exit IP belongs to a hosting / cloud network are listed (ASN in brianhama/bad-asn-list plus the major clouds, or a data-centre network name). Open proxies on home or mobile networks are often misconfigured or hijacked consumer devices, so APIBox does not distribute them; residential proxies are not offered.\n\nDocs: https://apibox.io.vn/docs/proxy-list/",
    "operationId": "proxyListPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/proxy-list/"
    },
    "parameters": [
     {
      "name": "protocol",
      "in": "query",
      "required": false,
      "description": "`http`, `socks4`, `socks5` (comma-separated; `https` = `http`). Default all.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Exit-IP countries, ISO 3166-1 alpha-2, comma-separated (e.g. `VN,SG`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "exclude_country",
      "in": "query",
      "required": false,
      "description": "Countries to leave out.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "https",
      "in": "query",
      "required": false,
      "description": "`1`: only proxies usable for HTTPS (HTTP proxies whose CONNECT tunnel relayed TLS, plus SOCKS).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "max_latency_ms",
      "in": "query",
      "required": false,
      "description": "Only proxies whose last check answered within this time.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "min_uptime",
      "in": "query",
      "required": false,
      "description": "Minimum share of successful checks among the last 12 (0–100).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "asn",
      "in": "query",
      "required": false,
      "description": "Only these exit-IP ASNs (comma-separated).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "port",
      "in": "query",
      "required": false,
      "description": "Only this proxy port.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Number of proxies. Max per request: Free 20, Starter 200, Pro 1,000.",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `txt` (one `protocol://ip:port` per line; `scheme=0` for bare `ip:port`) or `csv`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`latency`, `uptime`, `checked` (most recently checked), `new` (newest first) or `random`.",
      "schema": {
       "type": "string",
       "default": "latency"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "total_matching": {
           "type": "number"
          },
          "plan_max_per_request": {
           "type": "number"
          },
          "updated_at": {
           "type": "string"
          },
          "live_total": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "proxy": {
              "type": "string"
             },
             "protocol": {
              "type": "string"
             },
             "host": {
              "type": "string"
             },
             "port": {
              "type": "number"
             },
             "exit_ip": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "asn": {
              "type": "number"
             },
             "org": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "https": {},
             "latency_ms": {
              "type": "number"
             },
             "uptime": {
              "type": "number"
             },
             "checked_at": {
              "type": "string"
             },
             "first_seen": {
              "type": "string"
             }
            }
           }
          },
          "notice": {
           "type": "string"
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "attribution": {
           "type": "string"
          },
          "attribution_url": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-law-search": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Legal Documents Search",
    "description": "Full-text search over about 171,000 Vietnamese legal normative documents from the national legal database (vbpl.vn), refreshed nightly. Search with or without diacritics; a document number in `q` (e.g. `45/2019/QH14`) is matched first. Filter by `type` (Luật, Nghị định, Thông tư, Quyết định…), `status` (Còn hiệu lực, Hết hiệu lực…), issuing `agency`, `scope` (`tw` central / `dp` local) and `year_from` / `year_to`; sort by `relevance`, `newest` or `oldest`; page through with `page` and `page_size` (max 50; the first 10,000 results are reachable).\n\nEach item gives the document id, number, title, type, status, `inForce` (true for documents fully or partly in force), issue date (dd/mm/yyyy as published), agency and a link to the full text. Use the id with `/v1/vn-law-document/{id}` to get all attributes, related documents and the text (plain text for LLM / RAG pipelines, or clean HTML). `facets=1` adds counts by type and status.\n\nData: national legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15); part of the metadata comes from the \"Vietnamese Legal Documents\" dataset (CC BY 4.0, attribution in every answer). Reference only: the Official Gazette text prevails.\n\nDocs: https://apibox.io.vn/docs/vn-law-search/",
    "operationId": "vnLawSearchGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-law-search/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Keywords (max 200 characters), with or without diacritics, or a document number. Empty = browse by filters.",
      "schema": {
       "type": "string"
      },
      "example": "luật đất đai"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Document type, e.g. `Luật`, `Nghị định`, `Thông tư` (with or without diacritics).",
      "schema": {
       "type": "string"
      },
      "example": "Luật"
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "description": "Validity status, e.g. `Còn hiệu lực`, `Hết hiệu lực`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "agency",
      "in": "query",
      "required": false,
      "description": "Issuing agency, e.g. `Bộ Tài chính`, `UBND tỉnh Phú Yên`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scope",
      "in": "query",
      "required": false,
      "description": "`tw` (central) or `dp` (local).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "year_from",
      "in": "query",
      "required": false,
      "description": "Issued from this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "year_to",
      "in": "query",
      "required": false,
      "description": "Issued up to this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`relevance` (default with q), `newest` (default without q) or `oldest`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "description": "Page number.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "page_size",
      "in": "query",
      "required": false,
      "description": "Results per page (1–50).",
      "schema": {
       "type": "number",
       "default": 20
      },
      "example": 1
     },
     {
      "name": "facets",
      "in": "query",
      "required": false,
      "description": "`1`: add counts by type and status.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "total": {
           "type": "number"
          },
          "approximate": {
           "type": "boolean"
          },
          "page": {
           "type": "number"
          },
          "pageSize": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "number": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "inForce": {
              "type": "boolean"
             },
             "issuedDate": {
              "type": "string"
             },
             "agency": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "texts": {
             "type": "string"
            },
            "metadata_licence": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "total": 9,
         "approximate": false,
         "page": 1,
         "pageSize": 1,
         "items": [
          {
           "id": "177815",
           "number": "31/2024/QH15",
           "title": "Luật Đất đai",
           "type": "Luật",
           "status": "Còn hiệu lực",
           "inForce": true,
           "issuedDate": "18/01/2024",
           "agency": "Quốc hội",
           "url": "https://thuvienphapluat.io.vn/van-ban/177815/luat-dat-dai"
          }
         ],
         "source": {
          "name": "Thư viện Pháp luật Mở (thuvienphapluat.io.vn)",
          "texts": "National legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15)",
          "metadata_licence": "Part of the metadata: \"Vietnamese Legal Documents\" dataset by Thịnh Ngô, CC BY 4.0",
          "disclaimer": "Reference only; the text published in the Official Gazette (Công báo) prevails."
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Legal Documents Search",
    "description": "Full-text search over about 171,000 Vietnamese legal normative documents from the national legal database (vbpl.vn), refreshed nightly. Search with or without diacritics; a document number in `q` (e.g. `45/2019/QH14`) is matched first. Filter by `type` (Luật, Nghị định, Thông tư, Quyết định…), `status` (Còn hiệu lực, Hết hiệu lực…), issuing `agency`, `scope` (`tw` central / `dp` local) and `year_from` / `year_to`; sort by `relevance`, `newest` or `oldest`; page through with `page` and `page_size` (max 50; the first 10,000 results are reachable).\n\nEach item gives the document id, number, title, type, status, `inForce` (true for documents fully or partly in force), issue date (dd/mm/yyyy as published), agency and a link to the full text. Use the id with `/v1/vn-law-document/{id}` to get all attributes, related documents and the text (plain text for LLM / RAG pipelines, or clean HTML). `facets=1` adds counts by type and status.\n\nData: national legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15); part of the metadata comes from the \"Vietnamese Legal Documents\" dataset (CC BY 4.0, attribution in every answer). Reference only: the Official Gazette text prevails.\n\nDocs: https://apibox.io.vn/docs/vn-law-search/",
    "operationId": "vnLawSearchPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-law-search/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Keywords (max 200 characters), with or without diacritics, or a document number. Empty = browse by filters.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Document type, e.g. `Luật`, `Nghị định`, `Thông tư` (with or without diacritics).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "description": "Validity status, e.g. `Còn hiệu lực`, `Hết hiệu lực`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "agency",
      "in": "query",
      "required": false,
      "description": "Issuing agency, e.g. `Bộ Tài chính`, `UBND tỉnh Phú Yên`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scope",
      "in": "query",
      "required": false,
      "description": "`tw` (central) or `dp` (local).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "year_from",
      "in": "query",
      "required": false,
      "description": "Issued from this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "year_to",
      "in": "query",
      "required": false,
      "description": "Issued up to this year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "description": "`relevance` (default with q), `newest` (default without q) or `oldest`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "description": "Page number.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "page_size",
      "in": "query",
      "required": false,
      "description": "Results per page (1–50).",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "facets",
      "in": "query",
      "required": false,
      "description": "`1`: add counts by type and status.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "total": {
           "type": "number"
          },
          "approximate": {
           "type": "boolean"
          },
          "page": {
           "type": "number"
          },
          "pageSize": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "number": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "inForce": {
              "type": "boolean"
             },
             "issuedDate": {
              "type": "string"
             },
             "agency": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "texts": {
             "type": "string"
            },
            "metadata_licence": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-law-lookup/{number}": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Law Lookup by Number",
    "description": "Give a document number such as `31/2024/QH15`, `168/2025/NĐ-CP` or `01/2024/QĐ-UBND` and get every document carrying exactly that number (case, diacritics and spaces ignored). Local numbers such as `01/2024/QĐ-UBND` are shared by many provinces, so the answer is a list with the issuing agency of each; `truncated: true` means more than 300 matches exist and you should narrow down with `/v1/vn-law-search?q=<number>&agency=…`.\n\nEach item has the id, number, title, type, status, `inForce`, issue date, agency and link; pass the id to `/v1/vn-law-document/{id}` for the full record and text. Typical use: turn citations found in contracts, invoices or other texts (see `/v1/vn-legal-parse`) into links and validity checks.\n\nData: national legal database vbpl.vn (Ministry of Justice), refreshed nightly; reference only.\n\nDocs: https://apibox.io.vn/docs/vn-law-lookup/",
    "operationId": "vnLawLookupGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-law-lookup/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "description": "Document number, e.g. `31/2024/QH15` (path, URL-encoded, or `?number=`).",
      "schema": {
       "type": "string"
      },
      "example": "31/2024/QH15"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "number": {
           "type": "string"
          },
          "total": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "number": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "inForce": {
              "type": "boolean"
             },
             "issuedDate": {
              "type": "string"
             },
             "agency": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "texts": {
             "type": "string"
            },
            "metadata_licence": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "number": "31/2024/QH15",
         "total": 1,
         "truncated": false,
         "items": [
          {
           "id": "177815",
           "number": "31/2024/QH15",
           "title": "Luật Đất đai",
           "type": "Luật",
           "status": "Còn hiệu lực",
           "inForce": true,
           "issuedDate": "18/01/2024",
           "agency": "Quốc hội",
           "url": "https://thuvienphapluat.io.vn/van-ban/177815/luat-dat-dai"
          }
         ],
         "source": {
          "name": "Thư viện Pháp luật Mở (thuvienphapluat.io.vn)",
          "texts": "National legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15)",
          "metadata_licence": "Part of the metadata: \"Vietnamese Legal Documents\" dataset by Thịnh Ngô, CC BY 4.0",
          "disclaimer": "Reference only; the text published in the Official Gazette (Công báo) prevails."
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Law Lookup by Number",
    "description": "Give a document number such as `31/2024/QH15`, `168/2025/NĐ-CP` or `01/2024/QĐ-UBND` and get every document carrying exactly that number (case, diacritics and spaces ignored). Local numbers such as `01/2024/QĐ-UBND` are shared by many provinces, so the answer is a list with the issuing agency of each; `truncated: true` means more than 300 matches exist and you should narrow down with `/v1/vn-law-search?q=<number>&agency=…`.\n\nEach item has the id, number, title, type, status, `inForce`, issue date, agency and link; pass the id to `/v1/vn-law-document/{id}` for the full record and text. Typical use: turn citations found in contracts, invoices or other texts (see `/v1/vn-legal-parse`) into links and validity checks.\n\nData: national legal database vbpl.vn (Ministry of Justice), refreshed nightly; reference only.\n\nDocs: https://apibox.io.vn/docs/vn-law-lookup/",
    "operationId": "vnLawLookupPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-law-lookup/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "description": "Document number, e.g. `31/2024/QH15` (path, URL-encoded, or `?number=`).",
      "schema": {
       "type": "string"
      },
      "example": "31/2024/QH15"
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "number": {
           "type": "string"
          },
          "total": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "number": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "inForce": {
              "type": "boolean"
             },
             "issuedDate": {
              "type": "string"
             },
             "agency": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "texts": {
             "type": "string"
            },
            "metadata_licence": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-law-document/{id}": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Legal Document (full text)",
    "description": "Pass the id from `/v1/vn-law-search` or `/v1/vn-law-lookup` to get the full record: number, title, type, status, `inForce`, agency, signer, issue / effective / expiry / gazette dates, scope, sector and field, plus `relations` — the documents it is based on, amends, replaces or guides, and those that amend, replace or guide it, in both directions, each with its own status.\n\n`content=text` adds the text as plain text with line breaks kept and table cells separated by tabs, ideal for LLM / RAG pipelines; `content=html` returns clean HTML with absolute links; `relations=0` skips the relation tree. `hasContent: false` means only a PDF exists on vbpl.vn and `content` is null. For a list of up to 20 documents without text, pass `ids=1,2,3`.\n\nData: national legal database vbpl.vn (Ministry of Justice), refreshed nightly; part of the metadata CC BY 4.0 (attribution in every answer). Reference only: the Official Gazette text prevails.\n\nDocs: https://apibox.io.vn/docs/vn-law-document/",
    "operationId": "vnLawDocumentGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-law-document/"
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "Numeric document id from vn-law-search / vn-law-lookup (path or `?id=`).",
      "schema": {
       "type": "string"
      },
      "example": "179252"
     },
     {
      "name": "content",
      "in": "query",
      "required": false,
      "description": "`none`, `text` (plain text) or `html`.",
      "schema": {
       "type": "string",
       "default": "none"
      }
     },
     {
      "name": "relations",
      "in": "query",
      "required": false,
      "description": "`0` to skip related documents.",
      "schema": {
       "type": "boolean",
       "default": true
      },
      "example": false
     },
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "description": "Up to 20 ids (comma-separated) for a list of attributes without text.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "number": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "agency": {
           "type": "string"
          },
          "issuedDate": {
           "type": "string"
          },
          "effectiveDate": {
           "type": "string"
          },
          "expiryDate": {},
          "gazetteDate": {},
          "scope": {
           "type": "string"
          },
          "sector": {},
          "field": {
           "type": "string"
          },
          "signerTitle": {
           "type": "string"
          },
          "signer": {
           "type": "string"
          },
          "collectedFrom": {},
          "applicability": {},
          "inForce": {
           "type": "boolean"
          },
          "url": {
           "type": "string"
          },
          "hasContent": {
           "type": "boolean"
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "texts": {
             "type": "string"
            },
            "metadata_licence": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "id": "179252",
         "title": "Luật Bảo vệ dữ liệu cá nhân số 91/2025/QH15",
         "number": "91/2025/QH15",
         "type": "Luật",
         "status": "Còn hiệu lực",
         "agency": "Quốc hội",
         "issuedDate": "26/06/2025",
         "effectiveDate": "01/01/2026",
         "expiryDate": null,
         "gazetteDate": null,
         "scope": "Trung ương",
         "sector": null,
         "field": "Chưa phân loại",
         "signerTitle": "Chủ tịch Quốc hội",
         "signer": "Trần Thanh Mẫn",
         "collectedFrom": null,
         "applicability": null,
         "inForce": true,
         "url": "https://thuvienphapluat.io.vn/van-ban/179252/luat-bao-ve-du-lieu-ca-nhan-so-91-2025-qh15",
         "hasContent": true,
         "source": {
          "name": "Thư viện Pháp luật Mở (thuvienphapluat.io.vn)",
          "texts": "National legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15)",
          "metadata_licence": "Part of the metadata: \"Vietnamese Legal Documents\" dataset by Thịnh Ngô, CC BY 4.0",
          "disclaimer": "Reference only; the text published in the Official Gazette (Công báo) prevails."
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese Legal Document (full text)",
    "description": "Pass the id from `/v1/vn-law-search` or `/v1/vn-law-lookup` to get the full record: number, title, type, status, `inForce`, agency, signer, issue / effective / expiry / gazette dates, scope, sector and field, plus `relations` — the documents it is based on, amends, replaces or guides, and those that amend, replace or guide it, in both directions, each with its own status.\n\n`content=text` adds the text as plain text with line breaks kept and table cells separated by tabs, ideal for LLM / RAG pipelines; `content=html` returns clean HTML with absolute links; `relations=0` skips the relation tree. `hasContent: false` means only a PDF exists on vbpl.vn and `content` is null. For a list of up to 20 documents without text, pass `ids=1,2,3`.\n\nData: national legal database vbpl.vn (Ministry of Justice), refreshed nightly; part of the metadata CC BY 4.0 (attribution in every answer). Reference only: the Official Gazette text prevails.\n\nDocs: https://apibox.io.vn/docs/vn-law-document/",
    "operationId": "vnLawDocumentPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-law-document/"
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "Numeric document id from vn-law-search / vn-law-lookup (path or `?id=`).",
      "schema": {
       "type": "string"
      },
      "example": "179252"
     },
     {
      "name": "content",
      "in": "query",
      "required": false,
      "description": "`none`, `text` (plain text) or `html`.",
      "schema": {
       "type": "string",
       "default": "none"
      }
     },
     {
      "name": "relations",
      "in": "query",
      "required": false,
      "description": "`0` to skip related documents.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "description": "Up to 20 ids (comma-separated) for a list of attributes without text.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "number": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "agency": {
           "type": "string"
          },
          "issuedDate": {
           "type": "string"
          },
          "effectiveDate": {
           "type": "string"
          },
          "expiryDate": {},
          "gazetteDate": {},
          "scope": {
           "type": "string"
          },
          "sector": {},
          "field": {
           "type": "string"
          },
          "signerTitle": {
           "type": "string"
          },
          "signer": {
           "type": "string"
          },
          "collectedFrom": {},
          "applicability": {},
          "inForce": {
           "type": "boolean"
          },
          "url": {
           "type": "string"
          },
          "hasContent": {
           "type": "boolean"
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "texts": {
             "type": "string"
            },
            "metadata_licence": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-driving-theory": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Driving Theory Exam Rules",
    "description": "Give a licence class (`A1`, `A`, `B1`, `B`, `C1`, `C`, `D1`, `D2`, `D`, `BE`, `C1E`, `CE`, `D1E`, `D2E`, `DE`) and an optional `date` (default today) to get the computer theory test that applies on that day: number of questions, time limit, pass mark, the \"điểm liệt\" (critical question) rule, the official split of questions by chapter of the question bank and the paper-test variant where one exists. Without `class` you get the table for all 15 classes. Each answer names the regime (`effective_from`, `effective_until`, `status`: in_force / scheduled / expired) and the next scheduled change for the class.\n\nTwo regimes are covered: Circular 12/2025/TT-BCA (exams up to 28/02/2027, e.g. class B: 30 questions, 20 minutes, pass 27, one critical question; split by chapter from Traffic Police letter 2262/CSGT-P5) and Circular 108/2026/TT-BCA (exams from 01/03/2027, e.g. A1 / A: 40 questions, 27 minutes, pass 36; B: 50 / 33 / 45; trailer classes 90 / 60 / 81). `mode=grade` with `correct` and `critical_failed` returns pass / fail with the reason, in English and Vietnamese. `mode=regimes` lists both tables side by side.\n\nThe data is a hand-entered table checked against the official texts, with legal references, a review date and a disclaimer in every response; anything not confirmed by the official text is listed in `unverified`. The endpoint deliberately contains no question text, answers or pictures from the official question bank.\n\nDocs: https://apibox.io.vn/docs/vn-driving-theory/",
    "operationId": "vnDrivingTheoryGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-driving-theory/"
    },
    "parameters": [
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Licence class: A1, A, B1, B, C1, C, D1, D2, D, BE, C1E, CE, D1E, D2E, DE. Omit for all classes (structure mode). Required for `mode=grade`.",
      "schema": {
       "type": "string"
      },
      "example": "B"
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Exam date, YYYY-MM-DD or DD/MM/YYYY (default today, Vietnam time). From 2025-03-01.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-16"
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`structure` (default), `grade` (pass / fail check; implied when `correct` is given) or `regimes` (both tables). Alias: `action`.",
      "schema": {
       "type": "string",
       "default": "structure"
      }
     },
     {
      "name": "correct",
      "in": "query",
      "required": false,
      "description": "With `mode=grade`: number of correct answers (0 … number of questions).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "critical_failed",
      "in": "query",
      "required": false,
      "description": "With `mode=grade`: `1` if the critical (\"điểm liệt\") question was answered wrongly (default 0). Or give `critical_correct`.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "paper",
      "in": "query",
      "required": false,
      "description": "`1`: the paper test instead of the computer test (A1 / A until 28/02/2027; from 01/03/2027 only A1 for ethnic-minority candidates who cannot read Vietnamese).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "document": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "effective_until": {
             "type": "string"
            },
            "status": {
             "type": "string"
            }
           }
          },
          "exam": {
           "type": "object",
           "properties": {
            "class": {
             "type": "string"
            },
            "method": {
             "type": "string"
            },
            "questions": {
             "type": "number"
            },
            "time_limit_minutes": {
             "type": "number"
            },
            "time_limit_seconds": {
             "type": "number"
            },
            "seconds_per_question": {
             "type": "number"
            },
            "max_score": {
             "type": "number"
            },
            "pass_mark": {
             "type": "number"
            },
            "pass_percent": {
             "type": "number"
            },
            "max_wrong": {
             "type": "number"
            },
            "points_per_question": {
             "type": "number"
            },
            "critical_questions": {
             "type": "number"
            },
            "critical_rule": {
             "type": "string"
            },
            "theory_exempt_with_car_licence": {
             "type": "boolean"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "distribution": {
           "type": "object",
           "properties": {
            "available": {
             "type": "boolean"
            },
            "effective_from": {
             "type": "string"
            },
            "source": {
             "type": "string"
            },
            "critical": {
             "type": "object",
             "properties": {
              "questions": {
               "type": "number"
              },
              "vi": {
               "type": "string"
              }
             }
            },
            "topics": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            },
            "question_pool": {
             "type": "object",
             "properties": {
              "questions": {
               "type": "number"
              },
              "critical_questions": {
               "type": "number"
              }
             }
            }
           }
          },
          "next_change": {
           "type": "object",
           "properties": {
            "regime": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "questions": {
             "type": "number"
            },
            "time_limit_minutes": {
             "type": "number"
            },
            "pass_mark": {
             "type": "number"
            },
            "critical_questions": {
             "type": "number"
            },
            "summary": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "unverified": {
           "type": "array"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-16",
         "regime": {
          "id": "tt12-2025",
          "document": "Circular 12/2025/TT-BCA (Ministry of Public Security), annexes kept in force by Circular 108/2026/TT-BCA Art. 41(6)",
          "effective_from": "2025-03-01",
          "effective_until": "2027-02-28",
          "status": "in_force"
         },
         "exam": {
          "class": "B",
          "method": "computer",
          "questions": 30,
          "time_limit_minutes": 20,
          "time_limit_seconds": 1200,
          "seconds_per_question": 40,
          "max_score": 30,
          "pass_mark": 27,
          "pass_percent": 90,
          "max_wrong": 3,
          "points_per_question": 1,
          "critical_questions": 1,
          "critical_rule": "Each exam contains exactly 1 question on a situation that seriously endangers traffic safety (\"điểm liệt\"); choosing a wrong answer to it fails the theory test whatever the score.",
          "theory_exempt_with_car_licence": false,
          "source": "TT 12/2025/TT-BCA Phụ lục IV mục A"
         },
         "distribution": {
          "available": true,
          "effective_from": "2025-06-01",
          "source": "Công văn 2262/CSGT-P5 ngày 07/5/2025 (Cục CSGT), mục II",
          "critical": {
           "questions": 1,
           "vi": "Tình huống mất an toàn giao thông nghiêm trọng (câu điểm liệt)"
          },
          "topics": [
           {
            "chapter": "I",
            "topic": "rules",
            "en": "General provisions and road traffic rules",
            "bank_numbers": "1–180",
            "questions": 8
           },
           {
            "chapter": "II",
            "topic": "culture",
            "en": "Traffic culture, driver ethics, fire fighting and rescue skills",
            "bank_numbers": "181–205",
            "questions": 1
           },
           {
            "chapter": "III",
            "topic": "technique",
            "en": "Driving technique",
            "bank_numbers": "206–263",
            "questions": 1
           },
           {
            "chapter": "IV",
            "topic": "mechanics",
            "en": "Vehicle structure and repair",
            "bank_numbers": "264–300",
            "questions": 1
           },
           {
            "chapter": "V",
            "topic": "signs",
            "en": "Road signs and signals",
            "bank_numbers": "301–485",
            "questions": 9
           },
           {
            "chapter": "VI",
            "topic": "situations",
            "en": "Traffic diagrams (sa hình) and handling traffic situations",
            "bank_numbers": "486–600",
            "questions": 9
           }
          ],
          "total": 30,
          "question_pool": {
           "questions": 600,
           "critical_questions": 60
          }
         },
         "next_change": {
          "regime": "tt108-2026",
          "effective_from": "2027-03-01",
          "status": "scheduled",
          "questions": 50,
          "time_limit_minutes": 33,
          "pass_mark": 45,
          "critical_questions": 0,
          "summary": "30 → 50 questions, 20 → 33 min, pass 27 → 45, no critical question"
         },
         "legal": [
          {
           "ref": "Thông tư 12/2025/TT-BCA ngày 28/02/2025, Điều 4 khoản 1; Phụ lục II, III; mục A Phụ lục IV, V, VI",
           "effective_from": "2025-03-01"
          },
          {
           "ref": "Thông tư 108/2026/TT-BCA Điều 41 khoản 6 (giữ hiệu lực các phụ lục trên đến hết 28/02/2027), Điều 42 khoản 2 (thi lại nội dung chưa đạt theo TT 12/2025 đến hết 28/02/2027)",
           "effective_from": "2026-07-01"
          },
          {
           "ref": "Công văn 2262/CSGT-P5 ngày 07/5/2025 của Cục CSGT (bộ 600 câu hỏi, cấu trúc đề theo hạng)",
           "effective_from": "2025-06-01"
          }
         ],
         "unverified": [],
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not legal advice; check the official text and the exam centre (Phòng CSGT / trung tâm sát hạch)."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Driving Theory Exam Rules",
    "description": "Give a licence class (`A1`, `A`, `B1`, `B`, `C1`, `C`, `D1`, `D2`, `D`, `BE`, `C1E`, `CE`, `D1E`, `D2E`, `DE`) and an optional `date` (default today) to get the computer theory test that applies on that day: number of questions, time limit, pass mark, the \"điểm liệt\" (critical question) rule, the official split of questions by chapter of the question bank and the paper-test variant where one exists. Without `class` you get the table for all 15 classes. Each answer names the regime (`effective_from`, `effective_until`, `status`: in_force / scheduled / expired) and the next scheduled change for the class.\n\nTwo regimes are covered: Circular 12/2025/TT-BCA (exams up to 28/02/2027, e.g. class B: 30 questions, 20 minutes, pass 27, one critical question; split by chapter from Traffic Police letter 2262/CSGT-P5) and Circular 108/2026/TT-BCA (exams from 01/03/2027, e.g. A1 / A: 40 questions, 27 minutes, pass 36; B: 50 / 33 / 45; trailer classes 90 / 60 / 81). `mode=grade` with `correct` and `critical_failed` returns pass / fail with the reason, in English and Vietnamese. `mode=regimes` lists both tables side by side.\n\nThe data is a hand-entered table checked against the official texts, with legal references, a review date and a disclaimer in every response; anything not confirmed by the official text is listed in `unverified`. The endpoint deliberately contains no question text, answers or pictures from the official question bank.\n\nDocs: https://apibox.io.vn/docs/vn-driving-theory/",
    "operationId": "vnDrivingTheoryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-driving-theory/"
    },
    "parameters": [
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Licence class: A1, A, B1, B, C1, C, D1, D2, D, BE, C1E, CE, D1E, D2E, DE. Omit for all classes (structure mode). Required for `mode=grade`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Exam date, YYYY-MM-DD or DD/MM/YYYY (default today, Vietnam time). From 2025-03-01.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`structure` (default), `grade` (pass / fail check; implied when `correct` is given) or `regimes` (both tables). Alias: `action`.",
      "schema": {
       "type": "string",
       "default": "structure"
      }
     },
     {
      "name": "correct",
      "in": "query",
      "required": false,
      "description": "With `mode=grade`: number of correct answers (0 … number of questions).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "critical_failed",
      "in": "query",
      "required": false,
      "description": "With `mode=grade`: `1` if the critical (\"điểm liệt\") question was answered wrongly (default 0). Or give `critical_correct`.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "paper",
      "in": "query",
      "required": false,
      "description": "`1`: the paper test instead of the computer test (A1 / A until 28/02/2027; from 01/03/2027 only A1 for ethnic-minority candidates who cannot read Vietnamese).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "document": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "effective_until": {
             "type": "string"
            },
            "status": {
             "type": "string"
            }
           }
          },
          "exam": {
           "type": "object",
           "properties": {
            "class": {
             "type": "string"
            },
            "method": {
             "type": "string"
            },
            "questions": {
             "type": "number"
            },
            "time_limit_minutes": {
             "type": "number"
            },
            "time_limit_seconds": {
             "type": "number"
            },
            "seconds_per_question": {
             "type": "number"
            },
            "max_score": {
             "type": "number"
            },
            "pass_mark": {
             "type": "number"
            },
            "pass_percent": {
             "type": "number"
            },
            "max_wrong": {
             "type": "number"
            },
            "points_per_question": {
             "type": "number"
            },
            "critical_questions": {
             "type": "number"
            },
            "critical_rule": {
             "type": "string"
            },
            "theory_exempt_with_car_licence": {
             "type": "boolean"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "distribution": {
           "type": "object",
           "properties": {
            "available": {
             "type": "boolean"
            },
            "effective_from": {
             "type": "string"
            },
            "source": {
             "type": "string"
            },
            "critical": {
             "type": "object",
             "properties": {
              "questions": {
               "type": "number"
              },
              "vi": {
               "type": "string"
              }
             }
            },
            "topics": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "total": {
             "type": "number"
            },
            "question_pool": {
             "type": "object",
             "properties": {
              "questions": {
               "type": "number"
              },
              "critical_questions": {
               "type": "number"
              }
             }
            }
           }
          },
          "next_change": {
           "type": "object",
           "properties": {
            "regime": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "questions": {
             "type": "number"
            },
            "time_limit_minutes": {
             "type": "number"
            },
            "pass_mark": {
             "type": "number"
            },
            "critical_questions": {
             "type": "number"
            },
            "summary": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "unverified": {
           "type": "array"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-env-permit": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Environmental Permit Checker (EIA, Permit)",
    "description": "Send the activity type (one of the 28 pollution-risk types of Decree 08/2022 Appendix II, or `other`) with its capacity, the land / sea area, mining or water licence level, resettlement, public-investment group and yes/no flags for the environmental sensitive factors (urban ward, drinking-water source, protected areas, heritage sites, forest conversion). The API applies Appendices III, IV and V (replaced by Decree 48/2026 from 29/01/2026) and Article 28 of the Law on Environmental Protection, and returns group I, II, III or IV with the rows that triggered it.\n\nFor that group it lists the procedures: preliminary EIA (group I), EIA (group I and group II by land / sea / mining / resettlement only), environmental permit (wastewater or dust / gas to be treated, scrap import, hazardous-waste service) or environmental registration at the commune People’s Committee, with the exemption thresholds of Decree 08 Article 32. The appraising and licensing body follows Articles 35 and 41 as amended by Law 146/2025 (Ministry of Agriculture and Environment, provincial chairperson, Defence / Public Security) and the decentralisation of Article 26a. Wastewater flow gives the automatic monitoring duty of Appendix XXVIII.\n\nSensitive factors are partly qualitative and are answered by you; expansion projects are not modelled. `action=activities` lists the activity keys, units and capacity bands. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-env-permit/",
    "operationId": "vnEnvPermitGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-env-permit/"
    },
    "parameters": [
     {
      "name": "activity",
      "in": "query",
      "required": false,
      "description": "Pollution-risk activity key (e.g. `metal`, `seafood`, `textile_dyeing`, `livestock`; see `action=activities`) or `other`.",
      "schema": {
       "type": "string",
       "default": "other"
      }
     },
     {
      "name": "capacity",
      "in": "query",
      "required": false,
      "description": "Design capacity in the activity unit (t/year, m²/year, MW, l/year, head/day…).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "capacity_unit",
      "in": "query",
      "required": false,
      "description": "Alternative unit when the activity has two (`t_yarn_per_year`, `kwh_per_year`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "area_ha",
      "in": "query",
      "required": false,
      "description": "Land / land-with-water area used (ha).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "investment_group",
      "in": "query",
      "required": false,
      "description": "Public-investment group: `national`, `A`, `B`, `C`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "approved_by_na_or_pm",
      "in": "query",
      "required": false,
      "description": "Investment policy decided / approved by the National Assembly or the Prime Minister.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "in_industrial_zone",
      "in": "query",
      "required": false,
      "description": "Located in an industrial / economic zone or cluster.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "wastewater_m3_day",
      "in": "query",
      "required": false,
      "description": "Wastewater flow (m³/day); `connected_to_central_wwtp=true` when piped to a zone plant.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "air_emissions",
      "in": "query",
      "required": false,
      "description": "Dust / gas emissions that must be treated.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "hazardous_waste_kg_month",
      "in": "query",
      "required": false,
      "description": "Hazardous waste generated (kg/month); also `industrial_solid_waste_kg_month`, `domestic_waste_kg_day`, `flue_gas_m3_h`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "in_urban_ward",
      "in": "query",
      "required": false,
      "description": "Sensitive flags: `in_urban_ward`, `discharge_to_drinking_source`, `protected_area_use`, `heritage_site_use`, `protected_land_conversion`; plus `resettled_people`, `mountainous`.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "resource_licence",
      "in": "query",
      "required": false,
      "description": "Mining / water licence level: `ministry` or `province`; sea area: `sea_area_authority` + `sea_area_ha`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "zone_infrastructure",
      "in": "query",
      "required": false,
      "description": "`industrial_zone` or `industrial_cluster` for infrastructure projects; `provinces` = number of provinces spanned.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "string"
          },
          "group_vi": {
           "type": "string"
          },
          "basis": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "row": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "activity": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "risk_level": {
             "type": "string"
            },
            "phu_luc_ii_stt": {
             "type": "string"
            },
            "capacity": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            },
            "unit_vi": {
             "type": "string"
            },
            "band": {
             "type": "string"
            },
            "vsic": {
             "type": "string"
            }
           }
          },
          "procedures": {
           "type": "object",
           "properties": {
            "preliminary_eia": {
             "type": "boolean"
            },
            "eia": {
             "type": "boolean"
            },
            "environmental_permit": {
             "type": "boolean"
            },
            "environmental_registration": {
             "type": "boolean"
            },
            "registration_exempt": {
             "type": "boolean"
            }
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "authority": {
              "type": "object"
             }
            }
           }
          },
          "monitoring": {
           "type": "object",
           "properties": {
            "wastewater": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "confidence": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Environmental Permit Checker (EIA, Permit)",
    "description": "Send the activity type (one of the 28 pollution-risk types of Decree 08/2022 Appendix II, or `other`) with its capacity, the land / sea area, mining or water licence level, resettlement, public-investment group and yes/no flags for the environmental sensitive factors (urban ward, drinking-water source, protected areas, heritage sites, forest conversion). The API applies Appendices III, IV and V (replaced by Decree 48/2026 from 29/01/2026) and Article 28 of the Law on Environmental Protection, and returns group I, II, III or IV with the rows that triggered it.\n\nFor that group it lists the procedures: preliminary EIA (group I), EIA (group I and group II by land / sea / mining / resettlement only), environmental permit (wastewater or dust / gas to be treated, scrap import, hazardous-waste service) or environmental registration at the commune People’s Committee, with the exemption thresholds of Decree 08 Article 32. The appraising and licensing body follows Articles 35 and 41 as amended by Law 146/2025 (Ministry of Agriculture and Environment, provincial chairperson, Defence / Public Security) and the decentralisation of Article 26a. Wastewater flow gives the automatic monitoring duty of Appendix XXVIII.\n\nSensitive factors are partly qualitative and are answered by you; expansion projects are not modelled. `action=activities` lists the activity keys, units and capacity bands. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-env-permit/",
    "operationId": "vnEnvPermitPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-env-permit/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "activity": {
          "type": "string",
          "default": "other",
          "description": "Pollution-risk activity key (e.g. `metal`, `seafood`, `textile_dyeing`, `livestock`; see `action=activities`) or `other`."
         },
         "capacity": {
          "type": "number",
          "description": "Design capacity in the activity unit (t/year, m²/year, MW, l/year, head/day…)."
         },
         "capacity_unit": {
          "type": "string",
          "description": "Alternative unit when the activity has two (`t_yarn_per_year`, `kwh_per_year`)."
         },
         "area_ha": {
          "type": "number",
          "description": "Land / land-with-water area used (ha)."
         },
         "investment_group": {
          "type": "string",
          "description": "Public-investment group: `national`, `A`, `B`, `C`."
         },
         "approved_by_na_or_pm": {
          "type": "boolean",
          "description": "Investment policy decided / approved by the National Assembly or the Prime Minister."
         },
         "in_industrial_zone": {
          "type": "boolean",
          "description": "Located in an industrial / economic zone or cluster."
         },
         "wastewater_m3_day": {
          "type": "number",
          "description": "Wastewater flow (m³/day); `connected_to_central_wwtp=true` when piped to a zone plant."
         },
         "air_emissions": {
          "type": "boolean",
          "description": "Dust / gas emissions that must be treated."
         },
         "hazardous_waste_kg_month": {
          "type": "number",
          "description": "Hazardous waste generated (kg/month); also `industrial_solid_waste_kg_month`, `domestic_waste_kg_day`, `flue_gas_m3_h`."
         },
         "in_urban_ward": {
          "type": "boolean",
          "description": "Sensitive flags: `in_urban_ward`, `discharge_to_drinking_source`, `protected_area_use`, `heritage_site_use`, `protected_land_conversion`; plus `resettled_people`, `mountainous`."
         },
         "resource_licence": {
          "type": "string",
          "description": "Mining / water licence level: `ministry` or `province`; sea area: `sea_area_authority` + `sea_area_ha`."
         },
         "zone_infrastructure": {
          "type": "string",
          "description": "`industrial_zone` or `industrial_cluster` for infrastructure projects; `provinces` = number of provinces spanned."
         }
        }
       },
       "example": {
        "activity": "seafood",
        "capacity": 5000,
        "wastewater_m3_day": 300
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "string"
          },
          "group_vi": {
           "type": "string"
          },
          "basis": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "row": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "activity": {
           "type": "object",
           "properties": {
            "key": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "risk_level": {
             "type": "string"
            },
            "phu_luc_ii_stt": {
             "type": "string"
            },
            "capacity": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            },
            "unit_vi": {
             "type": "string"
            },
            "band": {
             "type": "string"
            },
            "vsic": {
             "type": "string"
            }
           }
          },
          "procedures": {
           "type": "object",
           "properties": {
            "preliminary_eia": {
             "type": "boolean"
            },
            "eia": {
             "type": "boolean"
            },
            "environmental_permit": {
             "type": "boolean"
            },
            "environmental_registration": {
             "type": "boolean"
            },
            "registration_exempt": {
             "type": "boolean"
            }
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "authority": {
              "type": "object"
             }
            }
           }
          },
          "monitoring": {
           "type": "object",
           "properties": {
            "wastewater": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "confidence": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "group": "II",
         "group_vi": "Nhóm II",
         "basis": [
          {
           "row": "PL IV STT 1",
           "vi": "Loại hình có nguy cơ gây ô nhiễm, công suất trung bình"
          }
         ],
         "activity": {
          "key": "seafood",
          "vi": "Chế biến thủy sản (trừ chỉ bảo quản)",
          "en": "Seafood processing (except storage only)",
          "risk_level": "III",
          "phu_luc_ii_stt": "16",
          "capacity": 5000,
          "unit": "t_per_year",
          "unit_vi": "tấn sản phẩm/năm",
          "band": "medium",
          "vsic": "1020"
         },
         "procedures": {
          "preliminary_eia": false,
          "eia": false,
          "environmental_permit": true,
          "environmental_registration": false,
          "registration_exempt": false
         },
         "steps": [
          {
           "step": "environmental_permit",
           "vi": "Giấy phép môi trường trước khi vận hành thử nghiệm công trình xử lý chất thải / đi vào vận hành",
           "ref": "Luật BVMT Điều 39, 41, 42 (sửa bởi Luật 146/2025)",
           "authority": {
            "vi": "Chủ tịch UBND cấp tỉnh",
            "en": "Chairperson of the provincial People’s Committee",
            "ref": "Luật BVMT Điều 41 khoản 3 (sửa bởi Luật 146/2025)"
           }
          }
         ],
         "monitoring": {
          "wastewater": "automatic_or_periodic",
          "vi": "Lưu lượng 300 m³/ngày trong khoảng 200 – dưới 500: quan trắc tự động, liên tục hoặc quan trắc định kỳ",
          "ref": "NĐ 08/2022 Điều 97 khoản 2 điểm b; Phụ lục XXVIII STT 2 cột 5"
         },
         "confidence": "medium",
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-hazardous-waste": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Hazardous Waste Code Lookup",
    "description": "Search the official waste list of Circular 02/2022/TT-BTNMT Appendix III Form 01 Section C (728 codes, with the renumbering of Circular 07/2025 and the codes 19 12 06–19 12 12 added by Circular 09/2026) by a description in Vietnamese or English, with or without diacritics (\"giẻ lau dính dầu\", \"bóng đèn huỳnh quang\", \"pin thải\"), or by a 2-, 4- or 6-digit code. Each result gives the code, Vietnamese and English names, classification symbol (NH = always hazardous, KS = must be tested against QCVN 07:2025/BNNMT thresholds, TT / TT-R = ordinary industrial solid waste), main hazard properties, usual physical state, Basel A and Y codes, EC code, group and sub-group.\n\n`batch` classifies a list of waste descriptions (a plant waste register, up to 200 lines). `action=obligations` with `kg_per_month` or `kg_per_year` lists the waste-owner duties (declaration in the permit / registration, storage up to 1 year, transfer with hazardous-waste manifests) and the 20 kg/month registration threshold. `action=groups` returns the 19 groups and 108 sub-groups.\n\nThe list is rebuilt weekly from the Official Gazette PDFs. The waste owner is responsible for the final classification; KS wastes need sampling.\n\nDocs: https://apibox.io.vn/docs/vn-hazardous-waste/",
    "operationId": "vnHazardousWasteGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hazardous-waste/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Waste description (Vietnamese or English, diacritics optional).",
      "schema": {
       "type": "string"
      },
      "example": "giẻ lau dính dầu"
     },
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Waste code with 2, 4 or 6 digits (e.g. `18 02 01`, `1802`, `18`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Filter: `NH`, `KS`, `TT`, `TT-R`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`groups` or `obligations` (with `kg_per_month` / `kg_per_year`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for `q` (1–100).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "hazardous": {},
             "requires_testing": {
              "type": "boolean"
             },
             "hazard_properties": {
              "type": "array"
             },
             "state": {
              "type": "string"
             },
             "basel_a": {
              "type": "array"
             },
             "basel_y": {
              "type": "array"
             },
             "ec_code": {
              "type": "string"
             },
             "group": {
              "type": "object"
             },
             "subgroup": {
              "type": "object"
             },
             "note": {},
             "score": {
              "type": "number"
             }
            }
           }
          },
          "coverage": {
           "type": "string"
          },
          "data_built": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "q": "giẻ lau dính dầu",
         "count": 10,
         "results": [
          {
           "code": "18 02 01",
           "name_vi": "Chất hấp thụ, vật liệu lọc (bao gồm cả vật liệu lọc dầu chưa nêu tại các mã khác), giẻ lau, vải bảo vệ thải bị nhiễm các thành phần nguy hại",
           "name_en": "Absorbents, filter materials (including oil filters not otherwise specified), wiping cloths, protective clothing contaminated by hazardous substances",
           "class": "KS",
           "class_vi": "Chất thải công nghiệp phải kiểm soát: áp dụng ngưỡng CTNH (QCVN 07:2025/BNNMT) để phân định CTNH hay CTRCNTT",
           "hazardous": null,
           "requires_testing": true,
           "hazard_properties": [
            {
             "symbol": "Đ",
             "vi": "Có độc tính (gây kích ứng, gây hại, độc cấp tính, độc mãn tính, ung thư, độc sinh sản, đột biến gen, sinh khí độc)"
            },
            {
             "symbol": "ĐS",
             "vi": "Có độc tính sinh thái"
            }
           ],
           "state": "Rắn",
           "basel_a": [
            "A3020",
            "A3140",
            "A3150"
           ],
           "basel_y": [
            "Y8",
            "Y41",
            "Y42"
           ],
           "ec_code": "15 02 02",
           "group": {
            "code": "18",
            "vi": "CÁC LOẠI CHẤT THẢI BAO BÌ, CHẤT HẤP THỤ, GIẺ LAU, VẬT LIỆU LỌC VÀ VẢI BẢO VỆ",
            "en": "WASTE PACKAGING; ABSORBENTS, WIPING CLOTHS, FILTER MATERIALS AND PROTECTIVE CLOTHING NOT OTHERWISE SPECIFIED"
           },
           "subgroup": {
            "code": "18 02",
            "vi": "Chất hấp thụ, vật liệu lọc, giẻ lau và vải bảo vệ thải",
            "en": "Absorbents, filter materials, wiping cloths and protective clothing"
           },
           "note": null,
           "score": 12.1
          }
         ],
         "coverage": "728 codes (TT 02/2022 Mục C with the TT 07/2025 and TT 09/2026 changes)",
         "data_built": "2026-11-16",
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Hazardous Waste Code Lookup",
    "description": "Search the official waste list of Circular 02/2022/TT-BTNMT Appendix III Form 01 Section C (728 codes, with the renumbering of Circular 07/2025 and the codes 19 12 06–19 12 12 added by Circular 09/2026) by a description in Vietnamese or English, with or without diacritics (\"giẻ lau dính dầu\", \"bóng đèn huỳnh quang\", \"pin thải\"), or by a 2-, 4- or 6-digit code. Each result gives the code, Vietnamese and English names, classification symbol (NH = always hazardous, KS = must be tested against QCVN 07:2025/BNNMT thresholds, TT / TT-R = ordinary industrial solid waste), main hazard properties, usual physical state, Basel A and Y codes, EC code, group and sub-group.\n\n`batch` classifies a list of waste descriptions (a plant waste register, up to 200 lines). `action=obligations` with `kg_per_month` or `kg_per_year` lists the waste-owner duties (declaration in the permit / registration, storage up to 1 year, transfer with hazardous-waste manifests) and the 20 kg/month registration threshold. `action=groups` returns the 19 groups and 108 sub-groups.\n\nThe list is rebuilt weekly from the Official Gazette PDFs. The waste owner is responsible for the final classification; KS wastes need sampling.\n\nDocs: https://apibox.io.vn/docs/vn-hazardous-waste/",
    "operationId": "vnHazardousWastePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hazardous-waste/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Waste description (Vietnamese or English, diacritics optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Waste code with 2, 4 or 6 digits (e.g. `18 02 01`, `1802`, `18`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Filter: `NH`, `KS`, `TT`, `TT-R`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`groups` or `obligations` (with `kg_per_month` / `kg_per_year`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for `q` (1–100).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "batch": {
          "type": "array",
          "items": {},
          "description": "List of descriptions (array or newline-separated text, max 200)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "hazardous": {},
             "requires_testing": {
              "type": "boolean"
             },
             "hazard_properties": {
              "type": "array"
             },
             "state": {
              "type": "string"
             },
             "basel_a": {
              "type": "array"
             },
             "basel_y": {
              "type": "array"
             },
             "ec_code": {
              "type": "string"
             },
             "group": {
              "type": "object"
             },
             "subgroup": {
              "type": "object"
             },
             "note": {},
             "score": {
              "type": "number"
             }
            }
           }
          },
          "coverage": {
           "type": "string"
          },
          "data_built": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-energy-audit": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Designated Energy User Check (TOE)",
    "description": "Send yearly energy use (`electricity_kwh`, `diesel_l` / `diesel_t`, `fuel_oil_t`, `gasoline_l`, `lpg_t`, `natural_gas_m3`, `coal_t` with `coal_grade`, `coke_t`) or a `fuels` array with your own factors or GJ. The API converts to tonnes of oil equivalent with the factors of Circular 02/2014/TT-BCT Appendix I (0.0001543 TOE/kWh, DO 1.02 TOE/t or 0.88 TOE/1,000 l, natural gas 900 TOE per million m³…) and applies Decree 30/2026/ND-CP Article 3: industrial, agricultural and transport facilities from 1,000 TOE a year, buildings (offices, homes, schools, hospitals, hotels, shops…) from 500 TOE.\n\nFor a designated energy user it lists the duties of Circular 64/2026/TT-BCT (in force 20/11/2026, replacing Circular 25/2020): consumption report before 15 January, annual plan and report before 30 April, 5-year plan, energy-management model and manager, mandatory energy audit every 3 years (report to the province within 30 days; new entries audit within 1 year). `last_audit_date` gives the next audit date.\n\nThe official figure is computed on dataenergy.vn; the province list (approved before 31 March) is the binding test. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-energy-audit/",
    "operationId": "vnEnergyAuditGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-energy-audit/"
    },
    "parameters": [
     {
      "name": "facility_type",
      "in": "query",
      "required": false,
      "description": "`industry`, `agriculture`, `transport` (1,000 TOE) or `building` (500 TOE).",
      "schema": {
       "type": "string",
       "default": "industry"
      }
     },
     {
      "name": "electricity_kwh",
      "in": "query",
      "required": false,
      "description": "Electricity per year (kWh); also `diesel_l`, `diesel_t`, `fuel_oil_t`, `fuel_oil_l`, `gasoline_l`, `lpg_t`, `natural_gas_m3`, `coal_t` (+ `coal_grade` 1-2 / 3-4 / 5-6), `coke_t`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "energy_toe",
      "in": "query",
      "required": false,
      "description": "Total TOE if already known.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "last_audit_date",
      "in": "query",
      "required": false,
      "description": "Date of the last energy-audit report (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`factors` lists the conversion factors.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "facility_type": {
           "type": "string"
          },
          "energy_toe": {
           "type": "number"
          },
          "energy_gj": {
           "type": "number"
          },
          "threshold_toe": {
           "type": "number"
          },
          "designated_energy_user": {
           "type": "boolean"
          },
          "margin_toe": {
           "type": "number"
          },
          "basis": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "fuel": {
              "type": "string"
             },
             "fuel_vi": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "toe_per_unit": {
              "type": "number"
             },
             "toe": {
              "type": "number"
             }
            }
           }
          },
          "duties": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "deadline": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Designated Energy User Check (TOE)",
    "description": "Send yearly energy use (`electricity_kwh`, `diesel_l` / `diesel_t`, `fuel_oil_t`, `gasoline_l`, `lpg_t`, `natural_gas_m3`, `coal_t` with `coal_grade`, `coke_t`) or a `fuels` array with your own factors or GJ. The API converts to tonnes of oil equivalent with the factors of Circular 02/2014/TT-BCT Appendix I (0.0001543 TOE/kWh, DO 1.02 TOE/t or 0.88 TOE/1,000 l, natural gas 900 TOE per million m³…) and applies Decree 30/2026/ND-CP Article 3: industrial, agricultural and transport facilities from 1,000 TOE a year, buildings (offices, homes, schools, hospitals, hotels, shops…) from 500 TOE.\n\nFor a designated energy user it lists the duties of Circular 64/2026/TT-BCT (in force 20/11/2026, replacing Circular 25/2020): consumption report before 15 January, annual plan and report before 30 April, 5-year plan, energy-management model and manager, mandatory energy audit every 3 years (report to the province within 30 days; new entries audit within 1 year). `last_audit_date` gives the next audit date.\n\nThe official figure is computed on dataenergy.vn; the province list (approved before 31 March) is the binding test. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-energy-audit/",
    "operationId": "vnEnergyAuditPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-energy-audit/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`factors` lists the conversion factors.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "facility_type": {
          "type": "string",
          "default": "industry",
          "description": "`industry`, `agriculture`, `transport` (1,000 TOE) or `building` (500 TOE)."
         },
         "electricity_kwh": {
          "type": "number",
          "description": "Electricity per year (kWh); also `diesel_l`, `diesel_t`, `fuel_oil_t`, `fuel_oil_l`, `gasoline_l`, `lpg_t`, `natural_gas_m3`, `coal_t` (+ `coal_grade` 1-2 / 3-4 / 5-6), `coke_t`."
         },
         "fuels": {
          "type": "array",
          "items": {},
          "description": "Array of `{fuel, quantity, unit, factor?}`; `unit: \"gj\"` for any fuel by energy content."
         },
         "energy_toe": {
          "type": "number",
          "description": "Total TOE if already known."
         },
         "last_audit_date": {
          "type": "string",
          "description": "Date of the last energy-audit report (YYYY-MM-DD)."
         }
        }
       },
       "example": {
        "electricity_kwh": 6000000,
        "diesel_l": 100000,
        "facility_type": "industry"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "facility_type": {
           "type": "string"
          },
          "energy_toe": {
           "type": "number"
          },
          "energy_gj": {
           "type": "number"
          },
          "threshold_toe": {
           "type": "number"
          },
          "designated_energy_user": {
           "type": "boolean"
          },
          "margin_toe": {
           "type": "number"
          },
          "basis": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "fuel": {
              "type": "string"
             },
             "fuel_vi": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "toe_per_unit": {
              "type": "number"
             },
             "toe": {
              "type": "number"
             }
            }
           }
          },
          "duties": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "deadline": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "facility_type": "industry",
         "energy_toe": 1013.8,
         "energy_gj": 42445.78,
         "threshold_toe": 1000,
         "designated_energy_user": true,
         "margin_toe": 13.8,
         "basis": {
          "vi": "Cơ sở sản xuất công nghiệp, nông nghiệp, đơn vị vận tải tiêu thụ từ 1.000 TOE/năm",
          "ref": "NĐ 30/2026 Điều 3 khoản 1"
         },
         "lines": [
          {
           "fuel": "electricity",
           "fuel_vi": "Điện",
           "quantity": 6000000,
           "unit": "kwh",
           "toe_per_unit": 0.0001543,
           "toe": 925.8
          },
          {
           "fuel": "diesel",
           "fuel_vi": "Dầu DO",
           "quantity": 100000,
           "unit": "l",
           "toe_per_unit": 0.00088,
           "toe": 88
          }
         ],
         "duties": [
          {
           "id": "list",
           "vi": "UBND cấp tỉnh phê duyệt, ban hành danh sách cơ sở sử dụng năng lượng trọng điểm của năm N-1 trước ngày 31/3 năm N; kiểm tra tên cơ sở trong quyết định của tỉnh",
           "ref": "NĐ 30/2026 Điều 4; TT 64/2026 Điều 5",
           "deadline": "2027-03-31"
          },
          {
           "id": "consumption_report",
           "vi": "Báo cáo tình hình tiêu thụ năng lượng năm N-1 tới UBND cấp tỉnh trên dataenergy.vn trước ngày 15/01 năm N (Mẫu 1.1 Phụ lục I)",
           "ref": "TT 64/2026 Điều 4 khoản 4 điểm a",
           "deadline": "2027-01-15"
          }
         ],
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-strict-equipment": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Strict-Safety Equipment & Inspection Due",
    "description": "`q` searches the 45 civilian items of the list of machines and equipment with strict occupational-safety requirements (Circular 36/2019/TT-BLĐTBXH, Section I): boilers above 0.7 bar, pressure vessels, gas cylinders, refrigerating systems by refrigerant group and charge, cranes, hoists, forklifts from 1,000 kg, lifts, escalators, amusement rides, scaffolds, explosion-proof equipment… Send `capacity_kg` or `pressure_bar` to test the thresholds written in the item. Sections II and III (defence, police) are summarised.\n\n`items` (up to 500) with `last_inspection` + `cycle_months` or the `next_due` date from the inspection certificate returns the next due date, days left and status (overdue equipment must not be used, Decree 44/2016 Article 16). `format=ics` downloads a calendar with a reminder `remind_days` before each date. Each answer lists the duties: inspection before use and periodically (Law on Occupational Safety Article 31), declaration to the provincial labour authority within 30 days before or after use.\n\nInspection cycles differ by equipment, age and inspection procedure (QTKĐ), so the cycle is taken from your certificate, not assumed.\n\nDocs: https://apibox.io.vn/docs/vn-strict-equipment/",
    "operationId": "vnStrictEquipmentGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-strict-equipment/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Equipment name (e.g. `xe nâng`, `thang máy`, `nồi hơi`, `forklift`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "capacity_kg",
      "in": "query",
      "required": false,
      "description": "Rated load (kg) for hoists, winches, forklifts.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "pressure_bar",
      "in": "query",
      "required": false,
      "description": "Working pressure (bar) for boilers, vessels, tanks, cylinders.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `ics` (calendar).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "remind_days",
      "in": "query",
      "required": false,
      "description": "Reminder before each due date in the .ics (0–180 days).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`list`, `search` or `due` (inferred).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "today": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "overdue": {
           "type": "number"
          },
          "due_soon": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "last_inspection": {},
             "cycle_months": {},
             "next_due": {
              "type": "string"
             },
             "days_left": {
              "type": "number"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "list_match": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Strict-Safety Equipment & Inspection Due",
    "description": "`q` searches the 45 civilian items of the list of machines and equipment with strict occupational-safety requirements (Circular 36/2019/TT-BLĐTBXH, Section I): boilers above 0.7 bar, pressure vessels, gas cylinders, refrigerating systems by refrigerant group and charge, cranes, hoists, forklifts from 1,000 kg, lifts, escalators, amusement rides, scaffolds, explosion-proof equipment… Send `capacity_kg` or `pressure_bar` to test the thresholds written in the item. Sections II and III (defence, police) are summarised.\n\n`items` (up to 500) with `last_inspection` + `cycle_months` or the `next_due` date from the inspection certificate returns the next due date, days left and status (overdue equipment must not be used, Decree 44/2016 Article 16). `format=ics` downloads a calendar with a reminder `remind_days` before each date. Each answer lists the duties: inspection before use and periodically (Law on Occupational Safety Article 31), declaration to the provincial labour authority within 30 days before or after use.\n\nInspection cycles differ by equipment, age and inspection procedure (QTKĐ), so the cycle is taken from your certificate, not assumed.\n\nDocs: https://apibox.io.vn/docs/vn-strict-equipment/",
    "operationId": "vnStrictEquipmentPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-strict-equipment/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Equipment name (e.g. `xe nâng`, `thang máy`, `nồi hơi`, `forklift`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "capacity_kg",
      "in": "query",
      "required": false,
      "description": "Rated load (kg) for hoists, winches, forklifts.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "pressure_bar",
      "in": "query",
      "required": false,
      "description": "Working pressure (bar) for boilers, vessels, tanks, cylinders.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `ics` (calendar).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "remind_days",
      "in": "query",
      "required": false,
      "description": "Reminder before each due date in the .ics (0–180 days).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`list`, `search` or `due` (inferred).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "Array of `{name, last_inspection, cycle_months}` or `{name, next_due}`."
         }
        }
       },
       "example": {
        "items": [
         {
          "name": "Thang máy A",
          "last_inspection": "2024-03-01",
          "cycle_months": 36
         },
         {
          "name": "Xe nâng 3T",
          "last_inspection": "2024-10-01",
          "cycle_months": 24
         },
         {
          "name": "Nồi hơi",
          "next_due": "2026-12-01"
         }
        ],
        "today": "2026-11-16"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "today": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "overdue": {
           "type": "number"
          },
          "due_soon": {
           "type": "number"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "last_inspection": {},
             "cycle_months": {},
             "next_due": {
              "type": "string"
             },
             "days_left": {
              "type": "number"
             },
             "status": {
              "type": "string"
             },
             "status_vi": {
              "type": "string"
             },
             "list_match": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "today": "2026-11-16",
         "count": 3,
         "overdue": 1,
         "due_soon": 1,
         "items": [
          {
           "name": "Xe nâng 3T",
           "last_inspection": "2024-10-01",
           "cycle_months": 24,
           "next_due": "2026-10-01",
           "days_left": -46,
           "status": "overdue",
           "status_vi": "Quá hạn kiểm định — không được tiếp tục sử dụng (NĐ 44/2016 Điều 16 khoản 5)",
           "list_match": {
            "stt": 18,
            "name_vi": "Xe nâng hàng dùng động cơ có tải trọng nâng từ 1.000 kg trở lên",
            "name_en": "Powered forklifts ≥ 1,000 kg",
            "section": "I"
           }
          },
          {
           "name": "Nồi hơi",
           "last_inspection": null,
           "cycle_months": null,
           "next_due": "2026-12-01",
           "days_left": 15,
           "status": "due_soon",
           "status_vi": "Sắp đến hạn (≤ 30 ngày)",
           "list_match": {
            "stt": 1,
            "name_vi": "Nồi hơi các loại (bao gồm cả bộ quá nhiệt và bộ hâm nước) có áp suất làm việc định mức của hơi trên 0,7 bar; nồi đun nước nóng có nhiệt độ môi chất trên 115 °C",
            "name_en": "Boilers (incl. superheaters, economisers) above 0.7 bar steam working pressure; hot-water boilers above 115 °C",
            "section": "I"
           }
          }
         ],
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-occupational-disease": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Occupational Disease List (35 Diseases)",
    "description": "The list of occupational diseases eligible for social insurance of Circular 60/2025/TT-BYT (31/12/2025, in force 15/02/2026, replacing Circulars 15/2016 and 02/2023): silicosis, asbestosis, byssinosis, occupational asthma, lead, benzene, mercury, manganese, pesticide and CO poisoning, noise-induced hearing loss, vibration diseases, radiation, skin diseases, leptospirosis, hepatitis B / C, tuberculosis, HIV from occupational accidents, mesothelioma and COVID-19. Search by disease, causal factor or job, with or without diacritics (\"hàn\", \"sơn\", \"tiếng ồn\", \"silic\"), or open one by `no` (1–35).\n\nEach result gives the number, Vietnamese and English names, a category, the causal factor, the annex holding the diagnosis and assessment guide, whether it is referred for assessment immediately (Article 4) and whether a consultation board is required (Article 6). The answer adds the benefit rules of the Law on Occupational Safety and Hygiene: at least 5 % loss of working capacity, lump sum from 5 % to 30 %, monthly allowance from 31 %, and coverage after leaving the job within the guarantee period.\n\nPer-disease exposure and guarantee periods are in the annexes and are not bundled. Reference only, not medical advice.\n\nDocs: https://apibox.io.vn/docs/vn-occupational-disease/",
    "operationId": "vnOccupationalDiseaseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-occupational-disease/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Disease, causal factor or job (e.g. `hàn`, `tiếng ồn`, `amiăng`). Empty = full list.",
      "schema": {
       "type": "string"
      },
      "example": "tiếng ồn"
     },
     {
      "name": "no",
      "in": "query",
      "required": false,
      "description": "Disease number 1–35 (Article 3).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "`dust_respiratory`, `poisoning`, `physical`, `skin`, `infectious`, `cancer`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for `q` (1–35).",
      "schema": {
       "type": "number",
       "default": 5
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "category_vi": {
              "type": "string"
             },
             "factor_vi": {
              "type": "string"
             },
             "annex": {
              "type": "string"
             },
             "immediate_assessment": {
              "type": "boolean"
             },
             "consultation_board": {
              "type": "boolean"
             },
             "score": {
              "type": "number"
             }
            }
           }
          },
          "benefit": {
           "type": "object",
           "properties": {
            "conditions": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "calculator": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "q": "tiếng ồn",
         "count": 1,
         "results": [
          {
           "no": 18,
           "name_vi": "Bệnh điếc nghề nghiệp do tiếng ồn",
           "name_en": "Occupational noise-induced hearing loss",
           "category": "physical",
           "category_vi": "Bệnh do yếu tố vật lý",
           "factor_vi": "Tiếng ồn",
           "annex": "Phụ lục XVIII",
           "immediate_assessment": true,
           "consultation_board": false,
           "score": 3
          }
         ],
         "benefit": {
          "conditions": [
           {
            "vi": "Bị bệnh thuộc Danh mục bệnh nghề nghiệp do Bộ trưởng Bộ Y tế ban hành (TT 60/2025/TT-BYT)",
            "ref": "Luật ATVSLĐ Điều 46 khoản 1 điểm a"
           },
           {
            "vi": "Suy giảm khả năng lao động từ 5% trở lên do bệnh đó",
            "ref": "Luật ATVSLĐ Điều 46 khoản 1 điểm b"
           }
          ],
          "calculator": "/v1/vn-insurance-benefits"
         },
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not medical or legal advice; diagnosis and assessment are made by authorised facilities. Check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Occupational Disease List (35 Diseases)",
    "description": "The list of occupational diseases eligible for social insurance of Circular 60/2025/TT-BYT (31/12/2025, in force 15/02/2026, replacing Circulars 15/2016 and 02/2023): silicosis, asbestosis, byssinosis, occupational asthma, lead, benzene, mercury, manganese, pesticide and CO poisoning, noise-induced hearing loss, vibration diseases, radiation, skin diseases, leptospirosis, hepatitis B / C, tuberculosis, HIV from occupational accidents, mesothelioma and COVID-19. Search by disease, causal factor or job, with or without diacritics (\"hàn\", \"sơn\", \"tiếng ồn\", \"silic\"), or open one by `no` (1–35).\n\nEach result gives the number, Vietnamese and English names, a category, the causal factor, the annex holding the diagnosis and assessment guide, whether it is referred for assessment immediately (Article 4) and whether a consultation board is required (Article 6). The answer adds the benefit rules of the Law on Occupational Safety and Hygiene: at least 5 % loss of working capacity, lump sum from 5 % to 30 %, monthly allowance from 31 %, and coverage after leaving the job within the guarantee period.\n\nPer-disease exposure and guarantee periods are in the annexes and are not bundled. Reference only, not medical advice.\n\nDocs: https://apibox.io.vn/docs/vn-occupational-disease/",
    "operationId": "vnOccupationalDiseasePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-occupational-disease/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Disease, causal factor or job (e.g. `hàn`, `tiếng ồn`, `amiăng`). Empty = full list.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "no",
      "in": "query",
      "required": false,
      "description": "Disease number 1–35 (Article 3).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "`dust_respiratory`, `poisoning`, `physical`, `skin`, `infectious`, `cancer`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Results for `q` (1–35).",
      "schema": {
       "type": "number",
       "default": 5
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "no": {
              "type": "number"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "category_vi": {
              "type": "string"
             },
             "factor_vi": {
              "type": "string"
             },
             "annex": {
              "type": "string"
             },
             "immediate_assessment": {
              "type": "boolean"
             },
             "consultation_board": {
              "type": "boolean"
             },
             "score": {
              "type": "number"
             }
            }
           }
          },
          "benefit": {
           "type": "object",
           "properties": {
            "conditions": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "calculator": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-medical-device-class": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Medical Device Classification (A–D)",
    "description": "Answer the rule questions: `invasive` (none, orifice, surgical, implant), `duration` or `duration_minutes` (transient < 60 min, short 60 min – 30 days, long > 30 days), `active` (therapeutic, diagnostic, administer, other) and flags such as contact with the heart / central circulation or central nervous system, biological effect or absorption, medicinal substance, animal or microbial origin, disinfection, contraception, dental, life support. For in-vitro diagnostics send `ivd=true` and one or more `ivd_purpose` values (transfusion screening, HIV-type infections, blood grouping, STI, self-test, point-of-care glucose…).\n\nThe API applies the 16 non-IVD rules and 7 IVD rules of Circular 05/2022/TT-BYT Appendix I and returns every rule that applies, the decisive one and the highest class (Decree 98/2021 Article 5). It adds the route: class A / B declaration of applicable standards at the provincial Department of Health, class C / D registration number from the Ministry of Health (30-day review, fast track for FDA / TGA / EU / Japan / NMPA approvals), unlimited validity, trading conditions for B–D and the ISO 13485 condition for imports.\n\n`q=` gives a typical class for common devices (mask, syringe, blood-pressure monitor, glucose meter, condom, stent…) with a confidence level. The registrant remains responsible for the classification.\n\nDocs: https://apibox.io.vn/docs/vn-medical-device-class/",
    "operationId": "vnMedicalDeviceClassGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-medical-device-class/"
    },
    "parameters": [
     {
      "name": "invasive",
      "in": "query",
      "required": false,
      "description": "`none`, `orifice` (body orifice), `surgical`, `implant`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "duration",
      "in": "query",
      "required": false,
      "description": "`transient`, `short`, `long` (or `duration_minutes`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "active",
      "in": "query",
      "required": false,
      "description": "`none`, `therapeutic`, `diagnostic`, `administer`, `other`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "heart_or_central_circulation",
      "in": "query",
      "required": false,
      "description": "Flags: `heart_or_central_circulation`, `cns_contact`, `biological_effect_or_absorbed`, `delivers_medicine`, `chemical_change_in_body`, `ionizing_radiation`, `dental`, `life_support`, `breast_implant`, `medicinal_substance`, `animal_or_microbial_origin`, `contraception_or_sti`, `xray`, `monitors_vital_dangerous`, `hazardous_energy`, `hazardous_delivery`…",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "wound",
      "in": "query",
      "required": false,
      "description": "Non-invasive wound contact: `barrier`, `dermis`, `dermis_secondary`; also `channel_or_store`, `blood_bag`, `modifies_blood`, `disinfects`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ivd",
      "in": "query",
      "required": false,
      "description": "In-vitro diagnostic device; with `ivd_purpose` (comma-separated, e.g. `self_test`, `life_threatening_infection`, `abo_grouping`).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Common device name for a typical-class suggestion (used when no rule input is sent).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "class": {
           "type": "string"
          },
          "class_vi": {
           "type": "string"
          },
          "risk_vi": {
           "type": "string"
          },
          "decisive_rule": {
           "type": "object",
           "properties": {
            "rule": {
             "type": "string"
            },
            "cls": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "rules_applied": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "cls": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "principle": {
           "type": "string"
          },
          "procedure": {
           "type": "object",
           "properties": {
            "route": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "trading": {
             "type": "string"
            },
            "validity_vi": {
             "type": "string"
            },
            "validity_ref": {
             "type": "string"
            },
            "quality_vi": {
             "type": "string"
            },
            "quality_ref": {
             "type": "string"
            },
            "label_vi": {
             "type": "string"
            },
            "label_ref": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Medical Device Classification (A–D)",
    "description": "Answer the rule questions: `invasive` (none, orifice, surgical, implant), `duration` or `duration_minutes` (transient < 60 min, short 60 min – 30 days, long > 30 days), `active` (therapeutic, diagnostic, administer, other) and flags such as contact with the heart / central circulation or central nervous system, biological effect or absorption, medicinal substance, animal or microbial origin, disinfection, contraception, dental, life support. For in-vitro diagnostics send `ivd=true` and one or more `ivd_purpose` values (transfusion screening, HIV-type infections, blood grouping, STI, self-test, point-of-care glucose…).\n\nThe API applies the 16 non-IVD rules and 7 IVD rules of Circular 05/2022/TT-BYT Appendix I and returns every rule that applies, the decisive one and the highest class (Decree 98/2021 Article 5). It adds the route: class A / B declaration of applicable standards at the provincial Department of Health, class C / D registration number from the Ministry of Health (30-day review, fast track for FDA / TGA / EU / Japan / NMPA approvals), unlimited validity, trading conditions for B–D and the ISO 13485 condition for imports.\n\n`q=` gives a typical class for common devices (mask, syringe, blood-pressure monitor, glucose meter, condom, stent…) with a confidence level. The registrant remains responsible for the classification.\n\nDocs: https://apibox.io.vn/docs/vn-medical-device-class/",
    "operationId": "vnMedicalDeviceClassPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-medical-device-class/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Common device name for a typical-class suggestion (used when no rule input is sent).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "invasive": {
          "type": "string",
          "description": "`none`, `orifice` (body orifice), `surgical`, `implant`."
         },
         "duration": {
          "type": "string",
          "description": "`transient`, `short`, `long` (or `duration_minutes`)."
         },
         "active": {
          "type": "string",
          "description": "`none`, `therapeutic`, `diagnostic`, `administer`, `other`."
         },
         "heart_or_central_circulation": {
          "type": "boolean",
          "description": "Flags: `heart_or_central_circulation`, `cns_contact`, `biological_effect_or_absorbed`, `delivers_medicine`, `chemical_change_in_body`, `ionizing_radiation`, `dental`, `life_support`, `breast_implant`, `medicinal_substance`, `animal_or_microbial_origin`, `contraception_or_sti`, `xray`, `monitors_vital_dangerous`, `hazardous_energy`, `hazardous_delivery`…"
         },
         "wound": {
          "type": "string",
          "description": "Non-invasive wound contact: `barrier`, `dermis`, `dermis_secondary`; also `channel_or_store`, `blood_bag`, `modifies_blood`, `disinfects`."
         },
         "ivd": {
          "type": "boolean",
          "description": "In-vitro diagnostic device; with `ivd_purpose` (comma-separated, e.g. `self_test`, `life_threatening_infection`, `abo_grouping`)."
         }
        }
       },
       "example": {
        "invasive": "implant",
        "heart_or_central_circulation": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "class": {
           "type": "string"
          },
          "class_vi": {
           "type": "string"
          },
          "risk_vi": {
           "type": "string"
          },
          "decisive_rule": {
           "type": "object",
           "properties": {
            "rule": {
             "type": "string"
            },
            "cls": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "rules_applied": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "cls": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "principle": {
           "type": "string"
          },
          "procedure": {
           "type": "object",
           "properties": {
            "route": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "trading": {
             "type": "string"
            },
            "validity_vi": {
             "type": "string"
            },
            "validity_ref": {
             "type": "string"
            },
            "quality_vi": {
             "type": "string"
            },
            "quality_ref": {
             "type": "string"
            },
            "label_vi": {
             "type": "string"
            },
            "label_ref": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "class": "D",
         "class_vi": "Loại D",
         "risk_vi": "mức độ rủi ro cao",
         "decisive_rule": {
          "rule": "Quy tắc 8.2",
          "cls": "D",
          "vi": "Tiếp xúc trực tiếp tim, hệ tuần hoàn trung tâm hoặc thần kinh trung ương"
         },
         "rules_applied": [
          {
           "rule": "Quy tắc 8.2",
           "cls": "D",
           "vi": "Tiếp xúc trực tiếp tim, hệ tuần hoàn trung tâm hoặc thần kinh trung ương"
          }
         ],
         "principle": "Highest class of all applicable rules and intended uses (NĐ 98/2021 Điều 5 khoản 2, 3); devices used together are classified separately (khoản 4).",
         "procedure": {
          "route": "registration",
          "vi": "Đăng ký lưu hành (cấp số lưu hành) tại Bộ Y tế; thẩm định trong 30 ngày kể từ khi nhận hồ sơ đầy đủ, hợp lệ; cấp nhanh khi đã được nước tham chiếu cho lưu hành",
          "ref": "NĐ 98/2021 Điều 21 khoản 1 điểm b, Điều 29, 30, 32",
          "trading": "Cơ sở mua bán phải công bố đủ điều kiện mua bán tại Sở Y tế (trừ danh mục được mua bán như hàng hóa thông thường)",
          "validity_vi": "Số lưu hành có giá trị không thời hạn (trừ số lưu hành cấp khẩn cấp)",
          "validity_ref": "NĐ 98/2021 Điều 21 khoản 3",
          "quality_vi": "TTBYT nhập khẩu: cơ sở sản xuất đạt ISO 13485 và được lưu hành tại bất kỳ nước nào; sản xuất trong nước: cơ sở đã công bố đủ điều kiện sản xuất",
          "quality_ref": "NĐ 98/2021 Điều 23 khoản 1",
          "label_vi": "Nhãn theo pháp luật về nhãn hàng hóa, hướng dẫn sử dụng tiếng Việt, thông tin bảo hành",
          "label_ref": "NĐ 98/2021 Điều 22"
         },
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not regulatory advice; the registrant classifies the device and is responsible for it (NĐ 98/2021 Điều 5 khoản 6). Check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/saas-status": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "SaaS & Cloud Status",
    "description": "One API for the status pages your stack depends on. Give `service` (e.g. `github`) or a comma list (`github,cloudflare,openai`, up to 20) and get a normalised status for each: `operational`, `degraded`, `partial_outage`, `major_outage`, `maintenance` (or `unknown` when the page cannot be read), the open incidents (title, status, impact, start time, link), maintenances in progress or scheduled, and the components that are not operational (`components=1` lists all of them). Batch answers include `worst_status` for a single traffic light.\n\nSources are the machine-readable feeds each provider publishes on its own status page: Atlassian Statuspage and incident.io (`/api/v2/summary.json`), Instatus, Better Stack, Slack, Heroku, AWS Health, Google Cloud / Firebase / Workspace (`incidents.json`) and the Azure RSS feed. `list=1` returns the catalog (95 services in 20 categories: hosting, cloud, AI, databases, CI, payments, messaging…), `category=` filters it.\n\nAnswers are cached for up to 2 minutes; only the status, incident titles and a link back to the official page are relayed. Long-running AWS regional events (open for more than 14 days) are listed but do not set the overall status. Not affiliated with the providers.\n\nDocs: https://apibox.io.vn/docs/saas-status/",
    "operationId": "saasStatusGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/saas-status/"
    },
    "parameters": [
     {
      "name": "service",
      "in": "query",
      "required": false,
      "description": "Service id or name (e.g. `github`, `cloudflare`, `aws`, `openai`), or a comma list of up to 20.",
      "schema": {
       "type": "string"
      },
      "example": "github"
     },
     {
      "name": "components",
      "in": "query",
      "required": false,
      "description": "`1`: list every component, not only the ones with problems.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`1`: return the catalog of supported services (no status fetched).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "With `list=1`: filter by category (`ai`, `cloud`, `hosting`, `database`, `dev`, `payments`…).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "category": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "status_vi": {
           "type": "string"
          },
          "ok": {
           "type": "boolean"
          },
          "description": {
           "type": "string"
          },
          "incidents": {
           "type": "array"
          },
          "maintenances": {
           "type": "array"
          },
          "components": {
           "type": "array"
          },
          "components_total": {
           "type": "number"
          },
          "status_page": {
           "type": "string"
          },
          "checked_at": {
           "type": "string"
          },
          "ms": {
           "type": "number"
          },
          "source": {
           "type": "string"
          }
         }
        },
        "example": {
         "id": "github",
         "name": "GitHub",
         "category": "dev",
         "status": "operational",
         "status_vi": "Hoạt động bình thường",
         "ok": true,
         "description": "All Systems Operational",
         "incidents": [],
         "maintenances": [],
         "components": [],
         "components_total": 12,
         "status_page": "https://www.githubstatus.com/",
         "checked_at": "2026-11-16T04:02:26.923Z",
         "ms": 236,
         "source": "Status published by each provider on its public status page; relayed with a link back, cached up to 2 minutes. Not affiliated with the providers."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/mcp-check": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "MCP Server Check",
    "description": "Give the `url` of a remote Model Context Protocol server. The checker speaks Streamable HTTP (JSON or SSE answers, `Mcp-Session-Id`, `MCP-Protocol-Version`) and falls back to the legacy HTTP+SSE transport. It runs `initialize`, `notifications/initialized`, `tools/list` (all pages), `prompts/list` and `resources/list` when declared, plus one unknown-method probe, and closes the session. It never calls a tool unless you name one with `call_tool` (+ `arguments`).\n\nChecks: JSON-RPC shape, negotiated protocol version, `serverInfo` and capabilities; per tool: name length and characters (spec 2025-11-25), duplicates, missing descriptions, `inputSchema` / `outputSchema` structure (types, properties, required), annotations; error code for unknown methods. Security heuristics flag descriptions with prompt-injection patterns (ignore instructions, hide from the user, <IMPORTANT> tags, secret files such as ~/.ssh, hidden steps, sending data elsewhere), invisible Unicode, encoded blobs and shadowing of common tool names.\n\nOn HTTP 401 it checks the OAuth discovery chain: `WWW-Authenticate` with `resource_metadata`, protected resource metadata (RFC 9728), authorization server metadata (RFC 8414 / OpenID), PKCE S256 and client registration. Pass `token` to check a protected server (used for this request only, never stored). `format=badge` returns an SVG badge for your README. Verdict: `pass`, `warn` or `fail`.\n\nDocs: https://apibox.io.vn/docs/mcp-check/",
    "operationId": "mcpCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/mcp-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "MCP endpoint, e.g. `https://mcp.example.com/mcp` (or the `/sse` URL of a legacy server).",
      "schema": {
       "type": "string"
      },
      "example": "https://mcp.deepwiki.com/mcp"
     },
     {
      "name": "token",
      "in": "query",
      "required": false,
      "description": "Bearer token for protected servers (prefer POST so it is not in logs of proxies).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "transport",
      "in": "query",
      "required": false,
      "description": "`auto`, `streamable` or `sse` (legacy).",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "call_tool",
      "in": "query",
      "required": false,
      "description": "Name of one tool to call with `arguments` (off by default).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "arguments",
      "in": "query",
      "required": false,
      "description": "JSON object of arguments for `call_tool`.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "protocol_version",
      "in": "query",
      "required": false,
      "description": "Protocol version offered in initialize.",
      "schema": {
       "type": "string",
       "default": "2025-11-25"
      }
     },
     {
      "name": "timeout",
      "in": "query",
      "required": false,
      "description": "Total time budget in seconds (3–25).",
      "schema": {
       "type": "number",
       "default": 15
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`badge`: SVG badge instead of JSON.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "checked_at": {
           "type": "string"
          },
          "transport": {
           "type": "string"
          },
          "http_status": {
           "type": "number"
          },
          "auth_required": {
           "type": "boolean"
          },
          "server": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "title": {},
            "version": {
             "type": "string"
            },
            "protocol_version": {
             "type": "string"
            },
            "capabilities": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "instructions": {
             "type": "string"
            },
            "session": {
             "type": "boolean"
            }
           }
          },
          "tools": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "params": {
              "type": "array"
             },
             "required": {
              "type": "array"
             },
             "has_output_schema": {
              "type": "boolean"
             },
             "annotations": {},
             "issues": {
              "type": "number"
             }
            }
           }
          },
          "tools_count": {
           "type": "number"
          },
          "prompts_count": {
           "type": "number"
          },
          "prompts": {
           "type": "array"
          },
          "resources_count": {
           "type": "number"
          },
          "resources": {
           "type": "array"
          },
          "verdict": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "infos": {
             "type": "number"
            },
            "ms": {
             "type": "number"
            }
           }
          },
          "issues": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "url": "https://mcp.deepwiki.com/mcp",
         "checked_at": "2026-11-16T04:02:26.925Z",
         "transport": "streamable_http",
         "http_status": 200,
         "auth_required": false,
         "server": {
          "name": "DeepWiki",
          "title": null,
          "version": "4.0.2",
          "protocol_version": "2025-11-25",
          "capabilities": [
           "logging",
           "prompts",
           "resources",
           "tools"
          ],
          "instructions": "DeepWiki MCP provides AI-powered documentation for GitHub repositories. …",
          "session": false
         },
         "tools": [
          {
           "name": "ask_wiki_question",
           "title": "Ask Wiki Question",
           "description": "Ask any question about a GitHub repository's codebase and get an AI-powered answer\ngrounded in its DeepWiki.",
           "params": [
            "repoName",
            "question"
           ],
           "required": [
            "repoName",
            "question"
           ],
           "has_output_schema": true,
           "annotations": null,
           "issues": 0
          },
          {
           "name": "read_wiki_contents",
           "title": "Read Wiki Contents",
           "description": "View documentation about a GitHub repository.",
           "params": [
            "repoName"
           ],
           "required": [
            "repoName"
           ],
           "has_output_schema": true,
           "annotations": null,
           "issues": 0
          },
          {
           "name": "read_wiki_structure",
           "title": "Read Wiki Structure",
           "description": "Get a list of documentation topics for a GitHub repository.",
           "params": [
            "repoName"
           ],
           "required": [
            "repoName"
           ],
           "has_output_schema": true,
           "annotations": null,
           "issues": 0
          }
         ],
         "tools_count": 3,
         "prompts_count": 0,
         "prompts": [],
         "resources_count": 0,
         "resources": [],
         "verdict": "pass",
         "summary": {
          "errors": 0,
          "warnings": 0,
          "infos": 0,
          "ms": 3651
         },
         "issues": [],
         "note": "Only initialize, notifications/initialized, tools/list, prompts/list, resources/list and one unknown-method probe are sent; tools/call only when \"call_tool\" is given. The token is used for this check only and is not stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "MCP Server Check",
    "description": "Give the `url` of a remote Model Context Protocol server. The checker speaks Streamable HTTP (JSON or SSE answers, `Mcp-Session-Id`, `MCP-Protocol-Version`) and falls back to the legacy HTTP+SSE transport. It runs `initialize`, `notifications/initialized`, `tools/list` (all pages), `prompts/list` and `resources/list` when declared, plus one unknown-method probe, and closes the session. It never calls a tool unless you name one with `call_tool` (+ `arguments`).\n\nChecks: JSON-RPC shape, negotiated protocol version, `serverInfo` and capabilities; per tool: name length and characters (spec 2025-11-25), duplicates, missing descriptions, `inputSchema` / `outputSchema` structure (types, properties, required), annotations; error code for unknown methods. Security heuristics flag descriptions with prompt-injection patterns (ignore instructions, hide from the user, <IMPORTANT> tags, secret files such as ~/.ssh, hidden steps, sending data elsewhere), invisible Unicode, encoded blobs and shadowing of common tool names.\n\nOn HTTP 401 it checks the OAuth discovery chain: `WWW-Authenticate` with `resource_metadata`, protected resource metadata (RFC 9728), authorization server metadata (RFC 8414 / OpenID), PKCE S256 and client registration. Pass `token` to check a protected server (used for this request only, never stored). `format=badge` returns an SVG badge for your README. Verdict: `pass`, `warn` or `fail`.\n\nDocs: https://apibox.io.vn/docs/mcp-check/",
    "operationId": "mcpCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/mcp-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "MCP endpoint, e.g. `https://mcp.example.com/mcp` (or the `/sse` URL of a legacy server).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "transport",
      "in": "query",
      "required": false,
      "description": "`auto`, `streamable` or `sse` (legacy).",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "protocol_version",
      "in": "query",
      "required": false,
      "description": "Protocol version offered in initialize.",
      "schema": {
       "type": "string",
       "default": "2025-11-25"
      }
     },
     {
      "name": "timeout",
      "in": "query",
      "required": false,
      "description": "Total time budget in seconds (3–25).",
      "schema": {
       "type": "number",
       "default": 15
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`badge`: SVG badge instead of JSON.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "token": {
          "type": "string",
          "description": "Bearer token for protected servers (prefer POST so it is not in logs of proxies)."
         },
         "call_tool": {
          "type": "string",
          "description": "Name of one tool to call with `arguments` (off by default)."
         },
         "arguments": {
          "type": "object",
          "description": "JSON object of arguments for `call_tool`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "url": {
           "type": "string"
          },
          "checked_at": {
           "type": "string"
          },
          "transport": {
           "type": "string"
          },
          "http_status": {
           "type": "number"
          },
          "auth_required": {
           "type": "boolean"
          },
          "server": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "title": {},
            "version": {
             "type": "string"
            },
            "protocol_version": {
             "type": "string"
            },
            "capabilities": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "instructions": {
             "type": "string"
            },
            "session": {
             "type": "boolean"
            }
           }
          },
          "tools": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "params": {
              "type": "array"
             },
             "required": {
              "type": "array"
             },
             "has_output_schema": {
              "type": "boolean"
             },
             "annotations": {},
             "issues": {
              "type": "number"
             }
            }
           }
          },
          "tools_count": {
           "type": "number"
          },
          "prompts_count": {
           "type": "number"
          },
          "prompts": {
           "type": "array"
          },
          "resources_count": {
           "type": "number"
          },
          "resources": {
           "type": "array"
          },
          "verdict": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "infos": {
             "type": "number"
            },
            "ms": {
             "type": "number"
            }
           }
          },
          "issues": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/office-clean": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Office Document Cleaner",
    "description": "Upload a Word, Excel or PowerPoint file (.docx / .xlsx / .pptx, macro-enabled variants too). `action=inspect` (default) reports what the recipient could see: author, last editor, company, manager, template path, editing time, custom properties, comments and their authors, tracked insertions / deletions (deleted text stays readable), hidden text, hidden sheets / rows / columns, hidden slides, speaker notes, links to other workbooks, the folder a workbook was saved in, attached template, revision ids (rsid), printer settings, VBA macros, embedded objects and pictures with EXIF / GPS. Each finding comes with a level (high / medium / low) and an English + Vietnamese message.\n\n`action=clean` returns a cleaned copy: properties cleared (creation and modification dates kept; `keep_title=1` keeps the title), custom properties removed, comments removed, tracked changes accepted (insertions kept, deletions and moved-from text dropped, deleted table rows removed, formatting changes accepted), speaker notes removed, links to other workbooks removed with their formulas frozen to the last values, attached template, absolute paths, rsids, printer settings and picture metadata removed, macros removed on request. Hidden sheets: `hidden_sheets=keep` (default), `unhide` or `remove` (formulas that used them keep their last values). Every step can be switched off (`comments=0`, `accept_changes=0`…).\n\nOnly the affected XML parts are rewritten; the rest of the package is copied unchanged and the result is re-checked (relationships, content types). The visible content does not change except for the options you choose. `format=json` returns the report and the file as base64. Files are processed in memory and never stored.\n\nDocs: https://apibox.io.vn/docs/office-clean/",
    "operationId": "officeCleanPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/office-clean/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "inspect",
          "description": "`inspect` (report) or `clean` (cleaned file); alias `mode`."
         },
         "format": {
          "type": "string",
          "default": "file",
          "description": "For clean: `file` (binary) or `json` (report + `file_base64`)."
         },
         "hidden_sheets": {
          "type": "string",
          "default": "keep",
          "description": "Excel: `keep`, `unhide` or `remove`."
         },
         "accept_changes": {
          "type": "boolean",
          "default": true,
          "description": "Accept tracked changes (Word)."
         },
         "comments": {
          "type": "boolean",
          "default": true,
          "description": "Remove comments and their authors."
         },
         "speaker_notes": {
          "type": "boolean",
          "default": true,
          "description": "Remove speaker notes (PowerPoint)."
         },
         "metadata": {
          "type": "boolean",
          "default": true,
          "description": "Clear document properties, custom properties, template and absolute paths."
         },
         "external_links": {
          "type": "boolean",
          "default": true,
          "description": "Remove links to other workbooks (formulas keep their values)."
         },
         "macros": {
          "type": "boolean",
          "default": true,
          "description": "Remove VBA macros (the file becomes .docx / .xlsx / .pptx)."
         },
         "image_metadata": {
          "type": "boolean",
          "default": true,
          "description": "Strip EXIF / GPS / text chunks from JPEG and PNG pictures."
         },
         "keep_title": {
          "type": "boolean",
          "default": false,
          "description": "Keep the document title property."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .docx / .xlsx / .pptx file (multipart), or `file_base64`."
         },
         "action": {
          "type": "string",
          "default": "inspect",
          "description": "`inspect` (report) or `clean` (cleaned file); alias `mode`."
         },
         "format": {
          "type": "string",
          "default": "file",
          "description": "For clean: `file` (binary) or `json` (report + `file_base64`)."
         },
         "hidden_sheets": {
          "type": "string",
          "default": "keep",
          "description": "Excel: `keep`, `unhide` or `remove`."
         },
         "accept_changes": {
          "type": "boolean",
          "default": true,
          "description": "Accept tracked changes (Word)."
         },
         "comments": {
          "type": "boolean",
          "default": true,
          "description": "Remove comments and their authors."
         },
         "speaker_notes": {
          "type": "boolean",
          "default": true,
          "description": "Remove speaker notes (PowerPoint)."
         },
         "metadata": {
          "type": "boolean",
          "default": true,
          "description": "Clear document properties, custom properties, template and absolute paths."
         },
         "external_links": {
          "type": "boolean",
          "default": true,
          "description": "Remove links to other workbooks (formulas keep their values)."
         },
         "macros": {
          "type": "boolean",
          "default": true,
          "description": "Remove VBA macros (the file becomes .docx / .xlsx / .pptx)."
         },
         "image_metadata": {
          "type": "boolean",
          "default": true,
          "description": "Strip EXIF / GPS / text chunks from JPEG and PNG pictures."
         },
         "keep_title": {
          "type": "boolean",
          "default": false,
          "description": "Keep the document title property."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "file": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          },
          "format": {
           "type": "string"
          },
          "macro_enabled": {
           "type": "boolean"
          },
          "metadata": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "creator": {
             "type": "string"
            },
            "last_modified_by": {
             "type": "string"
            },
            "revision": {
             "type": "string"
            },
            "created": {
             "type": "string"
            },
            "modified": {
             "type": "string"
            },
            "company": {
             "type": "string"
            },
            "template": {
             "type": "string"
            },
            "total_editing_minutes": {
             "type": "string"
            }
           }
          },
          "custom_properties": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "value": {
              "type": "string"
             }
            }
           }
          },
          "hyperlinks": {
           "type": "number"
          },
          "macros": {
           "type": "array"
          },
          "images": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "exif": {
              "type": "boolean"
             },
             "gps": {
              "type": "boolean"
             }
            }
           }
          },
          "tracked_changes": {
           "type": "object",
           "properties": {
            "insertions": {
             "type": "number"
            },
            "deletions": {
             "type": "number"
            },
            "moves": {
             "type": "number"
            },
            "formatting": {
             "type": "number"
            },
            "authors": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "comments": {
           "type": "object",
           "properties": {
            "count": {
             "type": "number"
            },
            "authors": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "hidden_text_runs": {
           "type": "number"
          },
          "track_changes_on": {
           "type": "boolean"
          },
          "attached_template": {
           "type": "string"
          },
          "revision_ids": {
           "type": "number"
          },
          "risks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "level": {
              "type": "string"
             },
             "code": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "message_vi": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "file": "hop-dong.docx",
         "bytes": 4626,
         "format": "docx",
         "macro_enabled": false,
         "metadata": {
          "title": "Hợp đồng",
          "creator": "Nguyễn Văn A",
          "last_modified_by": "Trần Thị B",
          "revision": "7",
          "created": "2026-01-01T00:00:00Z",
          "modified": "2026-11-01T00:00:00Z",
          "company": "Công ty Bí Mật",
          "template": "C:\\Users\\a\\Normal.dotm",
          "total_editing_minutes": "94"
         },
         "custom_properties": [
          {
           "name": "ClientCode",
           "value": "KH-001"
          }
         ],
         "hyperlinks": 1,
         "macros": [],
         "images": [
          {
           "name": "image1.jpg",
           "exif": true,
           "gps": true
          }
         ],
         "tracked_changes": {
          "insertions": 1,
          "deletions": 2,
          "moves": 1,
          "formatting": 1,
          "authors": [
           "Trần Thị B",
           "B"
          ]
         },
         "comments": {
          "count": 1,
          "authors": [
           "Lê Văn C"
          ]
         },
         "hidden_text_runs": 1,
         "track_changes_on": true,
         "attached_template": "file:///\\\\server\\share\\Mau%20HD.dotx",
         "revision_ids": 2,
         "risks": [
          {
           "level": "high",
           "code": "tracked_changes",
           "message": "2 deletion(s) and 1 insertion(s) are still tracked: deleted text can be read by anyone",
           "message_vi": "Còn 2 chỗ xoá và 1 chỗ chèn chưa chấp nhận: người nhận đọc được nội dung đã xoá"
          },
          {
           "level": "high",
           "code": "comments",
           "message": "1 comment(s) by Lê Văn C",
           "message_vi": "Có 1 nhận xét (comment)"
          },
          {
           "level": "high",
           "code": "image_gps",
           "message": "Picture(s) with GPS coordinates",
           "message_vi": "Ảnh có toạ độ GPS"
          },
          {
           "level": "medium",
           "code": "metadata",
           "message": "Author / company metadata: Nguyễn Văn A, Trần Thị B, Công ty Bí Mật, Sếp",
           "message_vi": "Có thông tin tác giả / công ty trong thuộc tính tài liệu"
          }
         ],
         "note": "Use action=clean to get a cleaned copy. Nothing is stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/gantt-chart": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Gantt Chart & Critical Path",
    "description": "Send `tasks` (JSON array), `csv` (header row) or an Excel `file`. Each task has an `id`, `name`, either `duration` (working days) or `start` + `end`, optional `start` constraint, `depends` (`\"A\"`, `\"A FS+2\"`, `\"B SS\"`, `\"C FF-1\"`, several separated by commas), `group`, `progress` (%), `milestone` and `wbs`. Vietnamese column names (Tên công việc, Bắt đầu, Thời lượng, Phụ thuộc, Nhóm, Tiến độ) and dd/mm/yyyy dates are understood.\n\nThe schedule skips weekends (`workweek=mon-fri`, `mon-sat` or `all`) and public holidays: Vietnam by default (official Tết, 30/4–1/5, 2/9 and 24/11 schedules), any country code from the holidays dataset, or `holidays=none`, plus `extra_holidays` / `extra_workdays`. A forward and backward pass (critical path method) gives early / late dates, total float and the critical path.\n\n`format=json` (default) returns the schedule; `svg`, `png` and `pdf` draw the Gantt chart: task table, bars coloured by group, progress, milestones, dependency arrows, critical path in red, weekends and holidays shaded, a \"today\" line, day / week / month scale (`scale=auto`), Vietnamese or English labels (`lang`). The PDF is A3 landscape by default (`page=A4`) and paginated for long schedules. Up to 500 tasks; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/gantt-chart/",
    "operationId": "ganttChartGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/gantt-chart/"
    },
    "parameters": [
     {
      "name": "tasks",
      "in": "query",
      "required": false,
      "description": "Tasks: `{id, name, duration | start + end, start?, depends?, group?, progress?, milestone?, wbs?}`. Or send `csv` or an Excel `file`.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "project_start",
      "in": "query",
      "required": false,
      "description": "Project start (YYYY-MM-DD) when no task has a start date.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "workweek",
      "in": "query",
      "required": false,
      "description": "`mon-fri`, `mon-sat` or `all`.",
      "schema": {
       "type": "string",
       "default": "mon-fri"
      }
     },
     {
      "name": "holidays",
      "in": "query",
      "required": false,
      "description": "`VN`, another country code (e.g. `US`, `JP`) or `none`.",
      "schema": {
       "type": "string",
       "default": "VN"
      }
     },
     {
      "name": "extra_holidays",
      "in": "query",
      "required": false,
      "description": "Extra non-working dates.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "extra_workdays",
      "in": "query",
      "required": false,
      "description": "Extra working dates (e.g. a Saturday make-up day).",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `svg`, `png` or `pdf`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "scale",
      "in": "query",
      "required": false,
      "description": "Timeline scale: `auto`, `day`, `week`, `month`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "Chart labels: `vi` or `en`.",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     },
     {
      "name": "title",
      "in": "query",
      "required": false,
      "description": "Chart title.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "today",
      "in": "query",
      "required": false,
      "description": "Date of the \"today\" line (default: today in Vietnam; `show_today=0` hides it).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "description": "PDF page: `A3` or `A4` (landscape).",
      "schema": {
       "type": "string",
       "default": "A3"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "project": {
           "type": "object",
           "properties": {
            "start": {
             "type": "string"
            },
            "finish": {
             "type": "string"
            },
            "working_days": {
             "type": "number"
            },
            "calendar_days": {
             "type": "number"
            },
            "tasks": {
             "type": "number"
            }
           }
          },
          "calendar": {
           "type": "object",
           "properties": {
            "workweek": {
             "type": "string"
            },
            "holidays": {
             "type": "string"
            },
            "holidays_in_schedule": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "critical_path": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "tasks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "duration": {
              "type": "number"
             },
             "start": {
              "type": "string"
             },
             "finish": {
              "type": "string"
             },
             "late_start": {
              "type": "string"
             },
             "late_finish": {
              "type": "string"
             },
             "total_float": {
              "type": "number"
             },
             "critical": {
              "type": "boolean"
             },
             "progress": {
              "type": "number"
             },
             "depends": {
              "type": "array"
             },
             "milestone": {
              "type": "boolean"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Gantt Chart & Critical Path",
    "description": "Send `tasks` (JSON array), `csv` (header row) or an Excel `file`. Each task has an `id`, `name`, either `duration` (working days) or `start` + `end`, optional `start` constraint, `depends` (`\"A\"`, `\"A FS+2\"`, `\"B SS\"`, `\"C FF-1\"`, several separated by commas), `group`, `progress` (%), `milestone` and `wbs`. Vietnamese column names (Tên công việc, Bắt đầu, Thời lượng, Phụ thuộc, Nhóm, Tiến độ) and dd/mm/yyyy dates are understood.\n\nThe schedule skips weekends (`workweek=mon-fri`, `mon-sat` or `all`) and public holidays: Vietnam by default (official Tết, 30/4–1/5, 2/9 and 24/11 schedules), any country code from the holidays dataset, or `holidays=none`, plus `extra_holidays` / `extra_workdays`. A forward and backward pass (critical path method) gives early / late dates, total float and the critical path.\n\n`format=json` (default) returns the schedule; `svg`, `png` and `pdf` draw the Gantt chart: task table, bars coloured by group, progress, milestones, dependency arrows, critical path in red, weekends and holidays shaded, a \"today\" line, day / week / month scale (`scale=auto`), Vietnamese or English labels (`lang`). The PDF is A3 landscape by default (`page=A4`) and paginated for long schedules. Up to 500 tasks; nothing is stored.\n\nDocs: https://apibox.io.vn/docs/gantt-chart/",
    "operationId": "ganttChartPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/gantt-chart/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "tasks": {
          "type": "array",
          "items": {},
          "description": "Tasks: `{id, name, duration | start + end, start?, depends?, group?, progress?, milestone?, wbs?}`. Or send `csv` or an Excel `file`."
         },
         "csv": {
          "type": "string",
          "description": "CSV with a header row (English or Vietnamese column names)."
         },
         "project_start": {
          "type": "string",
          "description": "Project start (YYYY-MM-DD) when no task has a start date."
         },
         "workweek": {
          "type": "string",
          "default": "mon-fri",
          "description": "`mon-fri`, `mon-sat` or `all`."
         },
         "holidays": {
          "type": "string",
          "default": "VN",
          "description": "`VN`, another country code (e.g. `US`, `JP`) or `none`."
         },
         "extra_holidays": {
          "type": "array",
          "items": {},
          "description": "Extra non-working dates."
         },
         "extra_workdays": {
          "type": "array",
          "items": {},
          "description": "Extra working dates (e.g. a Saturday make-up day)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `svg`, `png` or `pdf`."
         },
         "scale": {
          "type": "string",
          "default": "auto",
          "description": "Timeline scale: `auto`, `day`, `week`, `month`."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "Chart labels: `vi` or `en`."
         },
         "title": {
          "type": "string",
          "description": "Chart title."
         },
         "today": {
          "type": "string",
          "description": "Date of the \"today\" line (default: today in Vietnam; `show_today=0` hides it)."
         },
         "page": {
          "type": "string",
          "default": "A3",
          "description": "PDF page: `A3` or `A4` (landscape)."
         }
        }
       },
       "example": {
        "tasks": [
         {
          "id": "A",
          "name": "Khảo sát",
          "start": "2026-11-20",
          "duration": 3
         },
         {
          "id": "B",
          "name": "Thiết kế",
          "duration": 5,
          "depends": "A"
         },
         {
          "id": "C",
          "name": "Xin phép",
          "duration": 2,
          "depends": "A"
         },
         {
          "id": "D",
          "name": "Thi công",
          "duration": 10,
          "depends": "B,C"
         },
         {
          "id": "M",
          "name": "Bàn giao",
          "milestone": true,
          "depends": "D"
         }
        ]
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "tasks": {
          "type": "array",
          "items": {},
          "description": "Tasks: `{id, name, duration | start + end, start?, depends?, group?, progress?, milestone?, wbs?}`. Or send `csv` or an Excel `file`."
         },
         "csv": {
          "type": "string",
          "description": "CSV with a header row (English or Vietnamese column names)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "XLSX file (first visible sheet, or `sheet`)."
         },
         "project_start": {
          "type": "string",
          "description": "Project start (YYYY-MM-DD) when no task has a start date."
         },
         "workweek": {
          "type": "string",
          "default": "mon-fri",
          "description": "`mon-fri`, `mon-sat` or `all`."
         },
         "holidays": {
          "type": "string",
          "default": "VN",
          "description": "`VN`, another country code (e.g. `US`, `JP`) or `none`."
         },
         "extra_holidays": {
          "type": "array",
          "items": {},
          "description": "Extra non-working dates."
         },
         "extra_workdays": {
          "type": "array",
          "items": {},
          "description": "Extra working dates (e.g. a Saturday make-up day)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `svg`, `png` or `pdf`."
         },
         "scale": {
          "type": "string",
          "default": "auto",
          "description": "Timeline scale: `auto`, `day`, `week`, `month`."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "Chart labels: `vi` or `en`."
         },
         "title": {
          "type": "string",
          "description": "Chart title."
         },
         "today": {
          "type": "string",
          "description": "Date of the \"today\" line (default: today in Vietnam; `show_today=0` hides it)."
         },
         "page": {
          "type": "string",
          "default": "A3",
          "description": "PDF page: `A3` or `A4` (landscape)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "project": {
           "type": "object",
           "properties": {
            "start": {
             "type": "string"
            },
            "finish": {
             "type": "string"
            },
            "working_days": {
             "type": "number"
            },
            "calendar_days": {
             "type": "number"
            },
            "tasks": {
             "type": "number"
            }
           }
          },
          "calendar": {
           "type": "object",
           "properties": {
            "workweek": {
             "type": "string"
            },
            "holidays": {
             "type": "string"
            },
            "holidays_in_schedule": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           }
          },
          "critical_path": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "tasks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "duration": {
              "type": "number"
             },
             "start": {
              "type": "string"
             },
             "finish": {
              "type": "string"
             },
             "late_start": {
              "type": "string"
             },
             "late_finish": {
              "type": "string"
             },
             "total_float": {
              "type": "number"
             },
             "critical": {
              "type": "boolean"
             },
             "progress": {
              "type": "number"
             },
             "depends": {
              "type": "array"
             },
             "milestone": {
              "type": "boolean"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "project": {
          "start": "2026-11-20",
          "finish": "2026-12-16",
          "working_days": 18,
          "calendar_days": 27,
          "tasks": 5
         },
         "calendar": {
          "workweek": "mon-fri",
          "holidays": "VN",
          "holidays_in_schedule": [
           {
            "date": "2026-11-24",
            "name": "Vietnamese Culture Day"
           }
          ]
         },
         "critical_path": [
          "A",
          "B",
          "D",
          "M"
         ],
         "tasks": [
          {
           "id": "A",
           "name": "Khảo sát",
           "duration": 3,
           "start": "2026-11-20",
           "finish": "2026-11-25",
           "late_start": "2026-11-20",
           "late_finish": "2026-11-25",
           "total_float": 0,
           "critical": true,
           "progress": 0
          },
          {
           "id": "B",
           "name": "Thiết kế",
           "duration": 5,
           "start": "2026-11-26",
           "finish": "2026-12-02",
           "late_start": "2026-11-26",
           "late_finish": "2026-12-02",
           "total_float": 0,
           "critical": true,
           "progress": 0,
           "depends": [
            "AFS"
           ]
          },
          {
           "id": "C",
           "name": "Xin phép",
           "duration": 2,
           "start": "2026-11-26",
           "finish": "2026-11-27",
           "late_start": "2026-12-01",
           "late_finish": "2026-12-02",
           "total_float": 3,
           "critical": false,
           "progress": 0,
           "depends": [
            "AFS"
           ]
          },
          {
           "id": "D",
           "name": "Thi công",
           "duration": 10,
           "start": "2026-12-03",
           "finish": "2026-12-16",
           "late_start": "2026-12-03",
           "late_finish": "2026-12-16",
           "total_float": 0,
           "critical": true,
           "progress": 0,
           "depends": [
            "BFS",
            "CFS"
           ]
          },
          {
           "id": "M",
           "name": "Bàn giao",
           "duration": 0,
           "milestone": true,
           "start": "2026-12-16",
           "finish": "2026-12-16",
           "late_start": "2026-12-16",
           "late_finish": "2026-12-16",
           "total_float": 0,
           "critical": true,
           "progress": 0,
           "depends": [
            "DFS"
           ]
          }
         ],
         "note": "Durations and lags are in working days. Finish dates are the last working day of a task. Milestones (duration 0) sit at the end of their predecessor. Use format=svg / png / pdf for the chart."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/image-phash": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Perceptual Image Hash",
    "description": "Perceptual hashes stay almost the same when a picture is resized, re-compressed, converted or lightly edited, so they find duplicate and near-duplicate images where a file checksum fails. `action=hash` (one image: `file`, `file_base64` or `url`) returns aHash, dHash and pHash (64 bits, 16 hex digits, the definitions of the Python imagehash library) and blockhash (256 bits, blockhash.io); `known` (a list of hashes you keep) returns the ones within `threshold`.\n\n`action=compare` takes two images (`a` + `b`, `file` + `file2` or `url` + `url2`) or two hashes (`hash1` + `hash2`) and returns the Hamming distance, a similarity score and a verdict per algorithm (`identical_hash`, `near_duplicate`, `similar`, `different`; default thresholds 10 / 64 bits and 40 / 256 bits). `action=group` takes `images` (up to 200: URLs, base64 strings or `{id, url | base64 | phash}` objects) and returns groups of near-duplicates with the number of unique images.\n\npHash uses a 32×32 discrete cosine transform of the image reduced by area averaging. Crops, rotations and mirror images are not matched. PNG and JPEG are decoded (up to 12.5 megapixels); convert WebP / HEIC first. This is not face recognition, and images and hashes are not stored.\n\nDocs: https://apibox.io.vn/docs/image-phash/",
    "operationId": "imagePhashGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-phash/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`hash`, `compare` or `group` (guessed from the inputs when omitted).",
      "schema": {
       "type": "string",
       "default": "hash"
      }
     },
     {
      "name": "hash1",
      "in": "query",
      "required": false,
      "description": "compare: hex hash (with `hash2`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "algorithm",
      "in": "query",
      "required": false,
      "description": "group / hash comparison: `ahash`, `dhash`, `phash` or `blockhash`.",
      "schema": {
       "type": "string",
       "default": "phash"
      }
     },
     {
      "name": "algorithms",
      "in": "query",
      "required": false,
      "description": "hash / compare: comma list of algorithms.",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "threshold",
      "in": "query",
      "required": false,
      "description": "Maximum Hamming distance for a near duplicate (default 10, blockhash 40).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "image1": {
           "type": "object",
           "properties": {
            "label": {
             "type": "string"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "image2": {
           "type": "object",
           "properties": {
            "label": {
             "type": "string"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "verdict": {
           "type": "string"
          },
          "verdict_vi": {
           "type": "string"
          },
          "decided_by": {
           "type": "string"
          },
          "results": {
           "type": "object",
           "properties": {
            "ahash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            },
            "dhash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            },
            "phash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            },
            "blockhash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "Perceptual Image Hash",
    "description": "Perceptual hashes stay almost the same when a picture is resized, re-compressed, converted or lightly edited, so they find duplicate and near-duplicate images where a file checksum fails. `action=hash` (one image: `file`, `file_base64` or `url`) returns aHash, dHash and pHash (64 bits, 16 hex digits, the definitions of the Python imagehash library) and blockhash (256 bits, blockhash.io); `known` (a list of hashes you keep) returns the ones within `threshold`.\n\n`action=compare` takes two images (`a` + `b`, `file` + `file2` or `url` + `url2`) or two hashes (`hash1` + `hash2`) and returns the Hamming distance, a similarity score and a verdict per algorithm (`identical_hash`, `near_duplicate`, `similar`, `different`; default thresholds 10 / 64 bits and 40 / 256 bits). `action=group` takes `images` (up to 200: URLs, base64 strings or `{id, url | base64 | phash}` objects) and returns groups of near-duplicates with the number of unique images.\n\npHash uses a 32×32 discrete cosine transform of the image reduced by area averaging. Crops, rotations and mirror images are not matched. PNG and JPEG are decoded (up to 12.5 megapixels); convert WebP / HEIC first. This is not face recognition, and images and hashes are not stored.\n\nDocs: https://apibox.io.vn/docs/image-phash/",
    "operationId": "imagePhashPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/image-phash/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "hash",
          "description": "`hash`, `compare` or `group` (guessed from the inputs when omitted)."
         },
         "hash1": {
          "type": "string",
          "description": "compare: hex hash (with `hash2`)."
         },
         "images": {
          "type": "array",
          "items": {},
          "description": "group: up to 200 URLs, base64 strings or `{id, url | base64 | phash}` objects."
         },
         "algorithm": {
          "type": "string",
          "default": "phash",
          "description": "group / hash comparison: `ahash`, `dhash`, `phash` or `blockhash`."
         },
         "algorithms": {
          "type": "string",
          "default": "all",
          "description": "hash / compare: comma list of algorithms."
         },
         "threshold": {
          "type": "number",
          "description": "Maximum Hamming distance for a near duplicate (default 10, blockhash 40)."
         },
         "known": {
          "type": "array",
          "items": {},
          "description": "hash: your list of known hashes (`\"hex\"` or `{id, hash}`) to match against."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "hash",
          "description": "`hash`, `compare` or `group` (guessed from the inputs when omitted)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Image (PNG / JPEG), or `file_base64`, or `url`."
         },
         "a": {
          "type": "string",
          "format": "binary",
          "description": "compare: first image (`b` = second; or `file2`, `url2`)."
         },
         "hash1": {
          "type": "string",
          "description": "compare: hex hash (with `hash2`)."
         },
         "images": {
          "type": "array",
          "items": {},
          "description": "group: up to 200 URLs, base64 strings or `{id, url | base64 | phash}` objects."
         },
         "algorithm": {
          "type": "string",
          "default": "phash",
          "description": "group / hash comparison: `ahash`, `dhash`, `phash` or `blockhash`."
         },
         "algorithms": {
          "type": "string",
          "default": "all",
          "description": "hash / compare: comma list of algorithms."
         },
         "threshold": {
          "type": "number",
          "description": "Maximum Hamming distance for a near duplicate (default 10, blockhash 40)."
         },
         "known": {
          "type": "array",
          "items": {},
          "description": "hash: your list of known hashes (`\"hex\"` or `{id, hash}`) to match against."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "image1": {
           "type": "object",
           "properties": {
            "label": {
             "type": "string"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "image2": {
           "type": "object",
           "properties": {
            "label": {
             "type": "string"
            },
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            }
           }
          },
          "verdict": {
           "type": "string"
          },
          "verdict_vi": {
           "type": "string"
          },
          "decided_by": {
           "type": "string"
          },
          "results": {
           "type": "object",
           "properties": {
            "ahash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            },
            "dhash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            },
            "phash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            },
            "blockhash": {
             "type": "object",
             "properties": {
              "hash1": {
               "type": "string"
              },
              "hash2": {
               "type": "string"
              },
              "distance": {
               "type": "number"
              },
              "bits": {
               "type": "number"
              },
              "similarity": {
               "type": "number"
              },
              "verdict": {
               "type": "string"
              },
              "verdict_vi": {
               "type": "string"
              },
              "threshold": {
               "type": "number"
              }
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "image1": {
          "label": "photo.png",
          "width": 640,
          "height": 480
         },
         "image2": {
          "label": "photo-q40.jpg",
          "width": 640,
          "height": 480
         },
         "verdict": "identical_hash",
         "verdict_vi": "trùng hash (gần như chắc chắn cùng ảnh)",
         "decided_by": "phash",
         "results": {
          "ahash": {
           "hash1": "401b030373649818",
           "hash2": "401b030373649818",
           "distance": 0,
           "bits": 64,
           "similarity": 1,
           "verdict": "identical_hash",
           "verdict_vi": "trùng hash (gần như chắc chắn cùng ảnh)",
           "threshold": 10
          },
          "dhash": {
           "hash1": "a3b3362ec2cc3032",
           "hash2": "83b3b66ec2cc3032",
           "distance": 3,
           "bits": 64,
           "similarity": 0.9531,
           "verdict": "near_duplicate",
           "verdict_vi": "gần trùng",
           "threshold": 10
          },
          "phash": {
           "hash1": "8d2958c3657c73c9",
           "hash2": "8d2958c3657c73c9",
           "distance": 0,
           "bits": 64,
           "similarity": 1,
           "verdict": "identical_hash",
           "verdict_vi": "trùng hash (gần như chắc chắn cùng ảnh)",
           "threshold": 10
          },
          "blockhash": {
           "hash1": "30003f8767c767c701df001f001f07ff1f0e1f341c7c1e78cffcc7c483c403cc",
           "hash2": "3000378777c767c701df001f035f07ff1f0e1f341c7c1e78cff8c7c483c403ce",
           "distance": 7,
           "bits": 256,
           "similarity": 0.9727,
           "verdict": "near_duplicate",
           "verdict_vi": "gần trùng",
           "threshold": 40
          }
         },
         "note": "Perceptual hashes survive resizing, re-compression, format change and small edits, not crops, rotations or mirroring. Distances are Hamming distances; thresholds are heuristics. Images are not stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/booking-slots": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Booking Slots Calculator",
    "description": "Give the working hours (`working_hours`: `{\"mon-fri\":\"08:00-12:00,13:30-17:30\",\"sat\":\"08:00-12:00\"}` or the text `\"mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00\"`), the service `duration` and the grid `step` in minutes, and the date range (`from` / `to` or `days`, up to 62 days). Busy time comes from `busy` (a list of `{start, end}` or `{start, duration}`, with an offset or in the provider zone, optional `seats`) and / or calendars: `ics` text, `ics_url` / `ics_urls` (Google, Outlook, Apple calendar links; recurring events are expanded) or an uploaded .ics `file`. Cancelled and \"free\" (transparent) events are ignored.\n\nRules: `buffer_before` / `buffer_after` around each booking, `min_notice` (minutes before the earliest slot), `capacity` (parallel seats: rooms, staff, chairs) with `seats_left`, `max_per_day`, `closed_dates`, special hours per date (`date_overrides`), and public holidays (`holidays=VN` uses the official Vietnamese days off; any other country code uses the holidays dataset; `open_dates` reopens a holiday). Times use the provider `timezone` (IANA, default Asia/Ho_Chi_Minh, daylight saving handled); `customer_timezone` adds the customer’s local times.\n\nThe answer lists the slots per day, the first available slot and the holidays in range. `hold_start` checks one slot and returns a tentative iCalendar event (`format=ics` returns the .ics file) to hold it while the customer confirms. Nothing is stored: keep bookings in your own calendar and send them as busy time.\n\nDocs: https://apibox.io.vn/docs/booking-slots/",
    "operationId": "bookingSlotsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/booking-slots/"
    },
    "parameters": [
     {
      "name": "working_hours",
      "in": "query",
      "required": false,
      "description": "Weekly hours: object by weekday (`mon`…`sun`, `mon-fri`, `weekend`, `daily`) or the text form.",
      "schema": {
       "type": "object",
       "default": "mon-fri 08:00-12:00,13:00-17:00"
      }
     },
     {
      "name": "duration",
      "in": "query",
      "required": false,
      "description": "Service length in minutes (5–1440).",
      "schema": {
       "type": "number",
       "default": 30
      }
     },
     {
      "name": "step",
      "in": "query",
      "required": false,
      "description": "Grid step between slot starts, minutes.",
      "schema": {
       "type": "number",
       "default": 15
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "First date (YYYY-MM-DD, default today); `to` or `days` (default 7, max 62).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "timezone",
      "in": "query",
      "required": false,
      "description": "Provider IANA time zone.",
      "schema": {
       "type": "string",
       "default": "Asia/Ho_Chi_Minh"
      }
     },
     {
      "name": "customer_timezone",
      "in": "query",
      "required": false,
      "description": "Adds customer_start / customer_end in this zone.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "buffer_before",
      "in": "query",
      "required": false,
      "description": "Minutes kept free before each booking (`buffer_after` after).",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "min_notice",
      "in": "query",
      "required": false,
      "description": "Minimum minutes between now and a slot.",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "capacity",
      "in": "query",
      "required": false,
      "description": "Parallel seats (rooms, staff).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "max_per_day",
      "in": "query",
      "required": false,
      "description": "Maximum slots offered per day.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "holidays",
      "in": "query",
      "required": false,
      "description": "`VN`, another country code, or `none`. `open_dates` reopens dates.",
      "schema": {
       "type": "string",
       "default": "none"
      }
     },
     {
      "name": "closed_dates",
      "in": "query",
      "required": false,
      "description": "Dates closed (YYYY-MM-DD).",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "hold_start",
      "in": "query",
      "required": false,
      "description": "Slot start to hold: adds a tentative .ics (`format=ics` returns the file).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "timezone": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "rules": {
           "type": "object",
           "properties": {
            "duration_minutes": {
             "type": "number"
            },
            "step_minutes": {
             "type": "number"
            },
            "buffer_before_minutes": {
             "type": "number"
            },
            "buffer_after_minutes": {
             "type": "number"
            },
            "min_notice_minutes": {
             "type": "number"
            },
            "capacity": {
             "type": "number"
            },
            "max_per_day": {
             "type": "number"
            },
            "holidays": {
             "type": "string"
            },
            "now": {
             "type": "string"
            }
           }
          },
          "busy_intervals": {
           "type": "number"
          },
          "total_slots": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "first_available": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "start": {
             "type": "string"
            },
            "end": {
             "type": "string"
            }
           }
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "weekday": {
              "type": "string"
             },
             "weekday_vi": {
              "type": "string"
             },
             "open": {
              "type": "boolean"
             },
             "hours": {
              "type": "array"
             },
             "slots_count": {
              "type": "number"
             },
             "slots": {
              "type": "array"
             },
             "reason": {
              "type": "string"
             }
            }
           }
          },
          "holidays_in_range": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "name": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Booking Slots Calculator",
    "description": "Give the working hours (`working_hours`: `{\"mon-fri\":\"08:00-12:00,13:30-17:30\",\"sat\":\"08:00-12:00\"}` or the text `\"mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00\"`), the service `duration` and the grid `step` in minutes, and the date range (`from` / `to` or `days`, up to 62 days). Busy time comes from `busy` (a list of `{start, end}` or `{start, duration}`, with an offset or in the provider zone, optional `seats`) and / or calendars: `ics` text, `ics_url` / `ics_urls` (Google, Outlook, Apple calendar links; recurring events are expanded) or an uploaded .ics `file`. Cancelled and \"free\" (transparent) events are ignored.\n\nRules: `buffer_before` / `buffer_after` around each booking, `min_notice` (minutes before the earliest slot), `capacity` (parallel seats: rooms, staff, chairs) with `seats_left`, `max_per_day`, `closed_dates`, special hours per date (`date_overrides`), and public holidays (`holidays=VN` uses the official Vietnamese days off; any other country code uses the holidays dataset; `open_dates` reopens a holiday). Times use the provider `timezone` (IANA, default Asia/Ho_Chi_Minh, daylight saving handled); `customer_timezone` adds the customer’s local times.\n\nThe answer lists the slots per day, the first available slot and the holidays in range. `hold_start` checks one slot and returns a tentative iCalendar event (`format=ics` returns the .ics file) to hold it while the customer confirms. Nothing is stored: keep bookings in your own calendar and send them as busy time.\n\nDocs: https://apibox.io.vn/docs/booking-slots/",
    "operationId": "bookingSlotsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/booking-slots/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "working_hours": {
          "type": [
           "object",
           "string"
          ],
          "default": "mon-fri 08:00-12:00,13:00-17:00",
          "description": "Weekly hours: object by weekday (`mon`…`sun`, `mon-fri`, `weekend`, `daily`) or the text form."
         },
         "duration": {
          "type": "number",
          "default": 30,
          "description": "Service length in minutes (5–1440)."
         },
         "step": {
          "type": "number",
          "default": 15,
          "description": "Grid step between slot starts, minutes."
         },
         "from": {
          "type": "string",
          "description": "First date (YYYY-MM-DD, default today); `to` or `days` (default 7, max 62)."
         },
         "timezone": {
          "type": "string",
          "default": "Asia/Ho_Chi_Minh",
          "description": "Provider IANA time zone."
         },
         "customer_timezone": {
          "type": "string",
          "description": "Adds customer_start / customer_end in this zone."
         },
         "busy": {
          "type": "array",
          "items": {},
          "description": "Busy intervals `{start, end | duration, seats?}`."
         },
         "ics": {
          "type": "string",
          "description": "iCalendar text with busy events (or `ics_url`, `ics_urls`, an .ics `file`)."
         },
         "buffer_before": {
          "type": "number",
          "default": 0,
          "description": "Minutes kept free before each booking (`buffer_after` after)."
         },
         "min_notice": {
          "type": "number",
          "default": 0,
          "description": "Minimum minutes between now and a slot."
         },
         "capacity": {
          "type": "number",
          "default": 1,
          "description": "Parallel seats (rooms, staff)."
         },
         "max_per_day": {
          "type": "number",
          "description": "Maximum slots offered per day."
         },
         "holidays": {
          "type": "string",
          "default": "none",
          "description": "`VN`, another country code, or `none`. `open_dates` reopens dates."
         },
         "closed_dates": {
          "type": "array",
          "items": {},
          "description": "Dates closed (YYYY-MM-DD)."
         },
         "date_overrides": {
          "type": "object",
          "description": "Special hours per date, e.g. `{\"2026-12-24\":\"08:00-12:00\"}`."
         },
         "hold_start": {
          "type": "string",
          "description": "Slot start to hold: adds a tentative .ics (`format=ics` returns the file)."
         }
        }
       },
       "example": {
        "timezone": "Asia/Ho_Chi_Minh",
        "from": "2026-11-23",
        "to": "2026-11-24",
        "working_hours": "mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00",
        "duration": 60,
        "step": 30,
        "buffer_after": 15,
        "holidays": "VN",
        "busy": [
         {
          "start": "2026-11-23T09:00",
          "end": "2026-11-23T10:30"
         }
        ],
        "max_per_day": 4
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "timezone": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "rules": {
           "type": "object",
           "properties": {
            "duration_minutes": {
             "type": "number"
            },
            "step_minutes": {
             "type": "number"
            },
            "buffer_before_minutes": {
             "type": "number"
            },
            "buffer_after_minutes": {
             "type": "number"
            },
            "min_notice_minutes": {
             "type": "number"
            },
            "capacity": {
             "type": "number"
            },
            "max_per_day": {
             "type": "number"
            },
            "holidays": {
             "type": "string"
            },
            "now": {
             "type": "string"
            }
           }
          },
          "busy_intervals": {
           "type": "number"
          },
          "total_slots": {
           "type": "number"
          },
          "truncated": {
           "type": "boolean"
          },
          "first_available": {
           "type": "object",
           "properties": {
            "date": {
             "type": "string"
            },
            "start": {
             "type": "string"
            },
            "end": {
             "type": "string"
            }
           }
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "weekday": {
              "type": "string"
             },
             "weekday_vi": {
              "type": "string"
             },
             "open": {
              "type": "boolean"
             },
             "hours": {
              "type": "array"
             },
             "slots_count": {
              "type": "number"
             },
             "slots": {
              "type": "array"
             },
             "reason": {
              "type": "string"
             }
            }
           }
          },
          "holidays_in_range": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "name": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "timezone": "Asia/Ho_Chi_Minh",
         "from": "2026-11-23",
         "to": "2026-11-24",
         "rules": {
          "duration_minutes": 60,
          "step_minutes": 30,
          "buffer_before_minutes": 0,
          "buffer_after_minutes": 15,
          "min_notice_minutes": 0,
          "capacity": 1,
          "max_per_day": 4,
          "holidays": "VN",
          "now": "2026-11-16T10:00:00+07:00"
         },
         "busy_intervals": 1,
         "total_slots": 4,
         "truncated": false,
         "first_available": {
          "date": "2026-11-23",
          "start": "2026-11-23T10:30:00+07:00",
          "end": "2026-11-23T11:30:00+07:00"
         },
         "days": [
          {
           "date": "2026-11-23",
           "weekday": "mon",
           "weekday_vi": "Thứ Hai",
           "open": true,
           "hours": [
            "08:00-12:00",
            "13:30-17:30"
           ],
           "slots_count": 4,
           "slots": [
            {
             "start": "2026-11-23T10:30:00+07:00",
             "end": "2026-11-23T11:30:00+07:00"
            },
            {
             "start": "2026-11-23T11:00:00+07:00",
             "end": "2026-11-23T12:00:00+07:00"
            },
            {
             "start": "2026-11-23T13:30:00+07:00",
             "end": "2026-11-23T14:30:00+07:00"
            },
            {
             "start": "2026-11-23T14:00:00+07:00",
             "end": "2026-11-23T15:00:00+07:00"
            }
           ]
          },
          {
           "date": "2026-11-24",
           "weekday": "tue",
           "weekday_vi": "Thứ Ba",
           "open": false,
           "reason": "holiday: Vietnamese Culture Day",
           "slots": []
          }
         ],
         "holidays_in_range": [
          {
           "date": "2026-11-24",
           "name": "Vietnamese Culture Day"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-driver-hours": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Driver Hours Checker",
    "description": "Send a driving log as `log` (intervals `{ start, end, status, driver }` or events `{ time, status }`), or as CSV (`csv` or a text body with `start,end,status` / `time,status` columns, e.g. exported from a journey-monitoring device). Times are Vietnam local time. The answer lists, per driver, every continuous-driving period, daily and weekly totals and each violation with the minute it started and the excess.\n\nRules by date: until 30/6/2026 the Road Traffic Order and Safety Law 36/2024 article 64 caps driving at 10 h a day, 48 h a week and 4 h continuous. From 1/7/2026 (Law 118/2025) only the 4-hour continuous limit stays in the traffic law; daily / weekly working time follows the Labour Code, checked here as driving + other work (12 h a day incl. overtime, 48 h a week; both overridable). A stop of at least 15 minutes (5 minutes for intra-provincial buses and taxis) resets the continuous counter, per `service`. Fines of Decree 168/2024: driver 3–5 million VND and 2 licence points, owner 4–6 million (individual) or 8–12 million (organisation).\n\n`action=plan` with `trip_hours` (and optional `start`, `drivers`) returns how many drivers a trip needs and a schedule of driving blocks and stops. The log is processed in memory only; use pseudonymous driver ids. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-driver-hours/",
    "operationId": "vnDriverHoursGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-driver-hours/"
    },
    "parameters": [
     {
      "name": "service",
      "in": "query",
      "required": false,
      "description": "fixed_route, contract, tourist, bus_interprovince, bus_intraprovince, taxi, cargo, internal_cargo, internal_passenger.",
      "schema": {
       "type": "string",
       "default": "cargo"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "check (log) or plan (trip).",
      "schema": {
       "type": "string",
       "default": "check"
      }
     },
     {
      "name": "trip_hours",
      "in": "query",
      "required": false,
      "description": "plan: total driving hours of the trip.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "start",
      "in": "query",
      "required": false,
      "description": "plan: departure (YYYY-MM-DDTHH:MM).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "drivers",
      "in": "query",
      "required": false,
      "description": "plan: number of drivers available.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "min_rest_min",
      "in": "query",
      "required": false,
      "description": "Override the minimum stop (minutes).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "work_day_cap_h",
      "in": "query",
      "required": false,
      "description": "From 1/7/2026: daily working-time cap (Labour Code).",
      "schema": {
       "type": "number",
       "default": 12
      }
     },
     {
      "name": "work_week_cap_h",
      "in": "query",
      "required": false,
      "description": "From 1/7/2026: weekly working-time cap.",
      "schema": {
       "type": "number",
       "default": 48
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "regimes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "compliant": {
           "type": "boolean"
          },
          "service": {
           "type": "string"
          },
          "min_rest_min": {
           "type": "number"
          },
          "drivers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "driver": {
              "type": "string"
             },
             "totals": {
              "type": "object"
             },
             "violations": {
              "type": "array"
             },
             "compliant": {
              "type": "boolean"
             },
             "fine_estimate": {
              "type": "object"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Driver Hours Checker",
    "description": "Send a driving log as `log` (intervals `{ start, end, status, driver }` or events `{ time, status }`), or as CSV (`csv` or a text body with `start,end,status` / `time,status` columns, e.g. exported from a journey-monitoring device). Times are Vietnam local time. The answer lists, per driver, every continuous-driving period, daily and weekly totals and each violation with the minute it started and the excess.\n\nRules by date: until 30/6/2026 the Road Traffic Order and Safety Law 36/2024 article 64 caps driving at 10 h a day, 48 h a week and 4 h continuous. From 1/7/2026 (Law 118/2025) only the 4-hour continuous limit stays in the traffic law; daily / weekly working time follows the Labour Code, checked here as driving + other work (12 h a day incl. overtime, 48 h a week; both overridable). A stop of at least 15 minutes (5 minutes for intra-provincial buses and taxis) resets the continuous counter, per `service`. Fines of Decree 168/2024: driver 3–5 million VND and 2 licence points, owner 4–6 million (individual) or 8–12 million (organisation).\n\n`action=plan` with `trip_hours` (and optional `start`, `drivers`) returns how many drivers a trip needs and a schedule of driving blocks and stops. The log is processed in memory only; use pseudonymous driver ids. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-driver-hours/",
    "operationId": "vnDriverHoursPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-driver-hours/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "log": {
          "type": "array",
          "items": {},
          "description": "Intervals [{start, end, status: driving|work|rest, driver}] or events [{time, status, driver}] (Vietnam time, YYYY-MM-DDTHH:MM)."
         },
         "csv": {
          "type": "string",
          "description": "The same log as CSV (start,end,status[,driver] or time,status[,driver]); a text/csv body also works."
         },
         "service": {
          "type": "string",
          "default": "cargo",
          "description": "fixed_route, contract, tourist, bus_interprovince, bus_intraprovince, taxi, cargo, internal_cargo, internal_passenger."
         },
         "action": {
          "type": "string",
          "default": "check",
          "description": "check (log) or plan (trip)."
         },
         "trip_hours": {
          "type": "number",
          "description": "plan: total driving hours of the trip."
         },
         "start": {
          "type": "string",
          "description": "plan: departure (YYYY-MM-DDTHH:MM)."
         },
         "drivers": {
          "type": "number",
          "description": "plan: number of drivers available."
         },
         "min_rest_min": {
          "type": "number",
          "description": "Override the minimum stop (minutes)."
         },
         "work_day_cap_h": {
          "type": "number",
          "default": 12,
          "description": "From 1/7/2026: daily working-time cap (Labour Code)."
         },
         "work_week_cap_h": {
          "type": "number",
          "default": 48,
          "description": "From 1/7/2026: weekly working-time cap."
         }
        }
       },
       "example": {
        "service": "cargo",
        "log": [
         {
          "start": "2026-08-03T05:00",
          "end": "2026-08-03T09:20",
          "status": "driving",
          "driver": "D1"
         },
         {
          "start": "2026-08-03T09:20",
          "end": "2026-08-03T09:40",
          "status": "rest",
          "driver": "D1"
         },
         {
          "start": "2026-08-03T09:40",
          "end": "2026-08-03T12:00",
          "status": "driving",
          "driver": "D1"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "period": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "regimes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "compliant": {
           "type": "boolean"
          },
          "service": {
           "type": "string"
          },
          "min_rest_min": {
           "type": "number"
          },
          "drivers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "driver": {
              "type": "string"
             },
             "totals": {
              "type": "object"
             },
             "violations": {
              "type": "array"
             },
             "compliant": {
              "type": "boolean"
             },
             "fine_estimate": {
              "type": "object"
             }
            }
           }
          }
         }
        },
        "example": {
         "action": "check",
         "period": {
          "from": "2026-08-03",
          "to": "2026-08-03"
         },
         "regimes": [
          "law118"
         ],
         "compliant": false,
         "service": "cargo",
         "min_rest_min": 15,
         "drivers": [
          {
           "driver": "D1",
           "totals": {
            "driving_min": 400,
            "driving": "6h40",
            "longest_continuous_min": 260,
            "longest_continuous": "4h20"
           },
           "violations": [
            {
             "type": "continuous_driving",
             "rule": "continuous_4h",
             "at": "2026-08-03T09:00",
             "period_start": "2026-08-03T05:00",
             "limit_min": 240,
             "vi": "Lái xe liên tục quá 4 giờ mà không dừng nghỉ đủ 15 phút",
             "en": "Continuous driving over 4 h without a stop of at least 15 min",
             "fine": true,
             "driving_min": 260,
             "excess_min": 20
            }
           ],
           "compliant": false,
           "fine_estimate": {
            "per_violation_driver_vnd": {
             "min": 3000000,
             "max": 5000000
            },
            "licence_points": 2,
            "owner_individual_vnd": {
             "min": 4000000,
             "max": 6000000
            },
            "owner_organisation_vnd": {
             "min": 8000000,
             "max": 12000000
            },
            "note": "One decision may cover several violations; the amount within the range is set by the officer. Labour Code working-time checks are not traffic fines."
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-axle-load": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Axle Load & Overweight Checker",
    "description": "Describe the vehicle with `vehicle` (rigid truck / bus, semi = tractor + semi-trailer, drawbar = truck + trailer) and `groups` from front to back: `single:8,tandem:1.3:22` or JSON `[{type, spacing_m, load_t}]` (single, tandem, tridem; spacing between axle centres). The answer gives the limit of each group (Circular 12/2025/TT-BXD art. 14: 10 t single; tandem 11 / 16 / 18 t by spacing; tridem 21 / 24 t) and the gross limit (art. 15: 16 / 24 / 30 / 32–34 t for rigid vehicles, 26–48 t for semi-trailers by axles and kingpin distance, 45 t for drawbar combinations, −2 t per missing metre).\n\nOptional: `gross_t`, posted `road_limit_t` / `road_axle_limit_t` (bridges), `wheelbase_m`, `kingpin_m`, `drawbar_m`, dimensions `length_m`, `width_m`, `height_m` (oversize above 20 m / 2.5 m / 4.2 m, 4.35 m for containers), `design_payload_t` + `cargo_t` (payload over the inspection certificate), `permit`. It says whether a travel permit (giấy phép lưu hành, by the provincial Department of Construction, up to 90 / 30 days) is needed or cannot be issued, and the fine bands of Decree 168/2024 (arts. 21, 22, 32, 34) for driver and owner.\n\nGeneral limits only: posted limits of each bridge or road prevail. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-axle-load/",
    "operationId": "vnAxleLoadGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-axle-load/"
    },
    "parameters": [
     {
      "name": "groups",
      "in": "query",
      "required": true,
      "description": "Axle groups front to back: \"single:8,tandem:1.3:22\" (type:load or type:spacing:load) or JSON [{type, spacing_m, load_t}].",
      "schema": {
       "type": "string"
      },
      "example": "single:8,tandem:1.3:22"
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "rigid, semi (tractor + semi-trailer) or drawbar (truck + trailer).",
      "schema": {
       "type": "string",
       "default": "rigid"
      },
      "example": "rigid"
     },
     {
      "name": "gross_t",
      "in": "query",
      "required": false,
      "description": "Weighed gross mass (default: sum of groups).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "road_limit_t",
      "in": "query",
      "required": false,
      "description": "Posted gross limit of the road / bridge.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "kingpin_m",
      "in": "query",
      "required": false,
      "description": "Semi: kingpin to the first semi-trailer axle (m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "wheelbase_m",
      "in": "query",
      "required": false,
      "description": "Rigid ≥ 5 axles: first to last axle (m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "drawbar_m",
      "in": "query",
      "required": false,
      "description": "Drawbar: towing eye to the trailer axle group (m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "length_m",
      "in": "query",
      "required": false,
      "description": "Loaded length / width_m / height_m for oversize checks.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "design_payload_t",
      "in": "query",
      "required": false,
      "description": "Payload in the inspection certificate (with cargo_t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cargo_t",
      "in": "query",
      "required": false,
      "description": "Cargo actually carried (t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "permit",
      "in": "query",
      "required": false,
      "description": "The vehicle has a valid travel permit.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle": {
           "type": "string"
          },
          "axles": {
           "type": "number"
          },
          "gross_t": {
           "type": "number"
          },
          "groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "axles": {
              "type": "number"
             },
             "spacing_m": {},
             "load_t": {
              "type": "number"
             },
             "limit_t": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             },
             "over": {
              "type": "boolean"
             },
             "over_pct": {
              "type": "number"
             }
            }
           }
          },
          "gross": {
           "type": "object",
           "properties": {
            "load_t": {
             "type": "number"
            },
            "limit_t": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "over": {
             "type": "boolean"
            },
            "over_pct": {
             "type": "number"
            }
           }
          },
          "permit": {
           "type": "object",
           "properties": {
            "needed": {
             "type": "boolean"
            },
            "have_permit": {
             "type": "boolean"
            },
            "can_be_issued": {
             "type": "boolean"
            },
            "issuer": {
             "type": "string"
            },
            "validity": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "compliant": {
           "type": "boolean"
          },
          "fines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "violation": {
              "type": "string"
             },
             "band": {
              "type": "string"
             },
             "driver_vnd": {
              "type": "object"
             },
             "points": {
              "type": "number"
             },
             "owner_individual_vnd": {
              "type": "object"
             },
             "owner_organisation_vnd": {
              "type": "object"
             },
             "ref": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "over_pct": {
              "type": "number"
             },
             "note": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "vehicle": "rigid",
         "axles": 3,
         "gross_t": 30,
         "groups": [
          {
           "index": 0,
           "type": "single",
           "axles": 1,
           "spacing_m": null,
           "load_t": 8,
           "limit_t": 10,
           "rule": "Điều 14 khoản 1: single axle ≤ 10 t",
           "over": false,
           "over_pct": 0
          },
          {
           "index": 1,
           "type": "tandem",
           "axles": 2,
           "spacing_m": 1.3,
           "load_t": 22,
           "limit_t": 18,
           "rule": "Điều 14 khoản 2c: tandem, d ≥ 1.3 m ≤ 18 t",
           "over": true,
           "over_pct": 22.22
          }
         ],
         "gross": {
          "load_t": 30,
          "limit_t": 24,
          "rule": "Điều 15 khoản 1b: 3 axles ≤ 24 t",
          "over": true,
          "over_pct": 25
         },
         "permit": {
          "needed": true,
          "have_permit": false,
          "can_be_issued": true,
          "issuer": "Sở Xây dựng (provincial) where the applicant is registered or the trip starts / ends (TT 12/2025 Điều 24)",
          "validity": "Up to 90 days on upgraded routes without mandatory conditions; up to 30 days otherwise, per trip for tracked vehicles; never beyond the inspection certificate (TT 12/2025 Điều 22 khoản 4)",
          "vi": "Cần giấy phép lưu hành xe (Sở Xây dựng cấp) trước khi lưu thông."
         },
         "compliant": false,
         "fines": [
          {
           "violation": "over_road_load",
           "band": "> 20–50 %",
           "driver_vnd": {
            "min": 13000000,
            "max": 15000000
           },
           "points": 2,
           "owner_individual_vnd": {
            "min": 28000000,
            "max": 30000000
           },
           "owner_organisation_vnd": {
            "min": 56000000,
            "max": 60000000
           },
           "ref": "NĐ 168/2024 Điều 34 khoản 4 điểm a, khoản 7 điểm a; Điều 32 khoản 14 điểm đ",
           "basis": "gross",
           "over_pct": 25,
           "note": "Gross and axle overloads are fined once, at the heavier band (NĐ 168/2024 Điều 6 / Điều 34 note); ≤ 10 % gross and ≤ 20 % axle overload are not fined under Điều 34."
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Axle Load & Overweight Checker",
    "description": "Describe the vehicle with `vehicle` (rigid truck / bus, semi = tractor + semi-trailer, drawbar = truck + trailer) and `groups` from front to back: `single:8,tandem:1.3:22` or JSON `[{type, spacing_m, load_t}]` (single, tandem, tridem; spacing between axle centres). The answer gives the limit of each group (Circular 12/2025/TT-BXD art. 14: 10 t single; tandem 11 / 16 / 18 t by spacing; tridem 21 / 24 t) and the gross limit (art. 15: 16 / 24 / 30 / 32–34 t for rigid vehicles, 26–48 t for semi-trailers by axles and kingpin distance, 45 t for drawbar combinations, −2 t per missing metre).\n\nOptional: `gross_t`, posted `road_limit_t` / `road_axle_limit_t` (bridges), `wheelbase_m`, `kingpin_m`, `drawbar_m`, dimensions `length_m`, `width_m`, `height_m` (oversize above 20 m / 2.5 m / 4.2 m, 4.35 m for containers), `design_payload_t` + `cargo_t` (payload over the inspection certificate), `permit`. It says whether a travel permit (giấy phép lưu hành, by the provincial Department of Construction, up to 90 / 30 days) is needed or cannot be issued, and the fine bands of Decree 168/2024 (arts. 21, 22, 32, 34) for driver and owner.\n\nGeneral limits only: posted limits of each bridge or road prevail. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-axle-load/",
    "operationId": "vnAxleLoadPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-axle-load/"
    },
    "parameters": [
     {
      "name": "groups",
      "in": "query",
      "required": false,
      "description": "Axle groups front to back: \"single:8,tandem:1.3:22\" (type:load or type:spacing:load) or JSON [{type, spacing_m, load_t}].",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "rigid, semi (tractor + semi-trailer) or drawbar (truck + trailer).",
      "schema": {
       "type": "string",
       "default": "rigid"
      }
     },
     {
      "name": "gross_t",
      "in": "query",
      "required": false,
      "description": "Weighed gross mass (default: sum of groups).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "road_limit_t",
      "in": "query",
      "required": false,
      "description": "Posted gross limit of the road / bridge.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "kingpin_m",
      "in": "query",
      "required": false,
      "description": "Semi: kingpin to the first semi-trailer axle (m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "wheelbase_m",
      "in": "query",
      "required": false,
      "description": "Rigid ≥ 5 axles: first to last axle (m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "drawbar_m",
      "in": "query",
      "required": false,
      "description": "Drawbar: towing eye to the trailer axle group (m).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "length_m",
      "in": "query",
      "required": false,
      "description": "Loaded length / width_m / height_m for oversize checks.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "design_payload_t",
      "in": "query",
      "required": false,
      "description": "Payload in the inspection certificate (with cargo_t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cargo_t",
      "in": "query",
      "required": false,
      "description": "Cargo actually carried (t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "permit",
      "in": "query",
      "required": false,
      "description": "The vehicle has a valid travel permit.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle": {
           "type": "string"
          },
          "axles": {
           "type": "number"
          },
          "gross_t": {
           "type": "number"
          },
          "groups": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "type": {
              "type": "string"
             },
             "axles": {
              "type": "number"
             },
             "spacing_m": {},
             "load_t": {
              "type": "number"
             },
             "limit_t": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             },
             "over": {
              "type": "boolean"
             },
             "over_pct": {
              "type": "number"
             }
            }
           }
          },
          "gross": {
           "type": "object",
           "properties": {
            "load_t": {
             "type": "number"
            },
            "limit_t": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "over": {
             "type": "boolean"
            },
            "over_pct": {
             "type": "number"
            }
           }
          },
          "permit": {
           "type": "object",
           "properties": {
            "needed": {
             "type": "boolean"
            },
            "have_permit": {
             "type": "boolean"
            },
            "can_be_issued": {
             "type": "boolean"
            },
            "issuer": {
             "type": "string"
            },
            "validity": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "compliant": {
           "type": "boolean"
          },
          "fines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "violation": {
              "type": "string"
             },
             "band": {
              "type": "string"
             },
             "driver_vnd": {
              "type": "object"
             },
             "points": {
              "type": "number"
             },
             "owner_individual_vnd": {
              "type": "object"
             },
             "owner_organisation_vnd": {
              "type": "object"
             },
             "ref": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "over_pct": {
              "type": "number"
             },
             "note": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-truck-hours": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam City Truck Ban Hours",
    "description": "Pick a `city` (hanoi, hcm, danang), a `vehicle` (truck, van, pickup, specialised, garbage, public_service, coach, fixed_route) with its weight and a `datetime` (Vietnam time, default now). The answer says whether it may run in the restricted inner-city zone now, the allowed windows of the day, the next allowed time, who approves exceptions and the urban-route fine (5–7 million VND, 2 licence points).\n\nHà Nội (Decision 01/2026/QĐ-UBND from 15/1/2026, amended by 52/2026 from 30/4/2026) uses the gross weight `gvw_t`: under 2 t outside peak hours (06:00–09:00, 16:00–19:30), 2 t and more only 21:00–06:00 (approval by the city police for 2–10 t, Department of Construction from 10 t), pickups 24/24, contract coaches of 28+ seats outside peak hours. Ho Chi Minh City (Decision 23/2018, amended 2019) uses the payload `payload_t`: light trucks up to 2.5 t banned 06:00–09:00 and 16:00–20:00, heavier trucks 06:00–22:00; a replacement draft is listed under `pending`. Đà Nẵng rules come from signage reports and are marked `unverified`.\n\nEvery answer has `status`, `coverage` and the legal references; rules are reviewed every 30 days. Route signs, temporary orders and the Hà Nội low-emission zone (see /v1/vn-low-emission-zone) are not covered.\n\nDocs: https://apibox.io.vn/docs/vn-truck-hours/",
    "operationId": "vnTruckHoursGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-truck-hours/"
    },
    "parameters": [
     {
      "name": "city",
      "in": "query",
      "required": false,
      "description": "hanoi, hcm or danang.",
      "schema": {
       "type": "string",
       "default": "hanoi"
      },
      "example": "hanoi"
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "truck, van, pickup, specialised, garbage, public_service, coach, fixed_route.",
      "schema": {
       "type": "string",
       "default": "truck"
      },
      "example": "truck"
     },
     {
      "name": "gvw_t",
      "in": "query",
      "required": false,
      "description": "Hà Nội: gross vehicle mass (t).",
      "schema": {
       "type": "number"
      },
      "example": 5
     },
     {
      "name": "payload_t",
      "in": "query",
      "required": false,
      "description": "HCMC / Đà Nẵng: permitted payload (t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "coach: seats excluding the driver.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "datetime",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DDTHH:MM Vietnam time (default now).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-17T08:00"
     },
     {
      "name": "zone",
      "in": "query",
      "required": false,
      "description": "inner (restricted zone) or outer.",
      "schema": {
       "type": "string",
       "default": "inner"
      }
     },
     {
      "name": "permit",
      "in": "query",
      "required": false,
      "description": "The vehicle has an approval / permit.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "city": {
           "type": "string"
          },
          "city_status": {
           "type": "string"
          },
          "zone": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "datetime_vn": {
           "type": "string"
          },
          "vehicle": {
           "type": "string"
          },
          "gvw_t": {
           "type": "number"
          },
          "allowed_now": {
           "type": "boolean"
          },
          "next_allowed": {
           "type": "string"
          },
          "allowed_windows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             }
            }
           }
          },
          "rule": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "outside_windows": {
             "type": "string"
            }
           }
          },
          "fine": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          }
         }
        },
        "example": {
         "city": "Hà Nội",
         "city_status": "in_force",
         "zone": "inner",
         "date": "2026-11-17",
         "datetime_vn": "2026-11-17T08:00",
         "vehicle": "truck",
         "gvw_t": 5,
         "allowed_now": false,
         "next_allowed": "2026-11-17T21:00",
         "allowed_windows": [
          {
           "from": "21:00",
           "to": "06:00"
          }
         ],
         "rule": {
          "vi": "Xe tải thông dụng từ 2 tấn trở lên: chỉ hoạt động từ 21h00 đến 06h00 sáng hôm sau",
          "en": "Trucks of 2 t or more: 21:00–06:00 only",
          "ref": "QĐ 01/2026/QĐ-UBND Điều 5 khoản 2",
          "status": "in_force",
          "outside_windows": "Written approval of Công an Thành phố (2 t to under 10 t)"
         },
         "fine": {
          "vi": "Xe tải chạy sai tuyến, phạm vi, thời gian quy định trong đô thị: 5–7 triệu đồng, trừ 2 điểm GPLX (NĐ 168/2024 Điều 21 khoản 6 điểm d)",
          "en": "Truck outside permitted route / time in an urban area: 5–7 million VND, 2 licence points (NĐ 168/2024 Điều 21 k6 đ.d)"
         },
         "reviewed": "2026-11-16",
         "review_cadence_days": 30
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam City Truck Ban Hours",
    "description": "Pick a `city` (hanoi, hcm, danang), a `vehicle` (truck, van, pickup, specialised, garbage, public_service, coach, fixed_route) with its weight and a `datetime` (Vietnam time, default now). The answer says whether it may run in the restricted inner-city zone now, the allowed windows of the day, the next allowed time, who approves exceptions and the urban-route fine (5–7 million VND, 2 licence points).\n\nHà Nội (Decision 01/2026/QĐ-UBND from 15/1/2026, amended by 52/2026 from 30/4/2026) uses the gross weight `gvw_t`: under 2 t outside peak hours (06:00–09:00, 16:00–19:30), 2 t and more only 21:00–06:00 (approval by the city police for 2–10 t, Department of Construction from 10 t), pickups 24/24, contract coaches of 28+ seats outside peak hours. Ho Chi Minh City (Decision 23/2018, amended 2019) uses the payload `payload_t`: light trucks up to 2.5 t banned 06:00–09:00 and 16:00–20:00, heavier trucks 06:00–22:00; a replacement draft is listed under `pending`. Đà Nẵng rules come from signage reports and are marked `unverified`.\n\nEvery answer has `status`, `coverage` and the legal references; rules are reviewed every 30 days. Route signs, temporary orders and the Hà Nội low-emission zone (see /v1/vn-low-emission-zone) are not covered.\n\nDocs: https://apibox.io.vn/docs/vn-truck-hours/",
    "operationId": "vnTruckHoursPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-truck-hours/"
    },
    "parameters": [
     {
      "name": "city",
      "in": "query",
      "required": false,
      "description": "hanoi, hcm or danang.",
      "schema": {
       "type": "string",
       "default": "hanoi"
      }
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "truck, van, pickup, specialised, garbage, public_service, coach, fixed_route.",
      "schema": {
       "type": "string",
       "default": "truck"
      }
     },
     {
      "name": "gvw_t",
      "in": "query",
      "required": false,
      "description": "Hà Nội: gross vehicle mass (t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "payload_t",
      "in": "query",
      "required": false,
      "description": "HCMC / Đà Nẵng: permitted payload (t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "coach: seats excluding the driver.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "datetime",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DDTHH:MM Vietnam time (default now).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "zone",
      "in": "query",
      "required": false,
      "description": "inner (restricted zone) or outer.",
      "schema": {
       "type": "string",
       "default": "inner"
      }
     },
     {
      "name": "permit",
      "in": "query",
      "required": false,
      "description": "The vehicle has an approval / permit.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "city": {
           "type": "string"
          },
          "city_status": {
           "type": "string"
          },
          "zone": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "datetime_vn": {
           "type": "string"
          },
          "vehicle": {
           "type": "string"
          },
          "gvw_t": {
           "type": "number"
          },
          "allowed_now": {
           "type": "boolean"
          },
          "next_allowed": {
           "type": "string"
          },
          "allowed_windows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             }
            }
           }
          },
          "rule": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "outside_windows": {
             "type": "string"
            }
           }
          },
          "fine": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-motorbike-emission": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Motorbike Emission Roadmap",
    "description": "Send `province` (any of the 34 provinces / cities, e.g. Hà Nội, hcm, Đà Nẵng, Nghệ An), `type` (motorcycle > 50 cm³, moped ≤ 50 cm³, electric) and the manufacturing `year` or `manufacture_date`. The answer gives the start of mandatory emission inspection in that area under Decision 13/2026/QĐ-TTg (effective 16/5/2026): 1/7/2027 in Hà Nội and Ho Chi Minh City, 1/7/2028 in the other centrally-run cities (Hải Phòng, Đà Nẵng, Cần Thơ, Huế), 1/7/2030 elsewhere unless the province starts earlier.\n\nIt also returns the emission level required by manufacturing year (motorcycles: before 2008 level 1, 2008–2016 level 2, 2017–30/6/2026 level 3, from 1/7/2026 level 4; mopeds: level 1, 2 or 4), the CO / HC limits of that level, whether the bike meets the level-2 minimum that applies in Hà Nội and HCMC from 1/1/2028, the inspection cycle by age (60 / 24 / 12 months) and an estimated first due date.\n\nThe roadmap was postponed once, so the answer carries `roadmap_status`; it is reviewed every 30 days. Related: /v1/vn-low-emission-zone (Hà Nội Ring-1 zone) and /v1/vn-vehicle-fees. Limits are marked unverified until checked against QCVN 99:2025. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-motorbike-emission/",
    "operationId": "vnMotorbikeEmissionGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-motorbike-emission/"
    },
    "parameters": [
     {
      "name": "province",
      "in": "query",
      "required": true,
      "description": "Province / city (34 units after 1/7/2025) or code.",
      "schema": {
       "type": "string"
      },
      "example": "Hà Nội"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "motorcycle, moped or electric.",
      "schema": {
       "type": "string",
       "default": "motorcycle"
      },
      "example": "motorcycle"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Manufacturing / import year.",
      "schema": {
       "type": "number"
      },
      "example": 2005
     },
     {
      "name": "manufacture_date",
      "in": "query",
      "required": false,
      "description": "Factory date (YYYY-MM-DD), needed for 2026 motorcycles / 2027 mopeds.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-16"
     },
     {
      "name": "last_inspection",
      "in": "query",
      "required": false,
      "description": "Date of the last emission test → next due.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "province": {
           "type": "string"
          },
          "tier": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "manufacture_year": {
           "type": "number"
          },
          "subject_to_emission_inspection": {
           "type": "boolean"
          },
          "inspection_from": {
           "type": "string"
          },
          "required_level": {
           "type": "number"
          },
          "limits": {
           "type": "object",
           "properties": {
            "co_pct": {
             "type": "number"
            },
            "hc_ppm_4stroke": {
             "type": "number"
            },
            "hc_ppm_2stroke": {
             "type": "number"
            }
           }
          },
          "city_minimum": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "min_level": {
             "type": "number"
            },
            "in_effect": {
             "type": "boolean"
            },
            "meets": {
             "type": "boolean"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "cycle": {
           "type": "object",
           "properties": {
            "age_years": {
             "type": "number"
            },
            "months": {
             "type": "number"
            },
            "next_due_estimate": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "fee": {
           "type": "object",
           "properties": {
            "status": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "see_also": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-16",
         "province": "Thành phố Hà Nội",
         "tier": "tier1",
         "type": "motorcycle",
         "manufacture_year": 2005,
         "subject_to_emission_inspection": false,
         "inspection_from": "2027-07-01",
         "required_level": 1,
         "limits": {
          "co_pct": 4.5,
          "hc_ppm_4stroke": 1500,
          "hc_ppm_2stroke": 10000
         },
         "city_minimum": {
          "from": "2028-01-01",
          "min_level": 2,
          "in_effect": false,
          "meets": false,
          "vi": "Xe Mức 1 (mô tô trước 2008, xe gắn máy trước 2016/2017): từ 01/01/2028 không đáp ứng yêu cầu Mức 2 khi lưu hành tại Hà Nội, TP.HCM",
          "en": "Level-1 vehicle: from 01/01/2028 does not meet the level-2 minimum for use in Hà Nội / Ho Chi Minh City"
         },
         "cycle": {
          "age_years": 20.9,
          "months": 12,
          "next_due_estimate": "2027-07-01",
          "note": "Cycle of TT 47/2024 (unverified against the latest consolidated text); a due date before the roadmap start is moved to the start date."
         },
         "fee": {
          "status": "not_published",
          "note": "The service price for motorcycle emission inspection had not been published (11/2026)."
         },
         "see_also": [
          "/v1/vn-low-emission-zone",
          "/v1/vn-vehicle-fees"
         ],
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Motorbike Emission Roadmap",
    "description": "Send `province` (any of the 34 provinces / cities, e.g. Hà Nội, hcm, Đà Nẵng, Nghệ An), `type` (motorcycle > 50 cm³, moped ≤ 50 cm³, electric) and the manufacturing `year` or `manufacture_date`. The answer gives the start of mandatory emission inspection in that area under Decision 13/2026/QĐ-TTg (effective 16/5/2026): 1/7/2027 in Hà Nội and Ho Chi Minh City, 1/7/2028 in the other centrally-run cities (Hải Phòng, Đà Nẵng, Cần Thơ, Huế), 1/7/2030 elsewhere unless the province starts earlier.\n\nIt also returns the emission level required by manufacturing year (motorcycles: before 2008 level 1, 2008–2016 level 2, 2017–30/6/2026 level 3, from 1/7/2026 level 4; mopeds: level 1, 2 or 4), the CO / HC limits of that level, whether the bike meets the level-2 minimum that applies in Hà Nội and HCMC from 1/1/2028, the inspection cycle by age (60 / 24 / 12 months) and an estimated first due date.\n\nThe roadmap was postponed once, so the answer carries `roadmap_status`; it is reviewed every 30 days. Related: /v1/vn-low-emission-zone (Hà Nội Ring-1 zone) and /v1/vn-vehicle-fees. Limits are marked unverified until checked against QCVN 99:2025. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-motorbike-emission/",
    "operationId": "vnMotorbikeEmissionPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-motorbike-emission/"
    },
    "parameters": [
     {
      "name": "province",
      "in": "query",
      "required": false,
      "description": "Province / city (34 units after 1/7/2025) or code.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "motorcycle, moped or electric.",
      "schema": {
       "type": "string",
       "default": "motorcycle"
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Manufacturing / import year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "manufacture_date",
      "in": "query",
      "required": false,
      "description": "Factory date (YYYY-MM-DD), needed for 2026 motorcycles / 2027 mopeds.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "last_inspection",
      "in": "query",
      "required": false,
      "description": "Date of the last emission test → next due.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "province": {
           "type": "string"
          },
          "tier": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "manufacture_year": {
           "type": "number"
          },
          "subject_to_emission_inspection": {
           "type": "boolean"
          },
          "inspection_from": {
           "type": "string"
          },
          "required_level": {
           "type": "number"
          },
          "limits": {
           "type": "object",
           "properties": {
            "co_pct": {
             "type": "number"
            },
            "hc_ppm_4stroke": {
             "type": "number"
            },
            "hc_ppm_2stroke": {
             "type": "number"
            }
           }
          },
          "city_minimum": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "min_level": {
             "type": "number"
            },
            "in_effect": {
             "type": "boolean"
            },
            "meets": {
             "type": "boolean"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "cycle": {
           "type": "object",
           "properties": {
            "age_years": {
             "type": "number"
            },
            "months": {
             "type": "number"
            },
            "next_due_estimate": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "fee": {
           "type": "object",
           "properties": {
            "status": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "see_also": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-teaching-hours": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Teacher Periods & Overtime Pay",
    "description": "Send `level` (tieu_hoc, thcs, thpt, du_bi, boarding / special-school variants), `role` (teacher, principal, vice_principal), the periods taught (`actual_periods` a year or `periods_per_week`), `duties` (homeroom, head_group, deputy_group, lab:2, party_secretary, it, library, probation, child_under_12m…), `conversions` and the salary (`monthly_salary`, or `coefficient` + `allowance_coefficient` + `allowance_percent` with the base salary of the date). The answer gives the weekly norm (23 / 19 / 17 periods, principal 2, vice principal 4), the annual norm (× 35 teaching weeks, reserve weeks excluded), reductions, required and extra periods.\n\nPay follows Circular 21/2025/TT-BGDĐT (from 23/9/2025): one period = 12-month salary × teaching weeks ÷ (annual norm × 52); an extra period is paid 150 %; at most 200 extra periods a year. Warnings flag more than two concurrent duties, more than 150 % of the weekly norm and the 200-period cap. POST `teachers=[…]` for a whole school and `format=xlsx` for a payment sheet.\n\nA draft raising the norms is listed under `pending` and the rules are reviewed every 30 days. Preschool teachers and local extras (e.g. two-session pay in HCMC) are not covered. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-teaching-hours/",
    "operationId": "vnTeachingHoursGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-teaching-hours/"
    },
    "parameters": [
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "tieu_hoc, thcs, thpt, du_bi, ptdtbt_tieu_hoc, ptdtbt_thcs, dtnt_thcs, dtnt_thpt, khuyet_tat_* (empty = list norms).",
      "schema": {
       "type": "string"
      },
      "example": "thcs"
     },
     {
      "name": "role",
      "in": "query",
      "required": false,
      "description": "teacher, principal or vice_principal.",
      "schema": {
       "type": "string",
       "default": "teacher"
      }
     },
     {
      "name": "periods_per_week",
      "in": "query",
      "required": false,
      "description": "Average periods taught a week (or actual_periods for the year).",
      "schema": {
       "type": "number"
      },
      "example": 20
     },
     {
      "name": "actual_periods",
      "in": "query",
      "required": false,
      "description": "Periods actually taught in the school year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "duties",
      "in": "query",
      "required": false,
      "description": "Comma list or JSON: homeroom, head_group, deputy_group, lab:2, party_secretary, it, library, probation, child_under_12m, custom…",
      "schema": {
       "type": "string"
      },
      "example": "homeroom,head_group"
     },
     {
      "name": "coefficient",
      "in": "query",
      "required": false,
      "description": "Salary coefficient (with allowance_coefficient, allowance_percent) — or monthly_salary.",
      "schema": {
       "type": "number"
      },
      "example": 4
     },
     {
      "name": "monthly_salary",
      "in": "query",
      "required": false,
      "description": "Monthly salary used for overtime (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "weeks",
      "in": "query",
      "required": false,
      "description": "Teaching weeks (excl. reserve weeks).",
      "schema": {
       "type": "number",
       "default": 35
      }
     },
     {
      "name": "large_school",
      "in": "query",
      "required": false,
      "description": "≥ 28 classes (regions 2–3) or ≥ 19 (region 1).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "json or xlsx.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "level": {
           "type": "string"
          },
          "weekly_norm": {
           "type": "number"
          },
          "teaching_weeks": {
           "type": "number"
          },
          "annual_norm": {
           "type": "number"
          },
          "reductions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "per_week": {
              "type": "number"
             },
             "art": {
              "type": "string"
             }
            }
           }
          },
          "reduction_per_week": {
           "type": "number"
          },
          "required_periods": {
           "type": "number"
          },
          "total_periods": {
           "type": "number"
          },
          "extra_periods": {
           "type": "number"
          },
          "extra_periods_paid": {
           "type": "number"
          },
          "pay": {
           "type": "object",
           "properties": {
            "monthly_salary": {
             "type": "number"
            },
            "from_coefficient": {
             "type": "object",
             "properties": {
              "coefficient": {
               "type": "number"
              },
              "allowance_coefficient": {
               "type": "number"
              },
              "allowance_percent": {
               "type": "number"
              },
              "base_salary": {
               "type": "number"
              },
              "base_from": {
               "type": "string"
              },
              "base_ref": {
               "type": "string"
              }
             }
            },
            "salary_per_period": {
             "type": "number"
            },
            "salary_per_extra_period": {
             "type": "number"
            },
            "extra_pay": {
             "type": "number"
            },
            "formula": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "date": "2026-11-16",
         "level": "thcs",
         "weekly_norm": 19,
         "teaching_weeks": 35,
         "annual_norm": 665,
         "reductions": [
          {
           "code": "homeroom",
           "vi": "Giáo viên chủ nhiệm lớp",
           "per_week": 4,
           "art": "Điều 9"
          },
          {
           "code": "head_group",
           "vi": "Tổ trưởng chuyên môn",
           "per_week": 3,
           "art": "Điều 9"
          }
         ],
         "reduction_per_week": 7,
         "required_periods": 420,
         "total_periods": 700,
         "extra_periods": 280,
         "extra_periods_paid": 200,
         "pay": {
          "monthly_salary": 10120000,
          "from_coefficient": {
           "coefficient": 4,
           "allowance_coefficient": 0,
           "allowance_percent": 0,
           "base_salary": 2530000,
           "base_from": "2026-07-01",
           "base_ref": "Nghị định 161/2026/NĐ-CP; Thông tư 13/2026/TT-BNV"
          },
          "salary_per_period": 122915,
          "salary_per_extra_period": 184372,
          "extra_pay": 36874494,
          "formula": "monthly × 12 × weeks ÷ (annual norm × 52) × 150 %"
         },
         "warnings": [
          "280 extra periods exceed the 200-period annual cap (TT 21/2025): only 200 are paid."
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Teacher Periods & Overtime Pay",
    "description": "Send `level` (tieu_hoc, thcs, thpt, du_bi, boarding / special-school variants), `role` (teacher, principal, vice_principal), the periods taught (`actual_periods` a year or `periods_per_week`), `duties` (homeroom, head_group, deputy_group, lab:2, party_secretary, it, library, probation, child_under_12m…), `conversions` and the salary (`monthly_salary`, or `coefficient` + `allowance_coefficient` + `allowance_percent` with the base salary of the date). The answer gives the weekly norm (23 / 19 / 17 periods, principal 2, vice principal 4), the annual norm (× 35 teaching weeks, reserve weeks excluded), reductions, required and extra periods.\n\nPay follows Circular 21/2025/TT-BGDĐT (from 23/9/2025): one period = 12-month salary × teaching weeks ÷ (annual norm × 52); an extra period is paid 150 %; at most 200 extra periods a year. Warnings flag more than two concurrent duties, more than 150 % of the weekly norm and the 200-period cap. POST `teachers=[…]` for a whole school and `format=xlsx` for a payment sheet.\n\nA draft raising the norms is listed under `pending` and the rules are reviewed every 30 days. Preschool teachers and local extras (e.g. two-session pay in HCMC) are not covered. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-teaching-hours/",
    "operationId": "vnTeachingHoursPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-teaching-hours/"
    },
    "parameters": [
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "tieu_hoc, thcs, thpt, du_bi, ptdtbt_tieu_hoc, ptdtbt_thcs, dtnt_thcs, dtnt_thpt, khuyet_tat_* (empty = list norms).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "role",
      "in": "query",
      "required": false,
      "description": "teacher, principal or vice_principal.",
      "schema": {
       "type": "string",
       "default": "teacher"
      }
     },
     {
      "name": "periods_per_week",
      "in": "query",
      "required": false,
      "description": "Average periods taught a week (or actual_periods for the year).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "actual_periods",
      "in": "query",
      "required": false,
      "description": "Periods actually taught in the school year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "duties",
      "in": "query",
      "required": false,
      "description": "Comma list or JSON: homeroom, head_group, deputy_group, lab:2, party_secretary, it, library, probation, child_under_12m, custom…",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "coefficient",
      "in": "query",
      "required": false,
      "description": "Salary coefficient (with allowance_coefficient, allowance_percent) — or monthly_salary.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "monthly_salary",
      "in": "query",
      "required": false,
      "description": "Monthly salary used for overtime (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "weeks",
      "in": "query",
      "required": false,
      "description": "Teaching weeks (excl. reserve weeks).",
      "schema": {
       "type": "number",
       "default": 35
      }
     },
     {
      "name": "large_school",
      "in": "query",
      "required": false,
      "description": "≥ 28 classes (regions 2–3) or ≥ 19 (region 1).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "json or xlsx.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "conversions": {
          "type": "array",
          "items": {},
          "description": "[{type: x1|x1_5|remedial|competition|chuyen, periods}]."
         },
         "teachers": {
          "type": "array",
          "items": {},
          "description": "Batch: array of teacher objects with the fields above (+ name)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "level": {
           "type": "string"
          },
          "weekly_norm": {
           "type": "number"
          },
          "teaching_weeks": {
           "type": "number"
          },
          "annual_norm": {
           "type": "number"
          },
          "reductions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "code": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "per_week": {
              "type": "number"
             },
             "art": {
              "type": "string"
             }
            }
           }
          },
          "reduction_per_week": {
           "type": "number"
          },
          "required_periods": {
           "type": "number"
          },
          "total_periods": {
           "type": "number"
          },
          "extra_periods": {
           "type": "number"
          },
          "extra_periods_paid": {
           "type": "number"
          },
          "pay": {
           "type": "object",
           "properties": {
            "monthly_salary": {
             "type": "number"
            },
            "from_coefficient": {
             "type": "object",
             "properties": {
              "coefficient": {
               "type": "number"
              },
              "allowance_coefficient": {
               "type": "number"
              },
              "allowance_percent": {
               "type": "number"
              },
              "base_salary": {
               "type": "number"
              },
              "base_from": {
               "type": "string"
              },
              "base_ref": {
               "type": "string"
              }
             }
            },
            "salary_per_period": {
             "type": "number"
            },
            "salary_per_extra_period": {
             "type": "number"
            },
            "extra_pay": {
             "type": "number"
            },
            "formula": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-ocop-score": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "OCOP Self-Scoring and Star Estimate",
    "description": "Send the part scores `a`, `b`, `c` from the official form of your product group (Part A production and community strength, max 40; Part B marketing and product story, max 25; Part C quality, max 35), several evaluators as `scores=[{A,B,C},…]` (averaged) or per-criterion `criteria=[{part, code, score, max}]`. The answer gives the total, the star class of Decision 26/2026/QĐ-TTg (from 22/5/2026): under 30 one star, 30–49 two, 50–69 three, 70–89 four (provincial), 90–100 five (national), the points needed for the next star and the weakest part.\n\nFor three stars and more it estimates the timeline from `submit_date`: commune check within 15 working days (official holidays skipped), the next provincial session (dossiers recommended before 30/4 → evaluated before 30/6, before 30/10 → 30/12) and, for 90+, the national session (before 30/7 → 30/9, before 30/1 → 30/3). Certificates are valid 36 months.\n\n`group` is one of the six product groups (food, beverage, herbal, handicraft, ornamental, tourism). The detailed per-criterion questionnaire of Appendix II is not bundled: score it on the official form. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-ocop-score/",
    "operationId": "vnOcopScoreGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ocop-score/"
    },
    "parameters": [
     {
      "name": "a",
      "in": "query",
      "required": false,
      "description": "Part A score (0–40); b (0–25), c (0–35).",
      "schema": {
       "type": "number"
      },
      "example": 32
     },
     {
      "name": "b",
      "in": "query",
      "required": false,
      "description": "Part B score (0–25).",
      "schema": {
       "type": "number"
      },
      "example": 20
     },
     {
      "name": "c",
      "in": "query",
      "required": false,
      "description": "Part C score (0–35).",
      "schema": {
       "type": "number"
      },
      "example": 25
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "food, beverage, herbal, handicraft, ornamental, tourism.",
      "schema": {
       "type": "string",
       "default": "food"
      }
     },
     {
      "name": "submit_date",
      "in": "query",
      "required": false,
      "description": "Dossier date (default today) for the timeline.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-16"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "string"
          },
          "scores": {
           "type": "object",
           "properties": {
            "A": {
             "type": "number"
            },
            "B": {
             "type": "number"
            },
            "C": {
             "type": "number"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "stars": {
           "type": "number"
          },
          "class": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "evaluation_level": {
           "type": "string"
          },
          "certified": {
           "type": "boolean"
          },
          "next_star": {
           "type": "object",
           "properties": {
            "stars": {
             "type": "number"
            },
            "min_score": {
             "type": "number"
            },
            "points_needed": {
             "type": "number"
            },
            "focus_part": {
             "type": "string"
            }
           }
          },
          "timeline": {
           "type": "object",
           "properties": {
            "submit_date": {
             "type": "string"
            },
            "commune_review_by": {
             "type": "string"
            },
            "province_session": {
             "type": "object",
             "properties": {
              "recommended_before": {
               "type": "string"
              },
              "evaluated_before": {
               "type": "string"
              }
             }
            },
            "certificate_valid_months": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "group": "food",
         "scores": {
          "A": 32,
          "B": 20,
          "C": 25
         },
         "total": 77,
         "stars": 4,
         "class": {
          "vi": "Sản phẩm OCOP 4 sao (cấp tỉnh)",
          "en": "4 stars (provincial)"
         },
         "evaluation_level": "province",
         "certified": true,
         "next_star": {
          "stars": 5,
          "min_score": 90,
          "points_needed": 13,
          "focus_part": "C"
         },
         "timeline": {
          "submit_date": "2026-11-16",
          "commune_review_by": "2026-12-08",
          "province_session": {
           "recommended_before": "2027-04-30",
           "evaluated_before": "2027-06-30"
          },
          "certificate_valid_months": 36,
          "note": "Sessions: province — recommended before 30/4 → evaluated before 30/6, before 30/10 → before 30/12; national — before 30/7 → 30/9, before 30/01 → 30/3. Extra sessions are possible."
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "OCOP Self-Scoring and Star Estimate",
    "description": "Send the part scores `a`, `b`, `c` from the official form of your product group (Part A production and community strength, max 40; Part B marketing and product story, max 25; Part C quality, max 35), several evaluators as `scores=[{A,B,C},…]` (averaged) or per-criterion `criteria=[{part, code, score, max}]`. The answer gives the total, the star class of Decision 26/2026/QĐ-TTg (from 22/5/2026): under 30 one star, 30–49 two, 50–69 three, 70–89 four (provincial), 90–100 five (national), the points needed for the next star and the weakest part.\n\nFor three stars and more it estimates the timeline from `submit_date`: commune check within 15 working days (official holidays skipped), the next provincial session (dossiers recommended before 30/4 → evaluated before 30/6, before 30/10 → 30/12) and, for 90+, the national session (before 30/7 → 30/9, before 30/1 → 30/3). Certificates are valid 36 months.\n\n`group` is one of the six product groups (food, beverage, herbal, handicraft, ornamental, tourism). The detailed per-criterion questionnaire of Appendix II is not bundled: score it on the official form. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-ocop-score/",
    "operationId": "vnOcopScorePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ocop-score/"
    },
    "parameters": [
     {
      "name": "a",
      "in": "query",
      "required": false,
      "description": "Part A score (0–40); b (0–25), c (0–35).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "b",
      "in": "query",
      "required": false,
      "description": "Part B score (0–25).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "c",
      "in": "query",
      "required": false,
      "description": "Part C score (0–35).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "food, beverage, herbal, handicraft, ornamental, tourism.",
      "schema": {
       "type": "string",
       "default": "food"
      }
     },
     {
      "name": "submit_date",
      "in": "query",
      "required": false,
      "description": "Dossier date (default today) for the timeline.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "scores": {
          "type": "array",
          "items": {},
          "description": "Several evaluators: [{A, B, C}, …] → average."
         },
         "criteria": {
          "type": "array",
          "items": {},
          "description": "Per criterion: [{part, code, name, score, max}]."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "group": {
           "type": "string"
          },
          "scores": {
           "type": "object",
           "properties": {
            "A": {
             "type": "number"
            },
            "B": {
             "type": "number"
            },
            "C": {
             "type": "number"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "stars": {
           "type": "number"
          },
          "class": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "evaluation_level": {
           "type": "string"
          },
          "certified": {
           "type": "boolean"
          },
          "next_star": {
           "type": "object",
           "properties": {
            "stars": {
             "type": "number"
            },
            "min_score": {
             "type": "number"
            },
            "points_needed": {
             "type": "number"
            },
            "focus_part": {
             "type": "string"
            }
           }
          },
          "timeline": {
           "type": "object",
           "properties": {
            "submit_date": {
             "type": "string"
            },
            "commune_review_by": {
             "type": "string"
            },
            "province_session": {
             "type": "object",
             "properties": {
              "recommended_before": {
               "type": "string"
              },
              "evaluated_before": {
               "type": "string"
              }
             }
            },
            "certificate_valid_months": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-public-asset-norms": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Public Asset Norms",
    "description": "Send a `title` (e.g. bo_truong, thu_truong, giam_doc_so, pho_giam_doc_so, chu_tich_xa, truong_phong_tinh, chuyen_vien; empty = list) or POST `staff=[{title, count}]` for a whole unit. The answer gives, per title, the maximum working area (Decree 155/2025 appendices, e.g. 40 m² for a provincial department director, 15 m² for a specialist), the equipment group with quantities and price caps (Decision 15/2025/QĐ-TTg: desk, cabinets, desktop, laptop, printer…) and the car entitlement (Decree 72/2023 as amended by Decree 153/2025: personal car with a price cap of 1,550 / 1,400 / 1,250 million VND, or the general pool at 950 million, 2 cars per commune).\n\nFor a unit it adds the total title area, the common area (at most 85 %), the maximum building area excluding special-purpose space and the shared equipment (printer per 3 staff, photocopier per 15…). `current_area_m2` and `current_cars` (communes) compare with the norm and explain how excess space or cars are handled after the 2025 reorganisation.\n\nThe area figures come from a transcription of the 2025 appendix and Decree 369/2026 issued a new title appendix, so they are marked `unverified`; a decree replacing Decree 72/2023 is in draft (`pending`). Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-public-asset-norms/",
    "operationId": "vnPublicAssetNormsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-public-asset-norms/"
    },
    "parameters": [
     {
      "name": "title",
      "in": "query",
      "required": false,
      "description": "Title key (bo_truong, thu_truong, vu_truong, giam_doc_so, pho_giam_doc_so, chu_tich_tinh, chu_tich_xa, truong_phong_tinh, truong_phong_xa, chuyen_vien, hop_dong…) or Vietnamese name.",
      "schema": {
       "type": "string"
      },
      "example": "giam_doc_so"
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of people with that title.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "current_area_m2",
      "in": "query",
      "required": false,
      "description": "Current working area to compare.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rooms",
      "in": "query",
      "required": false,
      "description": "Office rooms (shared meeting sets).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "current_cars",
      "in": "query",
      "required": false,
      "description": "Commune: general-use cars held now.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "staff": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "scope": {
              "type": "string"
             },
             "count": {
              "type": "number"
             },
             "area_m2_each": {
              "type": "number"
             },
             "area_m2": {
              "type": "number"
             },
             "equipment_group": {
              "type": "string"
             },
             "equipment": {
              "type": "array"
             },
             "car": {
              "type": "object"
             }
            }
           }
          },
          "office": {
           "type": "object",
           "properties": {
            "title_area_m2": {
             "type": "number"
            },
            "common_area_max_m2": {
             "type": "number"
            },
            "total_max_m2_excl_special": {
             "type": "number"
            },
            "special_area": {
             "type": "string"
            }
           }
          },
          "cars": {
           "type": "object",
           "properties": {
            "personal": {
             "type": "array"
            },
            "general_pool_prices_million": {
             "type": "object",
             "properties": {
              "standard": {
               "type": "number"
              },
              "seats_12_16": {
               "type": "number"
              },
              "seats_7_8_two_axle": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "staff": [
          {
           "title": "giam_doc_so",
           "vi": "Giám đốc sở, Trưởng ban, ngành cấp tỉnh và tương đương",
           "scope": "local",
           "count": 1,
           "area_m2_each": 40,
           "area_m2": 40,
           "equipment_group": "V",
           "equipment": [
            {
             "vi": "Bộ bàn ghế ngồi làm việc",
             "en": "Desk and chair set",
             "qty": 1,
             "max_price_million": 13
            },
            {
             "vi": "Tủ đựng tài liệu",
             "en": "Filing cabinet",
             "qty": 2,
             "max_price_million": 7
            },
            {
             "vi": "Máy vi tính để bàn",
             "en": "Desktop computer",
             "qty": 1,
             "max_price_million": 20
            }
           ],
           "car": {
            "kind": "general_pool",
            "ref": "NĐ 72/2023 Điều 8, 15 (sửa đổi bởi NĐ 153/2025)",
            "vi": "Giám đốc sở: dùng xe ô tô phục vụ công tác chung của cơ quan (không có xe riêng)"
           }
          }
         ],
         "office": {
          "title_area_m2": 40,
          "common_area_max_m2": 34,
          "total_max_m2_excl_special": 74,
          "special_area": "Decided by the competent body (NĐ 155/2025 Điều 7)"
         },
         "cars": {
          "personal": [],
          "general_pool_prices_million": {
           "standard": 950,
           "seats_12_16": 1300,
           "seats_7_8_two_axle": 1600
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Public Asset Norms",
    "description": "Send a `title` (e.g. bo_truong, thu_truong, giam_doc_so, pho_giam_doc_so, chu_tich_xa, truong_phong_tinh, chuyen_vien; empty = list) or POST `staff=[{title, count}]` for a whole unit. The answer gives, per title, the maximum working area (Decree 155/2025 appendices, e.g. 40 m² for a provincial department director, 15 m² for a specialist), the equipment group with quantities and price caps (Decision 15/2025/QĐ-TTg: desk, cabinets, desktop, laptop, printer…) and the car entitlement (Decree 72/2023 as amended by Decree 153/2025: personal car with a price cap of 1,550 / 1,400 / 1,250 million VND, or the general pool at 950 million, 2 cars per commune).\n\nFor a unit it adds the total title area, the common area (at most 85 %), the maximum building area excluding special-purpose space and the shared equipment (printer per 3 staff, photocopier per 15…). `current_area_m2` and `current_cars` (communes) compare with the norm and explain how excess space or cars are handled after the 2025 reorganisation.\n\nThe area figures come from a transcription of the 2025 appendix and Decree 369/2026 issued a new title appendix, so they are marked `unverified`; a decree replacing Decree 72/2023 is in draft (`pending`). Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-public-asset-norms/",
    "operationId": "vnPublicAssetNormsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-public-asset-norms/"
    },
    "parameters": [
     {
      "name": "title",
      "in": "query",
      "required": false,
      "description": "Title key (bo_truong, thu_truong, vu_truong, giam_doc_so, pho_giam_doc_so, chu_tich_tinh, chu_tich_xa, truong_phong_tinh, truong_phong_xa, chuyen_vien, hop_dong…) or Vietnamese name.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of people with that title.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "current_area_m2",
      "in": "query",
      "required": false,
      "description": "Current working area to compare.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rooms",
      "in": "query",
      "required": false,
      "description": "Office rooms (shared meeting sets).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "current_cars",
      "in": "query",
      "required": false,
      "description": "Commune: general-use cars held now.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "staff": {
          "type": "array",
          "items": {},
          "description": "Whole unit: [{title, count}]."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "staff": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "scope": {
              "type": "string"
             },
             "count": {
              "type": "number"
             },
             "area_m2_each": {
              "type": "number"
             },
             "area_m2": {
              "type": "number"
             },
             "equipment_group": {
              "type": "string"
             },
             "equipment": {
              "type": "array"
             },
             "car": {
              "type": "object"
             }
            }
           }
          },
          "office": {
           "type": "object",
           "properties": {
            "title_area_m2": {
             "type": "number"
            },
            "common_area_max_m2": {
             "type": "number"
            },
            "total_max_m2_excl_special": {
             "type": "number"
            },
            "special_area": {
             "type": "string"
            }
           }
          },
          "cars": {
           "type": "object",
           "properties": {
            "personal": {
             "type": "array"
            },
            "general_pool_prices_million": {
             "type": "object",
             "properties": {
              "standard": {
               "type": "number"
              },
              "seats_12_16": {
               "type": "number"
              },
              "seats_7_8_two_axle": {
               "type": "number"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/commit-lint": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Commit Message Linter & Changelog",
    "description": "Three actions on one endpoint. `lint` checks one `message`, a list of `commits` or pasted `git log` output against Conventional Commits 1.0.0 with the rules of the popular config-conventional preset (type enum and case, scope case, subject case and full stop, header / body line length, blank lines, BREAKING CHANGE footers) or the stricter `angular` preset; customise with `types`, `scopes`, `header_max`, `require_scope`. Merge, revert and fixup commits are skipped. Every invalid message gets a corrected `suggestion` (synonyms such as feature → feat, past tense → imperative).\n\n`changelog` groups commits into BREAKING CHANGES, Features, Bug Fixes, Performance and Reverts (`all_types=1` adds docs, refactor, CI…), links issues and commits when you pass `repo_url` (GitHub or GitLab), and writes English or Vietnamese headings (`lang=vi`). `bump` returns the next version from `current_version` (breaking → major, feat → minor, fix / perf → patch; 0.x versions bump minor for breaking changes unless `pre_major=0`; `prerelease=beta` for pre-releases).\n\nAccepted log formats: default `git log`, `git log --oneline`, or messages separated by `---`. No configuration files are executed: everything is passed as parameters. Use it in GitLab / Bitbucket / Gitea pipelines, chat bots or release scripts without installing Node tooling.\n\nDocs: https://apibox.io.vn/docs/commit-lint/",
    "operationId": "commitLintGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/commit-lint/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`lint`, `changelog` or `bump` (also as path: /v1/commit-lint/changelog; alias `mode`).",
      "schema": {
       "type": "string",
       "default": "lint"
      }
     },
     {
      "name": "message",
      "in": "query",
      "required": false,
      "description": "One commit message (header, body, footers).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "preset",
      "in": "query",
      "required": false,
      "description": "`conventional` (config-conventional) or `angular`.",
      "schema": {
       "type": "string",
       "default": "conventional"
      }
     },
     {
      "name": "types",
      "in": "query",
      "required": false,
      "description": "Comma-separated allowed types (replaces the preset list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scopes",
      "in": "query",
      "required": false,
      "description": "Comma-separated allowed scopes.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "header_max",
      "in": "query",
      "required": false,
      "description": "Maximum header length (angular: 72).",
      "schema": {
       "type": "number",
       "default": 100
      }
     },
     {
      "name": "require_scope",
      "in": "query",
      "required": false,
      "description": "Require a scope.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "current_version",
      "in": "query",
      "required": false,
      "description": "Current version for `bump` / `changelog`, e.g. `1.4.2` or `v1.4.2`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "prerelease",
      "in": "query",
      "required": false,
      "description": "Pre-release identifier, e.g. `beta`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "repo_url",
      "in": "query",
      "required": false,
      "description": "https://github.com/owner/repo (or GitLab) for issue / commit / compare links.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "version",
      "in": "query",
      "required": false,
      "description": "Changelog version heading (default: computed next version or \"Unreleased\").",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "`en` or `vi` group headings.",
      "schema": {
       "type": "string",
       "default": "en"
      }
     },
     {
      "name": "all_types",
      "in": "query",
      "required": false,
      "description": "Include docs / refactor / test / build / CI / chore groups.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "commits": {
           "type": "number"
          },
          "invalid": {
           "type": "number"
          },
          "ignored": {
           "type": "number"
          },
          "config": {
           "type": "object",
           "properties": {
            "preset": {
             "type": "string"
            },
            "types": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "scopes": {},
            "header_max": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "header": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "parsed": {
              "type": "object"
             },
             "issues": {
              "type": "array"
             },
             "suggestion": {
              "type": "string"
             }
            }
           }
          },
          "spec": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Commit Message Linter & Changelog",
    "description": "Three actions on one endpoint. `lint` checks one `message`, a list of `commits` or pasted `git log` output against Conventional Commits 1.0.0 with the rules of the popular config-conventional preset (type enum and case, scope case, subject case and full stop, header / body line length, blank lines, BREAKING CHANGE footers) or the stricter `angular` preset; customise with `types`, `scopes`, `header_max`, `require_scope`. Merge, revert and fixup commits are skipped. Every invalid message gets a corrected `suggestion` (synonyms such as feature → feat, past tense → imperative).\n\n`changelog` groups commits into BREAKING CHANGES, Features, Bug Fixes, Performance and Reverts (`all_types=1` adds docs, refactor, CI…), links issues and commits when you pass `repo_url` (GitHub or GitLab), and writes English or Vietnamese headings (`lang=vi`). `bump` returns the next version from `current_version` (breaking → major, feat → minor, fix / perf → patch; 0.x versions bump minor for breaking changes unless `pre_major=0`; `prerelease=beta` for pre-releases).\n\nAccepted log formats: default `git log`, `git log --oneline`, or messages separated by `---`. No configuration files are executed: everything is passed as parameters. Use it in GitLab / Bitbucket / Gitea pipelines, chat bots or release scripts without installing Node tooling.\n\nDocs: https://apibox.io.vn/docs/commit-lint/",
    "operationId": "commitLintPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/commit-lint/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "lint",
          "description": "`lint`, `changelog` or `bump` (also as path: /v1/commit-lint/changelog; alias `mode`)."
         },
         "message": {
          "type": "string",
          "description": "One commit message (header, body, footers)."
         },
         "commits": {
          "type": "array",
          "items": {},
          "description": "Messages as strings or `{hash, message}` objects (max 2000)."
         },
         "log": {
          "type": "string",
          "description": "Pasted `git log` / `git log --oneline` output."
         },
         "preset": {
          "type": "string",
          "default": "conventional",
          "description": "`conventional` (config-conventional) or `angular`."
         },
         "types": {
          "type": "string",
          "description": "Comma-separated allowed types (replaces the preset list)."
         },
         "scopes": {
          "type": "string",
          "description": "Comma-separated allowed scopes."
         },
         "header_max": {
          "type": "number",
          "default": 100,
          "description": "Maximum header length (angular: 72)."
         },
         "require_scope": {
          "type": "boolean",
          "description": "Require a scope."
         },
         "current_version": {
          "type": "string",
          "description": "Current version for `bump` / `changelog`, e.g. `1.4.2` or `v1.4.2`."
         },
         "prerelease": {
          "type": "string",
          "description": "Pre-release identifier, e.g. `beta`."
         },
         "repo_url": {
          "type": "string",
          "description": "https://github.com/owner/repo (or GitLab) for issue / commit / compare links."
         },
         "version": {
          "type": "string",
          "description": "Changelog version heading (default: computed next version or \"Unreleased\")."
         },
         "lang": {
          "type": "string",
          "default": "en",
          "description": "`en` or `vi` group headings."
         },
         "all_types": {
          "type": "boolean",
          "description": "Include docs / refactor / test / build / CI / chore groups."
         }
        }
       },
       "example": {
        "message": "Fixed login redirect."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "commits": {
           "type": "number"
          },
          "invalid": {
           "type": "number"
          },
          "ignored": {
           "type": "number"
          },
          "config": {
           "type": "object",
           "properties": {
            "preset": {
             "type": "string"
            },
            "types": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "scopes": {},
            "header_max": {
             "type": "number"
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "header": {
              "type": "string"
             },
             "valid": {
              "type": "boolean"
             },
             "parsed": {
              "type": "object"
             },
             "issues": {
              "type": "array"
             },
             "suggestion": {
              "type": "string"
             }
            }
           }
          },
          "spec": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": false,
         "commits": 1,
         "invalid": 1,
         "ignored": 0,
         "config": {
          "preset": "conventional",
          "types": [
           "build",
           "chore",
           "ci",
           "docs",
           "feat",
           "fix",
           "perf",
           "refactor",
           "revert",
           "style",
           "test"
          ],
          "scopes": null,
          "header_max": 100
         },
         "results": [
          {
           "header": "Fixed login redirect.",
           "valid": false,
           "parsed": {
            "type": null,
            "scope": null,
            "subject": null,
            "breaking": false
           },
           "issues": [
            {
             "rule": "type-empty",
             "severity": "error",
             "message": "No type: the header must start with a type such as feat, fix, docs (\"type(scope): subject\")"
            },
            {
             "rule": "subject-empty",
             "severity": "error",
             "message": "No subject after \"type: \""
            }
           ],
           "suggestion": "fix: login redirect"
          }
         ],
         "spec": "https://www.conventionalcommits.org/en/v1.0.0/"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/dockerfile-lint": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Dockerfile Linter",
    "description": "Send a Dockerfile (text, file or raw body) and get findings with line numbers, severity (error / warning / info), a short fix and a 0-100 score. The parser understands line continuations, the `# escape=` directive, BuildKit heredocs, JSON and shell forms and multi-stage builds.\n\nChecks include: base image without tag or with `:latest` (digest pinning with `strict=1`), no `USER` or `USER root` in the final stage, literal secrets in `ENV` / `ARG` and known token formats anywhere, `ADD` from a URL without `--checksum`, `ADD` for local files, `apt-get` without `-y`, `--no-install-recommends`, `update` in the same layer or list cleanup, `apk add` without `--no-cache`, `yum` / `dnf` clean, `pip --no-cache-dir`, unpinned packages, `npm install` instead of `npm ci`, `curl | sh`, missing pipefail, `cd` instead of `WORKDIR`, `sudo`, `chmod 777`, `COPY . .` before installing dependencies (cache busting), several `CMD` / `ENTRYPOINT`, shell-form `CMD`, invalid `EXPOSE`, unknown or duplicate stage names in `COPY --from`, `MAINTAINER`, missing `HEALTHCHECK`.\n\nRules are our own (hadolint is GPL and is not used; there is no ShellCheck, so `RUN` scripts are checked heuristically). Filter with `ignore` (rule ids) and `min_severity`. The response lists the base images so you can check them with `/v1/eol-check`; Kubernetes manifests are validated by `/v1/k8s-validate`, CI workflows by `/v1/ci-validate`.\n\nDocs: https://apibox.io.vn/docs/dockerfile-lint/",
    "operationId": "dockerfileLintGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dockerfile-lint/"
    },
    "parameters": [
     {
      "name": "strict",
      "in": "query",
      "required": false,
      "description": "Also ask for digest-pinned base images.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "ignore",
      "in": "query",
      "required": false,
      "description": "Comma-separated rule ids to skip, e.g. `healthcheck-missing,apt-pin`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_severity",
      "in": "query",
      "required": false,
      "description": "`error`, `warning` or `info`.",
      "schema": {
       "type": "string",
       "default": "info"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "instructions": {
           "type": "number"
          },
          "stages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "name": {},
             "base_image": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "user": {}
            }
           }
          },
          "base_images": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "message": {
              "type": "string"
             },
             "fix": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Dockerfile Linter",
    "description": "Send a Dockerfile (text, file or raw body) and get findings with line numbers, severity (error / warning / info), a short fix and a 0-100 score. The parser understands line continuations, the `# escape=` directive, BuildKit heredocs, JSON and shell forms and multi-stage builds.\n\nChecks include: base image without tag or with `:latest` (digest pinning with `strict=1`), no `USER` or `USER root` in the final stage, literal secrets in `ENV` / `ARG` and known token formats anywhere, `ADD` from a URL without `--checksum`, `ADD` for local files, `apt-get` without `-y`, `--no-install-recommends`, `update` in the same layer or list cleanup, `apk add` without `--no-cache`, `yum` / `dnf` clean, `pip --no-cache-dir`, unpinned packages, `npm install` instead of `npm ci`, `curl | sh`, missing pipefail, `cd` instead of `WORKDIR`, `sudo`, `chmod 777`, `COPY . .` before installing dependencies (cache busting), several `CMD` / `ENTRYPOINT`, shell-form `CMD`, invalid `EXPOSE`, unknown or duplicate stage names in `COPY --from`, `MAINTAINER`, missing `HEALTHCHECK`.\n\nRules are our own (hadolint is GPL and is not used; there is no ShellCheck, so `RUN` scripts are checked heuristically). Filter with `ignore` (rule ids) and `min_severity`. The response lists the base images so you can check them with `/v1/eol-check`; Kubernetes manifests are validated by `/v1/k8s-validate`, CI workflows by `/v1/ci-validate`.\n\nDocs: https://apibox.io.vn/docs/dockerfile-lint/",
    "operationId": "dockerfileLintPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dockerfile-lint/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "dockerfile": {
          "type": "string",
          "description": "Dockerfile content (or a file upload / raw text body; max 500 KB)."
         },
         "strict": {
          "type": "boolean",
          "description": "Also ask for digest-pinned base images."
         },
         "ignore": {
          "type": "string",
          "description": "Comma-separated rule ids to skip, e.g. `healthcheck-missing,apt-pin`."
         },
         "min_severity": {
          "type": "string",
          "default": "info",
          "description": "`error`, `warning` or `info`."
         }
        },
        "required": [
         "dockerfile"
        ]
       },
       "example": {
        "dockerfile": "FROM node:latest\nWORKDIR /app\nCOPY . .\nRUN npm install\nENV API_TOKEN=s3cr3t-value\nEXPOSE 3000\nCMD node server.js\n"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "score": {
           "type": "number"
          },
          "instructions": {
           "type": "number"
          },
          "stages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "name": {},
             "base_image": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "user": {}
            }
           }
          },
          "base_images": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "message": {
              "type": "string"
             },
             "fix": {
              "type": "string"
             }
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": false,
         "errors": 1,
         "warnings": 2,
         "info": 4,
         "score": 71,
         "instructions": 7,
         "stages": [
          {
           "index": 0,
           "name": null,
           "base_image": "node:latest",
           "line": 1,
           "user": null
          }
         ],
         "base_images": [
          "node:latest"
         ],
         "findings": [
          {
           "rule": "from-latest",
           "severity": "warning",
           "line": 1,
           "message": "Base image \"node:latest\" uses :latest, which changes without notice; pin a version",
           "fix": "FROM node:<version>"
          },
          {
           "rule": "user-missing",
           "severity": "warning",
           "line": 1,
           "message": "The final stage has no USER: the container runs as root",
           "fix": "RUN useradd -r -u 10001 app (or adduser -D app on Alpine) and USER app before CMD"
          },
          {
           "rule": "healthcheck-missing",
           "severity": "info",
           "line": 1,
           "message": "No HEALTHCHECK in the final stage (fine on Kubernetes, which uses probes instead)"
          },
          {
           "rule": "copy-all-before-install",
           "severity": "info",
           "line": 3,
           "message": "COPY . before installing dependencies: every source change invalidates the dependency layer cache; copy the manifest / lockfile first, install, then copy the rest"
          },
          {
           "rule": "npm-ci",
           "severity": "info",
           "line": 4,
           "message": "Use npm ci (exact lockfile install) instead of npm install in images"
          },
          {
           "rule": "secret-in-env",
           "severity": "error",
           "line": 5,
           "message": "ENV API_TOKEN holds a literal secret: it is stored in the image layers / history",
           "fix": "Use a BuildKit secret: RUN --mount=type=secret,id=api_token …, or inject it at run time"
          },
          {
           "rule": "cmd-shell-form",
           "severity": "info",
           "line": 7,
           "message": "CMD in shell form runs under /bin/sh -c: the process is not PID 1 and does not receive SIGTERM; use the JSON (exec) form",
           "fix": "CMD [\"node\",\"server.js\"]"
          }
         ],
         "note": "Own rules (no hadolint / ShellCheck code). Check base images for end-of-life with /v1/eol-check and Kubernetes manifests with /v1/k8s-validate."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ci-validate": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "GitHub Actions & GitLab CI Validator",
    "description": "Send the YAML (text, file or raw body); the type is detected (or set `type` to `github-workflow`, `github-action` or `gitlab-ci`). Step 1 validates it against the official JSON Schemas (SchemaStore github-workflow / github-action, GitLab ci.json, refreshed weekly) and reports the most specific error per location with the YAML line number. Duplicate keys and YAML syntax errors are caught too.\n\nStep 2 runs semantic and security checks: `needs` pointing to unknown jobs or forming a cycle, `${{ }}` expression syntax (double-quoted strings, unknown functions / contexts) and context availability (e.g. `secrets` in `if`, `matrix` in a job `if`), `steps.<id>` / `needs.<job>` references, empty matrices, cron syntax and frequency, retired runner images (ubuntu-20.04, windows-2019, macos-13…) and dead action versions (upload-artifact v3, cache v2), actions not pinned to a commit SHA (supply-chain risk), `pull_request_target` + checkout of the PR head (pwn request), script injection from issue / PR titles and commit messages, broad `permissions`, deprecated `::set-output`, secrets echoed in logs. For GitLab: unknown stages, `needs` / `dependencies` / `extends` targets, needs on later stages, rules together with only/except, literal secrets in variables.\n\nThe response also lists jobs with their dependencies, a Mermaid graph and every action used. Checks are our own (inspired by actionlint’s public rule list). Related: `/v1/dockerfile-lint`, `/v1/k8s-validate`, `/v1/cron`.\n\nDocs: https://apibox.io.vn/docs/ci-validate/",
    "operationId": "ciValidateGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ci-validate/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`auto`, `github-workflow`, `github-action` or `gitlab-ci`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "schema",
      "in": "query",
      "required": false,
      "description": "Run JSON Schema validation.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "type": {
           "type": "string"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "findings": {
           "type": "array",
           "items": {}
          },
          "jobs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "needs": {
              "type": "array"
             }
            }
           }
          },
          "actions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "mermaid": {
           "type": "string"
          },
          "schema": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "source": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "built": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "GitHub Actions & GitLab CI Validator",
    "description": "Send the YAML (text, file or raw body); the type is detected (or set `type` to `github-workflow`, `github-action` or `gitlab-ci`). Step 1 validates it against the official JSON Schemas (SchemaStore github-workflow / github-action, GitLab ci.json, refreshed weekly) and reports the most specific error per location with the YAML line number. Duplicate keys and YAML syntax errors are caught too.\n\nStep 2 runs semantic and security checks: `needs` pointing to unknown jobs or forming a cycle, `${{ }}` expression syntax (double-quoted strings, unknown functions / contexts) and context availability (e.g. `secrets` in `if`, `matrix` in a job `if`), `steps.<id>` / `needs.<job>` references, empty matrices, cron syntax and frequency, retired runner images (ubuntu-20.04, windows-2019, macos-13…) and dead action versions (upload-artifact v3, cache v2), actions not pinned to a commit SHA (supply-chain risk), `pull_request_target` + checkout of the PR head (pwn request), script injection from issue / PR titles and commit messages, broad `permissions`, deprecated `::set-output`, secrets echoed in logs. For GitLab: unknown stages, `needs` / `dependencies` / `extends` targets, needs on later stages, rules together with only/except, literal secrets in variables.\n\nThe response also lists jobs with their dependencies, a Mermaid graph and every action used. Checks are our own (inspired by actionlint’s public rule list). Related: `/v1/dockerfile-lint`, `/v1/k8s-validate`, `/v1/cron`.\n\nDocs: https://apibox.io.vn/docs/ci-validate/",
    "operationId": "ciValidatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ci-validate/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "yaml": {
          "type": "string",
          "description": "Workflow / action.yml / .gitlab-ci.yml content (or file / raw body; max 1 MB)."
         },
         "type": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `github-workflow`, `github-action` or `gitlab-ci`."
         },
         "schema": {
          "type": "boolean",
          "default": true,
          "description": "Run JSON Schema validation."
         }
        },
        "required": [
         "yaml"
        ]
       },
       "example": {
        "yaml": "name: CI\non: [push, pull_request]\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 22\n      - run: npm ci && npm test\n  deploy:\n    needs: [test, build]\n    if: ${{ github.ref == \"refs/heads/main\" }}\n    runs-on: ubuntu-latest\n    steps:\n      - run: echo \"${{ github.event.head_commit.message }}\"\n"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "type": {
           "type": "string"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "findings": {
           "type": "array",
           "items": {}
          },
          "jobs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "needs": {
              "type": "array"
             }
            }
           }
          },
          "actions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "mermaid": {
           "type": "string"
          },
          "schema": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "source": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "built": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": false,
         "type": "github-workflow",
         "errors": 3,
         "warnings": 0,
         "info": 3,
         "findings": [
          {
           "rule": "permissions-missing",
           "severity": "info",
           "message": "No top-level \"permissions\": the GITHUB_TOKEN gets the repository default (often read-write); set permissions: contents: read and widen per job",
           "path": "",
           "line": 1
          },
          {
           "rule": "action-not-pinned",
           "severity": "info",
           "message": "actions/checkout@v4 uses the mutable ref \"v4\"; pin actions to a full commit SHA (owner/repo@<40-hex> # v4) — a moved tag runs new code with your secrets (e.g. tj-actions/changed-files, March 2025)",
           "path": "jobs.test.steps.0.uses",
           "line": 7
          },
          "…",
          {
           "rule": "needs-unknown",
           "severity": "error",
           "message": "Job \"deploy\" needs \"build\", which does not exist (jobs: test, deploy)",
           "path": "jobs.deploy.needs",
           "line": 13
          },
          {
           "rule": "expression-syntax",
           "severity": "error",
           "message": "Expression \"github.ref == \"refs/heads/main\"\": string literals use single quotes in GitHub expressions ('text'), not double quotes",
           "path": "jobs.deploy.if",
           "line": 14
          },
          {
           "rule": "script-injection",
           "severity": "error",
           "message": "github.event.head_commit.message is attacker-controlled and is pasted into the script: pass it through env (env: TITLE: ${{ github.event.head_commit.message }}) and use \"$TITLE\"",
           "path": "jobs.deploy.steps.0.run",
           "line": 17
          }
         ],
         "jobs": [
          {
           "id": "test",
           "needs": []
          },
          {
           "id": "deploy",
           "needs": [
            "test",
            "build"
           ]
          }
         ],
         "actions": [
          "actions/checkout@v4",
          "actions/setup-node@v4"
         ],
         "mermaid": "graph LR\n  test[\"test\"]\n  test --> deploy\n  build --> deploy",
         "schema": {
          "name": "github-workflow",
          "source": "https://www.schemastore.org/github-workflow.json",
          "licence": "Apache-2.0 (SchemaStore)",
          "built": "2026-11-16"
         },
         "note": "Kubernetes manifests: /v1/k8s-validate; Dockerfiles: /v1/dockerfile-lint."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/webserver-config": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": ".htaccess to nginx / Caddy & nginx Linter",
    "description": "`convert` (default) turns an `.htaccess` into an nginx `server` block and a Caddyfile: mod_rewrite (RewriteCond / RewriteRule with flags L, R=301, NC, QSA, QSD, F, G, OR, RewriteBase, %N back-references), the front-controller pattern (→ `try_files`), HTTPS and www redirects, Redirect / RedirectMatch, ErrorDocument, DirectoryIndex, Options, Header, mod_expires (→ a `map` on the content type), mod_deflate, Deny / Allow / Require, <Files> / <FilesMatch>, basic auth, LimitRequestBody, ServerSignature. Each directive gets a `confidence` (high / medium / low / none) and a note; PHP settings (`php_value`, `php_flag`) are moved to a PHP-FPM pool snippet. The output passes `nginx -t` for the supported directives.\n\n`lint` checks an nginx configuration statically: unbalanced braces and missing semicolons, `if` inside location (\"if is evil\"), alias path traversal (location without / + alias with /), add_header in a child block dropping the parent headers, proxy_pass with a URI in regex locations, variables without resolver, old TLS protocols and weak ciphers, `listen 443` without ssl, deprecated `listen … http2`, CRLF injection through `$uri` in redirects, unanchored / unsafe PHP locations, autoindex, duplicate server names, missing HSTS / security headers and `server_tokens`.\n\n`generate` writes nginx and Caddy configs for `static`, `spa`, `wordpress`, `laravel`, `php` or `reverse-proxy` sites with HTTP → HTTPS and www / apex redirects, Let’s Encrypt paths, gzip (brotli optional), static-file caching and security headers. Test the result with `nginx -t` or `caddy validate` before going live.\n\nDocs: https://apibox.io.vn/docs/webserver-config/",
    "operationId": "webserverConfigGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webserver-config/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`convert`, `lint` or `generate` (alias `mode`; also inferred from the fields sent).",
      "schema": {
       "type": "string",
       "default": "convert"
      }
     },
     {
      "name": "server_name",
      "in": "query",
      "required": false,
      "description": "convert: server name for the generated block.",
      "schema": {
       "type": "string",
       "default": "example.com"
      }
     },
     {
      "name": "root",
      "in": "query",
      "required": false,
      "description": "Document root (convert default /var/www/html, generate /var/www/<domain>).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "php_fpm",
      "in": "query",
      "required": false,
      "description": "PHP-FPM address.",
      "schema": {
       "type": "string",
       "default": "unix:/run/php/php8.3-fpm.sock"
      }
     },
     {
      "name": "preset",
      "in": "query",
      "required": false,
      "description": "generate: `static`, `spa`, `wordpress`, `laravel`, `php`, `reverse-proxy`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "generate: domain, e.g. `example.vn`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "www",
      "in": "query",
      "required": false,
      "description": "generate: `apex` (www → apex), `www` (apex → www) or `none`.",
      "schema": {
       "type": "string",
       "default": "apex"
      }
     },
     {
      "name": "upstream",
      "in": "query",
      "required": false,
      "description": "generate reverse-proxy: backend URL.",
      "schema": {
       "type": "string",
       "default": "http://127.0.0.1:3000"
      }
     },
     {
      "name": "https",
      "in": "query",
      "required": false,
      "description": "generate: HTTPS with redirect.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "brotli",
      "in": "query",
      "required": false,
      "description": "generate: brotli (needs ngx_brotli).",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "server",
      "in": "query",
      "required": false,
      "description": "generate: `nginx`, `caddy` or `both`.",
      "schema": {
       "type": "string",
       "default": "both"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "nginx": {
           "type": "string"
          },
          "caddy": {
           "type": "string"
          },
          "php_fpm_pool": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {}
          },
          "confidence": {
           "type": "object",
           "properties": {
            "high": {
             "type": "number"
            },
            "none": {
             "type": "number"
            }
           }
          },
          "parse_errors": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": ".htaccess to nginx / Caddy & nginx Linter",
    "description": "`convert` (default) turns an `.htaccess` into an nginx `server` block and a Caddyfile: mod_rewrite (RewriteCond / RewriteRule with flags L, R=301, NC, QSA, QSD, F, G, OR, RewriteBase, %N back-references), the front-controller pattern (→ `try_files`), HTTPS and www redirects, Redirect / RedirectMatch, ErrorDocument, DirectoryIndex, Options, Header, mod_expires (→ a `map` on the content type), mod_deflate, Deny / Allow / Require, <Files> / <FilesMatch>, basic auth, LimitRequestBody, ServerSignature. Each directive gets a `confidence` (high / medium / low / none) and a note; PHP settings (`php_value`, `php_flag`) are moved to a PHP-FPM pool snippet. The output passes `nginx -t` for the supported directives.\n\n`lint` checks an nginx configuration statically: unbalanced braces and missing semicolons, `if` inside location (\"if is evil\"), alias path traversal (location without / + alias with /), add_header in a child block dropping the parent headers, proxy_pass with a URI in regex locations, variables without resolver, old TLS protocols and weak ciphers, `listen 443` without ssl, deprecated `listen … http2`, CRLF injection through `$uri` in redirects, unanchored / unsafe PHP locations, autoindex, duplicate server names, missing HSTS / security headers and `server_tokens`.\n\n`generate` writes nginx and Caddy configs for `static`, `spa`, `wordpress`, `laravel`, `php` or `reverse-proxy` sites with HTTP → HTTPS and www / apex redirects, Let’s Encrypt paths, gzip (brotli optional), static-file caching and security headers. Test the result with `nginx -t` or `caddy validate` before going live.\n\nDocs: https://apibox.io.vn/docs/webserver-config/",
    "operationId": "webserverConfigPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/webserver-config/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "convert",
          "description": "`convert`, `lint` or `generate` (alias `mode`; also inferred from the fields sent)."
         },
         "htaccess": {
          "type": "string",
          "description": "convert: .htaccess content (max 300 KB)."
         },
         "nginx": {
          "type": "string",
          "description": "lint: nginx configuration text (max 1 MB)."
         },
         "server_name": {
          "type": "string",
          "default": "example.com",
          "description": "convert: server name for the generated block."
         },
         "root": {
          "type": "string",
          "description": "Document root (convert default /var/www/html, generate /var/www/<domain>)."
         },
         "php_fpm": {
          "type": "string",
          "default": "unix:/run/php/php8.3-fpm.sock",
          "description": "PHP-FPM address."
         },
         "preset": {
          "type": "string",
          "description": "generate: `static`, `spa`, `wordpress`, `laravel`, `php`, `reverse-proxy`."
         },
         "domain": {
          "type": "string",
          "description": "generate: domain, e.g. `example.vn`."
         },
         "www": {
          "type": "string",
          "default": "apex",
          "description": "generate: `apex` (www → apex), `www` (apex → www) or `none`."
         },
         "upstream": {
          "type": "string",
          "default": "http://127.0.0.1:3000",
          "description": "generate reverse-proxy: backend URL."
         },
         "https": {
          "type": "boolean",
          "default": true,
          "description": "generate: HTTPS with redirect."
         },
         "brotli": {
          "type": "boolean",
          "default": false,
          "description": "generate: brotli (needs ngx_brotli)."
         },
         "server": {
          "type": "string",
          "default": "both",
          "description": "generate: `nginx`, `caddy` or `both`."
         }
        }
       },
       "example": {
        "htaccess": "RewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\nRewriteRule ^old-page$ /new-page [R=301,L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . /index.php [L]\nphp_value upload_max_filesize 64M\n",
        "server_name": "example.com",
        "root": "/var/www/example"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "nginx": {
           "type": "string"
          },
          "caddy": {
           "type": "string"
          },
          "php_fpm_pool": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {}
          },
          "confidence": {
           "type": "object",
           "properties": {
            "high": {
             "type": "number"
            },
            "none": {
             "type": "number"
            }
           }
          },
          "parse_errors": {
           "type": "array"
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "convert",
         "nginx": "server {\n    listen 80;\n    listen [::]:80;\n    server_name _;\n    return 301 https://$host$request_uri;\n}\n\nserver {\n    listen 443 ssl;\n    listen [::]:443 ssl;\n    http2 on;\n    # ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n    # ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;\n    server_name example.com;\n    root /var/www/example;\n    index index.php index.html;\n\n    rewrite ^/old-page$ /new-page permanent;\n    location / {\n        try_files $uri $uri/ /index.php?$args;\n    }\n\n    location ~ \\.php$ {\n        try_files $uri =404;\n        fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n        fastcgi_pass unix:/run/php/php8.3-fpm.sock;\n        fastcgi_index index.php;\n        include fastcgi_params;\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    }\n\n    location ~ /\\.(?!well-known) {\n        deny all;\n    }\n}\n",
         "caddy": "example.com {\n    root * /var/www/example\n    @r1 {\n        path_regexp r1 ^/old-page$\n    }\n    redir @r1 /new-page 301\n    try_files {path} {path}/ /index.php?{query}\n    php_fastcgi unix//run/php/php8.3-fpm.sock\n    file_server\n}\n",
         "php_fpm_pool": "php_value[upload_max_filesize] = 64M",
         "items": [
          {
           "line": 2,
           "directive": "RewriteCond %{HTTPS} off\nRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]",
           "nginx": "server { listen 80; return 301 https://$host$request_uri; }",
           "caddy": "(automatic: Caddy redirects HTTP to HTTPS by itself)",
           "confidence": "high",
           "note": "HTTPS redirect moved to a separate port-80 server block"
          },
          {
           "line": 5,
           "directive": "RewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . /index.php [L]",
           "nginx": "location / { try_files $uri $uri/ /index.php?$args; }",
           "caddy": "try_files {path} {path}/ /index.php?{query}",
           "confidence": "high",
           "note": "front controller (WordPress / Laravel / most PHP apps): use try_files instead of if (!-f)"
          },
          "…"
         ],
         "confidence": {
          "high": 4,
          "none": 1
         },
         "parse_errors": [],
         "note": "Test the result (nginx -t, caddy validate) before going live: complex mod_rewrite rules are marked low confidence."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cors-check": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "CORS Checker",
    "description": "Give the API `url`, the page `origin`, the `method`, the request `headers` and whether `credentials` (cookies, `credentials: include`) are sent. The service decides like a browser (Fetch Standard): is it a simple request or does it need a preflight (and why), then sends a real `OPTIONS` preflight with Origin / Access-Control-Request-Method / -Headers (and -Private-Network when `private_network=1`) and a GET / HEAD probe with the Origin header. Redirects are not followed — a preflight must not redirect — and private / local addresses are refused.\n\nYou get `allowed`, a one-line verdict in English and Vietnamese and every problem explained: missing Access-Control-Allow-Origin, origin mismatch (exact scheme / host / port, trailing slash), several origins, `*` with credentials, missing Allow-Credentials, method or header not allowed (`*` never covers Authorization), preflight status not 2xx or redirected, missing `Vary: Origin` (cache poisoning between origins), Private Network Access, short preflight caching, exposed headers. When blocked, ready-to-paste fixes for nginx, Express (cors), Cloudflare Workers, Laravel and Apache are included.\n\nMethods other than GET / HEAD are never sent for real (no side effects on your API): the preflight decides, and the response headers come from a GET to the same URL. Without `url`, paste `preflight_headers` / `response_headers` to simulate offline.\n\nDocs: https://apibox.io.vn/docs/cors-check/",
    "operationId": "corsCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cors-check/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public API URL to test (http / https). Omit to simulate from pasted headers.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "origin",
      "in": "query",
      "required": true,
      "description": "Origin of the calling page, e.g. `https://app.example.com`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "HTTP method the page uses (alias `http_method`).",
      "schema": {
       "type": "string",
       "default": "GET"
      }
     },
     {
      "name": "headers",
      "in": "query",
      "required": false,
      "description": "Comma-separated request header names, e.g. `Authorization, Content-Type`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "content_type",
      "in": "query",
      "required": false,
      "description": "Content-Type sent (form / text types do not need a preflight; default application/json when Content-Type is listed).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "credentials",
      "in": "query",
      "required": false,
      "description": "Cookies / credentials: include are sent.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "private_network",
      "in": "query",
      "required": false,
      "description": "The target is on a private network (Private Network Access).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "origin": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "credentials": {
           "type": "boolean"
          },
          "request_type": {
           "type": "string"
          },
          "preflight_reasons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "allowed": {
           "type": "boolean"
          },
          "preflight_ok": {
           "type": "boolean"
          },
          "response_ok": {
           "type": "boolean"
          },
          "exposed_headers": {
           "type": "array"
          },
          "problems": {
           "type": "array",
           "items": {}
          },
          "verdict": {
           "type": "string"
          },
          "verdict_vi": {
           "type": "string"
          },
          "preflight": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "headers": {
             "type": "object",
             "properties": {
              "access-control-allow-origin": {
               "type": "string"
              },
              "access-control-allow-methods": {
               "type": "string"
              },
              "access-control-allow-headers": {
               "type": "string"
              }
             }
            }
           }
          },
          "response": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "headers": {
             "type": "object",
             "properties": {
              "access-control-allow-origin": {
               "type": "string"
              }
             }
            }
           }
          },
          "fixes": {
           "type": "object",
           "properties": {
            "express": {
             "type": "string"
            },
            "nginx": {
             "type": "string"
            },
            "cloudflare_workers": {
             "type": "string"
            },
            "laravel": {
             "type": "string"
            },
            "apache": {
             "type": "string"
            }
           }
          },
          "spec": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "CORS Checker",
    "description": "Give the API `url`, the page `origin`, the `method`, the request `headers` and whether `credentials` (cookies, `credentials: include`) are sent. The service decides like a browser (Fetch Standard): is it a simple request or does it need a preflight (and why), then sends a real `OPTIONS` preflight with Origin / Access-Control-Request-Method / -Headers (and -Private-Network when `private_network=1`) and a GET / HEAD probe with the Origin header. Redirects are not followed — a preflight must not redirect — and private / local addresses are refused.\n\nYou get `allowed`, a one-line verdict in English and Vietnamese and every problem explained: missing Access-Control-Allow-Origin, origin mismatch (exact scheme / host / port, trailing slash), several origins, `*` with credentials, missing Allow-Credentials, method or header not allowed (`*` never covers Authorization), preflight status not 2xx or redirected, missing `Vary: Origin` (cache poisoning between origins), Private Network Access, short preflight caching, exposed headers. When blocked, ready-to-paste fixes for nginx, Express (cors), Cloudflare Workers, Laravel and Apache are included.\n\nMethods other than GET / HEAD are never sent for real (no side effects on your API): the preflight decides, and the response headers come from a GET to the same URL. Without `url`, paste `preflight_headers` / `response_headers` to simulate offline.\n\nDocs: https://apibox.io.vn/docs/cors-check/",
    "operationId": "corsCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cors-check/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public API URL to test (http / https). Omit to simulate from pasted headers."
         },
         "origin": {
          "type": "string",
          "description": "Origin of the calling page, e.g. `https://app.example.com`."
         },
         "method": {
          "type": "string",
          "default": "GET",
          "description": "HTTP method the page uses (alias `http_method`)."
         },
         "headers": {
          "type": "string",
          "description": "Comma-separated request header names, e.g. `Authorization, Content-Type`."
         },
         "content_type": {
          "type": "string",
          "description": "Content-Type sent (form / text types do not need a preflight; default application/json when Content-Type is listed)."
         },
         "credentials": {
          "type": [
           "boolean",
           "string"
          ],
          "description": "Cookies / credentials: include are sent."
         },
         "private_network": {
          "type": "boolean",
          "description": "The target is on a private network (Private Network Access)."
         },
         "preflight_headers": {
          "type": [
           "object",
           "string"
          ],
          "description": "Simulation: preflight response headers (object or \"Name: value\" lines); `preflight_status` (default 204)."
         },
         "response_headers": {
          "type": [
           "object",
           "string"
          ],
          "description": "Simulation: actual response headers; `response_status` (default 200)."
         }
        },
        "required": [
         "origin"
        ]
       },
       "example": {
        "origin": "https://app.example.com",
        "method": "PUT",
        "headers": "Authorization, Content-Type",
        "credentials": "true",
        "preflight_headers": "Access-Control-Allow-Origin: *\nAccess-Control-Allow-Methods: GET, POST\nAccess-Control-Allow-Headers: *",
        "response_headers": "Access-Control-Allow-Origin: *"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "mode": {
           "type": "string"
          },
          "origin": {
           "type": "string"
          },
          "method": {
           "type": "string"
          },
          "credentials": {
           "type": "boolean"
          },
          "request_type": {
           "type": "string"
          },
          "preflight_reasons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "allowed": {
           "type": "boolean"
          },
          "preflight_ok": {
           "type": "boolean"
          },
          "response_ok": {
           "type": "boolean"
          },
          "exposed_headers": {
           "type": "array"
          },
          "problems": {
           "type": "array",
           "items": {}
          },
          "verdict": {
           "type": "string"
          },
          "verdict_vi": {
           "type": "string"
          },
          "preflight": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "headers": {
             "type": "object",
             "properties": {
              "access-control-allow-origin": {
               "type": "string"
              },
              "access-control-allow-methods": {
               "type": "string"
              },
              "access-control-allow-headers": {
               "type": "string"
              }
             }
            }
           }
          },
          "response": {
           "type": "object",
           "properties": {
            "status": {
             "type": "number"
            },
            "headers": {
             "type": "object",
             "properties": {
              "access-control-allow-origin": {
               "type": "string"
              }
             }
            }
           }
          },
          "fixes": {
           "type": "object",
           "properties": {
            "express": {
             "type": "string"
            },
            "nginx": {
             "type": "string"
            },
            "cloudflare_workers": {
             "type": "string"
            },
            "laravel": {
             "type": "string"
            },
            "apache": {
             "type": "string"
            }
           }
          },
          "spec": {
           "type": "string"
          }
         }
        },
        "example": {
         "mode": "simulated",
         "origin": "https://app.example.com",
         "method": "PUT",
         "credentials": true,
         "request_type": "preflighted",
         "preflight_reasons": [
          "method PUT is not GET / HEAD / POST",
          "header(s) authorization, content-type are not CORS-safelisted (Content-Type application/json is only safelisted for form / text types)"
         ],
         "allowed": false,
         "preflight_ok": false,
         "response_ok": false,
         "exposed_headers": [],
         "problems": [
          {
           "code": "preflight-wildcard-credentials",
           "severity": "error",
           "message": "Access-Control-Allow-Origin is \"*\" but the request sends credentials (cookies / Authorization with credentials: include): the server must echo the exact origin",
           "message_vi": "Access-Control-Allow-Origin là \"*\" nhưng request gửi kèm credentials (cookie, credentials: include): server phải trả đúng origin cụ thể"
          },
          {
           "code": "method-not-allowed",
           "severity": "error",
           "message": "Method PUT is not in Access-Control-Allow-Methods (GET, POST)",
           "message_vi": "Phương thức PUT không có trong Access-Control-Allow-Methods (GET, POST)"
          },
          {
           "code": "header-not-allowed",
           "severity": "error",
           "message": "Request header \"authorization\" is not in Access-Control-Allow-Headers (*); \"*\" never covers Authorization: list it explicitly",
           "message_vi": "Header \"authorization\" không có trong Access-Control-Allow-Headers (*); \"*\" không bao gồm Authorization: phải ghi rõ"
          },
          "…"
         ],
         "verdict": "Blocked: Access-Control-Allow-Origin is \"*\" but the request sends credentials (cookies / Authorization with credentials: include): the server must echo the exact origin",
         "verdict_vi": "Bị chặn: Access-Control-Allow-Origin là \"*\" nhưng request gửi kèm credentials (cookie, credentials: include): server phải trả đúng origin cụ thể",
         "preflight": {
          "status": 204,
          "headers": {
           "access-control-allow-origin": "*",
           "access-control-allow-methods": "GET, POST",
           "access-control-allow-headers": "*"
          }
         },
         "response": {
          "status": 200,
          "headers": {
           "access-control-allow-origin": "*"
          }
         },
         "fixes": {
          "express": "import cors from 'cors';\napp.use(cors({\n  origin: ['https://app.example.com'],\n  methods: ['GET', 'POST', 'OPTIONS', 'PUT'],\n  allowedHeaders: ['Authorization', 'Content-Type'],\n  credentials: true,\n  maxAge: 7200,\n}));\n// before auth middleware, so OPTIONS is answered without a token",
          "nginx": "…",
          "cloudflare_workers": "…",
          "laravel": "…",
          "apache": "…"
         },
         "spec": "https://fetch.spec.whatwg.org/#http-cors-protocol"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/iam-policy": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "AWS IAM Policy Linter & Explainer",
    "description": "Send an identity-based policy, a resource-based policy (S3 bucket, KMS, SQS…), a role trust policy or an SCP (detected, or set `type`). The catalogue of ~460 services and ~22,500 actions with their access levels, resource types (ARN formats) and condition keys comes from the AWS Service Authorization Reference and is refreshed weekly. Nothing is sent to AWS and no credentials are needed.\n\nLint (`action=lint`, also part of the default `analyze`): grammar (Version, Effect, Action / NotAction, Resource / NotResource, Principal by policy type, Sid), unknown services and actions with \"did you mean\", wildcards that match nothing, ARN syntax, actions whose resource type does not match any Resource (classic: s3:GetObject on arn:aws:s3:::bucket without /*), actions that only work with Resource \"*\", condition operators, unknown or unsupported condition keys, value types, ForAllValues with Allow, `*` admin grants, service wildcards, Allow + NotAction / NotResource, iam:PassRole on \"*\", 27 known privilege-escalation paths, public principals and federated trust without conditions, size limits.\n\nExplain (`action=explain`) lists every statement with the expanded actions and their access level (List / Read / Write / Permissions management / Tagging), resources, principals and conditions, plus a per-service summary. `action=minimize` rewrites Allow statements to explicit actions filtered by `access_levels` (e.g. `list,read`) and / or `actions_used` (from CloudTrail or IAM Access Analyzer).\n\nDocs: https://apibox.io.vn/docs/iam-policy/",
    "operationId": "iamPolicyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/iam-policy/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`analyze` (lint + explain), `lint`, `explain` or `minimize` (alias `mode`).",
      "schema": {
       "type": "string",
       "default": "analyze"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`identity`, `resource`, `trust` or `scp` (default: detected).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "max_actions",
      "in": "query",
      "required": false,
      "description": "Expanded actions listed per statement.",
      "schema": {
       "type": "number",
       "default": 200
      }
     },
     {
      "name": "access_levels",
      "in": "query",
      "required": false,
      "description": "minimize: keep only these levels, e.g. `list,read`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "statements": {
             "type": "number"
            },
            "allow_all": {
             "type": "boolean"
            },
            "allowed_actions": {
             "type": "number"
            },
            "services": {
             "type": "object",
             "properties": {
              "iam": {
               "type": "object"
              },
              "s3": {
               "type": "object"
              }
             }
            }
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "statement": {
              "type": "number"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "url": {
             "type": "string"
            }
           }
          },
          "data_built": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "AWS IAM Policy Linter & Explainer",
    "description": "Send an identity-based policy, a resource-based policy (S3 bucket, KMS, SQS…), a role trust policy or an SCP (detected, or set `type`). The catalogue of ~460 services and ~22,500 actions with their access levels, resource types (ARN formats) and condition keys comes from the AWS Service Authorization Reference and is refreshed weekly. Nothing is sent to AWS and no credentials are needed.\n\nLint (`action=lint`, also part of the default `analyze`): grammar (Version, Effect, Action / NotAction, Resource / NotResource, Principal by policy type, Sid), unknown services and actions with \"did you mean\", wildcards that match nothing, ARN syntax, actions whose resource type does not match any Resource (classic: s3:GetObject on arn:aws:s3:::bucket without /*), actions that only work with Resource \"*\", condition operators, unknown or unsupported condition keys, value types, ForAllValues with Allow, `*` admin grants, service wildcards, Allow + NotAction / NotResource, iam:PassRole on \"*\", 27 known privilege-escalation paths, public principals and federated trust without conditions, size limits.\n\nExplain (`action=explain`) lists every statement with the expanded actions and their access level (List / Read / Write / Permissions management / Tagging), resources, principals and conditions, plus a per-service summary. `action=minimize` rewrites Allow statements to explicit actions filtered by `access_levels` (e.g. `list,read`) and / or `actions_used` (from CloudTrail or IAM Access Analyzer).\n\nDocs: https://apibox.io.vn/docs/iam-policy/",
    "operationId": "iamPolicyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/iam-policy/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "policy": {
          "type": "object",
          "description": "Policy JSON (object or string; max 200 KB)."
         },
         "action": {
          "type": "string",
          "default": "analyze",
          "description": "`analyze` (lint + explain), `lint`, `explain` or `minimize` (alias `mode`)."
         },
         "type": {
          "type": "string",
          "description": "`identity`, `resource`, `trust` or `scp` (default: detected)."
         },
         "max_actions": {
          "type": "number",
          "default": 200,
          "description": "Expanded actions listed per statement."
         },
         "access_levels": {
          "type": "string",
          "description": "minimize: keep only these levels, e.g. `list,read`."
         },
         "actions_used": {
          "type": "array",
          "items": {},
          "description": "minimize: actions actually used (e.g. from CloudTrail)."
         }
        },
        "required": [
         "policy"
        ]
       },
       "example": {
        "action": "lint",
        "policy": {
         "Version": "2012-10-17",
         "Statement": [
          {
           "Effect": "Allow",
           "Action": [
            "s3:GetObject",
            "s3:ListBucket"
           ],
           "Resource": "arn:aws:s3:::my-bucket"
          },
          {
           "Effect": "Allow",
           "Action": "iam:PassRole",
           "Resource": "*"
          }
         ]
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "summary": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "statements": {
             "type": "number"
            },
            "allow_all": {
             "type": "boolean"
            },
            "allowed_actions": {
             "type": "number"
            },
            "services": {
             "type": "object",
             "properties": {
              "iam": {
               "type": "object"
              },
              "s3": {
               "type": "object"
              }
             }
            }
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "statement": {
              "type": "number"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "url": {
             "type": "string"
            }
           }
          },
          "data_built": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": true,
         "errors": 0,
         "warnings": 2,
         "info": 0,
         "summary": {
          "type": "identity",
          "statements": 2,
          "allow_all": false,
          "allowed_actions": 3,
          "services": {
           "iam": {
            "Write": 1
           },
           "s3": {
            "List": 1,
            "Read": 1
           }
          }
         },
         "findings": [
          {
           "rule": "resource-mismatch",
           "severity": "warning",
           "message": "No Resource of this statement matches the resource types of s3:GetObject (object actions need arn:aws:s3:::bucket/*, bucket actions arn:aws:s3:::bucket): this action is never granted",
           "statement": 0
          },
          {
           "rule": "passrole-wildcard",
           "severity": "warning",
           "message": "iam:PassRole on Resource \"*\": the principal can hand any role (incl. admin roles) to a service; restrict Resource to specific role ARNs and add an iam:PassedToService condition",
           "statement": 1
          }
         ],
         "source": {
          "name": "AWS Service Authorization Reference (servicereference.us-east-1.amazonaws.com)",
          "licence": "CC BY-SA 4.0 (AWS documentation)",
          "url": "https://docs.aws.amazon.com/service-authorization/latest/reference/service-reference.html"
         },
         "data_built": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/dns-zone": {
   "get": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "DNS Zone File Tools & Delegation Check",
    "description": "`validate` / `parse` read a BIND zone file ($ORIGIN, $TTL, parentheses, relative names, TTL units like 1h / 2w; $INCLUDE and $GENERATE are refused) and check it: SOA and apex NS, CNAME next to other data or at the apex, MX / NS / SRV pointing to a CNAME or an IP, in-zone NS without glue, targets without addresses, RRsets with different TTLs, duplicates, SOA timers (RFC 1912), TXT strings over 255 bytes, several SPF records, SPF over 10 DNS lookups, `+all`, DMARC syntax, CAA tags, private IPs, out-of-zone names, very low / high TTLs. `parse` also returns the records as JSON.\n\n`convert` turns BIND, JSON (also Cloudflare API exports with priority fields and Route 53 record sets) or CSV into `json`, `bind` (relative names), `csv`, `cloudflare` (BIND import file without SOA / apex NS) or `route53` (ChangeResourceRecordSets batch). `diff` queries every name / type of the zone over DNS-over-HTTPS (1.1.1.1, up to 100 RRsets) and shows what matches, differs or is missing live — useful before moving DNS to another provider.\n\n`delegation` (send `domain`) compares the registry nameservers (RDAP) with the zone NS set, resolves every nameserver, flags lame or single nameservers and nameservers in one /24 (RFC 2182), shows the SOA and checks DNSSEC: DS ↔ DNSKEY key tags and digests are recomputed locally, and the validation status comes from a validating resolver. Workers can only use DNS over HTTPS, so glue at the registry, per-nameserver SOA serials and zone transfers cannot be checked.\n\nDocs: https://apibox.io.vn/docs/dns-zone/",
    "operationId": "dnsZoneGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dns-zone/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`parse`, `validate`, `convert`, `diff` or `delegation` (alias `mode`; `delegation` when only `domain` is sent).",
      "schema": {
       "type": "string",
       "default": "parse"
      }
     },
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "Zone origin for relative names, or the domain for `delegation`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "`auto`, `bind`, `json` or `csv`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "convert: `json`, `bind`, `csv`, `cloudflare` or `route53`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "relative",
      "in": "query",
      "required": false,
      "description": "convert to bind: relative names.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "max_queries",
      "in": "query",
      "required": false,
      "description": "diff: RRsets queried (1-100).",
      "schema": {
       "type": "number",
       "default": 60
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "origin": {
           "type": "string"
          },
          "records": {
           "type": "number"
          },
          "types": {
           "type": "object",
           "properties": {
            "SOA": {
             "type": "number"
            },
            "NS": {
             "type": "number"
            },
            "MX": {
             "type": "number"
            },
            "TXT": {
             "type": "number"
            },
            "A": {
             "type": "number"
            },
            "CNAME": {
             "type": "number"
            }
           }
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "name": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Network & Validation"
    ],
    "summary": "DNS Zone File Tools & Delegation Check",
    "description": "`validate` / `parse` read a BIND zone file ($ORIGIN, $TTL, parentheses, relative names, TTL units like 1h / 2w; $INCLUDE and $GENERATE are refused) and check it: SOA and apex NS, CNAME next to other data or at the apex, MX / NS / SRV pointing to a CNAME or an IP, in-zone NS without glue, targets without addresses, RRsets with different TTLs, duplicates, SOA timers (RFC 1912), TXT strings over 255 bytes, several SPF records, SPF over 10 DNS lookups, `+all`, DMARC syntax, CAA tags, private IPs, out-of-zone names, very low / high TTLs. `parse` also returns the records as JSON.\n\n`convert` turns BIND, JSON (also Cloudflare API exports with priority fields and Route 53 record sets) or CSV into `json`, `bind` (relative names), `csv`, `cloudflare` (BIND import file without SOA / apex NS) or `route53` (ChangeResourceRecordSets batch). `diff` queries every name / type of the zone over DNS-over-HTTPS (1.1.1.1, up to 100 RRsets) and shows what matches, differs or is missing live — useful before moving DNS to another provider.\n\n`delegation` (send `domain`) compares the registry nameservers (RDAP) with the zone NS set, resolves every nameserver, flags lame or single nameservers and nameservers in one /24 (RFC 2182), shows the SOA and checks DNSSEC: DS ↔ DNSKEY key tags and digests are recomputed locally, and the validation status comes from a validating resolver. Workers can only use DNS over HTTPS, so glue at the registry, per-nameserver SOA serials and zone transfers cannot be checked.\n\nDocs: https://apibox.io.vn/docs/dns-zone/",
    "operationId": "dnsZonePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dns-zone/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "parse",
          "description": "`parse`, `validate`, `convert`, `diff` or `delegation` (alias `mode`; `delegation` when only `domain` is sent)."
         },
         "zone": {
          "type": "string",
          "description": "Zone file (BIND), JSON records or CSV (or file / raw body; max 2 MB, 20,000 records)."
         },
         "domain": {
          "type": "string",
          "description": "Zone origin for relative names, or the domain for `delegation`."
         },
         "from": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `bind`, `json` or `csv`."
         },
         "to": {
          "type": "string",
          "default": "json",
          "description": "convert: `json`, `bind`, `csv`, `cloudflare` or `route53`."
         },
         "relative": {
          "type": "boolean",
          "default": true,
          "description": "convert to bind: relative names."
         },
         "max_queries": {
          "type": "number",
          "default": 60,
          "description": "diff: RRsets queried (1-100)."
         }
        }
       },
       "example": {
        "action": "validate",
        "zone": "$ORIGIN example.com.\n$TTL 3600\n@    IN SOA ns1.example.com. hostmaster.example.com. 2026111601 7200 900 1209600 300\n     IN NS  ns1.example.com.\n     IN NS  ns2.example.net.\n     IN MX  10 mail\n@    IN TXT \"v=spf1 mx include:_spf.google.com ~all\"\nns1  IN A   203.0.113.53\nmail IN CNAME mx.provider.net.\nwww  IN CNAME @\nwww  IN TXT \"verify=1\"\n"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "origin": {
           "type": "string"
          },
          "records": {
           "type": "number"
          },
          "types": {
           "type": "object",
           "properties": {
            "SOA": {
             "type": "number"
            },
            "NS": {
             "type": "number"
            },
            "MX": {
             "type": "number"
            },
            "TXT": {
             "type": "number"
            },
            "A": {
             "type": "number"
            },
            "CNAME": {
             "type": "number"
            }
           }
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "info": {
           "type": "number"
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "line": {
              "type": "number"
             },
             "name": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "valid": false,
         "origin": "example.com.",
         "records": 9,
         "types": {
          "SOA": 1,
          "NS": 2,
          "MX": 1,
          "TXT": 2,
          "A": 1,
          "CNAME": 2
         },
         "errors": 2,
         "warnings": 0,
         "info": 1,
         "findings": [
          {
           "rule": "mx-to-cname",
           "severity": "error",
           "message": "MX example.com. points to mail.example.com., which is a CNAME (RFC 2181 10.3)",
           "line": 6,
           "name": "example.com."
          },
          {
           "rule": "cname-coexist",
           "severity": "error",
           "message": "www.example.com. has a CNAME and other data (TXT): not allowed (RFC 1034 3.6.2, RFC 2181 10.1)",
           "line": 10,
           "name": "www.example.com."
          },
          {
           "rule": "spf-lookups",
           "severity": "info",
           "message": "SPF at example.com.: 2 lookups counted here, plus whatever _spf.google.com uses (check with /v1/email-auth)",
           "line": 7,
           "name": "example.com."
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-business-registration": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Business Registration Procedures",
    "description": "Pick a `procedure` (establish, change of name, head office, legal representative, charter capital, members, owner, business lines, beneficial owners, suspension, early resumption, dissolution, branch opening / closing, conversion, conversion from a household business, closing a household business) and an `entity` (dntn, tnhh1, tnhh2, cp, hd, hkd). The answer lists the documents with the article of Decree 168/2025/NĐ-CP or the Enterprise Law, the official form numbers of Circular 68/2025/TT-BTC (Appendix I for enterprises, II for household businesses), the registration office (provincial or commune level), the filing deadline and the processing time.\n\nIt also tells you which internal body must decide (owner, members’ council, general meeting or board) with a link to `/v1/vn-corporate-voting` for the quorum and ratios, and computes dates: `start_date` gives the latest filing date for a suspension or resumption (3 working days before, using the official holiday calendar) and checks the 12-month limit; `change_date` gives the 10-day deadline for changes; `registration_date` gives the 90-day capital contribution deadline.\n\nRules: Enterprise Law 59/2020 as amended by Law 76/2025 (from 1/7/2025), Decree 168/2025 and Circular 68/2025 (from 1/7/2025). Fees: `/v1/vn-admin-fees`. Reference only; the API does not file anything for you.\n\nDocs: https://apibox.io.vn/docs/vn-business-registration/",
    "operationId": "vnBusinessRegistrationGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-business-registration/"
    },
    "parameters": [
     {
      "name": "procedure",
      "in": "query",
      "required": false,
      "description": "Procedure id (empty = list): establish, change_name, change_address, change_representative, change_capital, change_members, change_owner, change_business_lines, update_beneficial_owner, suspend, resume_early, dissolve, branch_open, branch_close, convert, from_hkd, hkd_close.",
      "schema": {
       "type": "string"
      },
      "example": "suspend"
     },
     {
      "name": "entity",
      "in": "query",
      "required": false,
      "description": "dntn (sole proprietorship), tnhh1, tnhh2, cp (joint-stock), hd (partnership), hkd (household business).",
      "schema": {
       "type": "string",
       "default": "tnhh1"
      },
      "example": "cp"
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Suspension / resumption start (YYYY-MM-DD) → latest filing date.",
      "schema": {
       "type": "string"
      },
      "example": "2027-01-04"
     },
     {
      "name": "months",
      "in": "query",
      "required": false,
      "description": "Suspension length in months (checks the 12-month limit).",
      "schema": {
       "type": "number"
      },
      "example": 6
     },
     {
      "name": "change_date",
      "in": "query",
      "required": false,
      "description": "Date of the change / decision → 10-day filing deadline.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "registration_date",
      "in": "query",
      "required": false,
      "description": "Enterprise registration date (establish) → 90-day capital deadline.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "procedure": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "entity": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "authority": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "filing": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "processing": {
           "type": "object",
           "properties": {
            "working_days": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "forms": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "form": {
              "type": "string"
             },
             "appendix": {
              "type": "string"
             },
             "title_vi": {
              "type": "string"
             },
             "source": {
              "type": "string"
             }
            }
           }
          },
          "documents": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "internal_decision": {
           "type": "object",
           "properties": {
            "body_vi": {
             "type": "string"
            },
            "body_en": {
             "type": "string"
            },
            "voting": {
             "type": "object",
             "properties": {
              "entity": {
               "type": "string"
              },
              "body": {
               "type": "string"
              },
              "decision": {
               "type": "string"
              }
             }
            },
            "voting_check": {
             "type": "string"
            }
           }
          },
          "dates": {
           "type": "object",
           "properties": {
            "start_date": {
             "type": "string"
            },
            "latest_filing_date": {
             "type": "string"
            },
            "too_late": {
             "type": "boolean"
            },
            "months": {
             "type": "number"
            },
            "within_limit": {
             "type": "boolean"
            }
           }
          },
          "follow_up": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "procedure": {
          "id": "suspend",
          "vi": "Thông báo tạm ngừng kinh doanh",
          "en": "Notice of temporary suspension"
         },
         "entity": {
          "id": "cp",
          "vi": "Công ty cổ phần",
          "en": "Joint-stock company"
         },
         "authority": {
          "vi": "Cơ quan đăng ký kinh doanh cấp tỉnh (Phòng Đăng ký kinh doanh – Sở Tài chính) nơi đặt trụ sở chính",
          "en": "Provincial business registration office (Department of Finance) where the head office is"
         },
         "filing": {
          "en": "At least 3 working days before the suspension starts; at most 12 months per notice (renew 3 working days before). Household business: only for suspensions of 15 days or more, at most one year per registration",
          "ref": "NĐ 168/2025/NĐ-CP Điều 60 khoản 1; Điều 103 khoản 1"
         },
         "processing": {
          "working_days": 1,
          "vi": "01 ngày làm việc (cấp giấy xác nhận)",
          "en": "1 working day (confirmation)",
          "ref": "NĐ 168/2025/NĐ-CP Điều 60 khoản 4; Điều 103 khoản 2"
         },
         "forms": [
          {
           "form": "Mẫu số 27",
           "appendix": "I",
           "title_vi": "Thông báo về việc tạm ngừng kinh doanh / tiếp tục kinh doanh trước thời hạn đã thông báo",
           "source": "Thông tư 68/2025/TT-BTC, Phụ lục I"
          }
         ],
         "documents": [
          {
           "vi": "Thông báo tạm ngừng kinh doanh",
           "en": "Suspension notice",
           "ref": "NĐ 168/2025/NĐ-CP Điều 60 khoản 2 điểm a"
          },
          {
           "vi": "Bản sao hoặc bản chính nghị quyết hoặc quyết định của Hội đồng quản trị về việc tạm ngừng kinh doanh",
           "en": "Board resolution on the suspension"
          }
         ],
         "internal_decision": {
          "body_vi": "Hội đồng quản trị",
          "body_en": "Board of directors",
          "voting": {
           "entity": "cp",
           "body": "hdqt",
           "decision": "ordinary"
          },
          "voting_check": "/v1/vn-corporate-voting?entity=cp&body=hdqt&decision=ordinary"
         },
         "dates": {
          "start_date": "2027-01-04",
          "latest_filing_date": "2026-12-29",
          "too_late": false,
          "months": 6,
          "within_limit": true
         },
         "follow_up": [
          "…"
         ],
         "reviewed": "2026-11-16",
         "review_cadence_days": 180,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Business Registration Procedures",
    "description": "Pick a `procedure` (establish, change of name, head office, legal representative, charter capital, members, owner, business lines, beneficial owners, suspension, early resumption, dissolution, branch opening / closing, conversion, conversion from a household business, closing a household business) and an `entity` (dntn, tnhh1, tnhh2, cp, hd, hkd). The answer lists the documents with the article of Decree 168/2025/NĐ-CP or the Enterprise Law, the official form numbers of Circular 68/2025/TT-BTC (Appendix I for enterprises, II for household businesses), the registration office (provincial or commune level), the filing deadline and the processing time.\n\nIt also tells you which internal body must decide (owner, members’ council, general meeting or board) with a link to `/v1/vn-corporate-voting` for the quorum and ratios, and computes dates: `start_date` gives the latest filing date for a suspension or resumption (3 working days before, using the official holiday calendar) and checks the 12-month limit; `change_date` gives the 10-day deadline for changes; `registration_date` gives the 90-day capital contribution deadline.\n\nRules: Enterprise Law 59/2020 as amended by Law 76/2025 (from 1/7/2025), Decree 168/2025 and Circular 68/2025 (from 1/7/2025). Fees: `/v1/vn-admin-fees`. Reference only; the API does not file anything for you.\n\nDocs: https://apibox.io.vn/docs/vn-business-registration/",
    "operationId": "vnBusinessRegistrationPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-business-registration/"
    },
    "parameters": [
     {
      "name": "procedure",
      "in": "query",
      "required": false,
      "description": "Procedure id (empty = list): establish, change_name, change_address, change_representative, change_capital, change_members, change_owner, change_business_lines, update_beneficial_owner, suspend, resume_early, dissolve, branch_open, branch_close, convert, from_hkd, hkd_close.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "entity",
      "in": "query",
      "required": false,
      "description": "dntn (sole proprietorship), tnhh1, tnhh2, cp (joint-stock), hd (partnership), hkd (household business).",
      "schema": {
       "type": "string",
       "default": "tnhh1"
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Suspension / resumption start (YYYY-MM-DD) → latest filing date.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "months",
      "in": "query",
      "required": false,
      "description": "Suspension length in months (checks the 12-month limit).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "change_date",
      "in": "query",
      "required": false,
      "description": "Date of the change / decision → 10-day filing deadline.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "registration_date",
      "in": "query",
      "required": false,
      "description": "Enterprise registration date (establish) → 90-day capital deadline.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "procedure": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "entity": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "authority": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "filing": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "processing": {
           "type": "object",
           "properties": {
            "working_days": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "forms": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "form": {
              "type": "string"
             },
             "appendix": {
              "type": "string"
             },
             "title_vi": {
              "type": "string"
             },
             "source": {
              "type": "string"
             }
            }
           }
          },
          "documents": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "internal_decision": {
           "type": "object",
           "properties": {
            "body_vi": {
             "type": "string"
            },
            "body_en": {
             "type": "string"
            },
            "voting": {
             "type": "object",
             "properties": {
              "entity": {
               "type": "string"
              },
              "body": {
               "type": "string"
              },
              "decision": {
               "type": "string"
              }
             }
            },
            "voting_check": {
             "type": "string"
            }
           }
          },
          "dates": {
           "type": "object",
           "properties": {
            "start_date": {
             "type": "string"
            },
            "latest_filing_date": {
             "type": "string"
            },
            "too_late": {
             "type": "boolean"
            },
            "months": {
             "type": "number"
            },
            "within_limit": {
             "type": "boolean"
            }
           }
          },
          "follow_up": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-corporate-voting": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Corporate Voting Calculator",
    "description": "Send the `body` (hdtv = members’ council of a multi-member LLC, dhdcd = general meeting of shareholders, hdqt = board of directors), the `decision` (ordinary, amend_charter, share_types_totals, change_business_lines, change_management_structure, major_assets, reorganize_dissolve, elect_dismiss, annual_financial_statements, related_party, preferred_rights), the `meeting` number (1, 2, 3) or `mode=written`, and either percentages (`attending_pct`, `approve_pct`) or vote counts (`total`, `present`, `votes_for`, `interested` votes excluded for related-party deals). For the board: `board_size`, `board_present`, `board_for`, `chair_for` for ties.\n\nThe answer gives the quorum required and whether it is met (members’ council 65 % / 50 % / none; general meeting > 50 % / ≥ 33 % / none; board 3/4 then > 1/2), the approval ratio with its basis (65 % or 75 % of capital present; ≥ 65 % or > 50 % of votes present; > 50 % of all votes in writing), whether the resolution passes, the notice periods (21 days for a general meeting, 7 working days for key members’ council documents, 3 working days for the board), matters that must be decided at a meeting, and the 90-day window to ask a court to annul.\n\nRules: Enterprise Law 59/2020 articles 49, 57–59, 67, 141–151, 157 and 167; Law 76/2025 did not change these ratios. `charter_quorum_pct` and `charter_ratio_pct` apply your charter where the law allows it.\n\nDocs: https://apibox.io.vn/docs/vn-corporate-voting/",
    "operationId": "vnCorporateVotingGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-corporate-voting/"
    },
    "parameters": [
     {
      "name": "body",
      "in": "query",
      "required": false,
      "description": "hdtv, dhdcd or hdqt.",
      "schema": {
       "type": "string",
       "default": "hdtv"
      },
      "example": "dhdcd"
     },
     {
      "name": "entity",
      "in": "query",
      "required": false,
      "description": "tnhh2 or cp (checked against the body).",
      "schema": {
       "type": "string"
      },
      "example": "cp"
     },
     {
      "name": "decision",
      "in": "query",
      "required": false,
      "description": "Decision type (empty = list).",
      "schema": {
       "type": "string",
       "default": "ordinary"
      },
      "example": "reorganize_dissolve"
     },
     {
      "name": "meeting",
      "in": "query",
      "required": false,
      "description": "Meeting number 1, 2 or 3.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 2
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`written` for a written vote.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "attending_pct",
      "in": "query",
      "required": false,
      "description": "Capital / voting shares represented at the meeting (%).",
      "schema": {
       "type": "number"
      },
      "example": 40
     },
     {
      "name": "approve_pct",
      "in": "query",
      "required": false,
      "description": "Votes in favour (% of the basis).",
      "schema": {
       "type": "number"
      },
      "example": 70
     },
     {
      "name": "total",
      "in": "query",
      "required": false,
      "description": "Total votes / capital (instead of percentages), with present, votes_for, interested.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "board_size",
      "in": "query",
      "required": false,
      "description": "Board: number of members (with board_present, board_for, chair_for).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "charter_ratio_pct",
      "in": "query",
      "required": false,
      "description": "Approval ratio set by the charter.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "body": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "entity": {
             "type": "string"
            }
           }
          },
          "decision": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "must_be_at_meeting": {
             "type": "boolean"
            }
           }
          },
          "mode": {
           "type": "string"
          },
          "meeting": {
           "type": "number"
          },
          "quorum": {
           "type": "object",
           "properties": {
            "required_pct": {
             "type": "number"
            },
            "comparison": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "attending_pct": {
             "type": "number"
            },
            "met": {
             "type": "boolean"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "approval": {
           "type": "object",
           "properties": {
            "required_pct": {
             "type": "number"
            },
            "comparison": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "approve_pct": {
             "type": "number"
            },
            "met": {
             "type": "boolean"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "passed": {
           "type": "boolean"
          },
          "notice": {
           "type": "object",
           "properties": {
            "invitation": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "next_meeting": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "challenge": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "days": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "body": {
          "id": "dhdcd",
          "vi": "Đại hội đồng cổ đông",
          "en": "General meeting of shareholders",
          "entity": "cp"
         },
         "decision": {
          "id": "reorganize_dissolve",
          "vi": "Tổ chức lại, giải thể công ty",
          "en": "Reorganisation or dissolution",
          "must_be_at_meeting": true
         },
         "mode": "meeting",
         "meeting": 2,
         "quorum": {
          "required_pct": 33,
          "comparison": "≥",
          "basis": "total voting shares represented",
          "attending_pct": 40,
          "met": true,
          "ref": "LDN Điều 145"
         },
         "approval": {
          "required_pct": 65,
          "comparison": "≥",
          "basis": "votes of all shareholders attending",
          "approve_pct": 70,
          "met": true,
          "ref": "LDN Điều 148 khoản 1 điểm đ; Điều 147 khoản 2 điểm g"
         },
         "passed": true,
         "notice": {
          "invitation": "At least 21 days before the opening (unless the charter sets longer), with agenda, documents, draft resolutions and ballots; shareholder list prepared ≤ 10 days before sending the invitation",
          "ref": "LDN Điều 143 khoản 1, 3; Điều 141 khoản 1 (sửa bởi Luật 76/2025)",
          "next_meeting": "Third invitation within 20 days of the planned second meeting (no quorum).",
          "…": "…"
         },
         "challenge": {
          "en": "Shareholders with ≥ 5 % (art. 115(2)) may ask a court / arbitrator to annul within 90 days of receiving the resolution or minutes",
          "ref": "LDN Điều 151",
          "days": 90
         },
         "reviewed": "2026-11-16",
         "review_cadence_days": 180,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Corporate Voting Calculator",
    "description": "Send the `body` (hdtv = members’ council of a multi-member LLC, dhdcd = general meeting of shareholders, hdqt = board of directors), the `decision` (ordinary, amend_charter, share_types_totals, change_business_lines, change_management_structure, major_assets, reorganize_dissolve, elect_dismiss, annual_financial_statements, related_party, preferred_rights), the `meeting` number (1, 2, 3) or `mode=written`, and either percentages (`attending_pct`, `approve_pct`) or vote counts (`total`, `present`, `votes_for`, `interested` votes excluded for related-party deals). For the board: `board_size`, `board_present`, `board_for`, `chair_for` for ties.\n\nThe answer gives the quorum required and whether it is met (members’ council 65 % / 50 % / none; general meeting > 50 % / ≥ 33 % / none; board 3/4 then > 1/2), the approval ratio with its basis (65 % or 75 % of capital present; ≥ 65 % or > 50 % of votes present; > 50 % of all votes in writing), whether the resolution passes, the notice periods (21 days for a general meeting, 7 working days for key members’ council documents, 3 working days for the board), matters that must be decided at a meeting, and the 90-day window to ask a court to annul.\n\nRules: Enterprise Law 59/2020 articles 49, 57–59, 67, 141–151, 157 and 167; Law 76/2025 did not change these ratios. `charter_quorum_pct` and `charter_ratio_pct` apply your charter where the law allows it.\n\nDocs: https://apibox.io.vn/docs/vn-corporate-voting/",
    "operationId": "vnCorporateVotingPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-corporate-voting/"
    },
    "parameters": [
     {
      "name": "body",
      "in": "query",
      "required": false,
      "description": "hdtv, dhdcd or hdqt.",
      "schema": {
       "type": "string",
       "default": "hdtv"
      }
     },
     {
      "name": "entity",
      "in": "query",
      "required": false,
      "description": "tnhh2 or cp (checked against the body).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "decision",
      "in": "query",
      "required": false,
      "description": "Decision type (empty = list).",
      "schema": {
       "type": "string",
       "default": "ordinary"
      }
     },
     {
      "name": "meeting",
      "in": "query",
      "required": false,
      "description": "Meeting number 1, 2 or 3.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "mode",
      "in": "query",
      "required": false,
      "description": "`written` for a written vote.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "attending_pct",
      "in": "query",
      "required": false,
      "description": "Capital / voting shares represented at the meeting (%).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "approve_pct",
      "in": "query",
      "required": false,
      "description": "Votes in favour (% of the basis).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "total",
      "in": "query",
      "required": false,
      "description": "Total votes / capital (instead of percentages), with present, votes_for, interested.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "board_size",
      "in": "query",
      "required": false,
      "description": "Board: number of members (with board_present, board_for, chair_for).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "charter_ratio_pct",
      "in": "query",
      "required": false,
      "description": "Approval ratio set by the charter.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "body": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "entity": {
             "type": "string"
            }
           }
          },
          "decision": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "must_be_at_meeting": {
             "type": "boolean"
            }
           }
          },
          "mode": {
           "type": "string"
          },
          "meeting": {
           "type": "number"
          },
          "quorum": {
           "type": "object",
           "properties": {
            "required_pct": {
             "type": "number"
            },
            "comparison": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "attending_pct": {
             "type": "number"
            },
            "met": {
             "type": "boolean"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "approval": {
           "type": "object",
           "properties": {
            "required_pct": {
             "type": "number"
            },
            "comparison": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "approve_pct": {
             "type": "number"
            },
            "met": {
             "type": "boolean"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "passed": {
           "type": "boolean"
          },
          "notice": {
           "type": "object",
           "properties": {
            "invitation": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "next_meeting": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "challenge": {
           "type": "object",
           "properties": {
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "days": {
             "type": "number"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-fdi-procedure": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Foreign Investment Procedure Route",
    "description": "Send the `form` (new_company, capital_contribution, bcc, new_project), the activity as `vsic` codes or text `q` (market access is checked through `/v1/vn-business-conditions`), `foreign_pct` after the deal and `prior_foreign_pct`, whether there is a `project`, `in_zone` (industrial / economic zone), `multi_province`, `sensitive_land` (island, border, coastal or defence-sensitive land) and `policy_cases` (cases of Investment Law art. 24 needing investment policy approval, e.g. golf, housing_urban, land_without_auction, casino, telecom_infra_press).\n\nThe answer is an ordered list of steps with the authority, statutory time and article: under the 2025 law a foreign investor may set up the company first and then obtain the investment registration certificate (IRC) – 10 working days, or 5 working days after a policy approval; capital-contribution registration is required only in the three cases of art. 21(3) (foreign ownership crossing or rising above 50 %, a conditional-access line, sensitive land) and takes 10 working days; then the member / shareholder change at the business registration office, the 90-day capital deadline, sector licences and quarterly / yearly reports.\n\nScheduled changes of Law 24/2026/QH16 (new conditional list from 1/3/2027, N2O ban from 1/1/2027) carry a `status`. Reviewed every 30 days. Points not settled in the texts (e.g. whether a pure trading company needs an IRC, the current foreign-exchange circular for the capital account) are marked `check` / unverified.\n\nDocs: https://apibox.io.vn/docs/vn-fdi-procedure/",
    "operationId": "vnFdiProcedureGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fdi-procedure/"
    },
    "parameters": [
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "new_company, capital_contribution, bcc or new_project (empty = list).",
      "schema": {
       "type": "string"
      },
      "example": "capital_contribution"
     },
     {
      "name": "vsic",
      "in": "query",
      "required": false,
      "description": "VSIC 2025 codes, comma-separated.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Description of the activity.",
      "schema": {
       "type": "string"
      },
      "example": "phát triển phần mềm"
     },
     {
      "name": "foreign_pct",
      "in": "query",
      "required": false,
      "description": "Foreign ownership after the deal (%).",
      "schema": {
       "type": "number"
      },
      "example": 60
     },
     {
      "name": "prior_foreign_pct",
      "in": "query",
      "required": false,
      "description": "Foreign ownership before (%).",
      "schema": {
       "type": "number"
      },
      "example": 30
     },
     {
      "name": "project",
      "in": "query",
      "required": false,
      "description": "There is an investment project (default true except capital_contribution).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "in_zone",
      "in": "query",
      "required": false,
      "description": "Project in an industrial / export-processing / hi-tech / economic zone.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "sensitive_land",
      "in": "query",
      "required": false,
      "description": "Company holds land in island / border / coastal / defence-sensitive areas.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "policy_cases",
      "in": "query",
      "required": false,
      "description": "Art. 24 cases needing policy approval, comma-separated (see the list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "foreign_pct": {
           "type": "number"
          },
          "prior_foreign_pct": {
           "type": "number"
          },
          "project": {
           "type": "boolean"
          },
          "in_zone": {
           "type": "boolean"
          },
          "market_access": {
           "type": "object",
           "properties": {
            "overall": {
             "type": "string"
            },
            "conditional_business": {
             "type": "boolean"
            },
            "results": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "source": {
             "type": "string"
            }
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "number"
             },
             "id": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "required": {},
             "authority": {
              "type": "string"
             },
             "time": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "upcoming": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "en": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "form": "capital_contribution",
         "foreign_pct": 60,
         "prior_foreign_pct": 30,
         "project": false,
         "in_zone": false,
         "market_access": {
          "overall": "open_like_domestic",
          "conditional_business": false,
          "results": [
           "…"
          ],
          "source": "/v1/vn-business-conditions"
         },
         "steps": [
          {
           "step": 1,
           "id": "market_access",
           "en": "Check market access (closed / conditional lines of Decree 96/2026 Annex I, ownership caps, form, partners) and treaty commitments",
           "ref": "Luật Đầu tư Điều 8; NĐ 96/2026 Điều 15–17",
           "required": true
          },
          {
           "step": 2,
           "id": "contribution_registration",
           "en": "Register the capital contribution / share purchase with the investment registration office of the head-office province",
           "authority": "Cơ quan đăng ký đầu tư nơi đặt trụ sở chính",
           "time": "10 ngày làm việc kể từ ngày nhận hồ sơ hợp lệ",
           "ref": "Luật Đầu tư Điều 21 khoản 3; NĐ 96/2026 Điều 76 khoản 3–5",
           "required": true,
           "note": "Required because: b) foreign ownership goes above 50 % or rises while above 50 %."
          },
          {
           "step": 3,
           "id": "member_change",
           "en": "Register the change of members / shareholders with the business registration office; the investor’s rights start when it is done",
           "authority": "Cơ quan đăng ký kinh doanh cấp tỉnh",
           "time": "03 ngày làm việc",
           "required": true
          },
          {
           "step": 4,
           "id": "payment",
           "required": "check",
           "…": "…"
          },
          {
           "step": 5,
           "id": "other_permits",
           "required": "check",
           "…": "…"
          }
         ],
         "upcoming": [
          {
           "date": "2027-01-01",
           "status": "scheduled",
           "en": "Ban on trading N2O for inhalation; existing contracts end and are liquidated within 45 days"
          },
          {
           "date": "2027-03-01",
           "status": "scheduled",
           "en": "New Annex IV (137 conditional lines); lines removed no longer need conditions; pending applications for them stop"
          }
         ],
         "reviewed": "2026-11-16",
         "review_cadence_days": 30,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Foreign Investment Procedure Route",
    "description": "Send the `form` (new_company, capital_contribution, bcc, new_project), the activity as `vsic` codes or text `q` (market access is checked through `/v1/vn-business-conditions`), `foreign_pct` after the deal and `prior_foreign_pct`, whether there is a `project`, `in_zone` (industrial / economic zone), `multi_province`, `sensitive_land` (island, border, coastal or defence-sensitive land) and `policy_cases` (cases of Investment Law art. 24 needing investment policy approval, e.g. golf, housing_urban, land_without_auction, casino, telecom_infra_press).\n\nThe answer is an ordered list of steps with the authority, statutory time and article: under the 2025 law a foreign investor may set up the company first and then obtain the investment registration certificate (IRC) – 10 working days, or 5 working days after a policy approval; capital-contribution registration is required only in the three cases of art. 21(3) (foreign ownership crossing or rising above 50 %, a conditional-access line, sensitive land) and takes 10 working days; then the member / shareholder change at the business registration office, the 90-day capital deadline, sector licences and quarterly / yearly reports.\n\nScheduled changes of Law 24/2026/QH16 (new conditional list from 1/3/2027, N2O ban from 1/1/2027) carry a `status`. Reviewed every 30 days. Points not settled in the texts (e.g. whether a pure trading company needs an IRC, the current foreign-exchange circular for the capital account) are marked `check` / unverified.\n\nDocs: https://apibox.io.vn/docs/vn-fdi-procedure/",
    "operationId": "vnFdiProcedurePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fdi-procedure/"
    },
    "parameters": [
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "new_company, capital_contribution, bcc or new_project (empty = list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vsic",
      "in": "query",
      "required": false,
      "description": "VSIC 2025 codes, comma-separated.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Description of the activity.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "foreign_pct",
      "in": "query",
      "required": false,
      "description": "Foreign ownership after the deal (%).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "prior_foreign_pct",
      "in": "query",
      "required": false,
      "description": "Foreign ownership before (%).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "project",
      "in": "query",
      "required": false,
      "description": "There is an investment project (default true except capital_contribution).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "in_zone",
      "in": "query",
      "required": false,
      "description": "Project in an industrial / export-processing / hi-tech / economic zone.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "sensitive_land",
      "in": "query",
      "required": false,
      "description": "Company holds land in island / border / coastal / defence-sensitive areas.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "policy_cases",
      "in": "query",
      "required": false,
      "description": "Art. 24 cases needing policy approval, comma-separated (see the list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Reference date (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "foreign_pct": {
           "type": "number"
          },
          "prior_foreign_pct": {
           "type": "number"
          },
          "project": {
           "type": "boolean"
          },
          "in_zone": {
           "type": "boolean"
          },
          "market_access": {
           "type": "object",
           "properties": {
            "overall": {
             "type": "string"
            },
            "conditional_business": {
             "type": "boolean"
            },
            "results": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "source": {
             "type": "string"
            }
           }
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "step": {
              "type": "number"
             },
             "id": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "required": {},
             "authority": {
              "type": "string"
             },
             "time": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "upcoming": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "en": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-promotion-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Sales Promotion Rules Checker",
    "description": "Send the `form` (sample, gift, discount, voucher, contest, lucky_draw, loyalty, event, other), the `goods`, prices (`regular_price` and `promo_price` or `discount_pct`), `gift_value` per unit, `total_prize_value` and `total_promoted_value`, the dates and the number of `provinces`. The answer checks banned goods (alcohol, lottery, tobacco, breast-milk substitutes, prescription drugs, public health and education services), the maximum discount and promotional value (50 %, or 100 % in concentrated programmes and in the 30 days before Tết, computed from the lunar calendar), and tells you the procedure: nothing for most forms, a notice to every provincial department at least 3 working days before for contests with prizes from 100 million VND (exempt when run only on e-commerce platforms), or registration and confirmation for lucky draws.\n\nFor prize promotions it gives the 45-day deadlines to announce winners and report, and 50 % of unclaimed prizes to the state budget. Decree 239/2026 (26/6/2026) repealed the caps of Decree 81 art. 6–7 and the 120-days-a-year discount limit; the 50 % caps now come from Circular 39/2025/TT-BCT whose legal basis changed, so they carry `status: provisional`. Reviewed every 30 days.\n\nDocs: https://apibox.io.vn/docs/vn-promotion-rules/",
    "operationId": "vnPromotionRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-promotion-rules/"
    },
    "parameters": [
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "Promotion form (empty = list).",
      "schema": {
       "type": "string"
      },
      "example": "discount"
     },
     {
      "name": "goods",
      "in": "query",
      "required": false,
      "description": "Goods / services promoted (keyword check for banned goods).",
      "schema": {
       "type": "string"
      },
      "example": "Áo khoác nam"
     },
     {
      "name": "regular_price",
      "in": "query",
      "required": false,
      "description": "Price just before the promotion (VND).",
      "schema": {
       "type": "number"
      },
      "example": 900000
     },
     {
      "name": "promo_price",
      "in": "query",
      "required": false,
      "description": "Promotional price (or discount_pct).",
      "schema": {
       "type": "number"
      },
      "example": 450000
     },
     {
      "name": "gift_value",
      "in": "query",
      "required": false,
      "description": "Value of the gift / voucher per unit sold.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "total_prize_value",
      "in": "query",
      "required": false,
      "description": "Total value of prizes / gifts of the programme.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "total_promoted_value",
      "in": "query",
      "required": false,
      "description": "Total value of promoted goods.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Start (YYYY-MM-DD); end_date for the end.",
      "schema": {
       "type": "string"
      },
      "example": "2027-01-10"
     },
     {
      "name": "provinces",
      "in": "query",
      "required": false,
      "description": "Number of provinces (registration authority).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "online_only",
      "in": "query",
      "required": false,
      "description": "Only on e-commerce platforms / online promotion sites.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "concentrated_program",
      "in": "query",
      "required": false,
      "description": "Part of a state-decided concentrated programme (100 % caps).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "goods": {
           "type": "string"
          },
          "discount_pct": {
           "type": "number"
          },
          "cap_pct": {
           "type": "number"
          },
          "concentrated_program": {
           "type": "boolean"
          },
          "tet_window": {
           "type": "object",
           "properties": {
            "lunar_new_year": {
             "type": "string"
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "status": {
           "type": "string"
          },
          "caps_status": {
           "type": "string"
          },
          "checks": {
           "type": "array",
           "items": {}
          },
          "procedure": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "form": {
          "id": "discount",
          "vi": "Giảm giá (bán thấp hơn giá trước đó trong thời gian khuyến mại)",
          "ref": "Luật Thương mại Điều 92 khoản 3; NĐ 81/2018 Điều 10"
         },
         "goods": "Áo khoác nam",
         "discount_pct": 50,
         "cap_pct": 100,
         "concentrated_program": true,
         "tet_window": {
          "lunar_new_year": "2027-02-06",
          "from": "2027-01-07",
          "to": "2027-02-05"
         },
         "status": "compliant",
         "caps_status": "provisional",
         "checks": [
          {
           "id": "goods_allowed",
           "ok": true,
           "en": "No banned goods detected (keyword check only)",
           "ref": "NĐ 81/2018 Điều 5 (sửa bởi NĐ 239/2026 Điều 1); Luật Thương mại Điều 100"
          },
          {
           "id": "max_discount",
           "ok": true,
           "en": "Maximum discount 100 % of the price just before the promotion (concentrated programme / Tết window)",
           "ref": "TT 39/2025/TT-BCT Điều 4",
           "status": "provisional"
          },
          {
           "id": "duration",
           "ok": true,
           "en": "The 120-days-a-year discount limit was repealed by NĐ 239/2026",
           "ref": "NĐ 239/2026 Điều 11 khoản 2"
          },
          "…"
         ],
         "procedure": {
          "type": "none",
          "en": "No notification or registration (public information duties of Commercial Law art. 97 still apply)",
          "ref": "NĐ 81/2018 Điều 17 khoản 2 điểm a (sửa bởi NĐ 239/2026 Điều 4)"
         },
         "reviewed": "2026-11-16",
         "review_cadence_days": 30,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Sales Promotion Rules Checker",
    "description": "Send the `form` (sample, gift, discount, voucher, contest, lucky_draw, loyalty, event, other), the `goods`, prices (`regular_price` and `promo_price` or `discount_pct`), `gift_value` per unit, `total_prize_value` and `total_promoted_value`, the dates and the number of `provinces`. The answer checks banned goods (alcohol, lottery, tobacco, breast-milk substitutes, prescription drugs, public health and education services), the maximum discount and promotional value (50 %, or 100 % in concentrated programmes and in the 30 days before Tết, computed from the lunar calendar), and tells you the procedure: nothing for most forms, a notice to every provincial department at least 3 working days before for contests with prizes from 100 million VND (exempt when run only on e-commerce platforms), or registration and confirmation for lucky draws.\n\nFor prize promotions it gives the 45-day deadlines to announce winners and report, and 50 % of unclaimed prizes to the state budget. Decree 239/2026 (26/6/2026) repealed the caps of Decree 81 art. 6–7 and the 120-days-a-year discount limit; the 50 % caps now come from Circular 39/2025/TT-BCT whose legal basis changed, so they carry `status: provisional`. Reviewed every 30 days.\n\nDocs: https://apibox.io.vn/docs/vn-promotion-rules/",
    "operationId": "vnPromotionRulesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-promotion-rules/"
    },
    "parameters": [
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "Promotion form (empty = list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "goods",
      "in": "query",
      "required": false,
      "description": "Goods / services promoted (keyword check for banned goods).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "regular_price",
      "in": "query",
      "required": false,
      "description": "Price just before the promotion (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "promo_price",
      "in": "query",
      "required": false,
      "description": "Promotional price (or discount_pct).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gift_value",
      "in": "query",
      "required": false,
      "description": "Value of the gift / voucher per unit sold.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "total_prize_value",
      "in": "query",
      "required": false,
      "description": "Total value of prizes / gifts of the programme.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "total_promoted_value",
      "in": "query",
      "required": false,
      "description": "Total value of promoted goods.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "start_date",
      "in": "query",
      "required": false,
      "description": "Start (YYYY-MM-DD); end_date for the end.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "provinces",
      "in": "query",
      "required": false,
      "description": "Number of provinces (registration authority).",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "online_only",
      "in": "query",
      "required": false,
      "description": "Only on e-commerce platforms / online promotion sites.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "concentrated_program",
      "in": "query",
      "required": false,
      "description": "Part of a state-decided concentrated programme (100 % caps).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "goods": {
           "type": "string"
          },
          "discount_pct": {
           "type": "number"
          },
          "cap_pct": {
           "type": "number"
          },
          "concentrated_program": {
           "type": "boolean"
          },
          "tet_window": {
           "type": "object",
           "properties": {
            "lunar_new_year": {
             "type": "string"
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          },
          "status": {
           "type": "string"
          },
          "caps_status": {
           "type": "string"
          },
          "checks": {
           "type": "array",
           "items": {}
          },
          "procedure": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-isms-level": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Vietnam Information System Security Level",
    "description": "Decree 85/2016 and Circular 12/2022 were based on the 2015 Network Information Security Law, which expired on 1/7/2026. Levels now follow the Cybersecurity Law 116/2025/QH15 (art. 8) and Decree 331/2026/NĐ-CP of 19/8/2026. Send the `function` (internal, public_service, infrastructure, industrial_control, other), the `info` processed (public, private, personal, state_secret) and the criteria: `conditional_business`, `admin_procedure`, `basic_subjects` / `sensitive_subjects` (100,000 / 10,000 thresholds), `infra_scope`, `national_egov`, `construction_grade` for industrial control systems, `secret_harm`, `national_data_store`, `nsis` or a `risk_level` from the risk framework.\n\nThe answer gives the level with the matched articles (the highest applies), who appraises and approves (own cybersecurity unit for levels 1–2, the owner for 3, the Ministry of Public Security for 4–5), the deadlines (5 working days for incomplete dossiers, 15 / 25 working days of appraisal, 7 for approval), the dossier, the management and technical requirement groups, cloud segregation rules for levels 3–5, incident reporting (24 h / 72 h), the annual report (20/12 and 25/12) and the transition dates. `format=docx` returns a dossier skeleton.\n\nThe baseline standard is TCVN 14423:2026 (only group names are given, standards are copyrighted). Reviewed every 90 days while ministry guidance is pending.\n\nDocs: https://apibox.io.vn/docs/vn-isms-level/",
    "operationId": "vnIsmsLevelGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-isms-level/"
    },
    "parameters": [
     {
      "name": "function",
      "in": "query",
      "required": false,
      "description": "internal, public_service, infrastructure, industrial_control, other (empty = help).",
      "schema": {
       "type": "string"
      },
      "example": "public_service"
     },
     {
      "name": "info",
      "in": "query",
      "required": false,
      "description": "Information processed: public, private, personal, state_secret (comma list).",
      "schema": {
       "type": "string"
      },
      "example": "personal"
     },
     {
      "name": "basic_subjects",
      "in": "query",
      "required": false,
      "description": "Number of people whose basic personal data is processed.",
      "schema": {
       "type": "number"
      },
      "example": 250000
     },
     {
      "name": "sensitive_subjects",
      "in": "query",
      "required": false,
      "description": "Number of people whose sensitive personal data is processed.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "conditional_business",
      "in": "query",
      "required": false,
      "description": "Online service in a conditional business line.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "admin_procedure",
      "in": "query",
      "required": false,
      "description": "Handles administrative procedures.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "infra_scope",
      "in": "query",
      "required": false,
      "description": "Infrastructure scope: one_org, sector, national, international.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "construction_grade",
      "in": "query",
      "required": false,
      "description": "Industrial control: grade of the works (IV, III, II, I, special).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "risk_level",
      "in": "query",
      "required": false,
      "description": "Level from the cybersecurity risk framework (1–5).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`docx` for a dossier skeleton (with system_name, owner).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "function": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "info": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "level": {
           "type": "number"
          },
          "national_security_important": {
           "type": "boolean"
          },
          "reasons": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "level": {
              "type": "number"
             },
             "ref": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "approval": {
           "type": "object",
           "properties": {
            "appraisal": {
             "type": "string"
            },
            "approval": {
             "type": "string"
            },
            "appraisal_days": {
             "type": "number"
            },
            "incomplete_dossier_reply_days": {
             "type": "number"
            },
            "approval_processing_days": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "dossier": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "requirements": {
           "type": "object",
           "properties": {
            "management": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "technical": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "level_specific": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "transition": {
           "type": "object",
           "properties": {
            "deadline_conditions": {
             "type": "string"
            },
            "deadline_legacy_approval": {
             "type": "string"
            },
            "overdue_conditions": {
             "type": "boolean"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "function": {
          "id": "public_service",
          "vi": "Hệ thống phục vụ người dân, doanh nghiệp – dịch vụ trực tuyến, dịch vụ công (điểm b)"
         },
         "info": [
          "personal"
         ],
         "level": 3,
         "national_security_important": false,
         "reasons": [
          {
           "level": 3,
           "ref": "NĐ 331/2026/NĐ-CP Điều 13 khoản 2 điểm c",
           "vi": "Xử lý thông tin riêng / cá nhân của 250000 chủ thể (dữ liệu cơ bản, ≥ 100.000)"
          }
         ],
         "approval": {
          "appraisal": "Đơn vị chuyên trách về an ninh mạng của chủ quản",
          "approval": "Chủ quản hệ thống thông tin",
          "appraisal_days": 15,
          "incomplete_dossier_reply_days": 5,
          "approval_processing_days": 7,
          "unit": "working days",
          "ref": "NĐ 331/2026/NĐ-CP Điều 18 khoản 2; Điều 23 khoản 3 điểm a"
         },
         "dossier": [
          "Tài liệu mô tả, thuyết minh tổng quan về hệ thống thông tin (chủ quản, đơn vị vận hành, phạm vi, quy mô, kiến trúc lô-gic / vật lý, danh mục thiết bị, ứng dụng)",
          "…"
         ],
         "requirements": {
          "management": [
           "Thiết lập chính sách an ninh mạng",
           "…"
          ],
          "technical": [
           "Bảo đảm an toàn mạng",
           "Bảo đảm an toàn máy chủ",
           "Bảo đảm an toàn ứng dụng",
           "Bảo đảm an toàn dữ liệu"
          ],
          "level_specific": [
           "Thuê trung tâm dữ liệu / điện toán đám mây: hệ thống tách riêng về lô-gic, vùng mạng tách riêng, phân vùng lưu trữ tách lô-gic (Điều 30 khoản 8)",
           "…"
          ]
         },
         "transition": {
          "deadline_conditions": "2027-06-30",
          "deadline_legacy_approval": "2026-12-31",
          "overdue_conditions": false
         },
         "reviewed": "2026-11-16",
         "review_cadence_days": 90,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Vietnam Information System Security Level",
    "description": "Decree 85/2016 and Circular 12/2022 were based on the 2015 Network Information Security Law, which expired on 1/7/2026. Levels now follow the Cybersecurity Law 116/2025/QH15 (art. 8) and Decree 331/2026/NĐ-CP of 19/8/2026. Send the `function` (internal, public_service, infrastructure, industrial_control, other), the `info` processed (public, private, personal, state_secret) and the criteria: `conditional_business`, `admin_procedure`, `basic_subjects` / `sensitive_subjects` (100,000 / 10,000 thresholds), `infra_scope`, `national_egov`, `construction_grade` for industrial control systems, `secret_harm`, `national_data_store`, `nsis` or a `risk_level` from the risk framework.\n\nThe answer gives the level with the matched articles (the highest applies), who appraises and approves (own cybersecurity unit for levels 1–2, the owner for 3, the Ministry of Public Security for 4–5), the deadlines (5 working days for incomplete dossiers, 15 / 25 working days of appraisal, 7 for approval), the dossier, the management and technical requirement groups, cloud segregation rules for levels 3–5, incident reporting (24 h / 72 h), the annual report (20/12 and 25/12) and the transition dates. `format=docx` returns a dossier skeleton.\n\nThe baseline standard is TCVN 14423:2026 (only group names are given, standards are copyrighted). Reviewed every 90 days while ministry guidance is pending.\n\nDocs: https://apibox.io.vn/docs/vn-isms-level/",
    "operationId": "vnIsmsLevelPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-isms-level/"
    },
    "parameters": [
     {
      "name": "function",
      "in": "query",
      "required": false,
      "description": "internal, public_service, infrastructure, industrial_control, other (empty = help).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "info",
      "in": "query",
      "required": false,
      "description": "Information processed: public, private, personal, state_secret (comma list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "basic_subjects",
      "in": "query",
      "required": false,
      "description": "Number of people whose basic personal data is processed.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sensitive_subjects",
      "in": "query",
      "required": false,
      "description": "Number of people whose sensitive personal data is processed.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "conditional_business",
      "in": "query",
      "required": false,
      "description": "Online service in a conditional business line.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "admin_procedure",
      "in": "query",
      "required": false,
      "description": "Handles administrative procedures.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "infra_scope",
      "in": "query",
      "required": false,
      "description": "Infrastructure scope: one_org, sector, national, international.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "construction_grade",
      "in": "query",
      "required": false,
      "description": "Industrial control: grade of the works (IV, III, II, I, special).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "risk_level",
      "in": "query",
      "required": false,
      "description": "Level from the cybersecurity risk framework (1–5).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`docx` for a dossier skeleton (with system_name, owner).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "function": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            }
           }
          },
          "info": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "level": {
           "type": "number"
          },
          "national_security_important": {
           "type": "boolean"
          },
          "reasons": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "level": {
              "type": "number"
             },
             "ref": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             }
            }
           }
          },
          "approval": {
           "type": "object",
           "properties": {
            "appraisal": {
             "type": "string"
            },
            "approval": {
             "type": "string"
            },
            "appraisal_days": {
             "type": "number"
            },
            "incomplete_dossier_reply_days": {
             "type": "number"
            },
            "approval_processing_days": {
             "type": "number"
            },
            "unit": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "dossier": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "requirements": {
           "type": "object",
           "properties": {
            "management": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "technical": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "level_specific": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "transition": {
           "type": "object",
           "properties": {
            "deadline_conditions": {
             "type": "string"
            },
            "deadline_legacy_approval": {
             "type": "string"
            },
            "overdue_conditions": {
             "type": "boolean"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-data-law": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Vietnam Data Law Core / Important Data",
    "description": "Send a description `q` of the dataset and the counts that drive the quantitative items: `basic_citizens` and `sensitive_citizens` (Vietnamese citizens whose basic / sensitive data you hold) and `org_financial_records` (Vietnamese organisations whose bank accounts, payment history or debts you hold), plus `state_held`, `public` and the `activity` (store, share, cross_border, foreign_cloud). Decision 20/2025/QĐ-TTg makes non-public data of ≥ 1,000,000 citizens (basic), ≥ 100,000 (sensitive) or ≥ 100,000 organisations core data, and 100,000 / 10,000 / 10,000 important data; other items are sector lists, suggested by keyword with a `confidence`.\n\nObligations for core and important data come from Decree 165/2025/NĐ-CP: data-protection officer and unit, logs kept ≥ 6 months, yearly risk report, drills every 6 months, outsourcing contracts and 3-year records, proof of irreversible deletion. Cross-border transfers (including processing on a platform abroad): core data needs an assessment by the Ministry of Public Security (10 days, up to 15) before transfer; important data needs a prior dossier sent 15 days before; three exemptions (emergencies, cross-border HR, contract necessity) report within 15 days after.\n\nThe list is broad: when nothing matches the API answers `no_match`, never \"not covered\". Personal data: see `/v1/vn-pdp-dossier`. `list=all` returns the annex. Reviewed every 90 days.\n\nDocs: https://apibox.io.vn/docs/vn-data-law/",
    "operationId": "vnDataLawGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-data-law/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Description of the dataset.",
      "schema": {
       "type": "string"
      },
      "example": "CRM khách hàng thương mại điện tử"
     },
     {
      "name": "basic_citizens",
      "in": "query",
      "required": false,
      "description": "Vietnamese citizens whose basic personal data is held (cumulative).",
      "schema": {
       "type": "number"
      },
      "example": 1500000
     },
     {
      "name": "sensitive_citizens",
      "in": "query",
      "required": false,
      "description": "Citizens whose sensitive data is held.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "org_financial_records",
      "in": "query",
      "required": false,
      "description": "Vietnamese organisations whose bank accounts / payments / debts are held.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "activity",
      "in": "query",
      "required": false,
      "description": "store, share, cross_border, foreign_cloud, outsource (comma list).",
      "schema": {
       "type": "string"
      },
      "example": "cross_border"
     },
     {
      "name": "state_held",
      "in": "query",
      "required": false,
      "description": "Data collected / managed by a state body.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "public",
      "in": "query",
      "required": false,
      "description": "Data already public (the list covers non-public data).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "contract_necessity",
      "in": "query",
      "required": false,
      "description": "Exemption: transfer needed to sign / perform a contract (also emergency, cross_border_hr).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`core`, `important` or `all`: the annex.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "classification": {
           "type": "string"
          },
          "confidence": {
           "type": "string"
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "category": {
              "type": "string"
             },
             "no": {
              "type": "number"
             },
             "vi": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "confidence": {
              "type": "string"
             }
            }
           }
          },
          "obligations": {
           "type": "array",
           "items": {}
          },
          "cross_border": {
           "type": "object",
           "properties": {
            "required": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "review_days": {
             "type": "number"
            },
            "max_days": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "classification": "core",
         "confidence": "high",
         "matches": [
          {
           "category": "core",
           "no": 26,
           "vi": "Dữ liệu công dân cơ bản của ≥ 1.000.000 công dân Việt Nam",
           "basis": "basic_citizens = 1500000",
           "confidence": "high"
          }
         ],
         "obligations": [
          {
           "id": "classify",
           "en": "Classify data as core / important / other",
           "ref": "Luật Dữ liệu Điều 13 khoản 1–2"
          },
          {
           "id": "dpo",
           "en": "Appoint a data-protection officer and unit; confidentiality undertakings; yearly training",
           "ref": "NĐ 165/2025 Điều 18"
          },
          {
           "id": "logs",
           "en": "Processing logs kept at least 6 months",
           "ref": "NĐ 165/2025 Điều 17 khoản 10"
          },
          "…"
         ],
         "cross_border": {
          "required": "prior_assessment_by_ministry",
          "vi": "Dữ liệu cốt lõi: gửi hồ sơ đánh giá tác động (Báo cáo Mẫu số 02 + văn bản giao kết với bên nhận) tới Bộ Công an (quân sự, quốc phòng, cơ yếu: Bộ Quốc phòng); kết quả trong 10 ngày (phức tạp: không quá 15 ngày) kể từ khi hồ sơ hợp lệ; chỉ chuyển sau khi có kết quả đạt",
          "review_days": 10,
          "max_days": 15,
          "ref": "NĐ 165/2025 Điều 12 khoản 1–5",
          "…": "…"
         },
         "reviewed": "2026-11-16",
         "review_cadence_days": 90,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Vietnam Data Law Core / Important Data",
    "description": "Send a description `q` of the dataset and the counts that drive the quantitative items: `basic_citizens` and `sensitive_citizens` (Vietnamese citizens whose basic / sensitive data you hold) and `org_financial_records` (Vietnamese organisations whose bank accounts, payment history or debts you hold), plus `state_held`, `public` and the `activity` (store, share, cross_border, foreign_cloud). Decision 20/2025/QĐ-TTg makes non-public data of ≥ 1,000,000 citizens (basic), ≥ 100,000 (sensitive) or ≥ 100,000 organisations core data, and 100,000 / 10,000 / 10,000 important data; other items are sector lists, suggested by keyword with a `confidence`.\n\nObligations for core and important data come from Decree 165/2025/NĐ-CP: data-protection officer and unit, logs kept ≥ 6 months, yearly risk report, drills every 6 months, outsourcing contracts and 3-year records, proof of irreversible deletion. Cross-border transfers (including processing on a platform abroad): core data needs an assessment by the Ministry of Public Security (10 days, up to 15) before transfer; important data needs a prior dossier sent 15 days before; three exemptions (emergencies, cross-border HR, contract necessity) report within 15 days after.\n\nThe list is broad: when nothing matches the API answers `no_match`, never \"not covered\". Personal data: see `/v1/vn-pdp-dossier`. `list=all` returns the annex. Reviewed every 90 days.\n\nDocs: https://apibox.io.vn/docs/vn-data-law/",
    "operationId": "vnDataLawPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-data-law/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Description of the dataset.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "basic_citizens",
      "in": "query",
      "required": false,
      "description": "Vietnamese citizens whose basic personal data is held (cumulative).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sensitive_citizens",
      "in": "query",
      "required": false,
      "description": "Citizens whose sensitive data is held.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "org_financial_records",
      "in": "query",
      "required": false,
      "description": "Vietnamese organisations whose bank accounts / payments / debts are held.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "activity",
      "in": "query",
      "required": false,
      "description": "store, share, cross_border, foreign_cloud, outsource (comma list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "state_held",
      "in": "query",
      "required": false,
      "description": "Data collected / managed by a state body.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "public",
      "in": "query",
      "required": false,
      "description": "Data already public (the list covers non-public data).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "contract_necessity",
      "in": "query",
      "required": false,
      "description": "Exemption: transfer needed to sign / perform a contract (also emergency, cross_border_hr).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "list",
      "in": "query",
      "required": false,
      "description": "`core`, `important` or `all`: the annex.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "classification": {
           "type": "string"
          },
          "confidence": {
           "type": "string"
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "category": {
              "type": "string"
             },
             "no": {
              "type": "number"
             },
             "vi": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "confidence": {
              "type": "string"
             }
            }
           }
          },
          "obligations": {
           "type": "array",
           "items": {}
          },
          "cross_border": {
           "type": "object",
           "properties": {
            "required": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "review_days": {
             "type": "number"
            },
            "max_days": {
             "type": "number"
            },
            "ref": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-esign-rules": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Vietnam E-Signature Rules and CA Check",
    "description": "`action=requirement` with a `transaction` (commercial_contract, labour_contract, e_invoice, tax_filing, customs_declaration, social_insurance, bidding, enterprise_registration, state_document, notarised_document, land_transfer, accounting_documents, bank_transaction, internal_documents, e_commerce_order, foreign_signature) returns the signature level that is enough – any e-signature the parties accept, a certified secure specialised e-signature or digital signature (equal to a handwritten one), the organisation’s digital signature, the official public-service signature, or notarisation – with the article and a `verified` flag (sector rules that could not be checked against the official text are marked unverified).\n\n`action=certificate` with a `certificate` (PEM, base64 DER or a file) parses the X.509 certificate, verifies its chain against the root and CA certificates published by NEAC (rootca.gov.vn) and the Government Cipher Committee, and says whether it is a public digital signature from a licensed CA, an official (cơ yếu) certificate or not in the Vietnamese list, plus validity dates. Revocation is not checked.\n\nRules: Law on Electronic Transactions 20/2023/QH15 (from 1/7/2024), Decree 23/2025/NĐ-CP (from 10/4/2025, replacing Decrees 130/2018 and 48/2024). The API never signs anything. Coverage: 16 common transaction types.\n\nDocs: https://apibox.io.vn/docs/vn-esign-rules/",
    "operationId": "vnEsignRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-esign-rules/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`requirement` or `certificate` (inferred from the other fields).",
      "schema": {
       "type": "string"
      },
      "example": "requirement"
     },
     {
      "name": "transaction",
      "in": "query",
      "required": false,
      "description": "Transaction id (requirement).",
      "schema": {
       "type": "string"
      },
      "example": "e_invoice"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "transaction": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "required": {
           "type": "object",
           "properties": {
            "level": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "timestamp_recommended": {
           "type": "boolean"
          },
          "ref": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "verified": {
           "type": "boolean"
          },
          "general": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "check_certificate": {
           "type": "string"
          },
          "verify_pdf": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "transaction": {
          "id": "e_invoice",
          "vi": "Hóa đơn điện tử",
          "en": "E-invoice"
         },
         "required": {
          "level": "public_digital_org",
          "vi": "Chữ ký số của tổ chức (doanh nghiệp) – chứng thư số công cộng cấp cho tổ chức",
          "en": "Digital signature of the organisation (public certificate issued to the company)"
         },
         "timestamp_recommended": true,
         "ref": "Nghị định 123/2020/NĐ-CP Điều 10 khoản 7 điểm b, khoản 14 (sửa bởi NĐ 70/2025/NĐ-CP)",
         "note": "Seller signs with the organisation’s digital signature (individual sellers: own or authorised person’s). Buyer’s signature is not required; some invoices (supermarket retail, fuel, stamps / tickets, tax-authority invoices per transaction) need no signature. See /v1/vn-einvoice.",
         "verified": true,
         "general": [
          "An electronic signature is not denied legal effect only because it is electronic (Luật GDĐT Điều 23 khoản 1).",
          "…"
         ],
         "check_certificate": "/v1/vn-esign-rules?action=certificate",
         "verify_pdf": "/v1/pdf-sign-verify",
         "reviewed": "2026-11-16",
         "review_cadence_days": 90,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Vietnam E-Signature Rules and CA Check",
    "description": "`action=requirement` with a `transaction` (commercial_contract, labour_contract, e_invoice, tax_filing, customs_declaration, social_insurance, bidding, enterprise_registration, state_document, notarised_document, land_transfer, accounting_documents, bank_transaction, internal_documents, e_commerce_order, foreign_signature) returns the signature level that is enough – any e-signature the parties accept, a certified secure specialised e-signature or digital signature (equal to a handwritten one), the organisation’s digital signature, the official public-service signature, or notarisation – with the article and a `verified` flag (sector rules that could not be checked against the official text are marked unverified).\n\n`action=certificate` with a `certificate` (PEM, base64 DER or a file) parses the X.509 certificate, verifies its chain against the root and CA certificates published by NEAC (rootca.gov.vn) and the Government Cipher Committee, and says whether it is a public digital signature from a licensed CA, an official (cơ yếu) certificate or not in the Vietnamese list, plus validity dates. Revocation is not checked.\n\nRules: Law on Electronic Transactions 20/2023/QH15 (from 1/7/2024), Decree 23/2025/NĐ-CP (from 10/4/2025, replacing Decrees 130/2018 and 48/2024). The API never signs anything. Coverage: 16 common transaction types.\n\nDocs: https://apibox.io.vn/docs/vn-esign-rules/",
    "operationId": "vnEsignRulesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-esign-rules/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "`requirement` or `certificate` (inferred from the other fields)."
         },
         "transaction": {
          "type": "string",
          "description": "Transaction id (requirement)."
         },
         "certificate": {
          "type": "string",
          "description": "X.509 certificate: PEM or base64 DER (or a multipart file `certificate`)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "transaction": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "required": {
           "type": "object",
           "properties": {
            "level": {
             "type": "string"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           }
          },
          "timestamp_recommended": {
           "type": "boolean"
          },
          "ref": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "verified": {
           "type": "boolean"
          },
          "general": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "check_certificate": {
           "type": "string"
          },
          "verify_pdf": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-material-norms": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Concrete & Mortar Mix Norms (TT 38/2026)",
    "description": "Looks up the material norms of Circular 38/2026/TT-BXD, Appendix VII (in force 1 July 2026, replacing Circular 12/2021): concrete mixes 11.11000–11.13000 for PCB30, PC40 / PCB40 and PCB40 with ground slag S95 by grade (M100–M600, or strength class B3.5–B45), slump and maximum stone size; masonry / plaster mortar mixes 12.10100–12.10200 (lime-cement or cement-sand, coarse or fine sand); clay, hollow, concrete and silicate brick masonry 12.21–12.23; plastering and screeding 12.31; and the loss rates of Part 3 (construction, concrete, transfer, transport and storage).\n\n`action=bill` turns quantities (m³ of concrete, m³ of brickwork, m² of plaster) into total cement (kg and 50 kg bags), sand, stone, water, lime and bricks, with and without losses, showing every code and loss rate used.\n\nThe tables are imported automatically from the signed PDF on datafiles.chinhphu.vn by a builder that cross-checks every row; misprints of the official text (duplicate codes) are flagged. Norms are the basis for estimates: real mixes must be designed by laboratory tests. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-material-norms/",
    "operationId": "vnMaterialNormsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-material-norms/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`concrete`, `mortar`, `code`, `losses`, `bill` or `list` (default: inferred; alias `table`).",
      "schema": {
       "type": "string"
      },
      "example": "concrete"
     },
     {
      "name": "grade",
      "in": "query",
      "required": false,
      "description": "Concrete grade (mác), e.g. 250; or `strength_class` B20.",
      "schema": {
       "type": "number"
      },
      "example": 250
     },
     {
      "name": "cement",
      "in": "query",
      "required": false,
      "description": "PCB30, PCB40 (= PC40) or PCB40_S95.",
      "schema": {
       "type": "string",
       "default": "PCB30"
      },
      "example": "PCB30"
     },
     {
      "name": "slump",
      "in": "query",
      "required": false,
      "description": "Slump in cm: 0.5-1, 2-4, 6-8, 10-12, 14-17, 18-22 (S95: 12±2…) or a number.",
      "schema": {
       "type": "string",
       "default": "6-8"
      },
      "example": "6-8"
     },
     {
      "name": "dmax",
      "in": "query",
      "required": false,
      "description": "Maximum stone size, mm: 10, 20, 40, 70.",
      "schema": {
       "type": "number",
       "default": 20
      },
      "example": 20
     },
     {
      "name": "volume_m3",
      "in": "query",
      "required": false,
      "description": "Optional volume for totals.",
      "schema": {
       "type": "number"
      },
      "example": 10
     },
     {
      "name": "mortar_grade",
      "in": "query",
      "required": false,
      "description": "Mortar grade (action=mortar), with `mortar_type` (cement_sand | lime_cement) and `sand` (coarse | fine | very_fine).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Norm code (mã hiệu), e.g. 11.11324, 12.21103, 21.1135.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "cement": {
           "type": "string"
          },
          "grade": {
           "type": "number"
          },
          "strength_class": {
           "type": "string"
          },
          "slump_cm": {
           "type": "string"
          },
          "dmax_mm": {
           "type": "number"
          },
          "per_m3": {
           "type": "object",
           "properties": {
            "cement_kg": {
             "type": "number"
            },
            "sand_m3": {
             "type": "number"
            },
            "stone_m3": {
             "type": "number"
            },
            "water_l": {
             "type": "number"
            },
            "admixture": {}
           }
          },
          "volume_m3": {
           "type": "number"
          },
          "total": {
           "type": "object",
           "properties": {
            "cement_kg": {
             "type": "number"
            },
            "cement_bags_50kg": {
             "type": "number"
            },
            "sand_m3": {
             "type": "number"
            },
            "stone_m3": {
             "type": "number"
            },
            "water_l": {
             "type": "number"
            }
           }
          },
          "total_note": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "included": {
             "type": "string"
            },
            "not_included": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "doc": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "sha256": {
             "type": "string"
            }
           }
          },
          "unverified": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "code": "11.11324",
         "cement": "PCB30",
         "grade": 250,
         "strength_class": "B20",
         "slump_cm": "6-8",
         "dmax_mm": 20,
         "per_m3": {
          "cement_kg": 372,
          "sand_m3": 0.486,
          "stone_m3": 0.793,
          "water_l": 191,
          "admixture": null
         },
         "volume_m3": 10,
         "total": {
          "cement_kg": 3720,
          "cement_bags_50kg": 74.4,
          "sand_m3": 4.86,
          "stone_m3": 7.93,
          "water_l": 1910
         },
         "total_note": "Without losses; use action=bill for construction / concrete losses.",
         "note": "Quantities exclude transport, storage and construction losses (PL VII Chương I mục I.1). Sand: cát vàng; stone: đá dăm. Admixture dose per mục I.4 (dẻo hóa 0,5–0,8 %, siêu dẻo 0,5–1,0 %, poly 0,5–1,5 % of cement mass).",
         "coverage": {
          "included": "PL VII Chương I mục I (11.11000 PCB30, 11.12000 PC40 & PCB40, 11.13000 PCB40 + slag S95: cement, sand, stone, water per 1 m³), Chương II 12.10100–12.10200 (masonry / plaster mortar), 12.21000–12.23000 (clay, hollow, c…",
          "not_included": "Special concretes 11.21000 and the adjustments of Chương I mục II (waterproof, fine-sand, flexural, non-shrink concrete), formwork 11.3–11.5, special mortars 12.10300–12.10400, stone / refractory masonry 12.24–12.25, …"
         },
         "legal": [
          {
           "ref": "Thông tư 38/2026/TT-BXD ngày 26/6/2026 ban hành định mức xây dựng — Phụ lục VII Định mức sử dụng vật liệu xây dựng",
           "effective_from": "2026-07-01",
           "url": "https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/7/38.2026.tt-bxd-pl7dmdtvatlieu_signed1.pdf"
          },
          {
           "ref": "Thông tư 12/2021/TT-BXD (Phụ lục VII cũ), TT 09/2024/TT-BXD, TT 08/2025/TT-BXD — hết hiệu lực từ 01/7/2026 (Điều 2 TT 38/2026)",
           "effective_to": "2026-06-30"
          }
         ],
         "source": {
          "doc": "Thông tư 38/2026/TT-BXD, Phụ lục VII — Định mức sử dụng vật liệu xây dựng",
          "url": "https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/7/38.2026.tt-bxd-pl7dmdtvatlieu_signed1.pdf",
          "sha256": "de6c99f53053abf453b1dcf20e4790f92b3d79f5cd22e621fe2ddfe0fb6672d4"
         },
         "unverified": "Tables imported automatically from the signed PDF and cross-checked; pending review by an estimating expert.",
         "disclaimer": "Reference only, not legal / estimating advice; check the official text. Actual mixes must be designed by laboratory tests.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý / dự toán; hãy đối chiếu văn bản chính thức. Cấp phối thực tế phải thí nghiệm xác định.",
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Concrete & Mortar Mix Norms (TT 38/2026)",
    "description": "Looks up the material norms of Circular 38/2026/TT-BXD, Appendix VII (in force 1 July 2026, replacing Circular 12/2021): concrete mixes 11.11000–11.13000 for PCB30, PC40 / PCB40 and PCB40 with ground slag S95 by grade (M100–M600, or strength class B3.5–B45), slump and maximum stone size; masonry / plaster mortar mixes 12.10100–12.10200 (lime-cement or cement-sand, coarse or fine sand); clay, hollow, concrete and silicate brick masonry 12.21–12.23; plastering and screeding 12.31; and the loss rates of Part 3 (construction, concrete, transfer, transport and storage).\n\n`action=bill` turns quantities (m³ of concrete, m³ of brickwork, m² of plaster) into total cement (kg and 50 kg bags), sand, stone, water, lime and bricks, with and without losses, showing every code and loss rate used.\n\nThe tables are imported automatically from the signed PDF on datafiles.chinhphu.vn by a builder that cross-checks every row; misprints of the official text (duplicate codes) are flagged. Norms are the basis for estimates: real mixes must be designed by laboratory tests. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-material-norms/",
    "operationId": "vnMaterialNormsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-material-norms/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`concrete`, `mortar`, `code`, `losses`, `bill` or `list` (default: inferred; alias `table`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "grade",
      "in": "query",
      "required": false,
      "description": "Concrete grade (mác), e.g. 250; or `strength_class` B20.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cement",
      "in": "query",
      "required": false,
      "description": "PCB30, PCB40 (= PC40) or PCB40_S95.",
      "schema": {
       "type": "string",
       "default": "PCB30"
      }
     },
     {
      "name": "slump",
      "in": "query",
      "required": false,
      "description": "Slump in cm: 0.5-1, 2-4, 6-8, 10-12, 14-17, 18-22 (S95: 12±2…) or a number.",
      "schema": {
       "type": "string",
       "default": "6-8"
      }
     },
     {
      "name": "dmax",
      "in": "query",
      "required": false,
      "description": "Maximum stone size, mm: 10, 20, 40, 70.",
      "schema": {
       "type": "number",
       "default": 20
      }
     },
     {
      "name": "volume_m3",
      "in": "query",
      "required": false,
      "description": "Optional volume for totals.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "mortar_grade",
      "in": "query",
      "required": false,
      "description": "Mortar grade (action=mortar), with `mortar_type` (cement_sand | lime_cement) and `sand` (coarse | fine | very_fine).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Norm code (mã hiệu), e.g. 11.11324, 12.21103, 21.1135.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "action=bill: [{type: concrete|masonry|plaster|mortar, volume_m3 | area_m2, grade, brick, thickness_cm, element, mortar_grade, placement}]; `losses=false` to skip losses."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "cement": {
           "type": "string"
          },
          "grade": {
           "type": "number"
          },
          "strength_class": {
           "type": "string"
          },
          "slump_cm": {
           "type": "string"
          },
          "dmax_mm": {
           "type": "number"
          },
          "per_m3": {
           "type": "object",
           "properties": {
            "cement_kg": {
             "type": "number"
            },
            "sand_m3": {
             "type": "number"
            },
            "stone_m3": {
             "type": "number"
            },
            "water_l": {
             "type": "number"
            },
            "admixture": {}
           }
          },
          "volume_m3": {
           "type": "number"
          },
          "total": {
           "type": "object",
           "properties": {
            "cement_kg": {
             "type": "number"
            },
            "cement_bags_50kg": {
             "type": "number"
            },
            "sand_m3": {
             "type": "number"
            },
            "stone_m3": {
             "type": "number"
            },
            "water_l": {
             "type": "number"
            }
           }
          },
          "total_note": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "included": {
             "type": "string"
            },
            "not_included": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "doc": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "sha256": {
             "type": "string"
            }
           }
          },
          "unverified": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-consulting-fee": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Project Management & Consulting Fee (TT 38/2026)",
    "description": "Computes the norm rates of Circular 38/2026/TT-BXD, Appendix VIII (in force 1 July 2026): project management (Table 1.1), investment-policy proposal, pre-feasibility and feasibility studies, economic-technical reports (2.1–2.6), design by work type, class and design steps (2.7–2.16, with the 55 % / 60 % shop-drawing share and Table DD1 for equipment-heavy civil works), reviews of studies, design and estimates (2.17–2.20, with minimum fees), tender documents and bid evaluation (2.21–2.23, split 45 / 55 %) and supervision of works, equipment installation and surveys (2.24–2.26).\n\nRates between two scales use formula (1) of the circular, Nt = Nb − (Nb − Na)/(Ga − Gb) × (Gt − Gb), shown step by step; scales above an open table go by estimate and are returned as null with the reason. Adjustment coefficients (remote / island areas, multi-province, self-managed, equipment ≥ 50 %, renovation, typical design, national important project, equipment ≥ 25 % for estimate reviews) are applied and listed.\n\nAll amounts exclude VAT. Tables are imported from the signed PDF and spot-checked; an estimating expert should confirm before use. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-consulting-fee/",
    "operationId": "vnConsultingFeeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-consulting-fee/"
    },
    "parameters": [
     {
      "name": "work_type",
      "in": "query",
      "required": true,
      "description": "`civil`, `industrial`, `transport`, `agriculture` or `infrastructure` (Vietnamese names accepted).",
      "schema": {
       "type": "string"
      },
      "example": "civil"
     },
     {
      "name": "construction_cost",
      "in": "query",
      "required": true,
      "description": "Construction cost, VND excluding VAT.",
      "schema": {
       "type": "number"
      },
      "example": 120000000000
     },
     {
      "name": "equipment_cost",
      "in": "query",
      "required": false,
      "description": "Equipment cost, VND excluding VAT.",
      "schema": {
       "type": "number"
      },
      "example": 30000000000
     },
     {
      "name": "construction_class",
      "in": "query",
      "required": false,
      "description": "special, I, II, III, IV (needed for design).",
      "schema": {
       "type": "string"
      },
      "example": "III"
     },
     {
      "name": "design_steps",
      "in": "query",
      "required": false,
      "description": "2 = shop drawings only, 3 = technical design + shop drawings.",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "services",
      "in": "query",
      "required": false,
      "description": "Comma list, e.g. project_management,feasibility,design,review_design,review_estimate,bidding_construction,supervision_construction,supervision_equipment.",
      "schema": {
       "type": "string"
      },
      "example": "project_management,design,supervision_construction"
     },
     {
      "name": "remote_area",
      "in": "query",
      "required": false,
      "description": "Sea, island, land border or extremely difficult commune (PM × 1.35, supervision × 1.2). Also multi_province, self_managed, renovation, typical_design, national_important, k.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "approval_date",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DD; before 2026-07-01 adds the transitional warning.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "work_type": {
           "type": "string"
          },
          "work_type_vi": {
           "type": "string"
          },
          "construction_cost": {
           "type": "number"
          },
          "equipment_cost": {
           "type": "number"
          },
          "construction_class": {
           "type": "string"
          },
          "design_steps": {
           "type": "number"
          },
          "services": {
           "type": "array",
           "items": {}
          },
          "total_vnd": {
           "type": "number"
          },
          "vat": {
           "type": "string"
          },
          "formula": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "source": {
           "type": "object",
           "properties": {
            "doc": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "sha256": {
             "type": "string"
            }
           }
          },
          "unverified": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "work_type": "civil",
         "work_type_vi": "Công trình dân dụng",
         "construction_cost": 120000000000,
         "equipment_cost": 30000000000,
         "construction_class": "III",
         "design_steps": 2,
         "services": [
          {
           "service": "project_management",
           "name_vi": "Chi phí quản lý dự án",
           "name_en": "Project management",
           "table": "Bảng 1.1",
           "base": "construction_cost + equipment_cost",
           "base_vnd": 150000000000,
           "rate_pct": 1.9515,
           "interpolation": "Nt = Nb − (Nb − Na)/(Ga − Gb) × (Gt − Gb) = 2.017 − (2.017 − 1.886)/(200 − 100) × (150 − 100) = 1.9515 %",
           "k": [],
           "amount_vnd": 2927250000,
           "note": "Excludes contingency and the investor's own appraisal costs (Bảng 1.1 notes)."
          },
          {
           "service": "design",
           "name_vi": "Thiết kế xây dựng",
           "name_en": "Construction design",
           "table": "Bảng 2.8",
           "base": "construction_cost",
           "base_vnd": 120000000000,
           "construction_class": "III",
           "rate_pct": 2.214,
           "interpolation": "Nt = Nb − (Nb − Na)/(Ga − Gb) × (Gt − Gb) = 2.25 − (2.25 − 2.07)/(200 − 100) × (120 − 100) = 2.214 %",
           "k": [],
           "amount_vnd": 2656800000,
           "includes": "design documents, cost estimate (12 % of the design cost), technical specifications, maintenance procedure, author supervision, professional liability insurance (mục 3.1, 3.4)"
          },
          "…"
         ],
         "total_vnd": 7726290000,
         "vat": "All rates and amounts exclude VAT.",
         "formula": "Nt = Nb − (Nb − Na)/(Ga − Gb) × (Gt − Gb) (Phụ lục VIII Phần I, công thức (1)); cost = base × Nt × Π k",
         "legal": [
          {
           "ref": "Thông tư 38/2026/TT-BXD ngày 26/6/2026 — Phụ lục VIII Định mức chi phí quản lý dự án và tư vấn xây dựng (Phần I công thức (1); Chương I, II)",
           "effective_from": "2026-07-01",
           "url": "https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/7/38.2026.tt-bxd-pl8dmqldavatvxd_signed1.pdf"
          },
          {
           "ref": "Thông tư 12/2021/TT-BXD Phụ lục VIII (và TT 09/2024, TT 08/2025) — hết hiệu lực từ 01/7/2026",
           "effective_to": "2026-06-30"
          },
          "…"
         ],
         "source": {
          "doc": "Thông tư 38/2026/TT-BXD, Phụ lục VIII — Định mức chi phí quản lý dự án và tư vấn xây dựng",
          "url": "https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/7/38.2026.tt-bxd-pl8dmqldavatvxd_signed1.pdf",
          "sha256": "74738c35c1da28e78cf78903c280efb69d287295c7f88c49b70f75c3d0d9fbbf"
         },
         "unverified": "Rate tables imported automatically from the signed PDF and spot-checked; pending review by an estimating expert.",
         "disclaimer": "Reference only, not legal / estimating advice; check the official text.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý / dự toán; hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Project Management & Consulting Fee (TT 38/2026)",
    "description": "Computes the norm rates of Circular 38/2026/TT-BXD, Appendix VIII (in force 1 July 2026): project management (Table 1.1), investment-policy proposal, pre-feasibility and feasibility studies, economic-technical reports (2.1–2.6), design by work type, class and design steps (2.7–2.16, with the 55 % / 60 % shop-drawing share and Table DD1 for equipment-heavy civil works), reviews of studies, design and estimates (2.17–2.20, with minimum fees), tender documents and bid evaluation (2.21–2.23, split 45 / 55 %) and supervision of works, equipment installation and surveys (2.24–2.26).\n\nRates between two scales use formula (1) of the circular, Nt = Nb − (Nb − Na)/(Ga − Gb) × (Gt − Gb), shown step by step; scales above an open table go by estimate and are returned as null with the reason. Adjustment coefficients (remote / island areas, multi-province, self-managed, equipment ≥ 50 %, renovation, typical design, national important project, equipment ≥ 25 % for estimate reviews) are applied and listed.\n\nAll amounts exclude VAT. Tables are imported from the signed PDF and spot-checked; an estimating expert should confirm before use. Reference only.\n\nDocs: https://apibox.io.vn/docs/vn-consulting-fee/",
    "operationId": "vnConsultingFeePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-consulting-fee/"
    },
    "parameters": [
     {
      "name": "work_type",
      "in": "query",
      "required": false,
      "description": "`civil`, `industrial`, `transport`, `agriculture` or `infrastructure` (Vietnamese names accepted).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "construction_cost",
      "in": "query",
      "required": false,
      "description": "Construction cost, VND excluding VAT.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "equipment_cost",
      "in": "query",
      "required": false,
      "description": "Equipment cost, VND excluding VAT.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "construction_class",
      "in": "query",
      "required": false,
      "description": "special, I, II, III, IV (needed for design).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "design_steps",
      "in": "query",
      "required": false,
      "description": "2 = shop drawings only, 3 = technical design + shop drawings.",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "services",
      "in": "query",
      "required": false,
      "description": "Comma list, e.g. project_management,feasibility,design,review_design,review_estimate,bidding_construction,supervision_construction,supervision_equipment.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "remote_area",
      "in": "query",
      "required": false,
      "description": "Sea, island, land border or extremely difficult commune (PM × 1.35, supervision × 1.2). Also multi_province, self_managed, renovation, typical_design, national_important, k.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "approval_date",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DD; before 2026-07-01 adds the transitional warning.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "work_type": {
           "type": "string"
          },
          "work_type_vi": {
           "type": "string"
          },
          "construction_cost": {
           "type": "number"
          },
          "equipment_cost": {
           "type": "number"
          },
          "construction_class": {
           "type": "string"
          },
          "design_steps": {
           "type": "number"
          },
          "services": {
           "type": "array",
           "items": {}
          },
          "total_vnd": {
           "type": "number"
          },
          "vat": {
           "type": "string"
          },
          "formula": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "source": {
           "type": "object",
           "properties": {
            "doc": {
             "type": "string"
            },
            "url": {
             "type": "string"
            },
            "sha256": {
             "type": "string"
            }
           }
          },
          "unverified": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-construction-contract": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Construction Contract Advance & Payments (ND 210/2026)",
    "description": "Applies Decree 210/2026/NĐ-CP on construction contracts (in force 1 July 2026, replacing Decree 37/2015 and Decree 50/2021): minimum advance by contract type and value (consulting 15 / 20 %, works 10 / 15 / 20 %, supply and EPC 10 %), the 30 % ceiling, the advance guarantee for advances over 1 billion VND, recovery by the time payments reach 80 % of the price, performance security of 2–10 %, the 14-working-day payment deadline and the settlement / liquidation deadlines. Warranty periods and minimum warranty amounts (24 months and 3 % for special and class I works, 12 months and 5 % otherwise) come from Decree 207/2026; the 12 % penalty cap for public investment and PPP from Construction Law 2025 Article 86.\n\n`action=schedule` (or `payments` / `installments`) builds the payment table: accepted value, advance recovered, retention, net payment, cumulative disbursement. `late_amount`, `late_days`, `late_rate_pct` give simple late-payment interest. Contracts signed before 1/7/2026 get the transitional note.\n\nOutside public investment and PPP most terms are agreed by the parties; the public-investment values are then shown as reference. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-construction-contract/",
    "operationId": "vnConstructionContractGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-construction-contract/"
    },
    "parameters": [
     {
      "name": "contract_type",
      "in": "query",
      "required": true,
      "description": "`construction`, `consulting`, `supply` or `epc` (EC, EP, PC, EPC, turnkey, other).",
      "schema": {
       "type": "string"
      },
      "example": "construction"
     },
     {
      "name": "contract_value",
      "in": "query",
      "required": true,
      "description": "Contract price at signing, VND (incl. contingency).",
      "schema": {
       "type": "number"
      },
      "example": 30000000000
     },
     {
      "name": "funding",
      "in": "query",
      "required": false,
      "description": "`public` (public investment / PPP) or `other`.",
      "schema": {
       "type": "string",
       "default": "public"
      },
      "example": "public"
     },
     {
      "name": "construction_class",
      "in": "query",
      "required": false,
      "description": "special, I, II, III, IV (warranty).",
      "schema": {
       "type": "string"
      },
      "example": "II"
     },
     {
      "name": "advance_pct",
      "in": "query",
      "required": false,
      "description": "Agreed advance %, checked against the minimum and the 30 % ceiling. Also performance_security_pct, retention_pct, recovery_pct.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "installments",
      "in": "query",
      "required": false,
      "description": "Number of equal payment periods for the schedule, or `payments` = array of accepted values (VND).",
      "schema": {
       "type": "number"
      },
      "example": 4
     },
     {
      "name": "contract_date",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DD; before 2026-07-01 adds the transitional note.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "late_amount",
      "in": "query",
      "required": false,
      "description": "Late payment amount, with late_days and late_rate_pct (annual %).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "contract_type": {
           "type": "string"
          },
          "contract_type_vi": {
           "type": "string"
          },
          "contract_value": {
           "type": "number"
          },
          "funding": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "advance": {
           "type": "object",
           "properties": {
            "min_pct": {
             "type": "number"
            },
            "max_pct": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "chosen_pct": {
             "type": "number"
            },
            "amount_vnd": {
             "type": "number"
            },
            "guarantee_required": {
             "type": "boolean"
            },
            "guarantee": {
             "type": "string"
            },
            "recovery": {
             "type": "string"
            },
            "price_adjustment": {
             "type": "string"
            }
           }
          },
          "performance_security": {
           "type": "object",
           "properties": {
            "range_pct": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "amount_range_vnd": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "rule": {
             "type": "string"
            },
            "returned": {
             "type": "string"
            }
           }
          },
          "warranty": {
           "type": "object",
           "properties": {
            "min_period_months": {
             "type": "number"
            },
            "min_amount_pct": {
             "type": "number"
            },
            "min_amount_vnd": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "equipment": {
             "type": "string"
            }
           }
          },
          "penalty": {
           "type": "object",
           "properties": {
            "max_pct_of_violated_part": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "payment": {
           "type": "object",
           "properties": {
            "deadline": {
             "type": "string"
            },
            "late_interest": {
             "type": "string"
            }
           }
          },
          "settlement": {
           "type": "object",
           "properties": {
            "settlement_days_max": {
             "type": "number"
            },
            "settlement_days_max_large": {
             "type": "number"
            },
            "liquidation_days_max": {
             "type": "number"
            },
            "liquidation_days_max_large": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "schedule": {
           "type": "object",
           "properties": {
            "retention_pct": {
             "type": "number"
            },
            "recovery_rate_pct": {
             "type": "number"
            },
            "rows": {
             "type": "array",
             "items": {}
            },
            "fully_recovered": {
             "type": "boolean"
            },
            "method": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "agreed_override": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "contract_type": "construction",
         "contract_type_vi": "Hợp đồng thi công xây dựng công trình",
         "contract_value": 30000000000,
         "funding": "public_investment_or_ppp",
         "regime": "NĐ 210/2026/NĐ-CP",
         "advance": {
          "min_pct": 15,
          "max_pct": 30,
          "rule": "works contract 10–50 tỷ: 15 % (điểm i)",
          "chosen_pct": 15,
          "amount_vnd": 4500000000,
          "guarantee_required": true,
          "guarantee": "Advance > 1 tỷ: an advance guarantee of the same value and currency is required before payment; it reduces as the advance is recovered (Điều 12.3.c, d).",
          "recovery": "Recovered through the payments; fully recovered when advance + payments for completed work reach 80 % of the contract price (Điều 12.3.m).",
          "price_adjustment": "The part of the price matching an advance above the minimum is not price-adjusted from the advance date (Điều 12.3.l)."
         },
         "performance_security": {
          "range_pct": [
           2,
           10
          ],
          "amount_range_vnd": [
           600000000,
           3000000000
          ],
          "rule": "2–10 % of the contract price; higher only as allowed by the bidding law; not required in the cases of Luật Đấu thầu Điều 68.2 (Điều 13.2.c, đ).",
          "returned": "After all obligations are met or the contractor has moved to the warranty obligation and handed over the warranty security (Điều 13.2.đ)."
         },
         "warranty": {
          "min_period_months": 12,
          "min_amount_pct": 5,
          "min_amount_vnd": 1500000000,
          "rule": "Public funds: warranty ≥ 12 months from acceptance and ≥ 5 % of the contract value, in cash or a bank warranty guarantee (NĐ 207/2026 Điều 32 khoản 2, 5, 7; NĐ 210/2026 Điều 13.2.g, Điều 20).",
          "equipment": "Equipment: per contract, not shorter than the manufacturer's warranty (Điều 32 khoản 6)."
         },
         "penalty": {
          "max_pct_of_violated_part": 12,
          "rule": "Public investment / PPP: contract penalty ≤ 12 % of the value of the violated part, plus damages as agreed (Luật Xây dựng 2025 Điều 86 khoản 3)."
         },
         "payment": {
          "deadline": "≤ 14 working days after the employer receives a complete valid payment file (Điều 28.4.l); ODA / foreign loans per the treaty (điểm m)",
          "late_interest": "Rate agreed in the contract; if not agreed, the overdue rate published by the contractor's bank for each late period (Điều 28.5). See /v1/vn-late-interest."
         },
         "settlement": {
          "settlement_days_max": 60,
          "settlement_days_max_large": 120,
          "liquidation_days_max": 45,
          "liquidation_days_max_large": 90,
          "rule": "Settlement ≤ 60 days after completion and acceptance (≤ 120 for large, complex contracts) — Điều 30.3; liquidation ≤ 45 days (≤ 90) — Điều 31.3.b."
         },
         "schedule": {
          "retention_pct": 0,
          "recovery_rate_pct": 18.75,
          "rows": [
           {
            "period": 1,
            "accepted_vnd": 7500000000,
            "advance_recovered_vnd": 1406250000,
            "retention_vnd": 0,
            "net_payment_vnd": 6093750000,
            "cumulative_accepted_vnd": 7500000000,
            "advance_outstanding_vnd": 3093750000,
            "cumulative_disbursed_pct": 35.3125
           },
           {
            "period": 2,
            "accepted_vnd": 7500000000,
            "advance_recovered_vnd": 1406250000,
            "retention_vnd": 0,
            "net_payment_vnd": 6093750000,
            "cumulative_accepted_vnd": 15000000000,
            "advance_outstanding_vnd": 1687500000,
            "cumulative_disbursed_pct": 55.625
           },
           "…"
          ],
          "fully_recovered": true,
          "method": "proportional_80: advance / (80 % × price) of each accepted amount, so the advance is recovered when the accepted (= disbursed) value reaches 80 % (default; interpretation of Điều 12.3.m — unverified)",
          "note": "Retention per payment is contractual (agreed_override); amounts exclude price adjustment and VAT."
         },
         "agreed_override": "Within the legal frame the contract may agree other advance schedules, retention and recovery (Điều 12.2); pass advance_pct, performance_security_pct, retention_pct, recovery_pct.",
         "legal": [
          {
           "ref": "Nghị định 210/2026/NĐ-CP ngày 15/6/2026 quy định chi tiết và hướng dẫn thi hành một số điều của Luật Xây dựng về hợp đồng xây dựng — Điều 12, 13, 20, 28, 30, 31, 33",
           "effective_from": "2026-07-01"
          },
          {
           "ref": "Luật Xây dựng số 135/2025/QH15 — Điều 83, 86 (khoản 3: phạt ≤ 12 % với dự án đầu tư công, PPP), 87",
           "effective_from": "2026-07-01"
          },
          "…"
         ],
         "disclaimer": "Reference only, not legal advice; check the official text and the contract.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hợp đồng.",
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Construction Contract Advance & Payments (ND 210/2026)",
    "description": "Applies Decree 210/2026/NĐ-CP on construction contracts (in force 1 July 2026, replacing Decree 37/2015 and Decree 50/2021): minimum advance by contract type and value (consulting 15 / 20 %, works 10 / 15 / 20 %, supply and EPC 10 %), the 30 % ceiling, the advance guarantee for advances over 1 billion VND, recovery by the time payments reach 80 % of the price, performance security of 2–10 %, the 14-working-day payment deadline and the settlement / liquidation deadlines. Warranty periods and minimum warranty amounts (24 months and 3 % for special and class I works, 12 months and 5 % otherwise) come from Decree 207/2026; the 12 % penalty cap for public investment and PPP from Construction Law 2025 Article 86.\n\n`action=schedule` (or `payments` / `installments`) builds the payment table: accepted value, advance recovered, retention, net payment, cumulative disbursement. `late_amount`, `late_days`, `late_rate_pct` give simple late-payment interest. Contracts signed before 1/7/2026 get the transitional note.\n\nOutside public investment and PPP most terms are agreed by the parties; the public-investment values are then shown as reference. Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-construction-contract/",
    "operationId": "vnConstructionContractPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-construction-contract/"
    },
    "parameters": [
     {
      "name": "contract_type",
      "in": "query",
      "required": false,
      "description": "`construction`, `consulting`, `supply` or `epc` (EC, EP, PC, EPC, turnkey, other).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "contract_value",
      "in": "query",
      "required": false,
      "description": "Contract price at signing, VND (incl. contingency).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "funding",
      "in": "query",
      "required": false,
      "description": "`public` (public investment / PPP) or `other`.",
      "schema": {
       "type": "string",
       "default": "public"
      }
     },
     {
      "name": "construction_class",
      "in": "query",
      "required": false,
      "description": "special, I, II, III, IV (warranty).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "advance_pct",
      "in": "query",
      "required": false,
      "description": "Agreed advance %, checked against the minimum and the 30 % ceiling. Also performance_security_pct, retention_pct, recovery_pct.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "installments",
      "in": "query",
      "required": false,
      "description": "Number of equal payment periods for the schedule, or `payments` = array of accepted values (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "contract_date",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DD; before 2026-07-01 adds the transitional note.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "late_amount",
      "in": "query",
      "required": false,
      "description": "Late payment amount, with late_days and late_rate_pct (annual %).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "contract_type": {
           "type": "string"
          },
          "contract_type_vi": {
           "type": "string"
          },
          "contract_value": {
           "type": "number"
          },
          "funding": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "advance": {
           "type": "object",
           "properties": {
            "min_pct": {
             "type": "number"
            },
            "max_pct": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "chosen_pct": {
             "type": "number"
            },
            "amount_vnd": {
             "type": "number"
            },
            "guarantee_required": {
             "type": "boolean"
            },
            "guarantee": {
             "type": "string"
            },
            "recovery": {
             "type": "string"
            },
            "price_adjustment": {
             "type": "string"
            }
           }
          },
          "performance_security": {
           "type": "object",
           "properties": {
            "range_pct": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "amount_range_vnd": {
             "type": "array",
             "items": {
              "type": "number"
             }
            },
            "rule": {
             "type": "string"
            },
            "returned": {
             "type": "string"
            }
           }
          },
          "warranty": {
           "type": "object",
           "properties": {
            "min_period_months": {
             "type": "number"
            },
            "min_amount_pct": {
             "type": "number"
            },
            "min_amount_vnd": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "equipment": {
             "type": "string"
            }
           }
          },
          "penalty": {
           "type": "object",
           "properties": {
            "max_pct_of_violated_part": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "payment": {
           "type": "object",
           "properties": {
            "deadline": {
             "type": "string"
            },
            "late_interest": {
             "type": "string"
            }
           }
          },
          "settlement": {
           "type": "object",
           "properties": {
            "settlement_days_max": {
             "type": "number"
            },
            "settlement_days_max_large": {
             "type": "number"
            },
            "liquidation_days_max": {
             "type": "number"
            },
            "liquidation_days_max_large": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "schedule": {
           "type": "object",
           "properties": {
            "retention_pct": {
             "type": "number"
            },
            "recovery_rate_pct": {
             "type": "number"
            },
            "rows": {
             "type": "array",
             "items": {}
            },
            "fully_recovered": {
             "type": "boolean"
            },
            "method": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "agreed_override": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-project-group": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Public Investment Project Group (A, B, C)",
    "description": "Applies the Public Investment Law 58/2024/QH15 as amended by Law 90/2025/QH15 (consolidated text 96/VBHN-VPQH): national important projects (Article 8: public capital of 30,000 billion VND or more, nuclear plants, conversion of protection / special-use forest, rice land of 500 ha or more, resettlement of 20,000 people in mountains or 50,000 elsewhere, special mechanisms), group A regardless of size (toxic substances and explosives, industrial / high-tech zone infrastructure) and the sector thresholds of Articles 9–11: 4,600 / 240, 3,000 / 160, 2,000 / 120 and 1,600 / 90 billion VND for groups A / B.\n\nThe answer gives the group with reasons, the thresholds of the sector, the maximum capital allocation period (A 6 years, B 4, C 3 — Article 57) with extension rules and, with `capital_source`, the bodies deciding the investment policy and the investment (Articles 18 and 38, after the 2025 two-tier local government reform).\n\nThresholds can be adjusted by the National Assembly Standing Committee (Article 12). Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-project-group/",
    "operationId": "vnProjectGroupGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-project-group/"
    },
    "parameters": [
     {
      "name": "sector",
      "in": "query",
      "required": true,
      "description": "Sector key (call without parameters for the list), e.g. transport_major, irrigation, urban_infra, health_culture_education, civil_buildings.",
      "schema": {
       "type": "string"
      },
      "example": "transport_major"
     },
     {
      "name": "total_investment_billion",
      "in": "query",
      "required": true,
      "description": "Total investment in billion VND (or total_investment in VND).",
      "schema": {
       "type": "number"
      },
      "example": 500
     },
     {
      "name": "capital_source",
      "in": "query",
      "required": false,
      "description": "`central` / `ministry`, `provincial`, `commune` or `soe` for the deciding authority.",
      "schema": {
       "type": "string"
      },
      "example": "provincial"
     },
     {
      "name": "resettlement_people",
      "in": "query",
      "required": false,
      "description": "People resettled (with `mountainous=1`). Also forest_special_ha, forest_protection_ha, forest_coastal_ha, forest_production_ha, rice_land_ha, nuclear, special_mechanism, toxic_explosive, industrial_zone_infra, public_investment_capital.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sector": {
           "type": "string"
          },
          "sector_vi": {
           "type": "string"
          },
          "total_investment": {
           "type": "number"
          },
          "total_investment_billion": {
           "type": "number"
          },
          "group": {
           "type": "string"
          },
          "group_vi": {
           "type": "string"
          },
          "reasons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "thresholds_billion": {
           "type": "object",
           "properties": {
            "group_a_from": {
             "type": "number"
            },
            "group_b_from": {
             "type": "number"
            },
            "national_public_capital_from": {
             "type": "number"
            },
            "article": {
             "type": "string"
            }
           }
          },
          "capital_allocation_period": {
           "type": "object",
           "properties": {
            "max_years": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "extension": {
             "type": "string"
            }
           }
          },
          "authority": {
           "type": "object",
           "properties": {
            "investment_policy": {
             "type": "string"
            },
            "investment_decision": {
             "type": "string"
            }
           }
          },
          "related": {
           "type": "object",
           "properties": {
            "construction_law": {
             "type": "string"
            },
            "environment": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "sector": "transport_major",
         "sector_vi": "Giao thông: cầu, cảng biển, cảng sông, sân bay, đường sắt, đường quốc lộ",
         "total_investment": 500000000000,
         "total_investment_billion": 500,
         "group": "B",
         "group_vi": "Dự án nhóm B",
         "reasons": [
          "total investment 500 tỷ from 240 to under 4.600 tỷ (Điều 10 khoản 1)"
         ],
         "thresholds_billion": {
          "group_a_from": 4600,
          "group_b_from": 240,
          "national_public_capital_from": 30000,
          "article": "Điều 9 khoản 2; Điều 10, 11"
         },
         "capital_allocation_period": {
          "max_years": 4,
          "rule": "Điều 57 khoản 2 (counted from the first year capital is allocated to completion; excludes preparation and settlement)",
          "extension": "≤ 1 year by the authority that decided the investment policy (Điều 57.3.b, c)"
         },
         "authority": {
          "investment_policy": "Ủy ban nhân dân cấp tỉnh (Điều 18 khoản 7)",
          "investment_decision": "Chủ tịch UBND cấp tỉnh (Điều 38 khoản 3 điểm c)"
         },
         "related": {
          "construction_law": "Luật Xây dựng 2025 classifies construction projects using the public-investment criteria (Điều 17 — unverified); construction class: /v1/vn-construction-class",
          "environment": "Environmental procedures depend on the project type and scale, not on the group (Luật Bảo vệ môi trường 2020)."
         },
         "note": "Thresholds may be adjusted by the National Assembly Standing Committee (Điều 12). The 2026 amendment of the Public Investment Law reportedly keeps the criteria (unverified).",
         "legal": [
          {
           "ref": "Luật Đầu tư công số 58/2024/QH15 (sửa đổi bởi Luật số 90/2025/QH15), văn bản hợp nhất 96/VBHN-VPQH — Điều 8, 9, 10, 11, 12, 18, 38, 57",
           "effective_from": "2025-01-01"
          },
          {
           "ref": "Nghị định 85/2025/NĐ-CP hướng dẫn Luật Đầu tư công (sửa đổi bởi NĐ 275/2025/NĐ-CP)",
           "effective_from": "2025-04-08",
           "url": "https://vnuf.edu.vn/wp-content/uploads/2025/05/Nghi-dinh_85-2025-ND-CP.pdf"
          }
         ],
         "disclaimer": "Reference only, not legal advice; check the official text.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Public Investment Project Group (A, B, C)",
    "description": "Applies the Public Investment Law 58/2024/QH15 as amended by Law 90/2025/QH15 (consolidated text 96/VBHN-VPQH): national important projects (Article 8: public capital of 30,000 billion VND or more, nuclear plants, conversion of protection / special-use forest, rice land of 500 ha or more, resettlement of 20,000 people in mountains or 50,000 elsewhere, special mechanisms), group A regardless of size (toxic substances and explosives, industrial / high-tech zone infrastructure) and the sector thresholds of Articles 9–11: 4,600 / 240, 3,000 / 160, 2,000 / 120 and 1,600 / 90 billion VND for groups A / B.\n\nThe answer gives the group with reasons, the thresholds of the sector, the maximum capital allocation period (A 6 years, B 4, C 3 — Article 57) with extension rules and, with `capital_source`, the bodies deciding the investment policy and the investment (Articles 18 and 38, after the 2025 two-tier local government reform).\n\nThresholds can be adjusted by the National Assembly Standing Committee (Article 12). Reference only, not legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-project-group/",
    "operationId": "vnProjectGroupPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-project-group/"
    },
    "parameters": [
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "Sector key (call without parameters for the list), e.g. transport_major, irrigation, urban_infra, health_culture_education, civil_buildings.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "total_investment_billion",
      "in": "query",
      "required": false,
      "description": "Total investment in billion VND (or total_investment in VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "capital_source",
      "in": "query",
      "required": false,
      "description": "`central` / `ministry`, `provincial`, `commune` or `soe` for the deciding authority.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "resettlement_people",
      "in": "query",
      "required": false,
      "description": "People resettled (with `mountainous=1`). Also forest_special_ha, forest_protection_ha, forest_coastal_ha, forest_production_ha, rice_land_ha, nuclear, special_mechanism, toxic_explosive, industrial_zone_infra, public_investment_capital.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sector": {
           "type": "string"
          },
          "sector_vi": {
           "type": "string"
          },
          "total_investment": {
           "type": "number"
          },
          "total_investment_billion": {
           "type": "number"
          },
          "group": {
           "type": "string"
          },
          "group_vi": {
           "type": "string"
          },
          "reasons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "thresholds_billion": {
           "type": "object",
           "properties": {
            "group_a_from": {
             "type": "number"
            },
            "group_b_from": {
             "type": "number"
            },
            "national_public_capital_from": {
             "type": "number"
            },
            "article": {
             "type": "string"
            }
           }
          },
          "capital_allocation_period": {
           "type": "object",
           "properties": {
            "max_years": {
             "type": "number"
            },
            "rule": {
             "type": "string"
            },
            "extension": {
             "type": "string"
            }
           }
          },
          "authority": {
           "type": "object",
           "properties": {
            "investment_policy": {
             "type": "string"
            },
            "investment_decision": {
             "type": "string"
            }
           }
          },
          "related": {
           "type": "object",
           "properties": {
            "construction_law": {
             "type": "string"
            },
            "environment": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-steel-weight": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Steel Weight Calculator (Bars, Pipes, Sections)",
    "description": "Computes mass = cross-section area × length × density (7,850 kg/m³ for steel; stainless 7,930, aluminium 2,700, copper, brass, cast iron or any `density`). Shapes: `rebar` and `round_bar` (d), `square_bar`, `hex_bar`, `flat_bar`, `pipe` (outer diameter × wall), `square_tube` and `rect_tube`, `plate` (t × w × l with `holes`), `angle` (L / V), `channel` (U), `i_beam` (I / H), `t_bar` and cold-formed `lipped_channel` (C / Z purlins). The answer gives the area, kg per metre (or per m² for plates), kg per piece and total.\n\nSend `items` for a bar schedule (bóc tách cốt thép): totals per diameter, total length, stock bars of 11.7 m (`stock_length_m`), bundles (`bars_per_bundle`), kilograms and tonnes.\n\nOnly your dimensions are used — no standard section tables are copied — so hot-rolled sections with root radii and tapered flanges, and tubes with rounded corners, differ from catalogue weights by a few percent (flagged as `approximate`).\n\nDocs: https://apibox.io.vn/docs/vn-steel-weight/",
    "operationId": "vnSteelWeightGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-steel-weight/"
    },
    "parameters": [
     {
      "name": "shape",
      "in": "query",
      "required": true,
      "description": "rebar, round_bar, square_bar, hex_bar, flat_bar, pipe, square_tube, rect_tube, plate, angle, channel, i_beam, t_bar, lipped_channel.",
      "schema": {
       "type": "string"
      },
      "example": "rebar"
     },
     {
      "name": "d",
      "in": "query",
      "required": false,
      "description": "Dimensions in mm by shape: d; a; s; w, t; od, t; a, b, t; t, w, l; h, b, tw, tf; h, b, c, t.",
      "schema": {
       "type": "number"
      },
      "example": 16
     },
     {
      "name": "length_m",
      "in": "query",
      "required": false,
      "description": "Piece length in m (default 11.7 for bars, 6 or 12 for sections).",
      "schema": {
       "type": "number"
      },
      "example": 11.7
     },
     {
      "name": "quantity",
      "in": "query",
      "required": false,
      "description": "Number of pieces.",
      "schema": {
       "type": "number",
       "default": 1
      },
      "example": 100
     },
     {
      "name": "material",
      "in": "query",
      "required": false,
      "description": "steel, stainless, aluminium, copper, brass, cast_iron; or `density` kg/m³.",
      "schema": {
       "type": "string",
       "default": "steel"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "shape": {
           "type": "string"
          },
          "shape_vi": {
           "type": "string"
          },
          "dims_mm": {
           "type": "object",
           "properties": {
            "d": {
             "type": "number"
            }
           }
          },
          "area_mm2": {
           "type": "number"
          },
          "kg_per_m": {
           "type": "number"
          },
          "length_m": {
           "type": "number"
          },
          "quantity": {
           "type": "number"
          },
          "kg_per_piece": {
           "type": "number"
          },
          "total_kg": {
           "type": "number"
          },
          "note": {
           "type": "string"
          },
          "material": {
           "type": "string"
          },
          "density_kg_m3": {
           "type": "number"
          },
          "method": {
           "type": "string"
          }
         }
        },
        "example": {
         "shape": "rebar",
         "shape_vi": "Thép thanh vằn (khối lượng danh nghĩa theo đường kính danh nghĩa)",
         "dims_mm": {
          "d": 16
         },
         "area_mm2": 201.06,
         "kg_per_m": 1.5783,
         "length_m": 11.7,
         "quantity": 100,
         "kg_per_piece": 18.467,
         "total_kg": 1846.653,
         "note": "Nominal mass π d²/4 × 7850 kg/m³ (e.g. d10 = 0,617 kg/m); actual mass within the tolerance of the product standard.",
         "material": "steel",
         "density_kg_m3": 7850,
         "method": "mass = cross-section area × length × density (theoretical, from the dimensions you send; no standard section tables are used)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Steel Weight Calculator (Bars, Pipes, Sections)",
    "description": "Computes mass = cross-section area × length × density (7,850 kg/m³ for steel; stainless 7,930, aluminium 2,700, copper, brass, cast iron or any `density`). Shapes: `rebar` and `round_bar` (d), `square_bar`, `hex_bar`, `flat_bar`, `pipe` (outer diameter × wall), `square_tube` and `rect_tube`, `plate` (t × w × l with `holes`), `angle` (L / V), `channel` (U), `i_beam` (I / H), `t_bar` and cold-formed `lipped_channel` (C / Z purlins). The answer gives the area, kg per metre (or per m² for plates), kg per piece and total.\n\nSend `items` for a bar schedule (bóc tách cốt thép): totals per diameter, total length, stock bars of 11.7 m (`stock_length_m`), bundles (`bars_per_bundle`), kilograms and tonnes.\n\nOnly your dimensions are used — no standard section tables are copied — so hot-rolled sections with root radii and tapered flanges, and tubes with rounded corners, differ from catalogue weights by a few percent (flagged as `approximate`).\n\nDocs: https://apibox.io.vn/docs/vn-steel-weight/",
    "operationId": "vnSteelWeightPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-steel-weight/"
    },
    "parameters": [
     {
      "name": "shape",
      "in": "query",
      "required": false,
      "description": "rebar, round_bar, square_bar, hex_bar, flat_bar, pipe, square_tube, rect_tube, plate, angle, channel, i_beam, t_bar, lipped_channel.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "d",
      "in": "query",
      "required": false,
      "description": "Dimensions in mm by shape: d; a; s; w, t; od, t; a, b, t; t, w, l; h, b, tw, tf; h, b, c, t.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "length_m",
      "in": "query",
      "required": false,
      "description": "Piece length in m (default 11.7 for bars, 6 or 12 for sections).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "quantity",
      "in": "query",
      "required": false,
      "description": "Number of pieces.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "material",
      "in": "query",
      "required": false,
      "description": "steel, stainless, aluminium, copper, brass, cast_iron; or `density` kg/m³.",
      "schema": {
       "type": "string",
       "default": "steel"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "Bar schedule: [{shape, d, length_m, quantity}, …]; with stock_length_m, bars_per_bundle."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "shape": {
           "type": "string"
          },
          "shape_vi": {
           "type": "string"
          },
          "dims_mm": {
           "type": "object",
           "properties": {
            "d": {
             "type": "number"
            }
           }
          },
          "area_mm2": {
           "type": "number"
          },
          "kg_per_m": {
           "type": "number"
          },
          "length_m": {
           "type": "number"
          },
          "quantity": {
           "type": "number"
          },
          "kg_per_piece": {
           "type": "number"
          },
          "total_kg": {
           "type": "number"
          },
          "note": {
           "type": "string"
          },
          "material": {
           "type": "string"
          },
          "density_kg_m3": {
           "type": "number"
          },
          "method": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/caniuse": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Browser Support (Can I use + browserslist)",
    "description": "Look up browser support for about 550 web platform features from the Can I use database: `feature=` (an id like `css-container-queries`, `webp`, `dialog`, or a name such as \"container queries\") returns the spec status, each browser's current support, the version full support starts from, prefix / flag notes, links and the share of users with full or partial support worldwide and in a country (`region=VN`, any ISO code, or continents `alt-as`, `alt-eu`…). `versions=all` adds the whole version-by-version table; `search=` finds feature ids.\n\n`query=` runs a browserslist query (`> 0.5% in VN, last 2 versions, not dead`, `defaults`, `baseline widely available`, `supports css-has`…) and returns the browser versions and their coverage worldwide and in the region of the query. `features=` (comma-separated) or `css=` (a CSS snippet — container queries, :has(), nesting, grid, oklch(), view transitions and ~90 other features are detected) checks each feature against the target and lists the versions that fail, with a fallback hint. `ua=` tells whether a User-Agent is inside the target and, with `features=`, what that browser supports.\n\nData: Can I use by Alexis Deveria (CC BY 4.0) with usage shares from StatCounter GlobalStats (CC BY-SA 3.0), refreshed weekly; queries run on browserslist (MIT). Attribution is included in every answer. One region per query.\n\nDocs: https://apibox.io.vn/docs/caniuse/",
    "operationId": "caniuseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/caniuse/"
    },
    "parameters": [
     {
      "name": "feature",
      "in": "query",
      "required": false,
      "description": "Feature id or name (e.g. `css-container-queries`, `webp`, \"flexbox gap\").",
      "schema": {
       "type": "string"
      },
      "example": "css-container-queries"
     },
     {
      "name": "search",
      "in": "query",
      "required": false,
      "description": "Find feature ids by keyword.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "query",
      "in": "query",
      "required": false,
      "description": "browserslist query (max 500 characters); target for features / css / ua (default `defaults`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "features",
      "in": "query",
      "required": false,
      "description": "Comma-separated features to check against `query` (max 100).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ua",
      "in": "query",
      "required": false,
      "description": "User-Agent string to test against `query`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "Country code (VN, US…) or `alt-as` / `alt-eu` / `alt-na` / `alt-sa` / `alt-af` / `alt-oc` / `alt-ww` for usage shares.",
      "schema": {
       "type": "string"
      },
      "example": "VN"
     },
     {
      "name": "browsers",
      "in": "query",
      "required": false,
      "description": "Limit the feature table to these browser ids (chrome, safari, ios_saf, firefox, edge, samsung, and_chr…).",
      "schema": {
       "type": "string"
      },
      "example": "chrome,safari,ios_saf,firefox"
     },
     {
      "name": "versions",
      "in": "query",
      "required": false,
      "description": "`all`: include the support of every version.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "Optional: `feature`, `search`, `query`, `check`, `ua` or `browsers` (list of browsers with current versions). Inferred from the parameters.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "description": {
           "type": "string"
          },
          "spec": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "status_name": {
           "type": "string"
          },
          "categories": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "keywords": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "usage": {
           "type": "object",
           "properties": {
            "global": {
             "type": "object",
             "properties": {
              "full": {
               "type": "number"
              },
              "partial": {
               "type": "number"
              },
              "total": {
               "type": "number"
              }
             }
            },
            "region": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "month": {
               "type": "string"
              },
              "full": {
               "type": "number"
              },
              "partial": {
               "type": "number"
              },
              "total": {
               "type": "number"
              }
             }
            }
           }
          },
          "browsers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "current_version": {
              "type": "string"
             },
             "current": {
              "type": "string"
             },
             "supported_since": {
              "type": "string"
             }
            }
           }
          },
          "links": {
           "type": "array",
           "items": {}
          },
          "fallback": {
           "type": "string"
          },
          "meta": {
           "type": "object",
           "properties": {
            "data_updated": {
             "type": "string"
            },
            "features": {
             "type": "number"
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "data": {
             "type": "string"
            },
            "usage": {
             "type": "string"
            },
            "queries": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "id": "css-container-queries",
         "title": "CSS Container Queries (Size)",
         "description": "Size queries in Container Queries provide a way to query the size of a container, and conditionally apply CSS to the content of that container.",
         "spec": "https://www.w3.org/TR/css-contain-3/",
         "status": "wd",
         "status_name": "W3C Working Draft",
         "categories": [
          "CSS"
         ],
         "keywords": "container query,@container,container-name,container-type",
         "url": "https://caniuse.com/css-container-queries",
         "usage": {
          "global": {
           "full": 95.96,
           "partial": 0.07,
           "total": 96.03
          },
          "region": {
           "code": "VN",
           "name": "Vietnam",
           "month": "2026-10",
           "full": 90.82,
           "partial": 0.33,
           "total": 91.15
          }
         },
         "browsers": [
          {
           "id": "firefox",
           "name": "Firefox",
           "type": "desktop",
           "current_version": "160",
           "current": "yes",
           "supported_since": "110"
          },
          {
           "id": "chrome",
           "name": "Chrome",
           "type": "desktop",
           "current_version": "157",
           "current": "yes",
           "supported_since": "106"
          },
          {
           "id": "safari",
           "name": "Safari",
           "type": "desktop",
           "current_version": "27.2",
           "current": "yes",
           "supported_since": "16.0"
          },
          {
           "id": "ios_saf",
           "name": "Safari on iOS",
           "type": "mobile",
           "current_version": "27.0",
           "current": "yes",
           "supported_since": "16.0"
          }
         ],
         "links": [
          {
           "url": "https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries",
           "title": "MDN article"
          },
          "…"
         ],
         "fallback": "Use media queries as the baseline and wrap container rules in @supports (container-type: inline-size).",
         "meta": {
          "data_updated": "2026-11-11",
          "features": 554
         },
         "source": {
          "data": "Can I use (https://caniuse.com) by Alexis Deveria, CC BY 4.0",
          "usage": "Usage share: StatCounter GlobalStats (https://gs.statcounter.com) via caniuse, CC BY-SA 3.0",
          "queries": "browserslist (MIT)"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Browser Support (Can I use + browserslist)",
    "description": "Look up browser support for about 550 web platform features from the Can I use database: `feature=` (an id like `css-container-queries`, `webp`, `dialog`, or a name such as \"container queries\") returns the spec status, each browser's current support, the version full support starts from, prefix / flag notes, links and the share of users with full or partial support worldwide and in a country (`region=VN`, any ISO code, or continents `alt-as`, `alt-eu`…). `versions=all` adds the whole version-by-version table; `search=` finds feature ids.\n\n`query=` runs a browserslist query (`> 0.5% in VN, last 2 versions, not dead`, `defaults`, `baseline widely available`, `supports css-has`…) and returns the browser versions and their coverage worldwide and in the region of the query. `features=` (comma-separated) or `css=` (a CSS snippet — container queries, :has(), nesting, grid, oklch(), view transitions and ~90 other features are detected) checks each feature against the target and lists the versions that fail, with a fallback hint. `ua=` tells whether a User-Agent is inside the target and, with `features=`, what that browser supports.\n\nData: Can I use by Alexis Deveria (CC BY 4.0) with usage shares from StatCounter GlobalStats (CC BY-SA 3.0), refreshed weekly; queries run on browserslist (MIT). Attribution is included in every answer. One region per query.\n\nDocs: https://apibox.io.vn/docs/caniuse/",
    "operationId": "caniusePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/caniuse/"
    },
    "parameters": [
     {
      "name": "feature",
      "in": "query",
      "required": false,
      "description": "Feature id or name (e.g. `css-container-queries`, `webp`, \"flexbox gap\").",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "search",
      "in": "query",
      "required": false,
      "description": "Find feature ids by keyword.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "query",
      "in": "query",
      "required": false,
      "description": "browserslist query (max 500 characters); target for features / css / ua (default `defaults`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ua",
      "in": "query",
      "required": false,
      "description": "User-Agent string to test against `query`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "Country code (VN, US…) or `alt-as` / `alt-eu` / `alt-na` / `alt-sa` / `alt-af` / `alt-oc` / `alt-ww` for usage shares.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "browsers",
      "in": "query",
      "required": false,
      "description": "Limit the feature table to these browser ids (chrome, safari, ios_saf, firefox, edge, samsung, and_chr…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "versions",
      "in": "query",
      "required": false,
      "description": "`all`: include the support of every version.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "Optional: `feature`, `search`, `query`, `check`, `ua` or `browsers` (list of browsers with current versions). Inferred from the parameters.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "features": {
          "type": "string",
          "description": "Comma-separated features to check against `query` (max 100)."
         },
         "css": {
          "type": "string",
          "description": "CSS snippet: features used are detected and checked against `query`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "description": {
           "type": "string"
          },
          "spec": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "status_name": {
           "type": "string"
          },
          "categories": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "keywords": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "usage": {
           "type": "object",
           "properties": {
            "global": {
             "type": "object",
             "properties": {
              "full": {
               "type": "number"
              },
              "partial": {
               "type": "number"
              },
              "total": {
               "type": "number"
              }
             }
            },
            "region": {
             "type": "object",
             "properties": {
              "code": {
               "type": "string"
              },
              "name": {
               "type": "string"
              },
              "month": {
               "type": "string"
              },
              "full": {
               "type": "number"
              },
              "partial": {
               "type": "number"
              },
              "total": {
               "type": "number"
              }
             }
            }
           }
          },
          "browsers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "current_version": {
              "type": "string"
             },
             "current": {
              "type": "string"
             },
             "supported_since": {
              "type": "string"
             }
            }
           }
          },
          "links": {
           "type": "array",
           "items": {}
          },
          "fallback": {
           "type": "string"
          },
          "meta": {
           "type": "object",
           "properties": {
            "data_updated": {
             "type": "string"
            },
            "features": {
             "type": "number"
            }
           }
          },
          "source": {
           "type": "object",
           "properties": {
            "data": {
             "type": "string"
            },
            "usage": {
             "type": "string"
            },
            "queries": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/source-map": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Source Map Stack Trace Resolver",
    "description": "Paste a stack trace from Chrome / Edge / Node (`at fn (file:line:col)`), Firefox / Safari (`fn@file:line:col`) or React Native / Hermes, plus the source map: `map` (JSON or a JS file with an inline `data:` sourceMappingURL), `maps` (an object `{\"app.js.map\": …}` for several bundles), `map_url`, or a `.map` / `.zip` of maps as a file. With `fetch=1` the service downloads each script URL in the trace, follows its `//# sourceMappingURL` comment or `SourceMap` header and fetches the map (public URLs only, size and redirect limits).\n\nEach frame gets the original source, line, column, the original function name (taken from the caller's mapping, like error trackers do), `context` lines from `sourcesContent`, and a `library` flag for node_modules / ignore-listed sources; `resolved_stack` is the whole trace rewritten. Index maps (sections) and maps from Vite, webpack, esbuild, Rollup and Terser work. `action=lookup` maps one line / column (or the reverse with `source=`); `action=validate` checks a map: version, sources / sourcesContent consistency, mappings that decode and stay inside the source, ignoreList, debugId, and warns when the map exposes your source code.\n\nMaps and code are processed in memory and never stored or logged. Uses source-map-js (BSD-3-Clause).\n\nDocs: https://apibox.io.vn/docs/source-map/",
    "operationId": "sourceMapGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/source-map/"
    },
    "parameters": [
     {
      "name": "map_url",
      "in": "query",
      "required": false,
      "description": "URL of a source map to download.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fetch",
      "in": "query",
      "required": false,
      "description": "`1`: discover maps from the script URLs in the trace (max 6 scripts).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "context",
      "in": "query",
      "required": false,
      "description": "Lines of code around each frame (0–10).",
      "schema": {
       "type": "number",
       "default": 3
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`resolve` (default with stack), `lookup` (line, column[, source]) or `validate` (optional `js` = generated code).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "line",
      "in": "query",
      "required": false,
      "description": "lookup: generated line (1-based), or original line with `source`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "column",
      "in": "query",
      "required": false,
      "description": "lookup: column (1-based like stack traces; `column_base=0` for 0-based).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          },
          "frames_total": {
           "type": "number"
          },
          "frames_resolved": {
           "type": "number"
          },
          "frames": {
           "type": "array",
           "items": {}
          },
          "resolved_stack": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Source Map Stack Trace Resolver",
    "description": "Paste a stack trace from Chrome / Edge / Node (`at fn (file:line:col)`), Firefox / Safari (`fn@file:line:col`) or React Native / Hermes, plus the source map: `map` (JSON or a JS file with an inline `data:` sourceMappingURL), `maps` (an object `{\"app.js.map\": …}` for several bundles), `map_url`, or a `.map` / `.zip` of maps as a file. With `fetch=1` the service downloads each script URL in the trace, follows its `//# sourceMappingURL` comment or `SourceMap` header and fetches the map (public URLs only, size and redirect limits).\n\nEach frame gets the original source, line, column, the original function name (taken from the caller's mapping, like error trackers do), `context` lines from `sourcesContent`, and a `library` flag for node_modules / ignore-listed sources; `resolved_stack` is the whole trace rewritten. Index maps (sections) and maps from Vite, webpack, esbuild, Rollup and Terser work. `action=lookup` maps one line / column (or the reverse with `source=`); `action=validate` checks a map: version, sources / sourcesContent consistency, mappings that decode and stay inside the source, ignoreList, debugId, and warns when the map exposes your source code.\n\nMaps and code are processed in memory and never stored or logged. Uses source-map-js (BSD-3-Clause).\n\nDocs: https://apibox.io.vn/docs/source-map/",
    "operationId": "sourceMapPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/source-map/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "stack": {
          "type": "string",
          "description": "The stack trace (required for action=resolve; max 500 frames)."
         },
         "map": {
          "type": "object",
          "description": "Source map (object or JSON text, or JS with an inline data: sourceMappingURL)."
         },
         "maps": {
          "type": "object",
          "description": "Several maps keyed by script / map name or URL."
         },
         "map_url": {
          "type": "string",
          "description": "URL of a source map to download."
         },
         "fetch": {
          "type": "boolean",
          "description": "`1`: discover maps from the script URLs in the trace (max 6 scripts)."
         },
         "context": {
          "type": "number",
          "default": 3,
          "description": "Lines of code around each frame (0–10)."
         },
         "action": {
          "type": "string",
          "description": "`resolve` (default with stack), `lookup` (line, column[, source]) or `validate` (optional `js` = generated code)."
         },
         "line": {
          "type": "number",
          "description": "lookup: generated line (1-based), or original line with `source`."
         },
         "column": {
          "type": "number",
          "description": "lookup: column (1-based like stack traces; `column_base=0` for 0-based)."
         }
        }
       },
       "example": {
        "stack": "Error: boom at 3\n    at n (https://example.com/assets/out.js:1:47)\n    at t (https://example.com/assets/out.js:1:122)\n    at u (https://example.com/assets/out.js:1:156)",
        "map": {
         "version": 3,
         "sources": [
          "lib.ts",
          "app.ts"
         ],
         "sourcesContent": [
          "export function helper(x: number): number {\n  if (x > 2) {\n    throw new Error('boom at ' + x);\n  }\n  return x * 2;\n}\n",
          "import { helper } from './lib';\n\nfunction computeTotal(items: number[]): number {\n  let sum = 0;\n  for (const i of items) sum += helper(i);\n  return sum;\n}\n\nexport function main() {\n  return computeTotal([1, 2, 3]);\n}\nmain();\n"
         ],
         "mappings": "mBAAO,SAASA,EAAOC,EAAmB,CACxC,GAAIA,EAAI,EACN,MAAM,IAAI,MAAM,WAAaA,CAAC,EAEhC,OAAOA,EAAI,CACb,CCHA,SAASC,EAAaC,EAAyB,CAC7C,IAAIC,EAAM,EACV,QAAWC,KAAKF,EAAOC,GAAOE,EAAOD,CAAC,EACtC,OAAOD,CACT,CAEO,SAASG,GAAO,CACrB,OAAOL,EAAa,CAAC,EAAG,EAAG,CAAC,CAAC,CAC/B,CACAK,EAAK",
         "names": [
          "helper",
          "x",
          "computeTotal",
          "items",
          "sum",
          "i",
          "helper",
          "main"
         ]
        },
        "context": 1
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "stack": {
          "type": "string",
          "description": "The stack trace (required for action=resolve; max 500 frames)."
         },
         "map": {
          "type": "object",
          "description": "Source map (object or JSON text, or JS with an inline data: sourceMappingURL)."
         },
         "maps": {
          "type": "object",
          "description": "Several maps keyed by script / map name or URL."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "A .map file or a .zip of .map files."
         },
         "map_url": {
          "type": "string",
          "description": "URL of a source map to download."
         },
         "fetch": {
          "type": "boolean",
          "description": "`1`: discover maps from the script URLs in the trace (max 6 scripts)."
         },
         "context": {
          "type": "number",
          "default": 3,
          "description": "Lines of code around each frame (0–10)."
         },
         "action": {
          "type": "string",
          "description": "`resolve` (default with stack), `lookup` (line, column[, source]) or `validate` (optional `js` = generated code)."
         },
         "line": {
          "type": "number",
          "description": "lookup: generated line (1-based), or original line with `source`."
         },
         "column": {
          "type": "number",
          "description": "lookup: column (1-based like stack traces; `column_base=0` for 0-based)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          },
          "frames_total": {
           "type": "number"
          },
          "frames_resolved": {
           "type": "number"
          },
          "frames": {
           "type": "array",
           "items": {}
          },
          "resolved_stack": {
           "type": "string"
          }
         }
        },
        "example": {
         "message": "Error: boom at 3",
         "frames_total": 3,
         "frames_resolved": 3,
         "frames": [
          {
           "raw": "at n (https://example.com/assets/out.js:1:47)",
           "function": "n",
           "file": "https://example.com/assets/out.js",
           "line": 1,
           "column": 47,
           "original": {
            "source": "lib.ts",
            "line": 3,
            "column": 11,
            "function": "helper",
            "name": null
           },
           "library": false,
           "context": {
            "start_line": 2,
            "lines": [
             "  if (x > 2) {",
             "    throw new Error('boom at ' + x);",
             "  }"
            ],
            "highlight": 3
           },
           "map": "map"
          },
          {
           "raw": "at t (https://example.com/assets/out.js:1:122)",
           "function": "t",
           "file": "https://example.com/assets/out.js",
           "line": 1,
           "column": 122,
           "original": {
            "source": "app.ts",
            "line": 5,
            "column": 33,
            "function": "computeTotal",
            "name": "helper"
           },
           "library": false,
           "context": {
            "start_line": 4,
            "lines": [
             "  let sum = 0;",
             "  for (const i of items) sum += helper(i);",
             "  return sum;"
            ],
            "highlight": 5
           },
           "map": "map"
          },
          "…"
         ],
         "resolved_stack": "Error: boom at 3\n    at helper (lib.ts:3:11)\n    at computeTotal (app.ts:5:33)\n    at u (app.ts:10:10)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/markdown-lint": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "Markdown Lint & Fix",
    "description": "Send Markdown as `markdown`, a file, a URL (e.g. a raw README) or a `.zip` of docs. You get every problem from markdownlint's rule set — heading levels, list indentation and style, line length, blank lines around headings / lists / fences, bare URLs, empty links, images without alt, code blocks without a language, link fragments… — with line, column, rule id and alias, description and a link to the rule docs. Configure with `config` (the usual `.markdownlint.json` object), `preset=relaxed`, `disable` / `enable` lists or `line_length`.\n\n`fix=1` applies every automatic fix (repeated until stable) and returns the fixed text plus what remains. `toc=1` builds a table of contents with GitHub-style anchors (`toc_min` / `toc_max` levels) and, with `insert_toc=1` or `fix=1`, writes it between `<!-- toc -->` and `<!-- tocstop -->` markers. Internal links are checked: `#anchors` against the headings (with GitHub duplicate suffixes) and explicit ids, undefined reference links, and — for a ZIP — relative links to files and to headings inside other files.\n\nUses markdownlint (MIT). Custom JavaScript rules are not accepted.\n\nDocs: https://apibox.io.vn/docs/markdown-lint/",
    "operationId": "markdownLintGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/markdown-lint/"
    },
    "parameters": [
     {
      "name": "preset",
      "in": "query",
      "required": false,
      "description": "`default` or `relaxed` (no line length, inline HTML, bare URL, code-language and first-line rules).",
      "schema": {
       "type": "string",
       "default": "default"
      }
     },
     {
      "name": "disable",
      "in": "query",
      "required": false,
      "description": "Rules to turn off, e.g. `MD013,MD041`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fix",
      "in": "query",
      "required": false,
      "description": "`1`: return the auto-fixed Markdown.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "toc",
      "in": "query",
      "required": false,
      "description": "`1`: generate a table of contents (`toc_min`, `toc_max`, default 2–3).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "insert_toc",
      "in": "query",
      "required": false,
      "description": "`1`: write the TOC between `<!-- toc -->` and `<!-- tocstop -->`.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "input": {
           "type": "string"
          },
          "errors": {
           "type": "number"
          },
          "by_rule": {
           "type": "object",
           "properties": {
            "MD040": {
             "type": "number"
            },
            "MD051": {
             "type": "number"
            }
           }
          },
          "messages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             },
             "alias": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "context": {
              "type": "string"
             },
             "fixable": {
              "type": "boolean"
             },
             "severity": {
              "type": "string"
             },
             "info": {
              "type": "string"
             },
             "column": {
              "type": "number"
             },
             "length": {
              "type": "number"
             }
            }
           }
          },
          "broken_links": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "link": {
              "type": "string"
             },
             "problem": {
              "type": "string"
             }
            }
           }
          },
          "headings": {
           "type": "number"
          },
          "fixed": {
           "type": "string"
          },
          "changed": {
           "type": "boolean"
          },
          "toc": {
           "type": "string"
          },
          "toc_inserted": {
           "type": "boolean"
          },
          "markdownlint": {
           "type": "string"
          },
          "preset": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "Markdown Lint & Fix",
    "description": "Send Markdown as `markdown`, a file, a URL (e.g. a raw README) or a `.zip` of docs. You get every problem from markdownlint's rule set — heading levels, list indentation and style, line length, blank lines around headings / lists / fences, bare URLs, empty links, images without alt, code blocks without a language, link fragments… — with line, column, rule id and alias, description and a link to the rule docs. Configure with `config` (the usual `.markdownlint.json` object), `preset=relaxed`, `disable` / `enable` lists or `line_length`.\n\n`fix=1` applies every automatic fix (repeated until stable) and returns the fixed text plus what remains. `toc=1` builds a table of contents with GitHub-style anchors (`toc_min` / `toc_max` levels) and, with `insert_toc=1` or `fix=1`, writes it between `<!-- toc -->` and `<!-- tocstop -->` markers. Internal links are checked: `#anchors` against the headings (with GitHub duplicate suffixes) and explicit ids, undefined reference links, and — for a ZIP — relative links to files and to headings inside other files.\n\nUses markdownlint (MIT). Custom JavaScript rules are not accepted.\n\nDocs: https://apibox.io.vn/docs/markdown-lint/",
    "operationId": "markdownLintPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/markdown-lint/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "markdown": {
          "type": "string",
          "description": "Markdown text (max 2,000,000 characters). Or send `url`, a file or a .zip."
         },
         "config": {
          "type": "object",
          "description": "markdownlint configuration, e.g. `{\"MD013\": {\"line_length\": 120}, \"MD033\": false}`."
         },
         "preset": {
          "type": "string",
          "default": "default",
          "description": "`default` or `relaxed` (no line length, inline HTML, bare URL, code-language and first-line rules)."
         },
         "disable": {
          "type": "string",
          "description": "Rules to turn off, e.g. `MD013,MD041`."
         },
         "fix": {
          "type": "boolean",
          "description": "`1`: return the auto-fixed Markdown."
         },
         "toc": {
          "type": "boolean",
          "description": "`1`: generate a table of contents (`toc_min`, `toc_max`, default 2–3)."
         },
         "insert_toc": {
          "type": "boolean",
          "description": "`1`: write the TOC between `<!-- toc -->` and `<!-- tocstop -->`."
         }
        }
       },
       "example": {
        "markdown": "# Project\n\n<!-- toc -->\n<!-- tocstop -->\n\n## Install\nRun it:\n```\nnpm i\n```\n## Usage\nSee [install](#install) and [api](#api).\n",
        "fix": true,
        "toc": true
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "markdown": {
          "type": "string",
          "description": "Markdown text (max 2,000,000 characters). Or send `url`, a file or a .zip."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "A .md file or a .zip of Markdown files (batch)."
         },
         "config": {
          "type": "object",
          "description": "markdownlint configuration, e.g. `{\"MD013\": {\"line_length\": 120}, \"MD033\": false}`."
         },
         "preset": {
          "type": "string",
          "default": "default",
          "description": "`default` or `relaxed` (no line length, inline HTML, bare URL, code-language and first-line rules)."
         },
         "disable": {
          "type": "string",
          "description": "Rules to turn off, e.g. `MD013,MD041`."
         },
         "fix": {
          "type": "boolean",
          "description": "`1`: return the auto-fixed Markdown."
         },
         "toc": {
          "type": "boolean",
          "description": "`1`: generate a table of contents (`toc_min`, `toc_max`, default 2–3)."
         },
         "insert_toc": {
          "type": "boolean",
          "description": "`1`: write the TOC between `<!-- toc -->` and `<!-- tocstop -->`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "input": {
           "type": "string"
          },
          "errors": {
           "type": "number"
          },
          "by_rule": {
           "type": "object",
           "properties": {
            "MD040": {
             "type": "number"
            },
            "MD051": {
             "type": "number"
            }
           }
          },
          "messages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "rule": {
              "type": "string"
             },
             "alias": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "context": {
              "type": "string"
             },
             "fixable": {
              "type": "boolean"
             },
             "severity": {
              "type": "string"
             },
             "info": {
              "type": "string"
             },
             "column": {
              "type": "number"
             },
             "length": {
              "type": "number"
             }
            }
           }
          },
          "broken_links": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "link": {
              "type": "string"
             },
             "problem": {
              "type": "string"
             }
            }
           }
          },
          "headings": {
           "type": "number"
          },
          "fixed": {
           "type": "string"
          },
          "changed": {
           "type": "boolean"
          },
          "toc": {
           "type": "string"
          },
          "toc_inserted": {
           "type": "boolean"
          },
          "markdownlint": {
           "type": "string"
          },
          "preset": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": false,
         "input": "markdown",
         "errors": 2,
         "by_rule": {
          "MD040": 1,
          "MD051": 1
         },
         "messages": [
          {
           "line": 14,
           "rule": "MD040",
           "alias": "fenced-code-language",
           "description": "Fenced code blocks should have a language specified",
           "context": "```",
           "fixable": false,
           "severity": "error",
           "info": "https://github.com/DavidAnson/markdownlint/blob/v0.42.1/doc/md040.md"
          },
          {
           "line": 20,
           "rule": "MD051",
           "alias": "link-fragments",
           "description": "Link fragments should be valid",
           "context": "[api](#api)",
           "column": 29,
           "length": 11,
           "fixable": false,
           "severity": "error",
           "info": "https://github.com/DavidAnson/markdownlint/blob/v0.42.1/doc/md051.md"
          }
         ],
         "broken_links": [
          {
           "line": 20,
           "link": "#api",
           "problem": "anchor_not_found"
          }
         ],
         "headings": 3,
         "fixed": "# Project\n\n<!-- toc -->\n\n- [Install](#install)\n- [Usage](#usage)\n\n<!-- tocstop -->\n\n## Install\n\nRun it:\n\n```\nnpm i\n```\n\n## Usage\n\nSee [install](#install) and [api](#api).\n",
         "changed": true,
         "toc": "- [Install](#install)\n- [Usage](#usage)",
         "toc_inserted": true,
         "markdownlint": "0.42.1",
         "preset": "default"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/html-validate": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML Validator",
    "description": "Checks HTML the way a browser parser reads it and reports each problem with line, column, rule, severity and a snippet: unclosed, stray and misnested tags (`<b><i></b></i>`), end tags on void elements, `<div/>` self-closing syntax, block elements that silently close a `<p>`, unknown and obsolete elements (`<center>`, `<font>`, `<marquee>`…), obsolete presentational attributes (`align`, `bgcolor`, `cellpadding`…), attributes not defined for the element, invalid enumerated values (`type=\"emial\"`), boolean attributes written as `disabled=\"false\"`, duplicate attributes and ids, broken id references (`for`, `aria-labelledby`), content-model errors (div in span, button in a, li outside a list, td outside tr, nested forms), and document checks (doctype, charset, title, viewport).\n\nBasic accessibility rules are included: images without alt, form controls without a label, links and buttons without an accessible name, empty headings, skipped heading levels, iframes without title, zoom disabled by the viewport, autoplay with sound. Choose `preset=recommended` (all), `standard` (no accessibility rules) or `a11y`; turn rules off with `disable=`; filter with `level=error|warning|info`. Fragments are recognised automatically (no document-level rules).\n\nIt is a fast static checker (own engine), not the W3C Nu validator. For a full WCAG audit with axe-core use /v1/a11y-check; for SEO checks use the SEO endpoints.\n\nDocs: https://apibox.io.vn/docs/html-validate/",
    "operationId": "htmlValidateGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-validate/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public page to fetch and validate.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "preset",
      "in": "query",
      "required": false,
      "description": "`recommended`, `standard` (no accessibility rules) or `a11y`.",
      "schema": {
       "type": "string",
       "default": "recommended"
      }
     },
     {
      "name": "disable",
      "in": "query",
      "required": false,
      "description": "Comma-separated rule ids to skip (e.g. `attribute-unknown,viewport-missing`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "Minimum severity returned: `error`, `warning` or `info`.",
      "schema": {
       "type": "string",
       "default": "info"
      }
     },
     {
      "name": "fragment",
      "in": "query",
      "required": false,
      "description": "Force fragment (`1`) or full-document (`0`) mode; default auto.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "list_rules",
      "in": "query",
      "required": false,
      "description": "`1`: include the list of rules.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "input": {
           "type": "string"
          },
          "preset": {
           "type": "string"
          },
          "document": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "infos": {
           "type": "number"
          },
          "by_rule": {
           "type": "object",
           "properties": {
            "lang-missing": {
             "type": "number"
            },
            "p-implied-close": {
             "type": "number"
            },
            "close-stray": {
             "type": "number"
            },
            "img-alt": {
             "type": "number"
            },
            "interactive-nesting": {
             "type": "number"
            },
            "id-duplicate": {
             "type": "number"
            },
            "attribute-obsolete": {
             "type": "number"
            },
            "charset-missing": {
             "type": "number"
            },
            "viewport-missing": {
             "type": "number"
            }
           }
          },
          "messages": {
           "type": "array",
           "items": {}
          },
          "see_also": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML Validator",
    "description": "Checks HTML the way a browser parser reads it and reports each problem with line, column, rule, severity and a snippet: unclosed, stray and misnested tags (`<b><i></b></i>`), end tags on void elements, `<div/>` self-closing syntax, block elements that silently close a `<p>`, unknown and obsolete elements (`<center>`, `<font>`, `<marquee>`…), obsolete presentational attributes (`align`, `bgcolor`, `cellpadding`…), attributes not defined for the element, invalid enumerated values (`type=\"emial\"`), boolean attributes written as `disabled=\"false\"`, duplicate attributes and ids, broken id references (`for`, `aria-labelledby`), content-model errors (div in span, button in a, li outside a list, td outside tr, nested forms), and document checks (doctype, charset, title, viewport).\n\nBasic accessibility rules are included: images without alt, form controls without a label, links and buttons without an accessible name, empty headings, skipped heading levels, iframes without title, zoom disabled by the viewport, autoplay with sound. Choose `preset=recommended` (all), `standard` (no accessibility rules) or `a11y`; turn rules off with `disable=`; filter with `level=error|warning|info`. Fragments are recognised automatically (no document-level rules).\n\nIt is a fast static checker (own engine), not the W3C Nu validator. For a full WCAG audit with axe-core use /v1/a11y-check; for SEO checks use the SEO endpoints.\n\nDocs: https://apibox.io.vn/docs/html-validate/",
    "operationId": "htmlValidatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/html-validate/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public page to fetch and validate.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "HTML source (max 3,000,000 characters). Or send `url` or a file."
         },
         "preset": {
          "type": "string",
          "default": "recommended",
          "description": "`recommended`, `standard` (no accessibility rules) or `a11y`."
         },
         "disable": {
          "type": "string",
          "description": "Comma-separated rule ids to skip (e.g. `attribute-unknown,viewport-missing`)."
         },
         "level": {
          "type": "string",
          "default": "info",
          "description": "Minimum severity returned: `error`, `warning` or `info`."
         },
         "fragment": {
          "type": "boolean",
          "description": "Force fragment (`1`) or full-document (`0`) mode; default auto."
         },
         "list_rules": {
          "type": "boolean",
          "description": "`1`: include the list of rules."
         }
        }
       },
       "example": {
        "html": "<!doctype html>\n<html>\n<head><title>Shop</title></head>\n<body>\n<p>Intro <div>Sale</div></p>\n<img src=\"banner.png\">\n<a href=\"/cart\"><button>Cart</button></a>\n<div id=\"x\"></div><div id=\"x\" align=\"center\"></div>\n</body>\n</html>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "input": {
           "type": "string"
          },
          "preset": {
           "type": "string"
          },
          "document": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "infos": {
           "type": "number"
          },
          "by_rule": {
           "type": "object",
           "properties": {
            "lang-missing": {
             "type": "number"
            },
            "p-implied-close": {
             "type": "number"
            },
            "close-stray": {
             "type": "number"
            },
            "img-alt": {
             "type": "number"
            },
            "interactive-nesting": {
             "type": "number"
            },
            "id-duplicate": {
             "type": "number"
            },
            "attribute-obsolete": {
             "type": "number"
            },
            "charset-missing": {
             "type": "number"
            },
            "viewport-missing": {
             "type": "number"
            }
           }
          },
          "messages": {
           "type": "array",
           "items": {}
          },
          "see_also": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": false,
         "input": "html",
         "preset": "recommended",
         "document": true,
         "errors": 6,
         "warnings": 2,
         "infos": 1,
         "by_rule": {
          "lang-missing": 1,
          "p-implied-close": 1,
          "close-stray": 1,
          "img-alt": 1,
          "interactive-nesting": 1,
          "id-duplicate": 1,
          "attribute-obsolete": 1,
          "charset-missing": 1,
          "viewport-missing": 1
         },
         "messages": [
          {
           "rule": "charset-missing",
           "severity": "warning",
           "category": "document",
           "message": "No <meta charset=\"utf-8\">",
           "line": 1,
           "column": 1,
           "snippet": "<!doctype html>"
          },
          "…",
          {
           "rule": "p-implied-close",
           "severity": "warning",
           "category": "content",
           "message": "<div> is not allowed inside <p>; the <p> opened on line 5 is closed here, so a later </p> will be stray",
           "line": 5,
           "column": 10,
           "element": "div",
           "snippet": "<p>Intro <div>Sale</div></p>"
          },
          {
           "rule": "close-stray",
           "severity": "error",
           "category": "syntax",
           "message": "</p> without an open <p> (often a block element closed the paragraph earlier)",
           "line": 5,
           "column": 25,
           "element": "p",
           "snippet": "<p>Intro <div>Sale</div></p>"
          },
          {
           "rule": "img-alt",
           "severity": "error",
           "category": "a11y",
           "message": "<img src=\"banner.png\"> has no alt (use alt=\"\" for decorative images)",
           "line": 6,
           "column": 1,
           "element": "img",
           "snippet": "<img src=\"banner.png\">"
          },
          {
           "rule": "interactive-nesting",
           "severity": "error",
           "category": "content",
           "message": "<button> (interactive) inside <a>",
           "line": 7,
           "column": 17,
           "element": "button",
           "snippet": "<a href=\"/cart\"><button>Cart</button></a>"
          },
          {
           "rule": "id-duplicate",
           "severity": "error",
           "category": "attribute",
           "message": "Duplicate id \"x\" (first used on line 8)",
           "line": 8,
           "column": 24,
           "element": "div",
           "snippet": "<div id=\"x\"></div><div id=\"x\" align=\"center\"></div>"
          },
          {
           "rule": "attribute-obsolete",
           "severity": "error",
           "category": "attribute",
           "message": "Attribute \"align\" on <div> is obsolete: use CSS text-align / margin",
           "line": 8,
           "column": 31,
           "element": "div",
           "snippet": "<div id=\"x\"></div><div id=\"x\" align=\"center\"></div>"
          }
         ],
         "see_also": "Full WCAG audit with axe-core: /v1/a11y-check"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/email-compat": {
   "get": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML E-mail Compatibility Checker",
    "description": "Send an HTML e-mail (`html`, an `.eml` message, a file or a URL) and get the HTML elements and attributes, CSS properties, values, units, selectors, pseudo-classes and at-rules (@media, prefers-color-scheme, @font-face…) it uses, each with the share of tested clients that support it, the clients where it does not work or works partly, the first line where it appears, and a link to the Can I email page. A per-client view lists how many of the features each client (Gmail web / iOS / Android, Outlook Windows / Mac / Outlook.com, Apple Mail, Yahoo, Samsung Email, Thunderbird, ProtonMail…) supports and which ones break; `clients=gmail,outlook.windows` narrows the list.\n\nAlso checked: total size against Gmail's 102 KB clipping limit, images without alt or width, images and links over http://, <style> inside <body>, missing <title> / lang, and a hint to inline the CSS (see /v1/email-inline) when classes are styled from <style>. `feature=` or `search=` look up one feature's support table.\n\nStatic analysis only: no rendering or screenshots. Scores weight every client equally because there is no free, licence-compatible client market-share data. Data: Can I email by Rémi Parmentier (MIT), refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/email-compat/",
    "operationId": "emailCompatGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-compat/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the HTML (e.g. \"view in browser\" link).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "clients",
      "in": "query",
      "required": false,
      "description": "Limit to client families or family.platform: `gmail,outlook.windows,apple-mail,yahoo,samsung-email`…",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "feature",
      "in": "query",
      "required": false,
      "description": "Look up one feature (e.g. `css-display-flex`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "search",
      "in": "query",
      "required": false,
      "description": "Search features by keyword.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "full",
      "in": "query",
      "required": false,
      "description": "`1`: include the per-client table of every feature.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "size": {
           "type": "object",
           "properties": {
            "bytes": {
             "type": "number"
            },
            "kb": {
             "type": "number"
            },
            "gmail_clip_limit_kb": {
             "type": "number"
            },
            "clipped_in_gmail": {
             "type": "boolean"
            }
           }
          },
          "score": {
           "type": "number"
          },
          "features_used": {
           "type": "number"
          },
          "features": {
           "type": "array",
           "items": {}
          },
          "clients": {
           "type": "array",
           "items": {}
          },
          "issues": {
           "type": "array",
           "items": {}
          },
          "images": {
           "type": "number"
          },
          "images_missing_alt": {
           "type": "number"
          },
          "note": {
           "type": "string"
          },
          "meta": {
           "type": "object",
           "properties": {
            "data_updated": {
             "type": "string"
            },
            "features": {
             "type": "number"
            }
           }
          },
          "source": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Content & HTML"
    ],
    "summary": "HTML E-mail Compatibility Checker",
    "description": "Send an HTML e-mail (`html`, an `.eml` message, a file or a URL) and get the HTML elements and attributes, CSS properties, values, units, selectors, pseudo-classes and at-rules (@media, prefers-color-scheme, @font-face…) it uses, each with the share of tested clients that support it, the clients where it does not work or works partly, the first line where it appears, and a link to the Can I email page. A per-client view lists how many of the features each client (Gmail web / iOS / Android, Outlook Windows / Mac / Outlook.com, Apple Mail, Yahoo, Samsung Email, Thunderbird, ProtonMail…) supports and which ones break; `clients=gmail,outlook.windows` narrows the list.\n\nAlso checked: total size against Gmail's 102 KB clipping limit, images without alt or width, images and links over http://, <style> inside <body>, missing <title> / lang, and a hint to inline the CSS (see /v1/email-inline) when classes are styled from <style>. `feature=` or `search=` look up one feature's support table.\n\nStatic analysis only: no rendering or screenshots. Scores weight every client equally because there is no free, licence-compatible client market-share data. Data: Can I email by Rémi Parmentier (MIT), refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/email-compat/",
    "operationId": "emailCompatPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/email-compat/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the HTML (e.g. \"view in browser\" link).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "feature",
      "in": "query",
      "required": false,
      "description": "Look up one feature (e.g. `css-display-flex`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "search",
      "in": "query",
      "required": false,
      "description": "Search features by keyword.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "html": {
          "type": "string",
          "description": "HTML of the e-mail (max 5 MB). Or `eml`, `url` or a file."
         },
         "eml": {
          "type": "string",
          "description": "Raw .eml message; the text/html part is analysed."
         },
         "clients": {
          "type": "string",
          "description": "Limit to client families or family.platform: `gmail,outlook.windows,apple-mail,yahoo,samsung-email`…"
         },
         "full": {
          "type": "boolean",
          "description": "`1`: include the per-client table of every feature."
         }
        }
       },
       "example": {
        "html": "<html><head><style>@media (max-width:600px){.col{display:block}} .btn:hover{opacity:.8}</style></head><body><div style=\"display:flex;gap:12px;border-radius:8px\"><img src=\"http://cdn.example.com/logo.webp\"></div></body></html>",
        "clients": "gmail,outlook,apple-mail,yahoo"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "size": {
           "type": "object",
           "properties": {
            "bytes": {
             "type": "number"
            },
            "kb": {
             "type": "number"
            },
            "gmail_clip_limit_kb": {
             "type": "number"
            },
            "clipped_in_gmail": {
             "type": "boolean"
            }
           }
          },
          "score": {
           "type": "number"
          },
          "features_used": {
           "type": "number"
          },
          "features": {
           "type": "array",
           "items": {}
          },
          "clients": {
           "type": "array",
           "items": {}
          },
          "issues": {
           "type": "array",
           "items": {}
          },
          "images": {
           "type": "number"
          },
          "images_missing_alt": {
           "type": "number"
          },
          "note": {
           "type": "string"
          },
          "meta": {
           "type": "object",
           "properties": {
            "data_updated": {
             "type": "string"
            },
            "features": {
             "type": "number"
            }
           }
          },
          "source": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "html",
         "size": {
          "bytes": 225,
          "kb": 0.2,
          "gmail_clip_limit_kb": 102,
          "clipped_in_gmail": false
         },
         "score": 75,
         "features_used": 14,
         "features": [
          {
           "slug": "css-gap",
           "title": "gap, column-gap, row-gap",
           "category": "css",
           "count": 1,
           "first_line": 1,
           "example": "gap: 12px",
           "supported_pct": 37,
           "clients_tested": 15,
           "unsupported_in": [
            "Gmail (Mobile Webmail)",
            "Outlook (Windows)",
            "Outlook (Windows Mail)",
            "Yahoo! Mail (Desktop Webmail)",
            "Yahoo! Mail (iOS)",
            "Yahoo! Mail (Android)"
           ],
           "partial_in": [
            "Gmail (Desktop Webmail)",
            "Gmail (iOS)",
            "Gmail (Android)",
            "Outlook (macOS)",
            "Outlook (Outlook.com)",
            "Outlook (iOS)",
            "Outlook (Android)"
           ],
           "url": "https://www.caniemail.com/features/css-gap/"
          },
          "…"
         ],
         "clients": [
          {
           "client": "Outlook (Windows)",
           "yes": 5,
           "partial": 2,
           "no": 7,
           "unknown": 0,
           "problems": [
            "display:flex",
            "gap, column-gap, row-gap",
            "border-radius",
            "webP image format",
            "@media",
            ":hover",
            "opacity"
           ],
           "score": 43
          },
          "…"
         ],
         "issues": [
          {
           "level": "warning",
           "code": "img_missing_alt",
           "message": "<img> without alt (http://cdn.example.com/logo.webp)",
           "line": 1
          },
          {
           "level": "warning",
           "code": "insecure_image",
           "message": "Image loaded over http:// (http://cdn.example.com/logo.webp)",
           "line": 1
          },
          "…"
         ],
         "images": 1,
         "images_missing_alt": 1,
         "note": "Static analysis only (no rendering). Scores weight every client / platform equally: no free licence-compatible e-mail client market-share data exists.",
         "meta": {
          "data_updated": "2026-09-16",
          "features": 308
         },
         "source": "Can I email (https://www.caniemail.com) by Rémi Parmentier, MIT licence"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/schema-convert": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Schema Converter",
    "description": "Send a JSON Schema (object, JSON or YAML text, file or URL) and pick `to`. Code: `typescript` (interfaces / types with JSDoc), `zod` (schemas with min / max / regex / email / uuid / datetime refinements, `.strict()`, `z.lazy` for recursion, plus `z.infer` types) and `pydantic` (Pydantic v2 models with `Field()` constraints, aliases for non-identifier keys, `extra=\"forbid\"`); definitions / $defs become named types.\n\nDrafts: `2020-12`, `2019-09`, `draft-07`, `draft-06`, `draft-04` upgrade or downgrade the schema (definitions ↔ $defs, id ↔ $id, boolean ↔ numeric exclusiveMinimum / Maximum, items array ↔ prefixItems, dependencies ↔ dependentRequired / dependentSchemas, const ↔ enum, keywords next to $ref). OpenAPI: `openapi-3.0` turns JSON Schema into an OpenAPI 3.0 Schema Object (nullable, example, exclusive bounds, $defs → components.schemas); `json-schema` does the reverse and accepts a whole OpenAPI 3.0 (or Swagger 2.0) document. References: `bundle` pulls external $refs (from `refs` = {\"common.json\": {...}} or URLs with `fetch=1`) into $defs; `dereference` inlines every $ref and reports cycles (kept as $ref, or `circular=error`).\n\nWhatever cannot be expressed in the target is listed in `warnings`. Related: /v1/json-to-types infers types from sample JSON, /v1/schema-mock makes example data, /v1/openapi-tools works on whole API documents. `format=text` returns only the code.\n\nDocs: https://apibox.io.vn/docs/schema-convert/",
    "operationId": "schemaConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/schema-convert/"
    },
    "parameters": [
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`text`: return only the generated code as text/plain.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "schema": {
          "type": "object",
          "description": "JSON Schema (object, or JSON / YAML text; max 3 MB). Or a file / `url`."
         },
         "to": {
          "type": "string",
          "default": "typescript",
          "description": "`typescript`, `zod`, `pydantic`, `2020-12`, `2019-09`, `draft-07`, `draft-06`, `draft-04`, `openapi-3.0`, `json-schema`, `bundle` or `dereference`."
         },
         "from": {
          "type": "string",
          "description": "Source dialect if `$schema` is missing: `draft-04` … `2020-12` or `openapi-3.0` (auto-detected)."
         },
         "name": {
          "type": "string",
          "description": "Name of the root type (default: title or `Root`)."
         },
         "refs": {
          "type": "object",
          "description": "External documents for $ref, keyed by URI or file name."
         },
         "fetch": {
          "type": "boolean",
          "description": "`1`: download http(s) $ref targets (max 20)."
         },
         "circular": {
          "type": "string",
          "default": "ref",
          "description": "dereference: `ref` (keep cycles as $ref) or `error`."
         }
        },
        "required": [
         "schema"
        ]
       },
       "example": {
        "schema": {
         "title": "Order",
         "type": "object",
         "required": [
          "id",
          "items"
         ],
         "properties": {
          "id": {
           "type": "string",
           "format": "uuid"
          },
          "items": {
           "type": "array",
           "minItems": 1,
           "items": {
            "$ref": "#/$defs/Item"
           }
          },
          "note": {
           "type": [
            "string",
            "null"
           ],
           "maxLength": 500
          }
         },
         "$defs": {
          "Item": {
           "type": "object",
           "required": [
            "sku",
            "qty"
           ],
           "properties": {
            "sku": {
             "type": "string"
            },
            "qty": {
             "type": "integer",
             "minimum": 1
            }
           }
          }
         }
        },
        "to": "zod"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "to": {
           "type": "string"
          },
          "language": {
           "type": "string"
          },
          "code": {
           "type": "string"
          },
          "types": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "to": "zod",
         "language": "zod",
         "code": "// Generated from JSON Schema by apibox.io.vn /v1/schema-convert\nimport { z } from 'zod';\n\nexport const ItemSchema = z.object({\n  sku: z.string(),\n  qty: z.number().int().gte(1),\n});\nexport type Item = z.infer<typeof ItemSchema>;\n\nexport const OrderSchema = z.object({\n  id: z.string().uuid(),\n  items: z.array(ItemSchema).min(1),\n  note: z.string().max(500).nullable().optional(),\n});\nexport type Order = z.infer<typeof OrderSchema>;\n",
         "types": [
          "Order",
          "Item"
         ],
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "JSON Schema Converter",
    "description": "Send a JSON Schema (object, JSON or YAML text, file or URL) and pick `to`. Code: `typescript` (interfaces / types with JSDoc), `zod` (schemas with min / max / regex / email / uuid / datetime refinements, `.strict()`, `z.lazy` for recursion, plus `z.infer` types) and `pydantic` (Pydantic v2 models with `Field()` constraints, aliases for non-identifier keys, `extra=\"forbid\"`); definitions / $defs become named types.\n\nDrafts: `2020-12`, `2019-09`, `draft-07`, `draft-06`, `draft-04` upgrade or downgrade the schema (definitions ↔ $defs, id ↔ $id, boolean ↔ numeric exclusiveMinimum / Maximum, items array ↔ prefixItems, dependencies ↔ dependentRequired / dependentSchemas, const ↔ enum, keywords next to $ref). OpenAPI: `openapi-3.0` turns JSON Schema into an OpenAPI 3.0 Schema Object (nullable, example, exclusive bounds, $defs → components.schemas); `json-schema` does the reverse and accepts a whole OpenAPI 3.0 (or Swagger 2.0) document. References: `bundle` pulls external $refs (from `refs` = {\"common.json\": {...}} or URLs with `fetch=1`) into $defs; `dereference` inlines every $ref and reports cycles (kept as $ref, or `circular=error`).\n\nWhatever cannot be expressed in the target is listed in `warnings`. Related: /v1/json-to-types infers types from sample JSON, /v1/schema-mock makes example data, /v1/openapi-tools works on whole API documents. `format=text` returns only the code.\n\nDocs: https://apibox.io.vn/docs/schema-convert/",
    "operationId": "schemaConvertGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/schema-convert/"
    },
    "parameters": [
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "`typescript`, `zod`, `pydantic`, `2020-12`, `2019-09`, `draft-07`, `draft-06`, `draft-04`, `openapi-3.0`, `json-schema`, `bundle` or `dereference`.",
      "schema": {
       "type": "string",
       "default": "typescript"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Source dialect if `$schema` is missing: `draft-04` … `2020-12` or `openapi-3.0` (auto-detected).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "name",
      "in": "query",
      "required": false,
      "description": "Name of the root type (default: title or `Root`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fetch",
      "in": "query",
      "required": false,
      "description": "`1`: download http(s) $ref targets (max 20).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "circular",
      "in": "query",
      "required": false,
      "description": "dereference: `ref` (keep cycles as $ref) or `error`.",
      "schema": {
       "type": "string",
       "default": "ref"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`text`: return only the generated code as text/plain.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "to": {
           "type": "string"
          },
          "language": {
           "type": "string"
          },
          "code": {
           "type": "string"
          },
          "types": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-fx-revaluation": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam FX Revaluation (TT 99)",
    "description": "Send the foreign-currency balances (`items`: account, currency, amount in the currency, book value in VND or book rate) and the closing `rates` of the bank you regularly deal with. Under Thông tư 99/2025/TT-BTC (from 1/1/2026) every monetary item is revalued at the average of the buying and selling transfer rates; demand deposits at the rate of the bank holding the account. Give `rates` as a number (the average) or `{ \"buy\", \"sell\" }` and the API averages them; a per-item `rate` overrides it.\n\nThe answer lists each line (asset or liability, gain or loss), the net result, the journal entries (TT 99: straight to 515 / 635; `chart=tt133`: through 413 then the net to 515 / 635), an optional reversal on the next day, and the CIT treatment: revaluation differences of cash, deposits and receivables are excluded from taxable income, those of payables stay in (NĐ 320/2025/NĐ-CP Điều 3.3.h). Advances paid / received (`advance: true`) and monetary gold are excluded. `rate_basis=buy_sell` reproduces the former TT 200 rule for comparison. `format=xlsx` returns the revaluation sheet.\n\nReference only, not an audit or tax advice; each answer cites the rules and the review date.\n\nDocs: https://apibox.io.vn/docs/vn-fx-revaluation/",
    "operationId": "vnFxRevaluationPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fx-revaluation/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "Balances: `{ account, currency, amount, book_value | book_rate, name?, kind?, advance?, rate? | buy? sell? }` (up to 2,000). `kind` (cash, receivable, payable, other_asset, other_liability) is inferred from the account."
         },
         "rates": {
          "type": "object",
          "description": "Closing rates by currency: a number (average transfer rate) or `{ \"buy\", \"sell\" }`."
         },
         "date": {
          "type": "string",
          "description": "Period-end date (default 31/12 of the year being closed)."
         },
         "chart": {
          "type": "string",
          "default": "tt99",
          "description": "`tt99` (TT 99/2025) or `tt133` (SMEs, TT 133/2016: through 413)."
         },
         "rate_basis": {
          "type": "string",
          "default": "average",
          "description": "`average` (current rule) or `buy_sell` (former TT 200 rule, comparison)."
         },
         "reverse_next_period": {
          "type": "boolean",
          "description": "Add the reversal entries on the next day (company policy)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         }
        },
        "required": [
         "items"
        ]
       },
       "example": {
        "date": "2026-12-31",
        "items": [
         {
          "account": "1122",
          "currency": "USD",
          "amount": 10000,
          "book_value": 254000000,
          "name": "VCB"
         },
         {
          "account": "331",
          "currency": "USD",
          "amount": 5000,
          "book_rate": 25600,
          "name": "Supplier A"
         }
        ],
        "rates": {
         "USD": {
          "buy": 26100,
          "sell": 26400
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "chart": {
           "type": "string"
          },
          "circular": {
           "type": "string"
          },
          "rate_basis": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "account": {
              "type": "string"
             },
             "account_name": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "currency": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "book_value": {
              "type": "number"
             },
             "book_rate": {
              "type": "number"
             },
             "closing_rate": {
              "type": "number"
             },
             "rate_source": {
              "type": "string"
             },
             "revalued_value": {
              "type": "number"
             },
             "difference": {
              "type": "number"
             },
             "result": {
              "type": "string"
             },
             "gain_loss": {
              "type": "number"
             },
             "cit_treatment": {
              "type": "string"
             }
            }
           }
          },
          "excluded": {
           "type": "array"
          },
          "totals": {
           "type": "object",
           "properties": {
            "gains": {
             "type": "number"
            },
            "losses": {
             "type": "number"
            },
            "net": {
             "type": "number"
            },
            "result": {
             "type": "string"
            },
            "presented_as": {
             "type": "string"
            }
           }
          },
          "entries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "debit": {
              "type": "string"
             },
             "credit": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "memo_vi": {
              "type": "string"
             },
             "debit_name": {
              "type": "string"
             },
             "credit_name": {
              "type": "string"
             }
            }
           }
          },
          "cit": {
           "type": "object",
           "properties": {
            "revaluation_net": {
             "type": "number"
            },
            "excluded_net": {
             "type": "number"
            },
            "included_net": {
             "type": "number"
            },
            "adjustment": {
             "type": "object",
             "properties": {
              "add_back_losses": {
               "type": "number"
              },
              "deduct_gains": {
               "type": "number"
              }
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-12-31",
         "chart": "tt99",
         "circular": "99/2025/TT-BTC",
         "rate_basis": "average",
         "items": [
          {
           "index": 0,
           "account": "1122",
           "account_name": "Tiền gửi không kỳ hạn",
           "name": "VCB",
           "kind": "cash",
           "currency": "USD",
           "amount": 10000,
           "book_value": 254000000,
           "book_rate": 25400,
           "closing_rate": 26250,
           "rate_source": "(buy + sell) / 2",
           "revalued_value": 262500000,
           "difference": 8500000,
           "result": "gain",
           "gain_loss": 8500000,
           "cit_treatment": "excluded"
          },
          {
           "index": 1,
           "account": "331",
           "account_name": "Phải trả cho người bán",
           "name": "Supplier A",
           "kind": "payable",
           "currency": "USD",
           "amount": 5000,
           "book_value": 128000000,
           "book_rate": 25600,
           "closing_rate": 26250,
           "rate_source": "(buy + sell) / 2",
           "revalued_value": 131250000,
           "difference": 3250000,
           "result": "loss",
           "gain_loss": -3250000,
           "cit_treatment": "included"
          }
         ],
         "excluded": [],
         "totals": {
          "gains": 8500000,
          "losses": 3250000,
          "net": 5250000,
          "result": "net_gain",
          "presented_as": "Doanh thu hoạt động tài chính (515)"
         },
         "entries": [
          {
           "debit": "1122",
           "credit": "515",
           "amount": 8500000,
           "memo_vi": "Đánh giá lại 1122 (VCB) 10,000 USD theo tỷ giá 26,250",
           "debit_name": "Tiền gửi không kỳ hạn",
           "credit_name": "Doanh thu hoạt động tài chính"
          },
          {
           "debit": "635",
           "credit": "331",
           "amount": 3250000,
           "memo_vi": "Đánh giá lại 331 (Supplier A) 5,000 USD theo tỷ giá 26,250",
           "debit_name": "Chi phí tài chính",
           "credit_name": "Phải trả cho người bán"
          }
         ],
         "cit": {
          "revaluation_net": 5250000,
          "excluded_net": 8500000,
          "included_net": -3250000,
          "adjustment": {
           "add_back_losses": 0,
           "deduct_gains": 8500000
          }
         },
         "reviewed": "2026-11-16",
         "disclaimer": "Reference only, not legal / tax / accounting advice and not a substitute for an audit; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam FX Revaluation (TT 99)",
    "description": "Send the foreign-currency balances (`items`: account, currency, amount in the currency, book value in VND or book rate) and the closing `rates` of the bank you regularly deal with. Under Thông tư 99/2025/TT-BTC (from 1/1/2026) every monetary item is revalued at the average of the buying and selling transfer rates; demand deposits at the rate of the bank holding the account. Give `rates` as a number (the average) or `{ \"buy\", \"sell\" }` and the API averages them; a per-item `rate` overrides it.\n\nThe answer lists each line (asset or liability, gain or loss), the net result, the journal entries (TT 99: straight to 515 / 635; `chart=tt133`: through 413 then the net to 515 / 635), an optional reversal on the next day, and the CIT treatment: revaluation differences of cash, deposits and receivables are excluded from taxable income, those of payables stay in (NĐ 320/2025/NĐ-CP Điều 3.3.h). Advances paid / received (`advance: true`) and monetary gold are excluded. `rate_basis=buy_sell` reproduces the former TT 200 rule for comparison. `format=xlsx` returns the revaluation sheet.\n\nReference only, not an audit or tax advice; each answer cites the rules and the review date.\n\nDocs: https://apibox.io.vn/docs/vn-fx-revaluation/",
    "operationId": "vnFxRevaluationGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fx-revaluation/"
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "chart": {
           "type": "string"
          },
          "circular": {
           "type": "string"
          },
          "rate_basis": {
           "type": "string"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "account": {
              "type": "string"
             },
             "account_name": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "currency": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "book_value": {
              "type": "number"
             },
             "book_rate": {
              "type": "number"
             },
             "closing_rate": {
              "type": "number"
             },
             "rate_source": {
              "type": "string"
             },
             "revalued_value": {
              "type": "number"
             },
             "difference": {
              "type": "number"
             },
             "result": {
              "type": "string"
             },
             "gain_loss": {
              "type": "number"
             },
             "cit_treatment": {
              "type": "string"
             }
            }
           }
          },
          "excluded": {
           "type": "array"
          },
          "totals": {
           "type": "object",
           "properties": {
            "gains": {
             "type": "number"
            },
            "losses": {
             "type": "number"
            },
            "net": {
             "type": "number"
            },
            "result": {
             "type": "string"
            },
            "presented_as": {
             "type": "string"
            }
           }
          },
          "entries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "debit": {
              "type": "string"
             },
             "credit": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "memo_vi": {
              "type": "string"
             },
             "debit_name": {
              "type": "string"
             },
             "credit_name": {
              "type": "string"
             }
            }
           }
          },
          "cit": {
           "type": "object",
           "properties": {
            "revaluation_net": {
             "type": "number"
            },
            "excluded_net": {
             "type": "number"
            },
            "included_net": {
             "type": "number"
            },
            "adjustment": {
             "type": "object",
             "properties": {
              "add_back_losses": {
               "type": "number"
              },
              "deduct_gains": {
               "type": "number"
              }
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-provisions": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Year-End Provisions (TT 48)",
    "description": "Send the lists you have: `receivables` (amount, due date, debtor status), `inventory` (quantity, unit cost, net realisable value), `securities` (book value, quantity, market price), `investments` (ownership %, the investee's owners' capital 411 + 412 and equity 410) and `warranties` (revenue or contract value, estimated cost). The API applies Thông tư 48/2019/TT-BTC as amended by Thông tư 24/2022/TT-BTC: doubtful debts 30% (6 months – < 1 year overdue), 50%, 70%, 100% (≥ 3 years), or the faster scale for telecom / retail sales to individuals; debtors bankrupt, missing, prosecuted or dead: estimated loss; inventory = quantity × (cost − NRV); listed securities = book value − quantity × market price (government bonds excluded); investments = ownership % × (invested capital − equity), capped at the book value; warranties ≤ 5% of revenue or contract value.\n\nWith the `opening` balances it computes the additional charge or the reversal for each provision and the journal entries (TT 99/2025 accounts 2291–2294, 3521 / 3522; `chart=tt133` for SMEs). `format=xlsx` returns the working papers. TT 48/2019 applies until a replacement circular is issued and at the latest 31/12/2026 (QĐ 1760/QĐ-BTC); a draft replacement is pending and the answer says so.\n\nReference only, not tax or audit advice.\n\nDocs: https://apibox.io.vn/docs/vn-provisions/",
    "operationId": "vnProvisionsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-provisions/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "receivables": {
          "type": "array",
          "items": {},
          "description": "`{ debtor, amount, due_date, status?, individual?, estimated_loss?, has_documents? }`; status: bankrupt, dissolving, missing, prosecuted, ill, dead, closed."
         },
         "inventory": {
          "type": "array",
          "items": {},
          "description": "`{ name, quantity, unit_cost, nrv | selling_price + costs_to_complete + selling_costs }`."
         },
         "securities": {
          "type": "array",
          "items": {},
          "description": "`{ name, kind (listed, upcom, corporate_bond, government_bond), book_value, quantity, market_price, no_trade? }`."
         },
         "investments": {
          "type": "array",
          "items": {},
          "description": "`{ name, ownership_percent, owners_capital, equity, book_value, foreign? }` from the investee's statements at the same date."
         },
         "warranties": {
          "type": "array",
          "items": {},
          "description": "`{ name, kind (product, construction), revenue | contract_value, estimated_cost | rate_percent }`."
         },
         "opening": {
          "type": "object",
          "description": "Opening balances by type: `{ \"bad_debt\": 30000000, \"inventory\": 0, … }`."
         },
         "date": {
          "type": "string",
          "description": "Reporting date (default 31/12)."
         },
         "retail_or_telecom": {
          "type": "boolean",
          "description": "Telecom / retail enterprise selling to individuals on deferred terms (3 / 6 / 9 / 12-month scale)."
         },
         "chart": {
          "type": "string",
          "default": "tt99",
          "description": "`tt99` or `tt133`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx`."
         }
        }
       },
       "example": {
        "date": "2026-12-31",
        "receivables": [
         {
          "debtor": "Cty A",
          "amount": 100000000,
          "due_date": "2025-03-15"
         },
         {
          "debtor": "Cty B",
          "amount": 40000000,
          "due_date": "2026-05-31"
         }
        ],
        "inventory": [
         {
          "name": "Thép",
          "quantity": 100,
          "unit_cost": 50000,
          "nrv": 42000
         }
        ],
        "opening": {
         "bad_debt": 30000000
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "chart": {
           "type": "string"
          },
          "sections": {
           "type": "object",
           "properties": {
            "inventory": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "bad_debt": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "summary": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "account": {
              "type": "string"
             },
             "account_name": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "required_balance": {
              "type": "number"
             },
             "opening_balance": {
              "type": "number"
             },
             "change": {
              "type": "number"
             },
             "action": {
              "type": "string"
             }
            }
           }
          },
          "net_charge": {
           "type": "number"
          },
          "entries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "debit": {
              "type": "string"
             },
             "credit": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "memo_vi": {
              "type": "string"
             },
             "debit_name": {
              "type": "string"
             },
             "credit_name": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-12-31",
         "chart": "tt99",
         "sections": {
          "inventory": [
           {
            "name": "Thép",
            "quantity": 100,
            "unit_cost": 50000,
            "nrv_per_unit": 42000,
            "cost_value": 5000000,
            "nrv_value": 4200000,
            "provision": 800000
           }
          ],
          "bad_debt": [
           {
            "debtor": "Cty A",
            "amount": 100000000,
            "due_date": "2025-03-15",
            "overdue_months": 21,
            "scale": "general",
            "rate_percent": 50,
            "provision": 50000000,
            "basis": "overdue 21 month(s)"
           },
           {
            "debtor": "Cty B",
            "amount": 40000000,
            "due_date": "2026-05-31",
            "overdue_months": 7,
            "scale": "general",
            "rate_percent": 30,
            "provision": 12000000,
            "basis": "overdue 7 month(s)"
           }
          ]
         },
         "summary": [
          {
           "type": "inventory",
           "account": "2294",
           "account_name": "Dự phòng giảm giá hàng tồn kho",
           "name_vi": "Dự phòng giảm giá hàng tồn kho",
           "required_balance": 800000,
           "opening_balance": 0,
           "change": 800000,
           "action": "additional_charge"
          },
          {
           "type": "bad_debt",
           "account": "2293",
           "account_name": "Dự phòng phải thu khó đòi",
           "name_vi": "Dự phòng phải thu khó đòi",
           "required_balance": 62000000,
           "opening_balance": 30000000,
           "change": 32000000,
           "action": "additional_charge"
          }
         ],
         "net_charge": 32800000,
         "entries": [
          {
           "debit": "632",
           "credit": "2294",
           "amount": 800000,
           "memo_vi": "Trích lập bổ sung dự phòng giảm giá hàng tồn kho",
           "debit_name": "Giá vốn hàng bán",
           "credit_name": "Dự phòng giảm giá hàng tồn kho"
          },
          {
           "debit": "6426",
           "credit": "2293",
           "amount": 32000000,
           "memo_vi": "Trích lập bổ sung dự phòng phải thu khó đòi",
           "debit_name": "Chi phí dự phòng",
           "credit_name": "Dự phòng phải thu khó đòi"
          }
         ],
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Year-End Provisions (TT 48)",
    "description": "Send the lists you have: `receivables` (amount, due date, debtor status), `inventory` (quantity, unit cost, net realisable value), `securities` (book value, quantity, market price), `investments` (ownership %, the investee's owners' capital 411 + 412 and equity 410) and `warranties` (revenue or contract value, estimated cost). The API applies Thông tư 48/2019/TT-BTC as amended by Thông tư 24/2022/TT-BTC: doubtful debts 30% (6 months – < 1 year overdue), 50%, 70%, 100% (≥ 3 years), or the faster scale for telecom / retail sales to individuals; debtors bankrupt, missing, prosecuted or dead: estimated loss; inventory = quantity × (cost − NRV); listed securities = book value − quantity × market price (government bonds excluded); investments = ownership % × (invested capital − equity), capped at the book value; warranties ≤ 5% of revenue or contract value.\n\nWith the `opening` balances it computes the additional charge or the reversal for each provision and the journal entries (TT 99/2025 accounts 2291–2294, 3521 / 3522; `chart=tt133` for SMEs). `format=xlsx` returns the working papers. TT 48/2019 applies until a replacement circular is issued and at the latest 31/12/2026 (QĐ 1760/QĐ-BTC); a draft replacement is pending and the answer says so.\n\nReference only, not tax or audit advice.\n\nDocs: https://apibox.io.vn/docs/vn-provisions/",
    "operationId": "vnProvisionsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-provisions/"
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "chart": {
           "type": "string"
          },
          "sections": {
           "type": "object",
           "properties": {
            "inventory": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "bad_debt": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "summary": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "account": {
              "type": "string"
             },
             "account_name": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "required_balance": {
              "type": "number"
             },
             "opening_balance": {
              "type": "number"
             },
             "change": {
              "type": "number"
             },
             "action": {
              "type": "string"
             }
            }
           }
          },
          "net_charge": {
           "type": "number"
          },
          "entries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "debit": {
              "type": "string"
             },
             "credit": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             },
             "memo_vi": {
              "type": "string"
             },
             "debit_name": {
              "type": "string"
             },
             "credit_name": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-tax-residency": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam PIT Tax Residency (183 days)",
    "description": "Send the `trips` (entry and exit dates; an empty exit means still in Vietnam until `as_of`). The API counts the days of presence the way Nghị định 253/2026/NĐ-CP Điều 4 does from 1/7/2026 (the arrival day counts as one day and the departure day as one day; in and out on the same day = 1 day), per calendar year and over the 12 consecutive months from the first day of presence, and adds habitual residence (`permanent_residence`, or leases of `rental_days` ≥ 183 in the year).\n\nFor each year it says resident or non-resident with the reasons, the tax period (calendar year, or the first 12 months from the first day when the 183 days are only reached that way, NĐ 253/2026 Điều 66.1.a), and the consequence: progressive 5-bracket tax with family deductions (link to `/v1/vn-pit-annual`) or 20% on Vietnam-sourced salary. `count_method=tt111` recounts with the former rule (arrival and departure days together as one day) and the answer flags years whose result changes.\n\nDates are processed in the request only and never stored. Reference only, not tax advice; check tax treaties with `/v1/vn-tax-treaty`.\n\nDocs: https://apibox.io.vn/docs/vn-tax-residency/",
    "operationId": "vnTaxResidencyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-residency/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "trips": {
          "type": "array",
          "items": {},
          "description": "`[{ \"entry\": \"2026-03-10\", \"exit\": \"2026-06-20\" }, …]` (up to 1,000; DD/MM/YYYY accepted; empty exit = still in Vietnam)."
         },
         "as_of": {
          "type": "string",
          "description": "Count open trips up to this date (default today)."
         },
         "year": {
          "type": "number",
          "description": "Only this tax year."
         },
         "permanent_residence": {
          "type": "boolean",
          "description": "Registered permanent / temporary residence in Vietnam."
         },
         "rental_days": {
          "type": "number",
          "description": "Days covered by housing leases in the tax year (incl. hotels, guest houses)."
         },
         "foreign_residence_certificate": {
          "type": "boolean",
          "description": "Can prove tax residence of another country (residence certificate)."
         },
         "count_method": {
          "type": "string",
          "default": "nd253",
          "description": "`nd253` (current) or `tt111` (former rule)."
         }
        },
        "required": [
         "trips"
        ]
       },
       "example": {
        "trips": [
         {
          "entry": "2026-03-10",
          "exit": "2026-06-20"
         },
         {
          "entry": "2026-09-01",
          "exit": "2026-10-15"
         },
         {
          "entry": "2027-01-05",
          "exit": "2027-03-31"
         }
        ],
        "as_of": "2027-11-16"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count_method": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "first_day": {
           "type": "string"
          },
          "first_12_months": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "days_present": {
             "type": "number"
            }
           }
          },
          "total_days_present": {
           "type": "number"
          },
          "years": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "number"
             },
             "days_present": {
              "type": "number"
             },
             "resident": {
              "type": "boolean"
             },
             "reasons": {
              "type": "array"
             },
             "tax_period": {},
             "consequence": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "other_method": {
           "type": "object",
           "properties": {
            "method": {
             "type": "string"
            },
            "first_12_months": {
             "type": "number"
            },
            "years_that_change": {
             "type": "array"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "privacy": {
           "type": "string"
          }
         }
        },
        "example": {
         "count_method": "nd253",
         "as_of": "2027-11-16",
         "first_day": "2026-03-10",
         "first_12_months": {
          "from": "2026-03-10",
          "to": "2027-03-09",
          "days_present": 212
         },
         "total_days_present": 234,
         "years": [
          {
           "year": 2026,
           "days_present": 148,
           "resident": true,
           "reasons": [
            "212 days present in the 12 consecutive months from the first day 2026-03-10 (≥ 183)"
           ],
           "tax_period": {
            "from": "2026-03-10",
            "to": "2027-03-09",
            "kind": "first_12_months"
           },
           "consequence": {
            "regime": "resident",
            "tools": [
             "/v1/vn-pit-annual",
             "/v1/vn-salary"
            ]
           }
          },
          {
           "year": 2027,
           "days_present": 86,
           "resident": false,
           "reasons": [
            "86 days present in 2027; no habitual residence"
           ],
           "tax_period": null,
           "consequence": {
            "regime": "non_resident",
            "salary_tax": "20% of the salary for work in Vietnam (NĐ 253/2026 Điều 64.1; 20% also under the former law)."
           }
          }
         ],
         "other_method": {
          "method": "tt111",
          "first_12_months": 210,
          "years_that_change": []
         },
         "reviewed": "2026-11-16",
         "privacy": "Dates are processed in the request only and never stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam PIT Tax Residency (183 days)",
    "description": "Send the `trips` (entry and exit dates; an empty exit means still in Vietnam until `as_of`). The API counts the days of presence the way Nghị định 253/2026/NĐ-CP Điều 4 does from 1/7/2026 (the arrival day counts as one day and the departure day as one day; in and out on the same day = 1 day), per calendar year and over the 12 consecutive months from the first day of presence, and adds habitual residence (`permanent_residence`, or leases of `rental_days` ≥ 183 in the year).\n\nFor each year it says resident or non-resident with the reasons, the tax period (calendar year, or the first 12 months from the first day when the 183 days are only reached that way, NĐ 253/2026 Điều 66.1.a), and the consequence: progressive 5-bracket tax with family deductions (link to `/v1/vn-pit-annual`) or 20% on Vietnam-sourced salary. `count_method=tt111` recounts with the former rule (arrival and departure days together as one day) and the answer flags years whose result changes.\n\nDates are processed in the request only and never stored. Reference only, not tax advice; check tax treaties with `/v1/vn-tax-treaty`.\n\nDocs: https://apibox.io.vn/docs/vn-tax-residency/",
    "operationId": "vnTaxResidencyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-tax-residency/"
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count_method": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "first_day": {
           "type": "string"
          },
          "first_12_months": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "days_present": {
             "type": "number"
            }
           }
          },
          "total_days_present": {
           "type": "number"
          },
          "years": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "number"
             },
             "days_present": {
              "type": "number"
             },
             "resident": {
              "type": "boolean"
             },
             "reasons": {
              "type": "array"
             },
             "tax_period": {},
             "consequence": {
              "type": "object",
              "properties": {}
             }
            }
           }
          },
          "other_method": {
           "type": "object",
           "properties": {
            "method": {
             "type": "string"
            },
            "first_12_months": {
             "type": "number"
            },
            "years_that_change": {
             "type": "array"
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "privacy": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-hkd-vs-company": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Household Business vs Company (Vietnam)",
    "description": "Enter the expected annual `revenue`, the business `sector`, deductible `expenses`, employee `payroll` and optionally the owner's insurance base or salary. The API runs the existing `/v1/vn-household-tax` core for the household business (lump-sum tax abolished from 2026, threshold 1 billion VND, % of revenue or 15–20% of income, 30% PIT reduction for 2026–2027) and `/v1/vn-cit` for a company (CIT 15% / 17% / 20%, 30% reduction for revenue ≤ 10 billion in 2026–2027), adds employer insurance (21.5%), the trade-union fee for enterprises (2%), the owner's compulsory social and health insurance (29.5% of the chosen base), and compares the cash left to the owner.\n\nVAT is shown separately: a household pays a % of the whole revenue (a cost), a company charges VAT on top and deducts input VAT. `by_revenue` repeats the comparison at 0.5× to 50× the revenue with the same cost ratios to show where the answer flips. The answer cites the rules (NQ 198/2025/QH15, NĐ 20/2026/NĐ-CP, NĐ 68/2026, NĐ 320/2025, NĐ 398/2026, Luật BHXH 2024) and marks what could not be verified (CIT exemption after converting a household business).\n\nA planning estimate, not tax or legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-hkd-vs-company/",
    "operationId": "vnHkdVsCompanyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hkd-vs-company/"
    },
    "parameters": [
     {
      "name": "revenue",
      "in": "query",
      "required": true,
      "description": "Expected annual revenue (VND, excluding VAT).",
      "schema": {
       "type": "number"
      },
      "example": 3000000000
     },
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "Household sector: distribution, services, production, asset_leasing, real_estate_leasing, agency, digital_content, other.",
      "schema": {
       "type": "string",
       "default": "distribution"
      },
      "example": "distribution"
     },
     {
      "name": "expenses",
      "in": "query",
      "required": false,
      "description": "Deductible costs with invoices (goods, rent…), excluding payroll.",
      "schema": {
       "type": "number"
      },
      "example": 2400000000
     },
     {
      "name": "payroll",
      "in": "query",
      "required": false,
      "description": "Annual salaries of employees (insurance base).",
      "schema": {
       "type": "number"
      },
      "example": 200000000
     },
     {
      "name": "owner_insurance_base",
      "in": "query",
      "required": false,
      "description": "Monthly social-insurance base chosen by the owner (default the reference level; 0 = leave out).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "owner_salary",
      "in": "query",
      "required": false,
      "description": "Annual salary paid to the owner by the company (deductible).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "vat_rate",
      "in": "query",
      "required": false,
      "description": "Company VAT rate (%).",
      "schema": {
       "type": "number",
       "default": 10
      }
     },
     {
      "name": "input_vat",
      "in": "query",
      "required": false,
      "description": "Company input VAT (default expenses × vat_rate).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "accounting_cost_company",
      "in": "query",
      "required": false,
      "description": "Annual accounting / compliance cost of the company.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "bookkeeping_cost_household",
      "in": "query",
      "required": false,
      "description": "Annual bookkeeping cost of the household business.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Tax year (2026–2030).",
      "schema": {
       "type": "number"
      },
      "example": 2026
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "household": {
           "type": "object",
           "properties": {
            "vat": {
             "type": "number"
            },
            "pit": {
             "type": "number"
            },
            "pit_method": {
             "type": "string"
            },
            "pit_reduction_30": {
             "type": "number"
            },
            "employer_insurance": {
             "type": "number"
            },
            "owner_insurance": {
             "type": "number"
            },
            "bookkeeping": {
             "type": "number"
            },
            "total_tax": {
             "type": "number"
            },
            "total_tax_and_insurance": {
             "type": "number"
            },
            "owner_cash_after_tax": {
             "type": "number"
            }
           }
          },
          "company": {
           "type": "object",
           "properties": {
            "vat_payable": {
             "type": "number"
            },
            "output_vat": {
             "type": "number"
            },
            "input_vat": {
             "type": "number"
            },
            "profit_before_tax": {
             "type": "number"
            },
            "cit_rate_percent": {
             "type": "number"
            },
            "cit": {
             "type": "number"
            },
            "cit_reduction_30": {
             "type": "number"
            },
            "employer_insurance": {
             "type": "number"
            },
            "union_fee": {
             "type": "number"
            },
            "owner_insurance": {
             "type": "number"
            },
            "total_tax": {
             "type": "number"
            },
            "total_tax_and_insurance": {
             "type": "number"
            },
            "owner_cash_after_tax": {
             "type": "number"
            }
           }
          },
          "comparison": {
           "type": "object",
           "properties": {
            "owner_cash_difference": {
             "type": "number"
            },
            "better": {
             "type": "string"
            },
            "tax_and_insurance_household": {
             "type": "number"
            },
            "tax_and_insurance_company": {
             "type": "number"
            }
           }
          },
          "by_revenue": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "revenue": {
              "type": "number"
             },
             "household_cash": {
              "type": "number"
             },
             "company_cash": {
              "type": "number"
             },
             "better": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2026,
         "household": {
          "vat": 30000000,
          "pit": 7000000,
          "pit_method": "revenue",
          "pit_reduction_30": 3000000,
          "employer_insurance": 43000000,
          "owner_insurance": 8619900,
          "bookkeeping": 0,
          "total_tax": 37000000,
          "total_tax_and_insurance": 88619900,
          "owner_cash_after_tax": 311380100
         },
         "company": {
          "vat_payable": 60000000,
          "output_vat": 300000000,
          "input_vat": 240000000,
          "profit_before_tax": 353000000,
          "cit_rate_percent": 15,
          "cit": 37065000,
          "cit_reduction_30": 15885000,
          "employer_insurance": 43000000,
          "union_fee": 4000000,
          "owner_insurance": 8619900,
          "total_tax": 37065000,
          "total_tax_and_insurance": 92684900,
          "owner_cash_after_tax": 307315100
         },
         "comparison": {
          "owner_cash_difference": 4065000,
          "better": "household",
          "tax_and_insurance_household": 88619900,
          "tax_and_insurance_company": 92684900
         },
         "by_revenue": [
          {
           "revenue": 3000000000,
           "household_cash": 311380100,
           "company_cash": 307315100,
           "better": "household"
          },
          {
           "revenue": 6000000000,
           "household_cash": 560414100,
           "company_cash": 613366100,
           "better": "company"
          }
         ],
         "reviewed": "2026-11-16"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Household Business vs Company (Vietnam)",
    "description": "Enter the expected annual `revenue`, the business `sector`, deductible `expenses`, employee `payroll` and optionally the owner's insurance base or salary. The API runs the existing `/v1/vn-household-tax` core for the household business (lump-sum tax abolished from 2026, threshold 1 billion VND, % of revenue or 15–20% of income, 30% PIT reduction for 2026–2027) and `/v1/vn-cit` for a company (CIT 15% / 17% / 20%, 30% reduction for revenue ≤ 10 billion in 2026–2027), adds employer insurance (21.5%), the trade-union fee for enterprises (2%), the owner's compulsory social and health insurance (29.5% of the chosen base), and compares the cash left to the owner.\n\nVAT is shown separately: a household pays a % of the whole revenue (a cost), a company charges VAT on top and deducts input VAT. `by_revenue` repeats the comparison at 0.5× to 50× the revenue with the same cost ratios to show where the answer flips. The answer cites the rules (NQ 198/2025/QH15, NĐ 20/2026/NĐ-CP, NĐ 68/2026, NĐ 320/2025, NĐ 398/2026, Luật BHXH 2024) and marks what could not be verified (CIT exemption after converting a household business).\n\nA planning estimate, not tax or legal advice.\n\nDocs: https://apibox.io.vn/docs/vn-hkd-vs-company/",
    "operationId": "vnHkdVsCompanyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hkd-vs-company/"
    },
    "parameters": [
     {
      "name": "revenue",
      "in": "query",
      "required": false,
      "description": "Expected annual revenue (VND, excluding VAT).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "Household sector: distribution, services, production, asset_leasing, real_estate_leasing, agency, digital_content, other.",
      "schema": {
       "type": "string",
       "default": "distribution"
      }
     },
     {
      "name": "expenses",
      "in": "query",
      "required": false,
      "description": "Deductible costs with invoices (goods, rent…), excluding payroll.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "payroll",
      "in": "query",
      "required": false,
      "description": "Annual salaries of employees (insurance base).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "owner_insurance_base",
      "in": "query",
      "required": false,
      "description": "Monthly social-insurance base chosen by the owner (default the reference level; 0 = leave out).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "owner_salary",
      "in": "query",
      "required": false,
      "description": "Annual salary paid to the owner by the company (deductible).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "vat_rate",
      "in": "query",
      "required": false,
      "description": "Company VAT rate (%).",
      "schema": {
       "type": "number",
       "default": 10
      }
     },
     {
      "name": "input_vat",
      "in": "query",
      "required": false,
      "description": "Company input VAT (default expenses × vat_rate).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "accounting_cost_company",
      "in": "query",
      "required": false,
      "description": "Annual accounting / compliance cost of the company.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "bookkeeping_cost_household",
      "in": "query",
      "required": false,
      "description": "Annual bookkeeping cost of the household business.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Tax year (2026–2030).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "household": {
           "type": "object",
           "properties": {
            "vat": {
             "type": "number"
            },
            "pit": {
             "type": "number"
            },
            "pit_method": {
             "type": "string"
            },
            "pit_reduction_30": {
             "type": "number"
            },
            "employer_insurance": {
             "type": "number"
            },
            "owner_insurance": {
             "type": "number"
            },
            "bookkeeping": {
             "type": "number"
            },
            "total_tax": {
             "type": "number"
            },
            "total_tax_and_insurance": {
             "type": "number"
            },
            "owner_cash_after_tax": {
             "type": "number"
            }
           }
          },
          "company": {
           "type": "object",
           "properties": {
            "vat_payable": {
             "type": "number"
            },
            "output_vat": {
             "type": "number"
            },
            "input_vat": {
             "type": "number"
            },
            "profit_before_tax": {
             "type": "number"
            },
            "cit_rate_percent": {
             "type": "number"
            },
            "cit": {
             "type": "number"
            },
            "cit_reduction_30": {
             "type": "number"
            },
            "employer_insurance": {
             "type": "number"
            },
            "union_fee": {
             "type": "number"
            },
            "owner_insurance": {
             "type": "number"
            },
            "total_tax": {
             "type": "number"
            },
            "total_tax_and_insurance": {
             "type": "number"
            },
            "owner_cash_after_tax": {
             "type": "number"
            }
           }
          },
          "comparison": {
           "type": "object",
           "properties": {
            "owner_cash_difference": {
             "type": "number"
            },
            "better": {
             "type": "string"
            },
            "tax_and_insurance_household": {
             "type": "number"
            },
            "tax_and_insurance_company": {
             "type": "number"
            }
           }
          },
          "by_revenue": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "revenue": {
              "type": "number"
             },
             "household_cash": {
              "type": "number"
             },
             "company_cash": {
              "type": "number"
             },
             "better": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cashflow-calc": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Cash Flow Calculator (NPV, IRR, XIRR, Bonds)",
    "description": "Send `cashflows` (the investment as a negative number first, e.g. `[-10000, 3000, 4200, 6800]`, or objects `{ \"date\", \"amount\" }` for dated flows) and a discount `rate` (10, \"10%\" or 0.1; or one rate per period). The answer gives NPV (first flow at t = 0) and `excel_npv` (Excel's NPV over all flows), IRR (every root when the flows change sign several times, with a warning), MIRR with `finance_rate` / `reinvest_rate`, simple and discounted payback, present values of inflows and outflows, benefit / cost ratio, profitability index and a sensitivity table of NPV when inflows and outflows move by ±x%. Dated flows give XNPV / XIRR (actual days / 365 like Excel) and the payback date. Optional break-even from fixed costs, unit price and unit variable cost.\n\n`type=bond` prices a bond from its yield or solves the yield from a clean price (Excel PRICE / YIELD conventions, day-count `basis` 0–4, annual / semi-annual / quarterly coupons) and returns accrued interest, dirty price, coupon dates and Macaulay / modified duration. Results reproduce the examples in the Excel documentation (NPV 1,188.44; IRR 8.66%; XIRR 37.34%; MIRR 12.61%; PRICE 94.6344).\n\n`format=xlsx` returns a workbook with live Excel formulas (NPV, IRR, MIRR, XIRR, XNPV) so you can check the numbers. Up to 10,000 flows.\n\nDocs: https://apibox.io.vn/docs/cashflow-calc/",
    "operationId": "cashflowCalcPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cashflow-calc/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "cashflows": {
          "type": "array",
          "items": {},
          "description": "Numbers per period (first = t 0) or `{ date, amount }` objects. Required unless `inflows` / `outflows` or `type=bond`."
         },
         "rate": {
          "type": "number",
          "description": "Discount rate (10, \"10%\" or 0.1) or an array, one per period."
         },
         "finance_rate": {
          "type": "number",
          "description": "MIRR finance rate (default = rate)."
         },
         "reinvest_rate": {
          "type": "number",
          "description": "MIRR reinvestment rate (default = rate)."
         },
         "inflows": {
          "type": "array",
          "items": {},
          "description": "Inflows per period (with `outflows`), for B/C and sensitivity on each side."
         },
         "outflows": {
          "type": "array",
          "items": {},
          "description": "Outflows per period (positive numbers)."
         },
         "sensitivity": {
          "type": "array",
          "items": {},
          "description": "Percent steps (default [-20, -10, 0, 10, 20])."
         },
         "guess": {
          "type": "number",
          "description": "IRR / XIRR picked closest to this rate when several exist (default 10%)."
         },
         "type": {
          "type": "string",
          "default": "project",
          "description": "`project` or `bond`."
         },
         "settlement": {
          "type": "string",
          "description": "Bond: settlement date."
         },
         "maturity": {
          "type": "string",
          "description": "Bond: maturity date."
         },
         "coupon_rate": {
          "type": "number",
          "description": "Bond: annual coupon rate."
         },
         "yield": {
          "type": "number",
          "description": "Bond: yield to maturity (to get the price)."
         },
         "price": {
          "type": "number",
          "description": "Bond: clean price per 100 (to get the yield)."
         },
         "frequency": {
          "type": "number",
          "default": 1,
          "description": "Bond: coupons per year (1, 2, 4, 12)."
         },
         "basis": {
          "type": "number",
          "default": 0,
          "description": "Bond: Excel day-count basis 0–4."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx` (projects)."
         }
        }
       },
       "example": {
        "cashflows": [
         -10000,
         3000,
         4200,
         6800
        ],
        "rate": 10,
        "finance_rate": 10,
        "reinvest_rate": 12
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "flows": {
           "type": "number"
          },
          "total_inflows": {
           "type": "number"
          },
          "total_outflows": {
           "type": "number"
          },
          "net": {
           "type": "number"
          },
          "irr": {
           "type": "number"
          },
          "irr_percent": {
           "type": "number"
          },
          "payback_periods": {
           "type": "number"
          },
          "rate": {
           "type": "number"
          },
          "npv": {
           "type": "number"
          },
          "excel_npv": {
           "type": "number"
          },
          "discounted_payback_periods": {
           "type": "number"
          },
          "pv_inflows": {
           "type": "number"
          },
          "pv_outflows": {
           "type": "number"
          },
          "benefit_cost_ratio": {
           "type": "number"
          },
          "profitability_index": {
           "type": "number"
          },
          "decision": {
           "type": "string"
          },
          "mirr": {
           "type": "number"
          },
          "mirr_percent": {
           "type": "number"
          },
          "finance_rate": {
           "type": "number"
          },
          "reinvest_rate": {
           "type": "number"
          },
          "notes": {
           "type": "array"
          }
         }
        },
        "example": {
         "type": "project",
         "flows": 4,
         "total_inflows": 14000,
         "total_outflows": -10000,
         "net": 4000,
         "irr": 0.1634056007,
         "irr_percent": 16.34056,
         "payback_periods": 2.411764705882353,
         "rate": 0.1,
         "npv": 1307.287754,
         "excel_npv": 1188.443412,
         "discounted_payback_periods": 2.7441176470588236,
         "pv_inflows": 11307.287754,
         "pv_outflows": 10000,
         "benefit_cost_ratio": 1.130729,
         "profitability_index": 1.130729,
         "decision": "accept (NPV > 0)",
         "mirr": 0.15147133664676304,
         "mirr_percent": 15.147134,
         "finance_rate": 0.1,
         "reinvest_rate": 0.12,
         "notes": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Cash Flow Calculator (NPV, IRR, XIRR, Bonds)",
    "description": "Send `cashflows` (the investment as a negative number first, e.g. `[-10000, 3000, 4200, 6800]`, or objects `{ \"date\", \"amount\" }` for dated flows) and a discount `rate` (10, \"10%\" or 0.1; or one rate per period). The answer gives NPV (first flow at t = 0) and `excel_npv` (Excel's NPV over all flows), IRR (every root when the flows change sign several times, with a warning), MIRR with `finance_rate` / `reinvest_rate`, simple and discounted payback, present values of inflows and outflows, benefit / cost ratio, profitability index and a sensitivity table of NPV when inflows and outflows move by ±x%. Dated flows give XNPV / XIRR (actual days / 365 like Excel) and the payback date. Optional break-even from fixed costs, unit price and unit variable cost.\n\n`type=bond` prices a bond from its yield or solves the yield from a clean price (Excel PRICE / YIELD conventions, day-count `basis` 0–4, annual / semi-annual / quarterly coupons) and returns accrued interest, dirty price, coupon dates and Macaulay / modified duration. Results reproduce the examples in the Excel documentation (NPV 1,188.44; IRR 8.66%; XIRR 37.34%; MIRR 12.61%; PRICE 94.6344).\n\n`format=xlsx` returns a workbook with live Excel formulas (NPV, IRR, MIRR, XIRR, XNPV) so you can check the numbers. Up to 10,000 flows.\n\nDocs: https://apibox.io.vn/docs/cashflow-calc/",
    "operationId": "cashflowCalcGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cashflow-calc/"
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "flows": {
           "type": "number"
          },
          "total_inflows": {
           "type": "number"
          },
          "total_outflows": {
           "type": "number"
          },
          "net": {
           "type": "number"
          },
          "irr": {
           "type": "number"
          },
          "irr_percent": {
           "type": "number"
          },
          "payback_periods": {
           "type": "number"
          },
          "rate": {
           "type": "number"
          },
          "npv": {
           "type": "number"
          },
          "excel_npv": {
           "type": "number"
          },
          "discounted_payback_periods": {
           "type": "number"
          },
          "pv_inflows": {
           "type": "number"
          },
          "pv_outflows": {
           "type": "number"
          },
          "benefit_cost_ratio": {
           "type": "number"
          },
          "profitability_index": {
           "type": "number"
          },
          "decision": {
           "type": "string"
          },
          "mirr": {
           "type": "number"
          },
          "mirr_percent": {
           "type": "number"
          },
          "finance_rate": {
           "type": "number"
          },
          "reinvest_rate": {
           "type": "number"
          },
          "notes": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-calendar-print": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Printable Vietnamese Lunar Calendar (PDF/SVG)",
    "description": "Generate a calendar for any `year` 2021–2199 in four `layout`s: `wall` (12 month pages), `desk` (12 landscape pages with an events column), `block` (one page per day: big solar day, weekday, lunar day and month length, can chi of year / month / day, hoàng đạo hours, solar term, holiday, quote) and `year` (one page). Lunar dates come from the Vietnamese calendar at UTC+7 (Hồ Ngọc Đức's algorithm used by `/v1/lunar-calendar`): Tết Đinh Mùi is 06/02/2027 and the 12th month of Bính Ngọ has 29 days. Days off come from `/v1/vn-holidays`, hoàng đạo / hắc đạo from `/v1/vn-good-days`.\n\nOptions: `size` (a2, a3, a4, a5, a6, 13x19, 19x27, 10x15, letter or `width_mm` + `height_mm`), `orientation`, `bleed_mm` (0–10, with crop marks and PDF TrimBox / BleedBox), theme `color`, `company` name, `logo` (PNG / JPEG), `company_holidays`, `quotes` (one per month or day), `week_start` (monday or sunday) and a month range. `format=pdf` (default, Be Vietnam Pro embedded), `svg` (one page: `page` or `date`) or `json` (the day data used for the layout).\n\nA full 365-page block calendar renders in about a second. Colours are RGB; ask your printer to convert to CMYK.\n\nDocs: https://apibox.io.vn/docs/vn-calendar-print/",
    "operationId": "vnCalendarPrintPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-calendar-print/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "year": {
          "type": "number",
          "description": "Year 2021–2199 (default next year from July)."
         },
         "layout": {
          "type": "string",
          "default": "wall",
          "description": "`wall`, `desk`, `block` or `year`."
         },
         "format": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf`, `svg` (one page) or `json`."
         },
         "size": {
          "type": "string",
          "description": "a2, a3, a4, a5, a6, 13x19, 19x27, 10x15, letter (default by layout)."
         },
         "orientation": {
          "type": "string",
          "description": "`portrait` or `landscape`."
         },
         "bleed_mm": {
          "type": "number",
          "default": 0,
          "description": "Bleed in mm (0–10); adds crop marks."
         },
         "color": {
          "type": "string",
          "default": "#b3122e",
          "description": "Theme colour (hex)."
         },
         "company": {
          "type": "string",
          "description": "Company name printed on each page."
         },
         "company_holidays": {
          "type": "array",
          "items": {},
          "description": "`[{ \"date\": \"2027-02-11\", \"name\": \"Nghỉ bù\" }]` (up to 100)."
         },
         "quotes": {
          "type": "array",
          "items": {},
          "description": "Quotes / greetings (up to 366, one per line accepted)."
         },
         "week_start": {
          "type": "string",
          "default": "monday",
          "description": "`monday` or `sunday`."
         },
         "from_month": {
          "type": "number",
          "description": "First month to print (1–12)."
         },
         "to_month": {
          "type": "number",
          "description": "Last month to print (1–12)."
         },
         "page": {
          "type": "number",
          "description": "SVG: page number to return."
         },
         "date": {
          "type": "string",
          "description": "SVG block layout: the day to return."
         },
         "good_days": {
          "type": "boolean",
          "default": true,
          "description": "Block layout: print hoàng đạo / hắc đạo and trực."
         }
        }
       },
       "example": {
        "year": 2027,
        "format": "json",
        "from_month": 2,
        "to_month": 2
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "year": {
          "type": "number",
          "description": "Year 2021–2199 (default next year from July)."
         },
         "layout": {
          "type": "string",
          "default": "wall",
          "description": "`wall`, `desk`, `block` or `year`."
         },
         "format": {
          "type": "string",
          "default": "pdf",
          "description": "`pdf`, `svg` (one page) or `json`."
         },
         "size": {
          "type": "string",
          "description": "a2, a3, a4, a5, a6, 13x19, 19x27, 10x15, letter (default by layout)."
         },
         "orientation": {
          "type": "string",
          "description": "`portrait` or `landscape`."
         },
         "bleed_mm": {
          "type": "number",
          "default": 0,
          "description": "Bleed in mm (0–10); adds crop marks."
         },
         "color": {
          "type": "string",
          "default": "#b3122e",
          "description": "Theme colour (hex)."
         },
         "company": {
          "type": "string",
          "description": "Company name printed on each page."
         },
         "logo": {
          "type": "string",
          "format": "binary",
          "description": "Logo PNG / JPEG (multipart or `logo_base64`, ≤ 2 MB)."
         },
         "company_holidays": {
          "type": "array",
          "items": {},
          "description": "`[{ \"date\": \"2027-02-11\", \"name\": \"Nghỉ bù\" }]` (up to 100)."
         },
         "quotes": {
          "type": "array",
          "items": {},
          "description": "Quotes / greetings (up to 366, one per line accepted)."
         },
         "week_start": {
          "type": "string",
          "default": "monday",
          "description": "`monday` or `sunday`."
         },
         "from_month": {
          "type": "number",
          "description": "First month to print (1–12)."
         },
         "to_month": {
          "type": "number",
          "description": "Last month to print (1–12)."
         },
         "page": {
          "type": "number",
          "description": "SVG: page number to return."
         },
         "date": {
          "type": "string",
          "description": "SVG block layout: the day to return."
         },
         "good_days": {
          "type": "boolean",
          "default": true,
          "description": "Block layout: print hoàng đạo / hắc đạo and trực."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "can_chi_year": {
           "type": "string"
          },
          "tet": {
           "type": "string"
          },
          "layout": {
           "type": "string"
          },
          "paper_mm": {
           "type": "object",
           "properties": {
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            },
            "bleed": {
             "type": "number"
            }
           }
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "weekday_vi": {
              "type": "string"
             },
             "lunar": {
              "type": "string"
             },
             "lunar_month_length": {
              "type": "number"
             },
             "can_chi": {
              "type": "object",
              "properties": {}
             },
             "solar_term": {
              "type": "string"
             },
             "lucky_hours": {
              "type": "array"
             },
             "festival": {
              "type": "string"
             },
             "day_off": {
              "type": "string"
             },
             "company": {},
             "observance": {},
             "red": {
              "type": "boolean"
             }
            }
           }
          },
          "months": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "month": {
              "type": "number"
             },
             "lunar_span": {
              "type": "string"
             },
             "events": {
              "type": "array"
             }
            }
           }
          }
         }
        },
        "example": {
         "year": 2027,
         "can_chi_year": "Đinh Mùi",
         "tet": "2027-02-06",
         "layout": "wall",
         "paper_mm": {
          "width": 297,
          "height": 420,
          "bleed": 0
         },
         "days": [
          {
           "date": "2027-02-05",
           "weekday_vi": "Thứ Sáu",
           "lunar": "29/12/2026",
           "lunar_month_length": 29,
           "can_chi": {
            "year": "Bính Ngọ",
            "month": "Tân Sửu",
            "day": "Ất Mão",
            "first_hour": "Bính Tý"
           },
           "solar_term": "Lập xuân",
           "lucky_hours": [
            "Tý",
            "Dần",
            "Mão",
            "Ngọ",
            "Mùi",
            "Dậu"
           ],
           "festival": "Giao thừa (Tất niên)",
           "day_off": "Tết Nguyên đán",
           "company": null,
           "observance": null,
           "red": true
          },
          {
           "date": "2027-02-06",
           "weekday_vi": "Thứ Bảy",
           "lunar": "01/01/2027",
           "lunar_month_length": 30,
           "can_chi": {
            "year": "Đinh Mùi",
            "month": "Nhâm Dần",
            "day": "Bính Thìn",
            "first_hour": "Mậu Tý"
           },
           "solar_term": "Lập xuân",
           "lucky_hours": [
            "Dần",
            "Thìn",
            "Tỵ",
            "Thân",
            "Dậu",
            "Hợi"
           ],
           "festival": "Tết Nguyên Đán",
           "day_off": "Tết Nguyên đán",
           "company": null,
           "observance": null,
           "red": true
          }
         ],
         "months": [
          {
           "month": 2,
           "lunar_span": "Âm lịch: tháng Chạp Bính Ngọ – tháng Giêng Đinh Mùi",
           "events": [
            "04/02 (28/12 ÂL): Tết Nguyên đán",
            "05/02 (29/12 ÂL): Giao thừa (Tất niên); Tết Nguyên đán",
            "06/02 (1/1 ÂL): Tết Nguyên đán; Mùng 1",
            "20/02 (15/1 ÂL): Tết Nguyên Tiêu (Rằm tháng Giêng); Rằm"
           ]
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "Printable Vietnamese Lunar Calendar (PDF/SVG)",
    "description": "Generate a calendar for any `year` 2021–2199 in four `layout`s: `wall` (12 month pages), `desk` (12 landscape pages with an events column), `block` (one page per day: big solar day, weekday, lunar day and month length, can chi of year / month / day, hoàng đạo hours, solar term, holiday, quote) and `year` (one page). Lunar dates come from the Vietnamese calendar at UTC+7 (Hồ Ngọc Đức's algorithm used by `/v1/lunar-calendar`): Tết Đinh Mùi is 06/02/2027 and the 12th month of Bính Ngọ has 29 days. Days off come from `/v1/vn-holidays`, hoàng đạo / hắc đạo from `/v1/vn-good-days`.\n\nOptions: `size` (a2, a3, a4, a5, a6, 13x19, 19x27, 10x15, letter or `width_mm` + `height_mm`), `orientation`, `bleed_mm` (0–10, with crop marks and PDF TrimBox / BleedBox), theme `color`, `company` name, `logo` (PNG / JPEG), `company_holidays`, `quotes` (one per month or day), `week_start` (monday or sunday) and a month range. `format=pdf` (default, Be Vietnam Pro embedded), `svg` (one page: `page` or `date`) or `json` (the day data used for the layout).\n\nA full 365-page block calendar renders in about a second. Colours are RGB; ask your printer to convert to CMYK.\n\nDocs: https://apibox.io.vn/docs/vn-calendar-print/",
    "operationId": "vnCalendarPrintGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-calendar-print/"
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "can_chi_year": {
           "type": "string"
          },
          "tet": {
           "type": "string"
          },
          "layout": {
           "type": "string"
          },
          "paper_mm": {
           "type": "object",
           "properties": {
            "width": {
             "type": "number"
            },
            "height": {
             "type": "number"
            },
            "bleed": {
             "type": "number"
            }
           }
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string"
             },
             "weekday_vi": {
              "type": "string"
             },
             "lunar": {
              "type": "string"
             },
             "lunar_month_length": {
              "type": "number"
             },
             "can_chi": {
              "type": "object",
              "properties": {}
             },
             "solar_term": {
              "type": "string"
             },
             "lucky_hours": {
              "type": "array"
             },
             "festival": {
              "type": "string"
             },
             "day_off": {
              "type": "string"
             },
             "company": {},
             "observance": {},
             "red": {
              "type": "boolean"
             }
            }
           }
          },
          "months": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "month": {
              "type": "number"
             },
             "lunar_span": {
              "type": "string"
             },
             "events": {
              "type": "array"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-fta-origin": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "FTA Rules of Origin Calculator (RVC, CTC)",
    "description": "Send the agreement (`fta`: atiga, acfta, akfta, ajcep, vjepa, vkfta, aanzfta, aifta, rcep, cptpp, evfta, ukvfta), the HS code of the finished good, its FOB value (`ex_works` for EVFTA / UKVFTA) and the bill of materials (`materials`: `[{hs, value, origin}]`, origin as an ISO country code or `originating: true/false`). Optional `costs` {labour, overhead, profit, other} enable the direct / build-up formula.\n\nThe result gives RVC by every method of the agreement (ASEAN direct and indirect, RCEP build-up / build-down, CPTPP focused value, build-down and build-up, EU MaxNOM), the tariff-shift test of each non-originating material at chapter, heading or subheading level, the de minimis or tolerance (10 % of FOB / ex-works), and a pass / fail for every alternative of the rule.\n\nWithout `rule` the general rule of the agreement is used (RVC40 or CTH for ATIGA, ACFTA, AKFTA, AJCEP, VJEPA, VKFTA, AANZFTA; RVC35 and CTSH for AIFTA). RCEP, CPTPP, EVFTA and UKVFTA only have product-specific rules: pass `rule` such as `RVC40 or CTH`, `RVC45(BD) or RVC35(BU) or CTH` or `MaxNOM70` from the PSR annex. PSR tables are not bundled; textile rules by weight are not computed.\n\nDocs: https://apibox.io.vn/docs/vn-fta-origin/",
    "operationId": "vnFtaOriginGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fta-origin/"
    },
    "parameters": [
     {
      "name": "fta",
      "in": "query",
      "required": true,
      "description": "atiga, acfta, akfta, ajcep, vjepa, vkfta, aanzfta, aifta, rcep, cptpp, evfta, ukvfta (empty: list).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hs",
      "in": "query",
      "required": true,
      "description": "HS code of the finished good (4–10 digits).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fob",
      "in": "query",
      "required": true,
      "description": "FOB value (ex_works for EVFTA / UKVFTA).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "rule",
      "in": "query",
      "required": false,
      "description": "Product-specific rule, e.g. \"RVC40 or CTH\", \"MaxNOM70\", \"RVC45(BD) or RVC35(BU)\".",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "fta": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "form": {
             "type": "string"
            },
            "circular": {
             "type": "string"
            },
            "de_minimis_pct": {
             "type": "number"
            },
            "de_minimis_base": {
             "type": "string"
            }
           }
          },
          "product": {
           "type": "object",
           "properties": {
            "hs": {
             "type": "string"
            },
            "description_vi": {
             "type": "string"
            }
           }
          },
          "fob": {
           "type": "number"
          },
          "originating": {
           "type": "boolean"
          },
          "rule": {
           "type": "object",
           "properties": {
            "text": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "alternatives": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "pass": {
              "type": "boolean"
             },
             "terms": {
              "type": "array"
             }
            }
           }
          },
          "rvc": {
           "type": "object",
           "properties": {
            "direct": {
             "type": "number"
            },
            "indirect": {
             "type": "number"
            },
            "cptpp_build_up": {
             "type": "number"
            },
            "cptpp_focused_value": {
             "type": "number"
            },
            "max_nom": {
             "type": "number"
            }
           }
          },
          "confidence": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "FTA Rules of Origin Calculator (RVC, CTC)",
    "description": "Send the agreement (`fta`: atiga, acfta, akfta, ajcep, vjepa, vkfta, aanzfta, aifta, rcep, cptpp, evfta, ukvfta), the HS code of the finished good, its FOB value (`ex_works` for EVFTA / UKVFTA) and the bill of materials (`materials`: `[{hs, value, origin}]`, origin as an ISO country code or `originating: true/false`). Optional `costs` {labour, overhead, profit, other} enable the direct / build-up formula.\n\nThe result gives RVC by every method of the agreement (ASEAN direct and indirect, RCEP build-up / build-down, CPTPP focused value, build-down and build-up, EU MaxNOM), the tariff-shift test of each non-originating material at chapter, heading or subheading level, the de minimis or tolerance (10 % of FOB / ex-works), and a pass / fail for every alternative of the rule.\n\nWithout `rule` the general rule of the agreement is used (RVC40 or CTH for ATIGA, ACFTA, AKFTA, AJCEP, VJEPA, VKFTA, AANZFTA; RVC35 and CTSH for AIFTA). RCEP, CPTPP, EVFTA and UKVFTA only have product-specific rules: pass `rule` such as `RVC40 or CTH`, `RVC45(BD) or RVC35(BU) or CTH` or `MaxNOM70` from the PSR annex. PSR tables are not bundled; textile rules by weight are not computed.\n\nDocs: https://apibox.io.vn/docs/vn-fta-origin/",
    "operationId": "vnFtaOriginPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fta-origin/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "fta": {
          "type": "string",
          "description": "atiga, acfta, akfta, ajcep, vjepa, vkfta, aanzfta, aifta, rcep, cptpp, evfta, ukvfta (empty: list)."
         },
         "hs": {
          "type": "string",
          "description": "HS code of the finished good (4–10 digits)."
         },
         "fob": {
          "type": "number",
          "description": "FOB value (ex_works for EVFTA / UKVFTA)."
         },
         "materials": {
          "type": "array",
          "items": {},
          "description": "[{name, hs, value, origin, originating?, focused?}]"
         },
         "costs": {
          "type": "object",
          "description": "{labour, overhead, profit, other} for the direct / build-up formula."
         },
         "rule": {
          "type": "string",
          "description": "Product-specific rule, e.g. \"RVC40 or CTH\", \"MaxNOM70\", \"RVC45(BD) or RVC35(BU)\"."
         }
        },
        "required": [
         "fta",
         "hs",
         "fob",
         "materials"
        ]
       },
       "example": {
        "fta": "atiga",
        "hs": "9403.60.90",
        "fob": 100,
        "materials": [
         {
          "name": "Gỗ xẻ",
          "hs": "4407.11",
          "value": 30,
          "origin": "VN"
         },
         {
          "name": "Vít",
          "hs": "7318.15",
          "value": 5,
          "origin": "CN"
         },
         {
          "name": "Vải bọc",
          "hs": "5407.52",
          "value": 15,
          "origin": "CN"
         }
        ],
        "costs": {
         "labour": 10,
         "overhead": 5,
         "profit": 10
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "fta": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "form": {
             "type": "string"
            },
            "circular": {
             "type": "string"
            },
            "de_minimis_pct": {
             "type": "number"
            },
            "de_minimis_base": {
             "type": "string"
            }
           }
          },
          "product": {
           "type": "object",
           "properties": {
            "hs": {
             "type": "string"
            },
            "description_vi": {
             "type": "string"
            }
           }
          },
          "fob": {
           "type": "number"
          },
          "originating": {
           "type": "boolean"
          },
          "rule": {
           "type": "object",
           "properties": {
            "text": {
             "type": "string"
            },
            "source": {
             "type": "string"
            }
           }
          },
          "alternatives": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "rule": {
              "type": "string"
             },
             "pass": {
              "type": "boolean"
             },
             "terms": {
              "type": "array"
             }
            }
           }
          },
          "rvc": {
           "type": "object",
           "properties": {
            "direct": {
             "type": "number"
            },
            "indirect": {
             "type": "number"
            },
            "cptpp_build_up": {
             "type": "number"
            },
            "cptpp_focused_value": {
             "type": "number"
            },
            "max_nom": {
             "type": "number"
            }
           }
          },
          "confidence": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "fta": {
          "id": "atiga",
          "form": "D",
          "circular": "Thông tư 22/2016/TT-BCT (consolidated 29/VBHN-BCT 10/12/2024; Phụ lục replaced by TT 03/2023/TT-BCT)",
          "de_minimis_pct": 10,
          "de_minimis_base": "fob"
         },
         "product": {
          "hs": "94036090",
          "description_vi": "Đồ nội thất khác và các bộ phận của chúng > Đồ nội thất bằng gỗ khác: > Loại khác"
         },
         "fob": 100,
         "originating": true,
         "rule": {
          "text": "RVC40 or CTH",
          "source": "general rule of the agreement"
         },
         "alternatives": [
          {
           "rule": "RVC40",
           "pass": true,
           "terms": [
            {
             "term": "RVC40",
             "pass": true,
             "values": {
              "direct": 55,
              "indirect": 80
             },
             "threshold": 40,
             "method_used": "direct"
            }
           ]
          },
          {
           "rule": "CTH",
           "pass": true,
           "terms": [
            {
             "term": "CTH",
             "pass": true,
             "de_minimis_used": false,
             "failing_materials": [],
             "detail": "Every non-originating material changes heading (4 digits)."
            }
           ]
          }
         ],
         "rvc": {
          "direct": 55,
          "indirect": 80,
          "cptpp_build_up": 30,
          "cptpp_focused_value": 100,
          "max_nom": 20
         },
         "confidence": "high_for_general_rule",
         "disclaimer": "Reference only, not legal or tax advice; check the official text and your customs / verification body."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-ghg-inventory": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam GHG Inventory Calculator",
    "description": "`action=obligation` checks the criteria of Decree 06/2022/NĐ-CP Article 6 (as amended by Decrees 119/2025 and 83/2026): 3,000 tCO2e a year, or 1,000 TOE for thermal power, industry, freight transport and commercial buildings, or 65,000 t of solid waste a year. It returns the duties and deadlines: biennial facility inventory to the province before 31 March (next 31/3/2027), mitigation plan 2026–2030, and for thermal power, steel and cement the verified report before 1 December from 2027 and emission allowances.\n\n`action=calc` (default when `fuels` or `electricity_kwh` is sent) computes scope 1 from fuels (`[{fuel, quantity, unit, sector}]`: diesel, gasoline, fuel_oil, lpg, natural_gas, anthracite, sub_bituminous, kerosene, jet_kerosene, biomass, charcoal… in l, kg, t, GJ, TJ, MWh, MMBtu) with the emission factors of Decision 2626/QĐ-BTNMT and scope 2 from grid electricity with the official grid factor (2024: 0.6187 tCO2/MWh, `grid_year` 2022–2024). GWP sets AR4, AR5 (default) or AR6; TOE is estimated for the obligation test. `custom` lines take your own factors (refrigerants, waste, scope 3).\n\nThe facility list of QĐ 42/2026/QĐ-TTg (2,441 facilities, in force 25/9/2026) is the binding test and is not bundled.\n\nDocs: https://apibox.io.vn/docs/vn-ghg-inventory/",
    "operationId": "vnGhgInventoryGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ghg-inventory/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "obligation, calc or factors.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "facility_type",
      "in": "query",
      "required": false,
      "description": "thermal_power, industrial, freight_transport, commercial_building, solid_waste, other.",
      "schema": {
       "type": "string",
       "default": "other"
      }
     },
     {
      "name": "annual_emissions_tco2e",
      "in": "query",
      "required": false,
      "description": "Annual emissions (obligation test).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "energy_toe",
      "in": "query",
      "required": false,
      "description": "Annual energy use in TOE.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "steel, cement or thermal_power for the allowance pilot.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "electricity_kwh",
      "in": "query",
      "required": false,
      "description": "Grid electricity used (kWh).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "grid_year",
      "in": "query",
      "required": false,
      "description": "Grid factor year (2022–2024) or grid_ef.",
      "schema": {
       "type": "number",
       "default": 2024
      }
     },
     {
      "name": "gwp",
      "in": "query",
      "required": false,
      "description": "ar4, ar5 or ar6.",
      "schema": {
       "type": "string",
       "default": "ar5"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "gwp": {
           "type": "string"
          },
          "totals": {
           "type": "object",
           "properties": {
            "scope1_tco2e": {
             "type": "number"
            },
            "scope2_tco2e": {
             "type": "number"
            },
            "scope1_2_tco2e": {
             "type": "number"
            },
            "scope3_tco2e": {
             "type": "number"
            },
            "biogenic_co2_t": {
             "type": "number"
            },
            "fuel_energy_gj": {
             "type": "number"
            },
            "energy_toe": {
             "type": "number"
            }
           }
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "scope": {
              "type": "number"
             },
             "fuel": {
              "type": "string"
             },
             "sector": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "energy_gj": {
              "type": "number"
             },
             "ef_kg_per_tj": {
              "type": "object"
             },
             "co2_t": {
              "type": "number"
             },
             "ch4_kg": {
              "type": "number"
             },
             "n2o_kg": {
              "type": "number"
             },
             "tco2e": {
              "type": "number"
             },
             "source": {
              "type": "string"
             },
             "ef_tco2_per_mwh": {
              "type": "number"
             },
             "grid_year": {
              "type": "number"
             }
            }
           }
          },
          "obligation": {
           "type": "object",
           "properties": {
            "in_scope": {
             "type": "boolean"
            },
            "reasons": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "quota_sector": {
             "type": "boolean"
            },
            "duties": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "assumptions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam GHG Inventory Calculator",
    "description": "`action=obligation` checks the criteria of Decree 06/2022/NĐ-CP Article 6 (as amended by Decrees 119/2025 and 83/2026): 3,000 tCO2e a year, or 1,000 TOE for thermal power, industry, freight transport and commercial buildings, or 65,000 t of solid waste a year. It returns the duties and deadlines: biennial facility inventory to the province before 31 March (next 31/3/2027), mitigation plan 2026–2030, and for thermal power, steel and cement the verified report before 1 December from 2027 and emission allowances.\n\n`action=calc` (default when `fuels` or `electricity_kwh` is sent) computes scope 1 from fuels (`[{fuel, quantity, unit, sector}]`: diesel, gasoline, fuel_oil, lpg, natural_gas, anthracite, sub_bituminous, kerosene, jet_kerosene, biomass, charcoal… in l, kg, t, GJ, TJ, MWh, MMBtu) with the emission factors of Decision 2626/QĐ-BTNMT and scope 2 from grid electricity with the official grid factor (2024: 0.6187 tCO2/MWh, `grid_year` 2022–2024). GWP sets AR4, AR5 (default) or AR6; TOE is estimated for the obligation test. `custom` lines take your own factors (refrigerants, waste, scope 3).\n\nThe facility list of QĐ 42/2026/QĐ-TTg (2,441 facilities, in force 25/9/2026) is the binding test and is not bundled.\n\nDocs: https://apibox.io.vn/docs/vn-ghg-inventory/",
    "operationId": "vnGhgInventoryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ghg-inventory/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "obligation, calc or factors."
         },
         "facility_type": {
          "type": "string",
          "default": "other",
          "description": "thermal_power, industrial, freight_transport, commercial_building, solid_waste, other."
         },
         "annual_emissions_tco2e": {
          "type": "number",
          "description": "Annual emissions (obligation test)."
         },
         "energy_toe": {
          "type": "number",
          "description": "Annual energy use in TOE."
         },
         "sector": {
          "type": "string",
          "description": "steel, cement or thermal_power for the allowance pilot."
         },
         "fuels": {
          "type": "array",
          "items": {},
          "description": "[{fuel, quantity, unit, sector, ncv_gj_per_t?, density_kg_per_l?}]"
         },
         "electricity_kwh": {
          "type": "number",
          "description": "Grid electricity used (kWh)."
         },
         "grid_year": {
          "type": "number",
          "default": 2024,
          "description": "Grid factor year (2022–2024) or grid_ef."
         },
         "gwp": {
          "type": "string",
          "default": "ar5",
          "description": "ar4, ar5 or ar6."
         },
         "custom": {
          "type": "array",
          "items": {},
          "description": "[{name, quantity, unit, factor_kgco2e_per_unit, scope}]"
         }
        }
       },
       "example": {
        "facility_type": "industrial",
        "fuels": [
         {
          "fuel": "diesel",
          "quantity": 100000,
          "unit": "l",
          "sector": "manufacturing"
         }
        ],
        "electricity_kwh": 5000000
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "gwp": {
           "type": "string"
          },
          "totals": {
           "type": "object",
           "properties": {
            "scope1_tco2e": {
             "type": "number"
            },
            "scope2_tco2e": {
             "type": "number"
            },
            "scope1_2_tco2e": {
             "type": "number"
            },
            "scope3_tco2e": {
             "type": "number"
            },
            "biogenic_co2_t": {
             "type": "number"
            },
            "fuel_energy_gj": {
             "type": "number"
            },
            "energy_toe": {
             "type": "number"
            }
           }
          },
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "scope": {
              "type": "number"
             },
             "fuel": {
              "type": "string"
             },
             "sector": {
              "type": "string"
             },
             "quantity": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "energy_gj": {
              "type": "number"
             },
             "ef_kg_per_tj": {
              "type": "object"
             },
             "co2_t": {
              "type": "number"
             },
             "ch4_kg": {
              "type": "number"
             },
             "n2o_kg": {
              "type": "number"
             },
             "tco2e": {
              "type": "number"
             },
             "source": {
              "type": "string"
             },
             "ef_tco2_per_mwh": {
              "type": "number"
             },
             "grid_year": {
              "type": "number"
             }
            }
           }
          },
          "obligation": {
           "type": "object",
           "properties": {
            "in_scope": {
             "type": "boolean"
            },
            "reasons": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "quota_sector": {
             "type": "boolean"
            },
            "duties": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          },
          "assumptions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "calc",
         "gwp": "IPCC AR5 (100-year)",
         "totals": {
          "scope1_tco2e": 268.53,
          "scope2_tco2e": 3093.5,
          "scope1_2_tco2e": 3362.03,
          "scope3_tco2e": 0,
          "biogenic_co2_t": 0,
          "fuel_energy_gj": 3612,
          "energy_toe": 857.77
         },
         "lines": [
          {
           "scope": 1,
           "fuel": "diesel",
           "sector": "manufacturing",
           "quantity": 100000,
           "unit": "l",
           "energy_gj": 3612,
           "ef_kg_per_tj": {
            "co2": 74100,
            "ch4": 3,
            "n2o": 0.6
           },
           "co2_t": 267.6492,
           "ch4_kg": 10.836,
           "n2o_kg": 2.1672,
           "tco2e": 268.5269
          },
          {
           "scope": 2,
           "source": "grid electricity (location-based)",
           "quantity": 5000000,
           "unit": "kWh",
           "ef_tco2_per_mwh": 0.6187,
           "grid_year": 2024,
           "tco2e": 3093.5
          }
         ],
         "obligation": {
          "in_scope": true,
          "reasons": [
           "Annual emissions 3362.03 tCO2e ≥ 3,000 (Điều 6 khoản 1)"
          ],
          "quota_sector": false,
          "duties": [
           "listed",
           "inventory",
           "mitigation_plan"
          ]
         },
         "assumptions": [
          "fuels[0]: density 0.84 kg/l assumed for diesel."
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal or tax advice; check the official text and your customs / verification body."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/cbam-calc": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "EU CBAM Calculator (Default Values, Cost)",
    "description": "Send the CN code (`cn`, 8 digits or TARIC), `country` of origin (ISO code or name, default Viet Nam), `mass_t`, import `year` and optionally `eua_price` (EUR per certificate). With `method=default` the embedded emissions are the country default value of Implementing Regulation (EU) 2025/2621 as corrected by 2026/1740 (falling back to \"Other countries\" when the country has none) plus the mark-up (10 % 2026, 20 % 2027, 30 % from 2028, 1 % for fertilisers). With `method=actual` send verified `see_direct` and, for cement and fertilisers, `see_indirect` or `electricity_mwh_per_t` (Viet Nam’s 2024 grid factor is applied by default).\n\nThe free allocation adjustment uses the CBAM benchmark of Implementing Regulation (EU) 2025/2620 (column B for default values with the production route of the country table, column A for actual data) times the CBAM factor (97.5 % 2026, 95 % 2027, 90 % 2028 … 0 from 2034) and the cross-sectoral correction factor (`cscf`, default 1). Certificates = mass × (embedded − free allocation), minus a carbon price paid at origin (`carbon_price_paid`).\n\nAlso returned: the 50-tonne de minimis per importer (`importer_annual_mass_t`), the declaration deadline (30 September of the following year) and the date certificates go on sale (1 February 2027). Without `cn` the default table of the country is listed. Data from EUR-Lex, refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/cbam-calc/",
    "operationId": "cbamCalcGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cbam-calc/"
    },
    "parameters": [
     {
      "name": "cn",
      "in": "query",
      "required": false,
      "description": "CN code (8 digits) or TARIC code; empty lists the country table.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Country of origin (ISO code or name).",
      "schema": {
       "type": "string",
       "default": "VN"
      }
     },
     {
      "name": "mass_t",
      "in": "query",
      "required": false,
      "description": "Imported mass in tonnes.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Import year (2026 onwards).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "method",
      "in": "query",
      "required": false,
      "description": "default or actual (alias calc_method).",
      "schema": {
       "type": "string",
       "default": "default"
      }
     },
     {
      "name": "see_direct",
      "in": "query",
      "required": false,
      "description": "Actual direct emissions (tCO2e/t).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "see_indirect",
      "in": "query",
      "required": false,
      "description": "Actual indirect emissions (cement, fertilisers) or electricity_mwh_per_t + grid_ef.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "eua_price",
      "in": "query",
      "required": false,
      "description": "Certificate price, EUR.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "carbon_price_paid",
      "in": "query",
      "required": false,
      "description": "Carbon price paid at origin, EUR/tCO2e.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "route",
      "in": "query",
      "required": false,
      "description": "Production route A–L for the benchmark.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "importer_annual_mass_t",
      "in": "query",
      "required": false,
      "description": "Importer’s yearly total, for the 50 t de minimis.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "cn": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "sector": {
           "type": "string"
          },
          "year": {
           "type": "number"
          },
          "mass_t": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "default_values": {
           "type": "object",
           "properties": {
            "table": {
             "type": "string"
            },
            "cn": {
             "type": "string"
            },
            "direct": {
             "type": "number"
            },
            "indirect": {},
            "total": {
             "type": "number"
            },
            "route": {
             "type": "string"
            }
           }
          },
          "embedded_emissions": {
           "type": "object",
           "properties": {
            "see_tco2e_per_t": {
             "type": "number"
            },
            "basis": {
             "type": "string"
            },
            "mark_up_pct": {
             "type": "number"
            },
            "total_tco2e": {
             "type": "number"
            }
           }
          },
          "free_allocation": {
           "type": "object",
           "properties": {
            "benchmark_cn": {
             "type": "string"
            },
            "benchmark_column": {
             "type": "string"
            },
            "benchmark_tco2e_per_t": {
             "type": "number"
            },
            "cbam_factor": {
             "type": "number"
            },
            "cscf": {
             "type": "number"
            },
            "sefa_tco2e_per_t": {
             "type": "number"
            }
           }
          },
          "certificates": {
           "type": "object",
           "properties": {
            "per_tonne": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "carbon_price_deduction": {
             "type": "number"
            }
           }
          },
          "cost_eur": {
           "type": "object",
           "properties": {
            "price_eur_per_certificate": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "per_tonne": {
             "type": "number"
            }
           }
          },
          "deadlines": {
           "type": "object",
           "properties": {
            "declaration": {
             "type": "string"
            },
            "certificates_on_sale_from": {
             "type": "string"
            }
           }
          },
          "source": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "EU CBAM Calculator (Default Values, Cost)",
    "description": "Send the CN code (`cn`, 8 digits or TARIC), `country` of origin (ISO code or name, default Viet Nam), `mass_t`, import `year` and optionally `eua_price` (EUR per certificate). With `method=default` the embedded emissions are the country default value of Implementing Regulation (EU) 2025/2621 as corrected by 2026/1740 (falling back to \"Other countries\" when the country has none) plus the mark-up (10 % 2026, 20 % 2027, 30 % from 2028, 1 % for fertilisers). With `method=actual` send verified `see_direct` and, for cement and fertilisers, `see_indirect` or `electricity_mwh_per_t` (Viet Nam’s 2024 grid factor is applied by default).\n\nThe free allocation adjustment uses the CBAM benchmark of Implementing Regulation (EU) 2025/2620 (column B for default values with the production route of the country table, column A for actual data) times the CBAM factor (97.5 % 2026, 95 % 2027, 90 % 2028 … 0 from 2034) and the cross-sectoral correction factor (`cscf`, default 1). Certificates = mass × (embedded − free allocation), minus a carbon price paid at origin (`carbon_price_paid`).\n\nAlso returned: the 50-tonne de minimis per importer (`importer_annual_mass_t`), the declaration deadline (30 September of the following year) and the date certificates go on sale (1 February 2027). Without `cn` the default table of the country is listed. Data from EUR-Lex, refreshed weekly.\n\nDocs: https://apibox.io.vn/docs/cbam-calc/",
    "operationId": "cbamCalcPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/cbam-calc/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "cn": {
          "type": "string",
          "description": "CN code (8 digits) or TARIC code; empty lists the country table."
         },
         "country": {
          "type": "string",
          "default": "VN",
          "description": "Country of origin (ISO code or name)."
         },
         "mass_t": {
          "type": "number",
          "default": 1,
          "description": "Imported mass in tonnes."
         },
         "year": {
          "type": "number",
          "description": "Import year (2026 onwards)."
         },
         "method": {
          "type": "string",
          "default": "default",
          "description": "default or actual (alias calc_method)."
         },
         "see_direct": {
          "type": "number",
          "description": "Actual direct emissions (tCO2e/t)."
         },
         "see_indirect": {
          "type": "number",
          "description": "Actual indirect emissions (cement, fertilisers) or electricity_mwh_per_t + grid_ef."
         },
         "eua_price": {
          "type": "number",
          "description": "Certificate price, EUR."
         },
         "carbon_price_paid": {
          "type": "number",
          "description": "Carbon price paid at origin, EUR/tCO2e."
         },
         "route": {
          "type": "string",
          "description": "Production route A–L for the benchmark."
         },
         "importer_annual_mass_t": {
          "type": "number",
          "description": "Importer’s yearly total, for the 50 t de minimis."
         }
        }
       },
       "example": {
        "cn": "72104900",
        "country": "VN",
        "mass_t": 100,
        "year": 2026,
        "eua_price": 80
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "cn": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "sector": {
           "type": "string"
          },
          "year": {
           "type": "number"
          },
          "mass_t": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "default_values": {
           "type": "object",
           "properties": {
            "table": {
             "type": "string"
            },
            "cn": {
             "type": "string"
            },
            "direct": {
             "type": "number"
            },
            "indirect": {},
            "total": {
             "type": "number"
            },
            "route": {
             "type": "string"
            }
           }
          },
          "embedded_emissions": {
           "type": "object",
           "properties": {
            "see_tco2e_per_t": {
             "type": "number"
            },
            "basis": {
             "type": "string"
            },
            "mark_up_pct": {
             "type": "number"
            },
            "total_tco2e": {
             "type": "number"
            }
           }
          },
          "free_allocation": {
           "type": "object",
           "properties": {
            "benchmark_cn": {
             "type": "string"
            },
            "benchmark_column": {
             "type": "string"
            },
            "benchmark_tco2e_per_t": {
             "type": "number"
            },
            "cbam_factor": {
             "type": "number"
            },
            "cscf": {
             "type": "number"
            },
            "sefa_tco2e_per_t": {
             "type": "number"
            }
           }
          },
          "certificates": {
           "type": "object",
           "properties": {
            "per_tonne": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "carbon_price_deduction": {
             "type": "number"
            }
           }
          },
          "cost_eur": {
           "type": "object",
           "properties": {
            "price_eur_per_certificate": {
             "type": "number"
            },
            "total": {
             "type": "number"
            },
            "per_tonne": {
             "type": "number"
            }
           }
          },
          "deadlines": {
           "type": "object",
           "properties": {
            "declaration": {
             "type": "string"
            },
            "certificates_on_sale_from": {
             "type": "string"
            }
           }
          },
          "source": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "cn": "72104900",
         "country": "Viet Nam",
         "sector": "Iron and steel",
         "year": 2026,
         "mass_t": 100,
         "method": "default",
         "default_values": {
          "table": "Viet Nam",
          "cn": "7210",
          "direct": 2.37,
          "indirect": null,
          "total": 2.37,
          "route": "C"
         },
         "embedded_emissions": {
          "see_tco2e_per_t": 2.607,
          "basis": "default value 2.37 × (1 + 10 % mark-up for 2026)",
          "mark_up_pct": 10,
          "total_tco2e": 260.7
         },
         "free_allocation": {
          "benchmark_cn": "72104900",
          "benchmark_column": "B (BMg)",
          "benchmark_tco2e_per_t": 1.491,
          "cbam_factor": 0.975,
          "cscf": 1,
          "sefa_tco2e_per_t": 1.4537
         },
         "certificates": {
          "per_tonne": 1.1533,
          "total": 115.3275,
          "carbon_price_deduction": 0
         },
         "cost_eur": {
          "price_eur_per_certificate": 80,
          "total": 9226.2,
          "per_tonne": 92.26
         },
         "deadlines": {
          "declaration": "2027-09-30",
          "certificates_on_sale_from": "2027-02-01"
         },
         "source": "EUR-Lex, © European Union (Decision 2011/833/EU)",
         "disclaimer": "Reference only, not legal or tax advice; check the official text and your customs / verification body."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-nutrition-label": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Nutrition Label Generator",
    "description": "Send `per100` (values per 100 g / 100 ml: energy_kcal, protein_g, carbohydrate_g, sugars_g, fat_g, saturated_fat_g, sodium_mg) or a recipe `ingredients` `[{name, grams, per100}]` with the cooked `yield_g`. Energy is computed with 4 / 4 / 9 kcal/g when missing. You supply the nutrient values (lab results or calculation, as Decree 37/2026 Article 49 allows); no food database is bundled.\n\nThe result applies Circular 30/2026/TT-BYT (in force 10 July 2026, replacing 29/2023): the five mandatory nutrients, total sugars for sweetened drinks and foods (`added_sugar`), saturated fat for fried food (`fried`), the Appendix I thresholds below which a nutrient need not be declared, per 100 g / ml and per serving (`serving_size`), and %NRV with the Appendix II reference values (2,000 kcal, protein 50 g, carbohydrate 325 g, fat 56 g, saturated fat 20 g, sodium 2,000 mg). It also checks common \"low / free\" claims against the Codex conditions for reference.\n\n`format=svg` or `pdf` returns a print-ready label in Be Vietnam Pro, in Vietnamese, English or both (`lang`). The circular sets no rounding rule; a stated convention is applied (kcal and mg whole, grams to 0.1 below 10 g).\n\nDocs: https://apibox.io.vn/docs/vn-nutrition-label/",
    "operationId": "vnNutritionLabelGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-nutrition-label/"
    },
    "parameters": [
     {
      "name": "yield_g",
      "in": "query",
      "required": false,
      "description": "Final product weight (default: sum of ingredients).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "form",
      "in": "query",
      "required": false,
      "description": "solid or liquid.",
      "schema": {
       "type": "string",
       "default": "solid"
      }
     },
     {
      "name": "serving_size",
      "in": "query",
      "required": false,
      "description": "Serving size in g / ml.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "servings_per_pack",
      "in": "query",
      "required": false,
      "description": "Servings per pack.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "added_sugar",
      "in": "query",
      "required": false,
      "description": "Sugar added (total sugars mandatory).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "fried",
      "in": "query",
      "required": false,
      "description": "Fried food (saturated fat mandatory).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "json, svg or pdf.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "vi, en or both.",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     },
     {
      "name": "product_name",
      "in": "query",
      "required": false,
      "description": "Name printed on the label.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "basis": {
           "type": "string"
          },
          "serving_size": {
           "type": "number"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "key": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "unit": {
              "type": "string"
             },
             "per100": {
              "type": "number"
             },
             "per_serving": {
              "type": "number"
             },
             "nrv_pct": {},
             "mandatory": {
              "type": "boolean"
             }
            }
           }
          },
          "claims": {
           "type": "array",
           "items": {}
          },
          "rounding": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Nutrition Label Generator",
    "description": "Send `per100` (values per 100 g / 100 ml: energy_kcal, protein_g, carbohydrate_g, sugars_g, fat_g, saturated_fat_g, sodium_mg) or a recipe `ingredients` `[{name, grams, per100}]` with the cooked `yield_g`. Energy is computed with 4 / 4 / 9 kcal/g when missing. You supply the nutrient values (lab results or calculation, as Decree 37/2026 Article 49 allows); no food database is bundled.\n\nThe result applies Circular 30/2026/TT-BYT (in force 10 July 2026, replacing 29/2023): the five mandatory nutrients, total sugars for sweetened drinks and foods (`added_sugar`), saturated fat for fried food (`fried`), the Appendix I thresholds below which a nutrient need not be declared, per 100 g / ml and per serving (`serving_size`), and %NRV with the Appendix II reference values (2,000 kcal, protein 50 g, carbohydrate 325 g, fat 56 g, saturated fat 20 g, sodium 2,000 mg). It also checks common \"low / free\" claims against the Codex conditions for reference.\n\n`format=svg` or `pdf` returns a print-ready label in Be Vietnam Pro, in Vietnamese, English or both (`lang`). The circular sets no rounding rule; a stated convention is applied (kcal and mg whole, grams to 0.1 below 10 g).\n\nDocs: https://apibox.io.vn/docs/vn-nutrition-label/",
    "operationId": "vnNutritionLabelPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-nutrition-label/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "per100": {
          "type": "object",
          "description": "Values per 100 g / ml of product."
         },
         "ingredients": {
          "type": "array",
          "items": {},
          "description": "Recipe [{name, grams, per100}]."
         },
         "yield_g": {
          "type": "number",
          "description": "Final product weight (default: sum of ingredients)."
         },
         "form": {
          "type": "string",
          "default": "solid",
          "description": "solid or liquid."
         },
         "serving_size": {
          "type": "number",
          "description": "Serving size in g / ml."
         },
         "servings_per_pack": {
          "type": "number",
          "description": "Servings per pack."
         },
         "added_sugar": {
          "type": "boolean",
          "description": "Sugar added (total sugars mandatory)."
         },
         "fried": {
          "type": "boolean",
          "description": "Fried food (saturated fat mandatory)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "json, svg or pdf."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "vi, en or both."
         },
         "product_name": {
          "type": "string",
          "description": "Name printed on the label."
         }
        }
       },
       "example": {
        "per100": {
         "energy_kcal": 463,
         "protein_g": 7.3,
         "carbohydrate_g": 64.7,
         "sugars_g": 22.5,
         "fat_g": 19.6,
         "saturated_fat_g": 11.8,
         "sodium_mg": 19.6
        },
        "serving_size": 30,
        "added_sugar": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "form": {
           "type": "string"
          },
          "basis": {
           "type": "string"
          },
          "serving_size": {
           "type": "number"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "key": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "unit": {
              "type": "string"
             },
             "per100": {
              "type": "number"
             },
             "per_serving": {
              "type": "number"
             },
             "nrv_pct": {},
             "mandatory": {
              "type": "boolean"
             }
            }
           }
          },
          "claims": {
           "type": "array",
           "items": {}
          },
          "rounding": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "form": "solid",
         "basis": "both",
         "serving_size": 30,
         "rows": [
          {
           "key": "energy_kcal",
           "vi": "Năng lượng",
           "unit": "kcal",
           "per100": 463,
           "per_serving": 139,
           "nrv_pct": 7,
           "mandatory": true
          },
          {
           "key": "protein_g",
           "vi": "Chất đạm",
           "unit": "g",
           "per100": 7.3,
           "per_serving": 2.2,
           "nrv_pct": 4,
           "mandatory": true
          },
          {
           "key": "carbohydrate_g",
           "vi": "Carbohydrat",
           "unit": "g",
           "per100": 65,
           "per_serving": 19,
           "nrv_pct": 6,
           "mandatory": true
          },
          {
           "key": "sugars_g",
           "vi": "Đường tổng số",
           "unit": "g",
           "per100": 23,
           "per_serving": 6.8,
           "nrv_pct": null,
           "mandatory": true
          },
          {
           "key": "fat_g",
           "vi": "Chất béo",
           "unit": "g",
           "per100": 20,
           "per_serving": 5.9,
           "nrv_pct": 11,
           "mandatory": true
          },
          {
           "key": "saturated_fat_g",
           "vi": "Chất béo bão hòa",
           "unit": "g",
           "per100": 12,
           "per_serving": 3.5,
           "nrv_pct": 18,
           "mandatory": false
          },
          {
           "key": "sodium_mg",
           "vi": "Natri",
           "unit": "mg",
           "per100": 20,
           "per_serving": 6,
           "nrv_pct": 0,
           "mandatory": true
          }
         ],
         "claims": [
          {
           "claim": "low_sodium",
           "vi": "Ít natri",
           "ok": true,
           "cond": "≤ 120 mg/100 g"
          },
          "…"
         ],
         "rounding": "Convention (TT 30/2026 sets none): kcal and mg whole numbers; grams 1 decimal below 10 g, whole numbers from 10 g; %NRV whole numbers.",
         "disclaimer": "Reference only, not legal or food-safety advice; check Thông tư 30/2026/TT-BYT and your product standard."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-ai-law": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam AI Law Risk Classifier",
    "description": "Without parameters (or `list=all` / a field) it returns the 46 high-risk systems of Decision 33/2026/QĐ-TTg (education, ethnic and religious affairs, health, banking, litigation, transport and aviation) with their \"only applies when\" conditions and whether certification by a conformity body is required.\n\nTo classify, send `role` (provider, deployer, developer, user) and either `system` (an id of the list, with `conditions_met`) or `field` plus yes / no answers: prohibited purposes (`manipulates`, `exploits_vulnerable`, `harmful_fakes`, `unlawful_data`), high-risk exclusions of Decree 142 Article 8.2 (`human_review`, `advisory_only`, `internal_only`, `data_processing_only`), medium-risk signals (`interacts_with_humans`, `generates_media`, `generates_text`, `deepfake`) and their exclusions (`office_tool`, `not_public`, `creative_fiction`, `technical_edit_only`, `backend_only`). The result gives the risk level (prohibited, high, medium, low) with reasons and the duties: self-classification and file, notice to the Ministry of Science and Technology, conformity assessment, human oversight, transparency, machine-readable marking, visible labels for deepfakes, incident reports (72 hours / 5 working days).\n\n`in_use_since` adds the transition deadline (1/3/2027 or 1/9/2027 for health, education and finance). Suggested label wording and IPTC / C2PA metadata are included. Items still waiting for guidance carry a `status`; the table is reviewed every 30 days.\n\nDocs: https://apibox.io.vn/docs/vn-ai-law/",
    "operationId": "vnAiLawGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ai-law/"
    },
    "parameters": [
     {
      "name": "role",
      "in": "query",
      "required": false,
      "description": "provider, deployer, developer or user.",
      "schema": {
       "type": "string",
       "default": "provider"
      }
     },
     {
      "name": "system",
      "in": "query",
      "required": false,
      "description": "Id of a listed high-risk system (e.g. banking-2).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "conditions_met",
      "in": "query",
      "required": false,
      "description": "The \"only applies when\" conditions of the listed system are met.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "field",
      "in": "query",
      "required": false,
      "description": "education, ethnic_religion, health, banking, litigation, transport, other.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "interacts_with_humans",
      "in": "query",
      "required": false,
      "description": "Talks directly with people (chatbot, voice).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "generates_media",
      "in": "query",
      "required": false,
      "description": "Generates audio, images or video.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "deepfake",
      "in": "query",
      "required": false,
      "description": "Imitates a real person or recreates real events.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "human_review",
      "in": "query",
      "required": false,
      "description": "Substantive human review before decisions take effect.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "foreign_provider",
      "in": "query",
      "required": false,
      "description": "Provider established abroad.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "in_use_since",
      "in": "query",
      "required": false,
      "description": "Date the system was put into use (YYYY-MM-DD).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "role": {
           "type": "string"
          },
          "system": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "field": {
             "type": "string"
            },
            "no": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "cert": {
             "type": "boolean"
            }
           }
          },
          "risk_level": {
           "type": "string"
          },
          "confidence": {
           "type": "string"
          },
          "reasons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "certification_required": {
           "type": "boolean"
          },
          "duties": {
           "type": "array",
           "items": {}
          },
          "transition": {
           "type": "object",
           "properties": {
            "deadline": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "status": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam AI Law Risk Classifier",
    "description": "Without parameters (or `list=all` / a field) it returns the 46 high-risk systems of Decision 33/2026/QĐ-TTg (education, ethnic and religious affairs, health, banking, litigation, transport and aviation) with their \"only applies when\" conditions and whether certification by a conformity body is required.\n\nTo classify, send `role` (provider, deployer, developer, user) and either `system` (an id of the list, with `conditions_met`) or `field` plus yes / no answers: prohibited purposes (`manipulates`, `exploits_vulnerable`, `harmful_fakes`, `unlawful_data`), high-risk exclusions of Decree 142 Article 8.2 (`human_review`, `advisory_only`, `internal_only`, `data_processing_only`), medium-risk signals (`interacts_with_humans`, `generates_media`, `generates_text`, `deepfake`) and their exclusions (`office_tool`, `not_public`, `creative_fiction`, `technical_edit_only`, `backend_only`). The result gives the risk level (prohibited, high, medium, low) with reasons and the duties: self-classification and file, notice to the Ministry of Science and Technology, conformity assessment, human oversight, transparency, machine-readable marking, visible labels for deepfakes, incident reports (72 hours / 5 working days).\n\n`in_use_since` adds the transition deadline (1/3/2027 or 1/9/2027 for health, education and finance). Suggested label wording and IPTC / C2PA metadata are included. Items still waiting for guidance carry a `status`; the table is reviewed every 30 days.\n\nDocs: https://apibox.io.vn/docs/vn-ai-law/",
    "operationId": "vnAiLawPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-ai-law/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "role": {
          "type": "string",
          "default": "provider",
          "description": "provider, deployer, developer or user."
         },
         "system": {
          "type": "string",
          "description": "Id of a listed high-risk system (e.g. banking-2)."
         },
         "conditions_met": {
          "type": "boolean",
          "description": "The \"only applies when\" conditions of the listed system are met."
         },
         "field": {
          "type": "string",
          "description": "education, ethnic_religion, health, banking, litigation, transport, other."
         },
         "interacts_with_humans": {
          "type": "boolean",
          "description": "Talks directly with people (chatbot, voice)."
         },
         "generates_media": {
          "type": "boolean",
          "description": "Generates audio, images or video."
         },
         "deepfake": {
          "type": "boolean",
          "description": "Imitates a real person or recreates real events."
         },
         "human_review": {
          "type": "boolean",
          "description": "Substantive human review before decisions take effect."
         },
         "foreign_provider": {
          "type": "boolean",
          "description": "Provider established abroad."
         },
         "in_use_since": {
          "type": "string",
          "description": "Date the system was put into use (YYYY-MM-DD)."
         }
        }
       },
       "example": {
        "role": "provider",
        "system": "banking-2",
        "conditions_met": true,
        "in_use_since": "2025-06-01"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "role": {
           "type": "string"
          },
          "system": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "field": {
             "type": "string"
            },
            "no": {
             "type": "number"
            },
            "vi": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "cert": {
             "type": "boolean"
            }
           }
          },
          "risk_level": {
           "type": "string"
          },
          "confidence": {
           "type": "string"
          },
          "reasons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "certification_required": {
           "type": "boolean"
          },
          "duties": {
           "type": "array",
           "items": {}
          },
          "transition": {
           "type": "object",
           "properties": {
            "deadline": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "status": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "review_cadence_days": {
           "type": "number"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "role": "provider",
         "system": {
          "id": "banking-2",
          "field": "banking",
          "no": 2,
          "vi": "Hệ thống AI tự động quyết định cấp tín dụng",
          "en": "Automated credit decisions",
          "cert": false
         },
         "risk_level": "high",
         "confidence": "high",
         "reasons": [
          "QĐ 33/2026/QĐ-TTg Phụ lục Ngân hàng mục 2: Hệ thống AI tự động quyết định cấp tín dụng"
         ],
         "certification_required": false,
         "duties": [
          {
           "id": "self_classify",
           "en": "Self-classify before use; re-classify after significant changes, serious incidents or list changes (notify within 15 working days if the risk rises)",
           "ref": "Luật Điều 10 khoản 1; NĐ 142 Điều 11"
          },
          {
           "id": "notify_most",
           "en": "Notify the Ministry of Science and Technology through the AI one-stop portal before use (online form or API); a system ID is issued",
           "ref": "Luật Điều 10 khoản 3; NĐ 142 Điều 14"
          },
          {
           "id": "conformity",
           "en": "Conformity assessment before use: self-assessment or a conformity body; repeat after significant changes",
           "ref": "Luật Điều 13 khoản 2 điểm b; QĐ 33/2026 Phụ lục"
          },
          "…"
         ],
         "transition": {
          "deadline": "2027-09-01",
          "ref": "QĐ 33/2026/QĐ-TTg Điều 4 khoản 1"
         },
         "status": "in_force_with_pending_guidance",
         "reviewed": "2026-11-15",
         "review_cadence_days": 30,
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-online-license": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Website and Game Licence Check",
    "description": "Send `service`: news_aggregator, social_network, internal_website, personal_website, specialized_service, ecommerce, online_game, app_store, cross_border or mobile_content, with details: `monthly_visits` (6-month average), `monthly_users`, `livestream`, `revenue`, `foreign`, `republishes_press`, `user_posts`, `vn_data_storage`.\n\nThe result gives the website class of Article 20, whether a licence, a notification or nothing is needed and who issues it: aggregator licence; social-network licence above 10,000 monthly visits or 1,000 regular users, or for livestream and revenue (otherwise a notification); contact notice for foreign providers with 100,000 monthly visits from Vietnam or local data storage. Each case lists the duties: 24-hour takedown, 48-hour complaints, account verification by Vietnamese mobile number, parents registering under-16 accounts, 2-year log storage, a server in Vietnam, the 25 November annual report.\n\nFor games send `multiplayer`, `server_interaction` / `downloaded_only` and content flags (`combat`, `cartoon`, `realistic_violence`, `revealing_outfits`, `horror`): it returns the class G1–G4 with the enterprise licence and per-game release decision, an indicative age rating (00+, 12+, 16+, 18+) and duties such as the 60 / 180-minute daily limit for players under 18. Corporate, specialised or personal sites that republish press content or let users post are re-classified with `confidence`.\n\nDocs: https://apibox.io.vn/docs/vn-online-license/",
    "operationId": "vnOnlineLicenseGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-online-license/"
    },
    "parameters": [
     {
      "name": "service",
      "in": "query",
      "required": true,
      "description": "news_aggregator, social_network, internal_website, personal_website, specialized_service, ecommerce, online_game, app_store, cross_border, mobile_content.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "monthly_visits",
      "in": "query",
      "required": false,
      "description": "Monthly visits (6-month average; from Vietnam for cross-border).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "monthly_users",
      "in": "query",
      "required": false,
      "description": "Regular monthly users.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "livestream",
      "in": "query",
      "required": false,
      "description": "Offers livestreaming.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "revenue",
      "in": "query",
      "required": false,
      "description": "Revenue-generating activities.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "foreign",
      "in": "query",
      "required": false,
      "description": "Provider established abroad.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "republishes_press",
      "in": "query",
      "required": false,
      "description": "Republishes press / state news.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "user_posts",
      "in": "query",
      "required": false,
      "description": "Users post, comment and share.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "multiplayer",
      "in": "query",
      "required": false,
      "description": "Games: players interact with each other.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "server_interaction",
      "in": "query",
      "required": false,
      "description": "Games: players interact with the publisher’s server.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "service": {
           "type": "string"
          },
          "classification": {
           "type": "string"
          },
          "license": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "name_vi": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "validity": {
             "type": "string"
            },
            "reason": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "obligations": {
           "type": "array",
           "items": {}
          },
          "confidence": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Website and Game Licence Check",
    "description": "Send `service`: news_aggregator, social_network, internal_website, personal_website, specialized_service, ecommerce, online_game, app_store, cross_border or mobile_content, with details: `monthly_visits` (6-month average), `monthly_users`, `livestream`, `revenue`, `foreign`, `republishes_press`, `user_posts`, `vn_data_storage`.\n\nThe result gives the website class of Article 20, whether a licence, a notification or nothing is needed and who issues it: aggregator licence; social-network licence above 10,000 monthly visits or 1,000 regular users, or for livestream and revenue (otherwise a notification); contact notice for foreign providers with 100,000 monthly visits from Vietnam or local data storage. Each case lists the duties: 24-hour takedown, 48-hour complaints, account verification by Vietnamese mobile number, parents registering under-16 accounts, 2-year log storage, a server in Vietnam, the 25 November annual report.\n\nFor games send `multiplayer`, `server_interaction` / `downloaded_only` and content flags (`combat`, `cartoon`, `realistic_violence`, `revealing_outfits`, `horror`): it returns the class G1–G4 with the enterprise licence and per-game release decision, an indicative age rating (00+, 12+, 16+, 18+) and duties such as the 60 / 180-minute daily limit for players under 18. Corporate, specialised or personal sites that republish press content or let users post are re-classified with `confidence`.\n\nDocs: https://apibox.io.vn/docs/vn-online-license/",
    "operationId": "vnOnlineLicensePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-online-license/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "service": {
          "type": "string",
          "description": "news_aggregator, social_network, internal_website, personal_website, specialized_service, ecommerce, online_game, app_store, cross_border, mobile_content."
         },
         "monthly_visits": {
          "type": "number",
          "description": "Monthly visits (6-month average; from Vietnam for cross-border)."
         },
         "monthly_users": {
          "type": "number",
          "description": "Regular monthly users."
         },
         "livestream": {
          "type": "boolean",
          "description": "Offers livestreaming."
         },
         "revenue": {
          "type": "boolean",
          "description": "Revenue-generating activities."
         },
         "foreign": {
          "type": "boolean",
          "description": "Provider established abroad."
         },
         "republishes_press": {
          "type": "boolean",
          "description": "Republishes press / state news."
         },
         "user_posts": {
          "type": "boolean",
          "description": "Users post, comment and share."
         },
         "multiplayer": {
          "type": "boolean",
          "description": "Games: players interact with each other."
         },
         "server_interaction": {
          "type": "boolean",
          "description": "Games: players interact with the publisher’s server."
         }
        },
        "required": [
         "service"
        ]
       },
       "example": {
        "service": "social_network",
        "monthly_visits": 25000,
        "livestream": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "service": {
           "type": "string"
          },
          "classification": {
           "type": "string"
          },
          "license": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "name_vi": {
             "type": "string"
            },
            "issuer": {
             "type": "string"
            },
            "validity": {
             "type": "string"
            },
            "reason": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "obligations": {
           "type": "array",
           "items": {}
          },
          "confidence": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "service": "social_network",
         "classification": "Mạng xã hội trong nước",
         "license": {
          "required": true,
          "name_vi": "Giấy phép cung cấp dịch vụ mạng xã hội",
          "issuer": "Bộ Văn hóa, Thể thao và Du lịch (thẩm quyền của Bộ TT&TT trước đây)",
          "validity": "tối đa 05 năm",
          "reason": "Từ 10.000 lượt truy cập / tháng (trung bình 06 tháng) hoặc trên 1.000 người dùng thường xuyên / tháng",
          "ref": "Điều 24 khoản 6 điểm a, b, d; Điều 25 khoản 4, 5; Điều 31"
         },
         "obligations": [
          {
           "id": "verify_accounts",
           "en": "Verify accounts with a Vietnamese mobile number (or personal ID); commercial livestreamers by personal ID; only verified accounts may post, comment or stream",
           "ref": "Điều 27 khoản 3 điểm b"
          },
          {
           "id": "complaints_48h",
           "en": "Handle user complaints about unlawful content within 48 hours",
           "ref": "Điều 35 khoản 8"
          },
          {
           "id": "annual_report",
           "en": "Annual report by 25 November (Form 15)",
           "ref": "Điều 24 khoản 10",
           "deadline": "25/11"
          },
          "…"
         ],
         "confidence": "high",
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-sim-numbers": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese SIM Number Patterns",
    "description": "Send one number or a list (up to 1,000; 5,000 for `action=filter`) in any common format (`0981.236.868`, `+84 98 123 6868`). Each number is normalised and checked against the 10-digit mobile prefixes; `network` is the network the prefix was assigned to (a number may have been ported since 2018, which the response says).\n\nThe classifier knows the patterns used in SIM shop price lists: lục / ngũ / tứ quý, tam hoa and tam hoa kép, taxi AB.AB.AB, ABC.ABC and ABCD.ABCD, kép AABB / AABBCC, soi gương ABC.CBA, gánh ABBA / ABA, số tiến / lùi, năm sinh (1950 to this year), ngày sinh ddmmyy, lộc phát (68 / 86), thần tài (39 / 79), ông địa (38 / 78), song lộc / song phát, tứ quý giữa, đầu số cổ and few distinct digits. Patterns implied by a stronger one are not repeated. `score` (0-100) is the strongest pattern weight plus a quarter of the others; change any weight with `weights`, e.g. `{\"nam_sinh\":60}`. `action=patterns` lists ids and default weights.\n\n`action=filter` keeps the numbers of a stock list that match `patterns`, `network`, `ends_with`, `contains`, `avoid_digits`, `min_score` or `nut_min`, sorted by score. With `phong_thuy=1` or `birth_year`, the answer adds the sum of digits, nút, the ngũ hành of the digits and how they relate to the owner's mệnh (nạp âm of the lunar year): a folk belief, given as reference only. Numbers are never stored.\n\nDocs: https://apibox.io.vn/docs/vn-sim-numbers/",
    "operationId": "vnSimNumbersGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sim-numbers/"
    },
    "parameters": [
     {
      "name": "number",
      "in": "query",
      "required": false,
      "description": "One mobile number (any format).",
      "schema": {
       "type": "string"
      },
      "example": "0981.236.868"
     },
     {
      "name": "numbers",
      "in": "query",
      "required": false,
      "description": "Several numbers: array or comma / newline separated.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`classify`, `filter` or `patterns`.",
      "schema": {
       "type": "string",
       "default": "classify"
      }
     },
     {
      "name": "weights",
      "in": "query",
      "required": false,
      "description": "Pattern weights, e.g. `{\"tu_quy\":80}`.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "birth_year",
      "in": "query",
      "required": false,
      "description": "Owner's lunar birth year: adds the phong thuỷ view.",
      "schema": {
       "type": "number"
      },
      "example": 1990
     },
     {
      "name": "phong_thuy",
      "in": "query",
      "required": false,
      "description": "`1`: add sum of digits, nút and digit elements.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "patterns",
      "in": "query",
      "required": false,
      "description": "filter: pattern ids to keep (any of them).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "network",
      "in": "query",
      "required": false,
      "description": "filter: networks, e.g. `viettel,vinaphone`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ends_with",
      "in": "query",
      "required": false,
      "description": "filter: required ending digits.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "avoid_digits",
      "in": "query",
      "required": false,
      "description": "filter: digits that must not appear (e.g. `47`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_score",
      "in": "query",
      "required": false,
      "description": "filter: minimum score.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "filter: maximum items returned.",
      "schema": {
       "type": "number",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "national": {
           "type": "string"
          },
          "e164": {
           "type": "string"
          },
          "display": {
           "type": "string"
          },
          "prefix": {
           "type": "string"
          },
          "network": {
           "type": "string"
          },
          "network_note": {
           "type": "string"
          },
          "patterns": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "weight": {
              "type": "number"
             },
             "part": {
              "type": "string"
             }
            }
           }
          },
          "score": {
           "type": "number"
          },
          "tier": {
           "type": "string"
          },
          "tier_vi": {
           "type": "string"
          },
          "phong_thuy": {
           "type": "object",
           "properties": {
            "sum": {
             "type": "number"
            },
            "nut": {
             "type": "number"
            },
            "nut_label_vi": {
             "type": "string"
            },
            "digit_elements": {
             "type": "object",
             "properties": {
              "Kim": {
               "type": "number"
              },
              "Mộc": {
               "type": "number"
              },
              "Thủy": {
               "type": "number"
              },
              "Hỏa": {
               "type": "number"
              },
              "Thổ": {
               "type": "number"
              }
             }
            },
            "method": {
             "type": "string"
            },
            "owner": {
             "type": "object",
             "properties": {
              "lunar_year": {
               "type": "number"
              },
              "can_chi": {
               "type": "string"
              },
              "menh": {
               "type": "string"
              }
             }
            },
            "supporting_digits": {
             "type": "number"
            },
            "clashing_digits": {
             "type": "number"
            },
            "harmony_vi": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "input": "0981.236.868",
         "valid": true,
         "national": "0981236868",
         "e164": "+84981236868",
         "display": "0981.236.868",
         "prefix": "098",
         "network": "Viettel",
         "network_note": "original network of the prefix; the number may have been ported (chuyển mạng giữ số)",
         "patterns": [
          {
           "id": "loc_phat",
           "vi": "Lộc phát",
           "en": "Ends with 68 / 86 (lộc phát, phát lộc)",
           "weight": 30,
           "part": "6868"
          },
          {
           "id": "lap_abab",
           "vi": "Số lặp AB.AB",
           "en": "Pair repeated (AB.AB)",
           "weight": 25,
           "part": "6868"
          },
          {
           "id": "dau_so_co",
           "vi": "Đầu số cổ",
           "en": "Old premium prefix (090, 091, 098…)",
           "weight": 10,
           "part": "098"
          }
         ],
         "score": 39,
         "tier": "kha",
         "tier_vi": "Sim khá",
         "phong_thuy": {
          "sum": 51,
          "nut": 1,
          "nut_label_vi": "thấp",
          "digit_elements": {
           "Kim": 1,
           "Mộc": 4,
           "Thủy": 3,
           "Hỏa": 1,
           "Thổ": 0
          },
          "method": "digits mapped to ngũ hành by Hà Đồ numbers (1,6 Thủy; 2,7 Hỏa; 3,8 Mộc; 4,9 Kim; 0,5 Thổ); nút = sum of the 10 digits mod 10",
          "owner": {
           "lunar_year": 1990,
           "can_chi": "Canh Ngọ",
           "menh": "Thổ"
          },
          "supporting_digits": 1,
          "clashing_digits": 4,
          "harmony_vi": "khắc mệnh",
          "note": "birth_year is the lunar year (people born before Tết belong to the previous year)"
         },
         "disclaimer": "Phong thuỷ is a folk belief: reference only."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnamese SIM Number Patterns",
    "description": "Send one number or a list (up to 1,000; 5,000 for `action=filter`) in any common format (`0981.236.868`, `+84 98 123 6868`). Each number is normalised and checked against the 10-digit mobile prefixes; `network` is the network the prefix was assigned to (a number may have been ported since 2018, which the response says).\n\nThe classifier knows the patterns used in SIM shop price lists: lục / ngũ / tứ quý, tam hoa and tam hoa kép, taxi AB.AB.AB, ABC.ABC and ABCD.ABCD, kép AABB / AABBCC, soi gương ABC.CBA, gánh ABBA / ABA, số tiến / lùi, năm sinh (1950 to this year), ngày sinh ddmmyy, lộc phát (68 / 86), thần tài (39 / 79), ông địa (38 / 78), song lộc / song phát, tứ quý giữa, đầu số cổ and few distinct digits. Patterns implied by a stronger one are not repeated. `score` (0-100) is the strongest pattern weight plus a quarter of the others; change any weight with `weights`, e.g. `{\"nam_sinh\":60}`. `action=patterns` lists ids and default weights.\n\n`action=filter` keeps the numbers of a stock list that match `patterns`, `network`, `ends_with`, `contains`, `avoid_digits`, `min_score` or `nut_min`, sorted by score. With `phong_thuy=1` or `birth_year`, the answer adds the sum of digits, nút, the ngũ hành of the digits and how they relate to the owner's mệnh (nạp âm of the lunar year): a folk belief, given as reference only. Numbers are never stored.\n\nDocs: https://apibox.io.vn/docs/vn-sim-numbers/",
    "operationId": "vnSimNumbersPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sim-numbers/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "number": {
          "type": "string",
          "description": "One mobile number (any format)."
         },
         "numbers": {
          "type": "array",
          "items": {},
          "description": "Several numbers: array or comma / newline separated."
         },
         "action": {
          "type": "string",
          "default": "classify",
          "description": "`classify`, `filter` or `patterns`."
         },
         "weights": {
          "type": "object",
          "description": "Pattern weights, e.g. `{\"tu_quy\":80}`."
         },
         "birth_year": {
          "type": "number",
          "description": "Owner's lunar birth year: adds the phong thuỷ view."
         },
         "phong_thuy": {
          "type": "boolean",
          "description": "`1`: add sum of digits, nút and digit elements."
         },
         "patterns": {
          "type": "string",
          "description": "filter: pattern ids to keep (any of them)."
         },
         "network": {
          "type": "string",
          "description": "filter: networks, e.g. `viettel,vinaphone`."
         },
         "ends_with": {
          "type": "string",
          "description": "filter: required ending digits."
         },
         "avoid_digits": {
          "type": "string",
          "description": "filter: digits that must not appear (e.g. `47`)."
         },
         "min_score": {
          "type": "number",
          "description": "filter: minimum score."
         },
         "limit": {
          "type": "number",
          "default": 100,
          "description": "filter: maximum items returned."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "input": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "national": {
           "type": "string"
          },
          "e164": {
           "type": "string"
          },
          "display": {
           "type": "string"
          },
          "prefix": {
           "type": "string"
          },
          "network": {
           "type": "string"
          },
          "network_note": {
           "type": "string"
          },
          "patterns": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             },
             "weight": {
              "type": "number"
             },
             "part": {
              "type": "string"
             }
            }
           }
          },
          "score": {
           "type": "number"
          },
          "tier": {
           "type": "string"
          },
          "tier_vi": {
           "type": "string"
          },
          "phong_thuy": {
           "type": "object",
           "properties": {
            "sum": {
             "type": "number"
            },
            "nut": {
             "type": "number"
            },
            "nut_label_vi": {
             "type": "string"
            },
            "digit_elements": {
             "type": "object",
             "properties": {
              "Kim": {
               "type": "number"
              },
              "Mộc": {
               "type": "number"
              },
              "Thủy": {
               "type": "number"
              },
              "Hỏa": {
               "type": "number"
              },
              "Thổ": {
               "type": "number"
              }
             }
            },
            "method": {
             "type": "string"
            },
            "owner": {
             "type": "object",
             "properties": {
              "lunar_year": {
               "type": "number"
              },
              "can_chi": {
               "type": "string"
              },
              "menh": {
               "type": "string"
              }
             }
            },
            "supporting_digits": {
             "type": "number"
            },
            "clashing_digits": {
             "type": "number"
            },
            "harmony_vi": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-math-worksheet": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "Primary Maths Worksheet Generator (Vietnam)",
    "description": "Pick a `grade` (1-5) and up to six `topics` from the 2018 general education programme (Thông tư 32/2018/TT-BGDĐT): addition and subtraction within 10 / 20 / 100 / 1,000 / 100,000 with or without regrouping, missing numbers, comparisons (>, <, =), multiplication and division tables, multi-digit multiplication and division (with remainder), order of operations, find x, Roman numerals, rounding, fractions (simplify, compare, four operations), mixed numbers, decimals, percentages, unit conversions per grade and word problems. `action=topics` lists the 42 topic ids; leave `topic` empty for a mixed sheet of the grade.\n\nProblems are generated from templates, never copied: the same `seed` always gives the same sheet, so a teacher can print versions A / B or re-create the answer key later. `difficulty` (1-3) changes number ranges, `count` sets the number of exercises (up to 120, 20 for word problems).\n\n`format=pdf` returns an A4 sheet (Be Vietnam Pro font, name / class / date line, exercises laid out in columns, answer lines under word problems) followed by an answer key page; `format=docx` gives the same in Word for editing; JSON gives every item with its answer for apps and quiz tools. Optional `title`, `school` and `answer_key=0`.\n\nDocs: https://apibox.io.vn/docs/vn-math-worksheet/",
    "operationId": "vnMathWorksheetGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-math-worksheet/"
    },
    "parameters": [
     {
      "name": "grade",
      "in": "query",
      "required": true,
      "description": "Grade 1 to 5.",
      "schema": {
       "type": "number"
      },
      "example": 3
     },
     {
      "name": "topics",
      "in": "query",
      "required": false,
      "description": "Topic ids, comma-separated (see `action=topics`); empty = mixed sheet.",
      "schema": {
       "type": "string"
      },
      "example": "mul_table,word_3"
     },
     {
      "name": "count",
      "in": "query",
      "required": false,
      "description": "Number of exercises (max 120; 20 for word problems).",
      "schema": {
       "type": "number",
       "default": 24
      },
      "example": 4
     },
     {
      "name": "difficulty",
      "in": "query",
      "required": false,
      "description": "1 easy, 2 normal, 3 hard.",
      "schema": {
       "type": "number",
       "default": 2
      }
     },
     {
      "name": "seed",
      "in": "query",
      "required": false,
      "description": "Same seed = same sheet (random when empty).",
      "schema": {
       "type": "string"
      },
      "example": "demo"
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `pdf` or `docx`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "`vi` or `en` (labels and word problems).",
      "schema": {
       "type": "string",
       "default": "vi"
      }
     },
     {
      "name": "title",
      "in": "query",
      "required": false,
      "description": "Custom title.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "school",
      "in": "query",
      "required": false,
      "description": "School name printed above the title.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "answer_key",
      "in": "query",
      "required": false,
      "description": "Add the answer key page.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "title": {
           "type": "string"
          },
          "grade": {
           "type": "number"
          },
          "topics": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             }
            }
           }
          },
          "seed": {
           "type": "string"
          },
          "sections": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "topic": {
              "type": "string"
             },
             "instruction": {
              "type": "string"
             },
             "items": {
              "type": "array"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "difficulty": {
           "type": "number"
          },
          "lang": {
           "type": "string"
          },
          "programme": {
           "type": "string"
          }
         }
        },
        "example": {
         "title": "Phiếu bài tập Toán lớp 3: Bảng nhân 2 đến 9; Bài toán có lời văn lớp 3",
         "grade": 3,
         "topics": [
          {
           "id": "mul_table",
           "vi": "Bảng nhân 2 đến 9",
           "en": "Multiplication tables 2 to 9"
          },
          {
           "id": "word_3",
           "vi": "Bài toán có lời văn lớp 3",
           "en": "Word problems, grade 3"
          }
         ],
         "seed": "demo",
         "sections": [
          {
           "topic": "mul_table",
           "instruction": "Tính",
           "items": [
            {
             "q": "2 × 9 = ____",
             "a": "18",
             "kind": "calc",
             "n": 1
            },
            {
             "q": "4 × 10 = ____",
             "a": "40",
             "kind": "calc",
             "n": 2
            }
           ]
          },
          {
           "topic": "word_3",
           "instruction": "Giải bài toán",
           "items": [
            {
             "q": "Một hình chữ nhật có chiều dài 21 cm, chiều rộng 18 cm. Tính chu vi hình chữ nhật đó.",
             "a": "78 cm",
             "kind": "word",
             "n": 3
            },
            {
             "q": "Mỗi xe chở được 35 học sinh. Có 183 học sinh đi tham quan thì cần ít nhất bao nhiêu xe?",
             "a": "6 xe",
             "kind": "word",
             "n": 4
            }
           ]
          }
         ],
         "count": 4,
         "difficulty": 2,
         "lang": "vi",
         "programme": "Chương trình GDPT 2018 môn Toán (Thông tư 32/2018/TT-BGDĐT)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "Primary Maths Worksheet Generator (Vietnam)",
    "description": "Pick a `grade` (1-5) and up to six `topics` from the 2018 general education programme (Thông tư 32/2018/TT-BGDĐT): addition and subtraction within 10 / 20 / 100 / 1,000 / 100,000 with or without regrouping, missing numbers, comparisons (>, <, =), multiplication and division tables, multi-digit multiplication and division (with remainder), order of operations, find x, Roman numerals, rounding, fractions (simplify, compare, four operations), mixed numbers, decimals, percentages, unit conversions per grade and word problems. `action=topics` lists the 42 topic ids; leave `topic` empty for a mixed sheet of the grade.\n\nProblems are generated from templates, never copied: the same `seed` always gives the same sheet, so a teacher can print versions A / B or re-create the answer key later. `difficulty` (1-3) changes number ranges, `count` sets the number of exercises (up to 120, 20 for word problems).\n\n`format=pdf` returns an A4 sheet (Be Vietnam Pro font, name / class / date line, exercises laid out in columns, answer lines under word problems) followed by an answer key page; `format=docx` gives the same in Word for editing; JSON gives every item with its answer for apps and quiz tools. Optional `title`, `school` and `answer_key=0`.\n\nDocs: https://apibox.io.vn/docs/vn-math-worksheet/",
    "operationId": "vnMathWorksheetPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-math-worksheet/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "grade": {
          "type": "number",
          "description": "Grade 1 to 5."
         },
         "topics": {
          "type": "string",
          "description": "Topic ids, comma-separated (see `action=topics`); empty = mixed sheet."
         },
         "count": {
          "type": "number",
          "default": 24,
          "description": "Number of exercises (max 120; 20 for word problems)."
         },
         "difficulty": {
          "type": "number",
          "default": 2,
          "description": "1 easy, 2 normal, 3 hard."
         },
         "seed": {
          "type": "string",
          "description": "Same seed = same sheet (random when empty)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `pdf` or `docx`."
         },
         "lang": {
          "type": "string",
          "default": "vi",
          "description": "`vi` or `en` (labels and word problems)."
         },
         "title": {
          "type": "string",
          "description": "Custom title."
         },
         "school": {
          "type": "string",
          "description": "School name printed above the title."
         },
         "answer_key": {
          "type": "boolean",
          "default": true,
          "description": "Add the answer key page."
         }
        },
        "required": [
         "grade"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "title": {
           "type": "string"
          },
          "grade": {
           "type": "number"
          },
          "topics": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "en": {
              "type": "string"
             }
            }
           }
          },
          "seed": {
           "type": "string"
          },
          "sections": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "topic": {
              "type": "string"
             },
             "instruction": {
              "type": "string"
             },
             "items": {
              "type": "array"
             }
            }
           }
          },
          "count": {
           "type": "number"
          },
          "difficulty": {
           "type": "number"
          },
          "lang": {
           "type": "string"
          },
          "programme": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-dictionary": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Dictionary & Word Chain",
    "description": "The dictionary holds the Vietnamese headwords of the Vietnamese Wiktionary (about 41,500 entries, extracted by wiktextract / kaikki.org, refreshed weekly). `word` can be typed with or without accents (`hoc sinh` finds `học sinh`); an entry gives the parts of speech with Vietnamese and English labels, definitions with examples, synonyms and antonyms when Wiktionary has them, the IPA of Hà Nội and Sài Gòn, the chữ Hán / Nôm form and etymology, and a link to the Wiktionary page. `action=suggest&q=nha t` autocompletes.\n\n`action=chain` serves \"nối từ\" game bots (Discord, Zalo, Messenger): it says whether a two-syllable word is valid (about 26,800 common two-syllable words, no proper nouns or idioms), checks the link with `previous`, lists continuations starting with the last syllable (excluding `used` words), flags dead ends and, with `strategy=trap`, sorts replies that leave the opponent the fewest moves. Without `word` it proposes a start word. `action=random` draws words by `syllables`, `pos` or `letters` (for guessing games).\n\nDefinitions are licensed CC BY-SA 4.0: every answer carries the attribution; credit Wiktionary and share derived data under the same licence.\n\nDocs: https://apibox.io.vn/docs/vn-dictionary/",
    "operationId": "vnDictionaryGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-dictionary/"
    },
    "parameters": [
     {
      "name": "word",
      "in": "query",
      "required": false,
      "description": "Word to look up (accents optional) or to check in the chain.",
      "schema": {
       "type": "string"
      },
      "example": "hoc sinh"
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`lookup`, `suggest`, `chain`, `random` or `stats`.",
      "schema": {
       "type": "string",
       "default": "lookup"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "suggest: beginning of a word.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "previous",
      "in": "query",
      "required": false,
      "description": "chain: the previous word, to check the link.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "used",
      "in": "query",
      "required": false,
      "description": "chain: words already played.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "strategy",
      "in": "query",
      "required": false,
      "description": "chain: `any`, `trap`, `safe` or `random` ordering of candidates.",
      "schema": {
       "type": "string",
       "default": "any"
      }
     },
     {
      "name": "syllables",
      "in": "query",
      "required": false,
      "description": "random: number of syllables.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "pos",
      "in": "query",
      "required": false,
      "description": "random: part of speech (`noun`, `verb`, `adj`…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "examples",
      "in": "query",
      "required": false,
      "description": "lookup: include examples.",
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum suggestions / candidates.",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "match": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "entries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "word": {
              "type": "string"
             },
             "syllables": {
              "type": "number"
             },
             "meanings": {
              "type": "array"
             },
             "synonyms": {
              "type": "array"
             },
             "antonyms": {
              "type": "array"
             },
             "ipa": {
              "type": "object"
             },
             "han_nom": {
              "type": "string"
             },
             "etymology": {
              "type": "string"
             },
             "in_word_chain_list": {
              "type": "boolean"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "attribution": {
           "type": "object",
           "properties": {
            "source": {
             "type": "string"
            },
            "license": {
             "type": "string"
            },
            "license_url": {
             "type": "string"
            },
            "authors": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "query": "hoc sinh",
         "match": "folded",
         "count": 1,
         "entries": [
          {
           "word": "học sinh",
           "syllables": 2,
           "meanings": [
            {
             "pos": "noun",
             "pos_en": "noun",
             "pos_vi": "danh từ",
             "senses": [
              {
               "definition": "Trẻ em học tập ở nhà trường.",
               "examples": [
                "Học sinh trung học.",
                "Học sinh tiên tiến."
               ]
              }
             ]
            }
           ],
           "synonyms": [
            "sĩ tử",
            "giám sinh",
            "học viên",
            "sinh viên"
           ],
           "antonyms": [],
           "ipa": {
            "ha_noi": "ha̰ʔwk˨˩ sïŋ˧˧",
            "sai_gon": "hawk˨˩˨ ʂɨn˧˧"
           },
           "han_nom": "學生",
           "etymology": "Âm Hán-Việt của chữ Hán 學生.",
           "in_word_chain_list": true,
           "url": "https://vi.wiktionary.org/wiki/h%E1%BB%8Dc_sinh"
          }
         ],
         "attribution": {
          "source": "Wiktionary tiếng Việt (vi.wiktionary.org), extracted by wiktextract / kaikki.org",
          "license": "CC BY-SA 4.0",
          "license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
          "authors": "Wiktionary contributors",
          "note": "Definitions are shared under CC BY-SA 4.0: credit Wiktionary and share derived data under the same licence."
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Vietnamese Dictionary & Word Chain",
    "description": "The dictionary holds the Vietnamese headwords of the Vietnamese Wiktionary (about 41,500 entries, extracted by wiktextract / kaikki.org, refreshed weekly). `word` can be typed with or without accents (`hoc sinh` finds `học sinh`); an entry gives the parts of speech with Vietnamese and English labels, definitions with examples, synonyms and antonyms when Wiktionary has them, the IPA of Hà Nội and Sài Gòn, the chữ Hán / Nôm form and etymology, and a link to the Wiktionary page. `action=suggest&q=nha t` autocompletes.\n\n`action=chain` serves \"nối từ\" game bots (Discord, Zalo, Messenger): it says whether a two-syllable word is valid (about 26,800 common two-syllable words, no proper nouns or idioms), checks the link with `previous`, lists continuations starting with the last syllable (excluding `used` words), flags dead ends and, with `strategy=trap`, sorts replies that leave the opponent the fewest moves. Without `word` it proposes a start word. `action=random` draws words by `syllables`, `pos` or `letters` (for guessing games).\n\nDefinitions are licensed CC BY-SA 4.0: every answer carries the attribution; credit Wiktionary and share derived data under the same licence.\n\nDocs: https://apibox.io.vn/docs/vn-dictionary/",
    "operationId": "vnDictionaryPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-dictionary/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "word": {
          "type": "string",
          "description": "Word to look up (accents optional) or to check in the chain."
         },
         "action": {
          "type": "string",
          "default": "lookup",
          "description": "`lookup`, `suggest`, `chain`, `random` or `stats`."
         },
         "q": {
          "type": "string",
          "description": "suggest: beginning of a word."
         },
         "previous": {
          "type": "string",
          "description": "chain: the previous word, to check the link."
         },
         "used": {
          "type": "array",
          "items": {},
          "description": "chain: words already played."
         },
         "strategy": {
          "type": "string",
          "default": "any",
          "description": "chain: `any`, `trap`, `safe` or `random` ordering of candidates."
         },
         "syllables": {
          "type": "number",
          "description": "random: number of syllables."
         },
         "pos": {
          "type": "string",
          "description": "random: part of speech (`noun`, `verb`, `adj`…)."
         },
         "examples": {
          "type": "boolean",
          "default": true,
          "description": "lookup: include examples."
         },
         "limit": {
          "type": "number",
          "default": 20,
          "description": "Maximum suggestions / candidates."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "match": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "entries": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "word": {
              "type": "string"
             },
             "syllables": {
              "type": "number"
             },
             "meanings": {
              "type": "array"
             },
             "synonyms": {
              "type": "array"
             },
             "antonyms": {
              "type": "array"
             },
             "ipa": {
              "type": "object"
             },
             "han_nom": {
              "type": "string"
             },
             "etymology": {
              "type": "string"
             },
             "in_word_chain_list": {
              "type": "boolean"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "attribution": {
           "type": "object",
           "properties": {
            "source": {
             "type": "string"
            },
            "license": {
             "type": "string"
            },
            "license_url": {
             "type": "string"
            },
            "authors": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/citation": {
   "get": {
    "tags": [
     "Text"
    ],
    "summary": "Citation Generator (APA, IEEE, Harvard…)",
    "description": "Send `items`: DOIs, ISBNs, PMIDs (`pmid:123`), web page URLs, BibTeX or RIS records, CSL-JSON or plain objects (`type`, `title`, `authors`, `year`, `journal`, `volume`, `issue`, `pages`, `publisher`…), up to 100 items and 25 online lookups per request. DOIs are resolved by doi.org content negotiation (Crossref, DataCite…), ISBNs through Open Library, PMIDs through the NCBI citation exporter and pages through their citation / Dublin Core / Open Graph tags; lookups are cached for a day and nothing is stored. Duplicates (same DOI or PMID) are listed once.\n\nStyles: `apa` (7th), `apa-6`, `ieee`, `harvard` (Cite Them Right), `vancouver` (NLM), `chicago` (author-date, 18th), `mla` (9th) and `apa-vn`, the convention of many Vietnamese universities: Vietnamese authors keep their full name in natural order and Vietnamese works come first, sorted by given name. Vietnamese names are parsed correctly (`Nguyễn Văn An` = family Nguyễn), reversed records from databases are fixed, Vietnamese titles are not title-cased, and `lang=vi` uses the Vietnamese CSL locale.\n\nThe JSON answer has the reference list (text and HTML), the in-text citation of each item and the CSL-JSON data (`exports=1` adds BibTeX and RIS). `format=text|html|bibtex|ris|csl|docx` returns that format directly; DOCX has hanging indents ready for a thesis. Styles and locales: Citation Style Language project (CC BY-SA 3.0); rendering by citation-js and citeproc-js (CPAL-1.0).\n\nDocs: https://apibox.io.vn/docs/citation/",
    "operationId": "citationGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/citation/"
    },
    "parameters": [
     {
      "name": "doi",
      "in": "query",
      "required": false,
      "description": "One or more DOIs (comma-separated).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "isbn",
      "in": "query",
      "required": false,
      "description": "One or more ISBNs.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "style",
      "in": "query",
      "required": false,
      "description": "`apa`, `apa-vn`, `apa-6`, `ieee`, `harvard`, `vancouver`, `chicago`, `mla`.",
      "schema": {
       "type": "string",
       "default": "apa"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "`en` or `vi` (terms such as \"và c.s.\").",
      "schema": {
       "type": "string",
       "default": "en"
      }
     },
     {
      "name": "vn_names",
      "in": "query",
      "required": false,
      "description": "`auto`, `full` (Vietnamese authors as full names in every style) or `off`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `text`, `html`, `bibtex`, `ris`, `csl` or `docx`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "exports",
      "in": "query",
      "required": false,
      "description": "Add BibTeX and RIS to the JSON answer.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "style": {
           "type": "string"
          },
          "style_name": {
           "type": "string"
          },
          "locale": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "bibliography": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "html": {
              "type": "string"
             }
            }
           }
          },
          "citations": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "text": {
              "type": "string"
             }
            }
           }
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "author": {
              "type": "array"
             },
             "container-title": {
              "type": "string"
             },
             "volume": {
              "type": "string"
             },
             "issue": {
              "type": "string"
             },
             "page": {
              "type": "string"
             },
             "issued": {
              "type": "object",
              "properties": {}
             },
             "DOI": {
              "type": "string"
             },
             "id": {
              "type": "string"
             },
             "language": {
              "type": "string"
             },
             "publisher": {
              "type": "string"
             }
            }
           }
          },
          "attribution": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Text"
    ],
    "summary": "Citation Generator (APA, IEEE, Harvard…)",
    "description": "Send `items`: DOIs, ISBNs, PMIDs (`pmid:123`), web page URLs, BibTeX or RIS records, CSL-JSON or plain objects (`type`, `title`, `authors`, `year`, `journal`, `volume`, `issue`, `pages`, `publisher`…), up to 100 items and 25 online lookups per request. DOIs are resolved by doi.org content negotiation (Crossref, DataCite…), ISBNs through Open Library, PMIDs through the NCBI citation exporter and pages through their citation / Dublin Core / Open Graph tags; lookups are cached for a day and nothing is stored. Duplicates (same DOI or PMID) are listed once.\n\nStyles: `apa` (7th), `apa-6`, `ieee`, `harvard` (Cite Them Right), `vancouver` (NLM), `chicago` (author-date, 18th), `mla` (9th) and `apa-vn`, the convention of many Vietnamese universities: Vietnamese authors keep their full name in natural order and Vietnamese works come first, sorted by given name. Vietnamese names are parsed correctly (`Nguyễn Văn An` = family Nguyễn), reversed records from databases are fixed, Vietnamese titles are not title-cased, and `lang=vi` uses the Vietnamese CSL locale.\n\nThe JSON answer has the reference list (text and HTML), the in-text citation of each item and the CSL-JSON data (`exports=1` adds BibTeX and RIS). `format=text|html|bibtex|ris|csl|docx` returns that format directly; DOCX has hanging indents ready for a thesis. Styles and locales: Citation Style Language project (CC BY-SA 3.0); rendering by citation-js and citeproc-js (CPAL-1.0).\n\nDocs: https://apibox.io.vn/docs/citation/",
    "operationId": "citationPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/citation/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "DOIs, ISBNs, PMIDs, URLs, BibTeX / RIS strings or objects."
         },
         "doi": {
          "type": "string",
          "description": "One or more DOIs (comma-separated)."
         },
         "isbn": {
          "type": "string",
          "description": "One or more ISBNs."
         },
         "bibtex": {
          "type": "string",
          "description": "BibTeX records."
         },
         "ris": {
          "type": "string",
          "description": "RIS records."
         },
         "style": {
          "type": "string",
          "default": "apa",
          "description": "`apa`, `apa-vn`, `apa-6`, `ieee`, `harvard`, `vancouver`, `chicago`, `mla`."
         },
         "lang": {
          "type": "string",
          "default": "en",
          "description": "`en` or `vi` (terms such as \"và c.s.\")."
         },
         "vn_names": {
          "type": "string",
          "default": "auto",
          "description": "`auto`, `full` (Vietnamese authors as full names in every style) or `off`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `text`, `html`, `bibtex`, `ris`, `csl` or `docx`."
         },
         "exports": {
          "type": "boolean",
          "description": "Add BibTeX and RIS to the JSON answer."
         }
        }
       },
       "example": {
        "style": "apa",
        "items": [
         {
          "type": "article",
          "title": "Ứng dụng học máy trong dự báo phụ tải điện",
          "authors": [
           "Nguyễn Văn An",
           "Trần Thị Bình"
          ],
          "year": 2021,
          "journal": "Tạp chí Khoa học và Công nghệ",
          "volume": "59",
          "issue": "3",
          "pages": "45-60",
          "doi": "10.1234/abc.2021"
         },
         {
          "type": "book",
          "title": "Deep learning",
          "authors": "Goodfellow, Ian; Bengio, Yoshua; Courville, Aaron",
          "year": 2016,
          "publisher": "MIT Press"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "style": {
           "type": "string"
          },
          "style_name": {
           "type": "string"
          },
          "locale": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "bibliography": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "html": {
              "type": "string"
             }
            }
           }
          },
          "citations": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "text": {
              "type": "string"
             }
            }
           }
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "author": {
              "type": "array"
             },
             "container-title": {
              "type": "string"
             },
             "volume": {
              "type": "string"
             },
             "issue": {
              "type": "string"
             },
             "page": {
              "type": "string"
             },
             "issued": {
              "type": "object",
              "properties": {}
             },
             "DOI": {
              "type": "string"
             },
             "id": {
              "type": "string"
             },
             "language": {
              "type": "string"
             },
             "publisher": {
              "type": "string"
             }
            }
           }
          },
          "attribution": {
           "type": "string"
          }
         }
        },
        "example": {
         "style": "apa",
         "style_name": "APA 7th edition",
         "locale": "en-US",
         "count": 2,
         "bibliography": [
          {
           "id": "ref2",
           "text": "Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press.",
           "html": "<div data-csl-entry-id=\"ref2\" class=\"csl-entry\">Goodfellow, I., Bengio, Y., &#38; Courville, A. (2016). <i>Deep learning</i>. MIT Press.</div>"
          },
          {
           "id": "ref1",
           "text": "Nguyễn, V. A., & Trần, T. B. (2021). Ứng dụng học máy trong dự báo phụ tải điện. Tạp chí Khoa học và Công nghệ, 59(3), 45–60. https://doi.org/10.1234/abc.2021",
           "html": "<div data-csl-entry-id=\"ref1\" class=\"csl-entry\">Nguyễn, V. A., &#38; Trần, T. B. (2021). Ứng dụng học máy trong dự báo phụ tải điện. <i>Tạp chí Khoa học và Công nghệ</i>, <i>59</i>(3), 45–60. https://doi.org/10.1234/abc.2021</div>"
          }
         ],
         "citations": [
          {
           "id": "ref1",
           "text": "(Nguyễn & Trần, 2021)"
          },
          {
           "id": "ref2",
           "text": "(Goodfellow et al., 2016)"
          }
         ],
         "items": [
          {
           "type": "article-journal",
           "title": "Ứng dụng học máy trong dự báo phụ tải điện",
           "author": [
            {
             "family": "Nguyễn",
             "given": "Văn An"
            },
            {
             "family": "Trần",
             "given": "Thị Bình"
            }
           ],
           "container-title": "Tạp chí Khoa học và Công nghệ",
           "volume": "59",
           "issue": "3",
           "page": "45-60",
           "issued": {
            "date-parts": [
             [
              2021
             ]
            ]
           },
           "DOI": "10.1234/abc.2021",
           "id": "ref1",
           "language": "vi-VN"
          },
          {
           "type": "book",
           "title": "Deep learning",
           "author": [
            {
             "family": "Goodfellow",
             "given": "Ian"
            },
            {
             "family": "Bengio",
             "given": "Yoshua"
            },
            {
             "family": "Courville",
             "given": "Aaron"
            }
           ],
           "publisher": "MIT Press",
           "issued": {
            "date-parts": [
             [
              2016
             ]
            ]
           },
           "id": "ref2"
          }
         ],
         "attribution": "Citation styles and locales: Citation Style Language project and the style authors (https://citationstyles.org), CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Rendering: citation-js (MIT) and citeproc-js 2.4.63 by Frank Bennett, used unmodified under the Common Public Attribution License 1.0 (CPAL-1.0, licence text: https://opensource.org/license/cpal-1-0); source code: https://github.com/Juris-M/citeproc-js (version 2.4.63: https://www.npmjs.com/package/citeproc/v/2.4.63). Third-party licences: https://apibox.io.vn/licenses"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/epub": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "EPUB Create, Read & Validate",
    "description": "`action=create` (default with `title`) builds an EPUB 3 book: send `chapters` (array of `{title, markdown | html}`) or one `markdown` text split at `#` headings (`split_level` 2 for `##`), plus `authors`, `language` (default `vi`), `publisher`, `description`, `date`, `subjects`, `rights`, `identifier` and an optional `cover` image (multipart field or `cover_base64`). The book has a nav document and an NCX for old readers, a cover page, landmarks, clean XHTML (scripts and unsafe tags removed, images given as data: URIs embedded), optional title page, `toc_depth=2` for sections and `embed_font=1` to embed Be Vietnam Pro for readers without Vietnamese fonts. The answer is the .epub file, or JSON with base64 when `format=json`.\n\n`action=read` (default when a `file` is sent) returns the metadata (title, creators with roles, languages, identifiers, publisher, dates, subjects, series), the table of contents (nav or NCX), each spine item with title, word count and its content as `text`, `markdown`, `html` or `none`, the cover (base64 with `include_cover=1`) and structure issues. `action=validate` returns only the checks: mimetype first and stored, container.xml, package document, required metadata, manifest files present, spine references, navigation, XHTML namespace and HTML entities.\n\nEverything runs in memory; files are not stored. The checks cover the common mistakes, not the full W3C EPUBCheck rule set. No conversion to MOBI or PDF.\n\nDocs: https://apibox.io.vn/docs/epub/",
    "operationId": "epubPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/epub/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "`create`, `read` or `validate` (default: read when a file is sent, otherwise create)."
         },
         "content": {
          "type": "string",
          "default": "text",
          "description": "read: `text`, `markdown`, `html` or `none`."
         },
         "title": {
          "type": "string",
          "description": "create: book title (required)."
         },
         "chapters": {
          "type": "array",
          "items": {},
          "description": "create: `[{title, markdown | html}]`."
         },
         "markdown": {
          "type": "string",
          "description": "create: one Markdown text split into chapters at `#` headings."
         },
         "authors": {
          "type": [
           "array",
           "string"
          ],
          "description": "create: authors."
         },
         "language": {
          "type": "string",
          "default": "vi",
          "description": "create: BCP 47 language tag."
         },
         "embed_font": {
          "type": "boolean",
          "description": "create: embed Be Vietnam Pro."
         },
         "format": {
          "type": "string",
          "default": "epub",
          "description": "create: `epub` or `json` (base64)."
         }
        }
       },
       "example": {
        "title": "Truyện ngắn",
        "authors": "Nguyễn Văn A",
        "markdown": "# Chương 1\n\nXin chào.\n\n# Chương 2\n\nTạm biệt.",
        "format": "json"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "`create`, `read` or `validate` (default: read when a file is sent, otherwise create)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "read / validate: the EPUB file (multipart, raw body or `file_base64`)."
         },
         "content": {
          "type": "string",
          "default": "text",
          "description": "read: `text`, `markdown`, `html` or `none`."
         },
         "title": {
          "type": "string",
          "description": "create: book title (required)."
         },
         "chapters": {
          "type": "array",
          "items": {},
          "description": "create: `[{title, markdown | html}]`."
         },
         "markdown": {
          "type": "string",
          "description": "create: one Markdown text split into chapters at `#` headings."
         },
         "authors": {
          "type": "array",
          "items": {},
          "description": "create: authors."
         },
         "language": {
          "type": "string",
          "default": "vi",
          "description": "create: BCP 47 language tag."
         },
         "cover": {
          "type": "string",
          "format": "binary",
          "description": "create: cover image (PNG / JPEG / GIF / WebP)."
         },
         "embed_font": {
          "type": "boolean",
          "description": "create: embed Be Vietnam Pro."
         },
         "format": {
          "type": "string",
          "default": "epub",
          "description": "create: `epub` or `json` (base64)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "filename": {
           "type": "string"
          },
          "bytes": {
           "type": "number"
          },
          "identifier": {
           "type": "string"
          },
          "chapters": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "href": {
              "type": "string"
             },
             "sections": {
              "type": "number"
             }
            }
           }
          },
          "images": {
           "type": "number"
          },
          "words": {
           "type": "number"
          },
          "files": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "warnings": {
           "type": "array"
          },
          "epub_base64": {
           "type": "string"
          }
         }
        },
        "example": {
         "filename": "Truyen-ngan.epub",
         "bytes": 3165,
         "identifier": "urn:uuid:00000000-0000-4000-8000-000000000001",
         "chapters": [
          {
           "title": "Chương 1",
           "href": "text/ch001.xhtml",
           "sections": 0
          },
          {
           "title": "Chương 2",
           "href": "text/ch002.xhtml",
           "sections": 0
          }
         ],
         "images": 0,
         "words": 8,
         "files": [
          "mimetype",
          "META-INF/container.xml",
          "OEBPS/text/ch001.xhtml",
          "OEBPS/text/ch002.xhtml",
          "OEBPS/style.css",
          "OEBPS/nav.xhtml",
          "OEBPS/toc.ncx",
          "OEBPS/content.opf"
         ],
         "warnings": [],
         "epub_base64": "UEsDBBQAAAAAAAA4IVxvYassFAAAABQAAAAIAAAA…"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-construction-class": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Construction Work Class",
    "description": "Applies Appendix II, Table 2 of Circular 34/2026/TT-BXD (in force 1 July 2026, replacing Circular 06/2021): each criterion gives a class and the work takes the highest one. Buildings (section 2.1) use height (H* = 150 m fire height for fire-hazard groups F1.2, F1.3, F4.2, F4.3 and mixed-use buildings, otherwise 200 m), above-ground floors, total floor area, largest span, underground depth and underground floors; villas are never below class III. Towers (2.2.1), infrastructure masts (2.2.2), tanks and silos (2.4, one class up for hazardous chemicals, not below II) and road bridges (2.5.1) are also covered.\n\nThe class by importance / capacity of Appendix I (schools by pupils, hospitals by beds, power plants by MW…) is not computed: pass it as `capacity_class` and the higher class wins (Article 2.2). Projects whose investment was decided before 1/7/2026 keep the class under the old rules (Article 5) — `investment_decision_date` adds that warning. Checked against the worked examples of Appendix III (high school, water plant, underground car park).\n\nResults are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-construction-class/",
    "operationId": "vnConstructionClassGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-construction-class/"
    },
    "parameters": [
     {
      "name": "structure",
      "in": "query",
      "required": true,
      "description": "`building`, `tower`, `infra_tower`, `tank` or `road_bridge`.",
      "schema": {
       "type": "string"
      },
      "example": "building"
     },
     {
      "name": "height_m",
      "in": "query",
      "required": false,
      "description": "Height of the building / structure, m.",
      "schema": {
       "type": "number"
      },
      "example": 36
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Above-ground floors.",
      "schema": {
       "type": "number"
      },
      "example": 8
     },
     {
      "name": "floor_area_m2",
      "in": "query",
      "required": false,
      "description": "Total floor area, m².",
      "schema": {
       "type": "number"
      },
      "example": 4000
     },
     {
      "name": "span_m",
      "in": "query",
      "required": false,
      "description": "Largest structural span, m (buildings, bridges).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "underground_depth_m",
      "in": "query",
      "required": false,
      "description": "Depth below ground to the lowest floor slab, m.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "underground_floors",
      "in": "query",
      "required": false,
      "description": "Number of basement floors.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "fire_group",
      "in": "query",
      "required": false,
      "description": "Fire-hazard group (F1.2, F1.3, F4.2, F4.3 or MIXED) for the 150 m rule; `fire_height_m` = fire height under QCVN 06:2022.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "volume_m3",
      "in": "query",
      "required": false,
      "description": "Tank / silo capacity, m³ (`hazardous_chemicals=1` raises one class).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "pier_height_m",
      "in": "query",
      "required": false,
      "description": "Bridge pier height, m.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "villa",
      "in": "query",
      "required": false,
      "description": "Villa (not below class III).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "capacity_class",
      "in": "query",
      "required": false,
      "description": "Class by importance / capacity from Appendix I, if known.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "investment_decision_date",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DD; before 2026-07-01 adds the transitional warning.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "structure": {
           "type": "string"
          },
          "section": {
           "type": "string"
          },
          "description_vi": {
           "type": "string"
          },
          "class": {
           "type": "string"
          },
          "class_vi": {
           "type": "string"
          },
          "structural_class": {
           "type": "string"
          },
          "governing": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "criteria": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "criterion": {
              "type": "string"
             },
             "label_vi": {
              "type": "string"
             },
             "value": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "rule": {
           "type": "string"
          },
          "rule_vi": {
           "type": "string"
          },
          "applies_to_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "included": {
             "type": "string"
            },
            "not_included": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "structure": "building",
         "section": "2.1",
         "description_vi": "Nhà, kết cấu dạng nhà; công trình nhiều tầng có sàn; kết cấu nhịp lớn dạng khung",
         "class": "II",
         "class_vi": "Cấp II",
         "structural_class": "II",
         "governing": [
          "height_m",
          "floors"
         ],
         "criteria": [
          {
           "criterion": "height_m",
           "label_vi": "Chiều cao (m)",
           "value": 36,
           "unit": "m",
           "class": "II",
           "class_vi": "Cấp II",
           "ref": "Bảng 2 mục 2.1 tiêu chí a + Ghi chú 1, 2"
          },
          {
           "criterion": "floors",
           "label_vi": "Số tầng cao",
           "value": 8,
           "unit": "tầng",
           "class": "II",
           "class_vi": "Cấp II",
           "ref": "Bảng 2 mục 2.1 tiêu chí b"
          },
          {
           "criterion": "floor_area_m2",
           "label_vi": "Tổng diện tích sàn",
           "value": 4000,
           "unit": "m²",
           "class": "III",
           "class_vi": "Cấp III",
           "ref": "Bảng 2 mục 2.1 tiêu chí c (nghìn m²: > 30 / > 10–30 / 1–10 / < 1; không có cấp đặc biệt)"
          }
         ],
         "rule": "The class of a stand-alone work is the highest class found from Phụ lục I (importance / capacity) and Phụ lục II (structural scale) — Điều 2 khoản 2.",
         "rule_vi": "Cấp của công trình độc lập là cấp cao nhất xác định theo Phụ lục I (mức độ quan trọng, quy mô công suất) và Phụ lục II (quy mô kết cấu) — khoản 2 Điều 2.",
         "applies_to_vi": [
          "thẩm quyền thẩm định báo cáo nghiên cứu khả thi, kiểm tra công tác nghiệm thu",
          "thẩm quyền cấp giấy phép xây dựng, công trình được miễn giấy phép",
          "điều kiện kinh nghiệm cấp chứng chỉ hành nghề khảo sát, thiết kế, giám sát; giám đốc QLDA, chỉ huy trưởng",
          "thi tuyển phương án kiến trúc; chỉ dẫn kỹ thuật riêng; công trình ảnh hưởng lớn đến an toàn cộng đồng",
          "…"
         ],
         "coverage": {
          "included": "Phụ lục II Bảng 2 sections 2.1 (buildings), 2.2.1, 2.2.2 (towers), 2.4 (tanks, silos), 2.5.1 (road bridges)",
          "not_included": "Phụ lục I (class by importance / capacity for civil, industrial, infrastructure, transport, agriculture works — pass capacity_class) and Phụ lục II sections 2.3 (cable cars), 2.5.2–2.5.3 (rail / footbridges), 2.6–2.14 (tunnels, roads, dams, pipelines, retai…"
         },
         "legal": [
          {
           "ref": "Thông tư 34/2026/TT-BXD quy định chi tiết về cấp công trình xây dựng phục vụ quản lý hoạt động xây dựng (Điều 2, 3, 5; Phụ lục II Bảng 2)",
           "effective_from": "2026-07-01",
           "url": "https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/7/34-bxd.pdf"
          },
          {
           "ref": "Thông tư 06/2021/TT-BXD (sửa đổi bởi TT 02/2025/TT-BXD) — hết hiệu lực từ 01/7/2026",
           "effective_to": "2026-06-30"
          }
         ],
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hỏi cơ quan có thẩm quyền.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Construction Work Class",
    "description": "Applies Appendix II, Table 2 of Circular 34/2026/TT-BXD (in force 1 July 2026, replacing Circular 06/2021): each criterion gives a class and the work takes the highest one. Buildings (section 2.1) use height (H* = 150 m fire height for fire-hazard groups F1.2, F1.3, F4.2, F4.3 and mixed-use buildings, otherwise 200 m), above-ground floors, total floor area, largest span, underground depth and underground floors; villas are never below class III. Towers (2.2.1), infrastructure masts (2.2.2), tanks and silos (2.4, one class up for hazardous chemicals, not below II) and road bridges (2.5.1) are also covered.\n\nThe class by importance / capacity of Appendix I (schools by pupils, hospitals by beds, power plants by MW…) is not computed: pass it as `capacity_class` and the higher class wins (Article 2.2). Projects whose investment was decided before 1/7/2026 keep the class under the old rules (Article 5) — `investment_decision_date` adds that warning. Checked against the worked examples of Appendix III (high school, water plant, underground car park).\n\nResults are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-construction-class/",
    "operationId": "vnConstructionClassPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-construction-class/"
    },
    "parameters": [
     {
      "name": "structure",
      "in": "query",
      "required": false,
      "description": "`building`, `tower`, `infra_tower`, `tank` or `road_bridge`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "height_m",
      "in": "query",
      "required": false,
      "description": "Height of the building / structure, m.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Above-ground floors.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "floor_area_m2",
      "in": "query",
      "required": false,
      "description": "Total floor area, m².",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "span_m",
      "in": "query",
      "required": false,
      "description": "Largest structural span, m (buildings, bridges).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "underground_depth_m",
      "in": "query",
      "required": false,
      "description": "Depth below ground to the lowest floor slab, m.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "underground_floors",
      "in": "query",
      "required": false,
      "description": "Number of basement floors.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "fire_group",
      "in": "query",
      "required": false,
      "description": "Fire-hazard group (F1.2, F1.3, F4.2, F4.3 or MIXED) for the 150 m rule; `fire_height_m` = fire height under QCVN 06:2022.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "volume_m3",
      "in": "query",
      "required": false,
      "description": "Tank / silo capacity, m³ (`hazardous_chemicals=1` raises one class).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "pier_height_m",
      "in": "query",
      "required": false,
      "description": "Bridge pier height, m.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "villa",
      "in": "query",
      "required": false,
      "description": "Villa (not below class III).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "capacity_class",
      "in": "query",
      "required": false,
      "description": "Class by importance / capacity from Appendix I, if known.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "investment_decision_date",
      "in": "query",
      "required": false,
      "description": "YYYY-MM-DD; before 2026-07-01 adds the transitional warning.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "structure": {
           "type": "string"
          },
          "section": {
           "type": "string"
          },
          "description_vi": {
           "type": "string"
          },
          "class": {
           "type": "string"
          },
          "class_vi": {
           "type": "string"
          },
          "structural_class": {
           "type": "string"
          },
          "governing": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "criteria": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "criterion": {
              "type": "string"
             },
             "label_vi": {
              "type": "string"
             },
             "value": {
              "type": "number"
             },
             "unit": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             }
            }
           }
          },
          "rule": {
           "type": "string"
          },
          "rule_vi": {
           "type": "string"
          },
          "applies_to_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "coverage": {
           "type": "object",
           "properties": {
            "included": {
             "type": "string"
            },
            "not_included": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-fire-safety": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Fire Safety Obligations",
    "description": "For 45 facility types (apartments, schools, hospitals, karaoke, restaurants, shops, hotels, offices, factories and warehouses by fire-hazard class A–E, petrol stations, gas shops, tunnels…) and their size (floors, floor area, business area, volume, seats, pupils, beds, gas stock, voltage, tunnel length), the API applies Decree 105/2025/NĐ-CP as amended by Decree 347/2026/NĐ-CP (from 15 September 2026):\n\n- Appendix I — facility under fire-safety management; Appendix II — facility with fire and explosion risk, group 1 (checked every year) or group 2 (every 2 years, Article 13 as amended);\n- Appendix VII — compulsory fire and explosion insurance (Article 35); Appendix III — design appraisal by the specialised authority;\n- Article 20 — an in-house fire and rescue team when 20+ people work there regularly (10 / 15 / 25 members), squads for shifts over 100 people; Article 27 — fire-alarm transmitter connected to the national database by 1 July 2027.\n\nMissing size inputs are listed in `missing_inputs` instead of being guessed. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-fire-safety/",
    "operationId": "vnFireSafetyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fire-safety/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": true,
      "description": "Facility type, e.g. `karaoke`, `restaurant`, `hotel`, `apartment`, `factory_c`, `warehouse_abc`, `petrol_station` (call without it for all 45).",
      "schema": {
       "type": "string"
      },
      "example": "karaoke"
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Floors of the tallest building.",
      "schema": {
       "type": "number"
      },
      "example": 3
     },
     {
      "name": "floor_area_m2",
      "in": "query",
      "required": false,
      "description": "Total floor area, m².",
      "schema": {
       "type": "number"
      },
      "example": 400
     },
     {
      "name": "business_area_m2",
      "in": "query",
      "required": false,
      "description": "Area used for business (shops, restaurants, house + business).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "volume_m3",
      "in": "query",
      "required": false,
      "description": "Building volume (factories, warehouses).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Seats (theatres, stadiums, cultural houses); `children`, `beds` for kindergartens / hospitals.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gas_kg",
      "in": "query",
      "required": false,
      "description": "Gas stock (gas shops); `voltage_kv`, `length_m`, `area_ha`, `construction_class` for other types.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "workers",
      "in": "query",
      "required": false,
      "description": "People working there regularly (fire team); `workers_per_shift` for squads.",
      "schema": {
       "type": "number"
      },
      "example": 25
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "type_vi": {
           "type": "string"
          },
          "type_en": {
           "type": "string"
          },
          "managed": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "basis": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "fire_explosion_risk": {
           "type": "object",
           "properties": {
            "group": {
             "type": "number"
            },
            "group_vi": {
             "type": "string"
            },
            "basis": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "periodic_inspection": {
           "type": "object",
           "properties": {
            "every_years": {
             "type": "number"
            },
            "by": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "compulsory_insurance": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "basis": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ref": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "design_appraisal": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "basis": {
             "type": "array"
            },
            "ref": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "note_vi": {
             "type": "string"
            }
           }
          },
          "fire_alarm_connection": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "deadline": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "note_vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "fire_team": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "kind": {
             "type": "string"
            },
            "min_members": {
             "type": "number"
            },
            "leaders": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "specialised_note": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "type": "karaoke",
         "type_vi": "Thủy cung, karaoke, vũ trường, vui chơi giải trí, biểu diễn nghệ thuật, hoạt động văn hóa khác",
         "type_en": "Aquarium, karaoke, dance club, amusement, performance venue",
         "managed": {
          "required": true,
          "basis": [
           "floor_area_m2 400 ≥ 50"
          ],
          "ref": "NĐ 105/2025 Phụ lục I mục 8"
         },
         "fire_explosion_risk": {
          "group": 2,
          "group_vi": "Nhóm 2",
          "basis": [
           "floors 3 ≥ 2",
           "floor_area_m2 400 ≥ 300"
          ],
          "ref": "NĐ 105/2025 Phụ lục II"
         },
         "periodic_inspection": {
          "every_years": 2,
          "by": "Công an (theo phân cấp) hoặc cơ quan chuyên môn về xây dựng do UBND cấp tỉnh phân công",
          "ref": "NĐ 105/2025 Điều 13 khoản 2 (sửa đổi bởi NĐ 347/2026)"
         },
         "compulsory_insurance": {
          "required": true,
          "basis": [
           "floors 3 ≥ 2",
           "floor_area_m2 400 ≥ 300"
          ],
          "ref": "NĐ 105/2025 Điều 35, Phụ lục VII (mức phí tối thiểu: Phụ lục VI)",
          "note": "Exempt: facilities of the Ministries of Defence / Public Security used for defence and security purposes."
         },
         "design_appraisal": {
          "required": false,
          "basis": [],
          "ref": "NĐ 105/2025 Phụ lục III (thay thế bởi Phụ lục III NĐ 347/2026 từ 15/9/2026)",
          "note": "Works of the list must have their fire-safety design appraised by the specialised authority when built, renovated or changing use; other works: the investor appraises.",
          "note_vi": "Công trình thuộc danh mục phải được thẩm định thiết kế về PCCC khi xây dựng mới, cải tạo, thay đổi công năng; công trình khác chủ đầu tư tự chịu trách nhiệm."
         },
         "fire_alarm_connection": {
          "required": true,
          "deadline": "2027-07-01",
          "note": "Equip and connect a fire-alarm transmitter to the national PCCC & rescue database by 01/7/2027.",
          "note_vi": "Trang bị, kết nối thiết bị truyền tin báo cháy với Cơ sở dữ liệu về PCCC và CNCH chậm nhất 01/7/2027.",
          "ref": "NĐ 105/2025 Điều 27 khoản 2"
         },
         "fire_team": {
          "required": true,
          "kind": "Đội PCCC và CNCH cơ sở",
          "min_members": 10,
          "leaders": "1 đội trưởng, 1 đội phó",
          "ref": "NĐ 105/2025 Điều 20 khoản 2, 5",
          "specialised_note": "Industrial zones ≥ 75 ha, oil depots ≥ 100,000 m³, refineries, airports, nuclear plants… must have a specialised (chuyên ngành) team instead — Điều 20 khoản 1."
         },
         "legal": [
          {
           "ref": "Luật Phòng cháy, chữa cháy và cứu nạn, cứu hộ số 55/2024/QH15",
           "effective_from": "2025-07-01"
          },
          {
           "ref": "Nghị định 105/2025/NĐ-CP quy định chi tiết Luật PCCC và CNCH (Phụ lục I, II, III, VI, VII; Điều 20, 27, 35)",
           "effective_from": "2025-07-01",
           "url": "https://congbao.chinhphu.vn/cong-bao/cong-bao-so-717-718-ngay-31-05-2025-44911.htm"
          },
          "…"
         ],
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hỏi cơ quan có thẩm quyền.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Fire Safety Obligations",
    "description": "For 45 facility types (apartments, schools, hospitals, karaoke, restaurants, shops, hotels, offices, factories and warehouses by fire-hazard class A–E, petrol stations, gas shops, tunnels…) and their size (floors, floor area, business area, volume, seats, pupils, beds, gas stock, voltage, tunnel length), the API applies Decree 105/2025/NĐ-CP as amended by Decree 347/2026/NĐ-CP (from 15 September 2026):\n\n- Appendix I — facility under fire-safety management; Appendix II — facility with fire and explosion risk, group 1 (checked every year) or group 2 (every 2 years, Article 13 as amended);\n- Appendix VII — compulsory fire and explosion insurance (Article 35); Appendix III — design appraisal by the specialised authority;\n- Article 20 — an in-house fire and rescue team when 20+ people work there regularly (10 / 15 / 25 members), squads for shifts over 100 people; Article 27 — fire-alarm transmitter connected to the national database by 1 July 2027.\n\nMissing size inputs are listed in `missing_inputs` instead of being guessed. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-fire-safety/",
    "operationId": "vnFireSafetyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-fire-safety/"
    },
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "Facility type, e.g. `karaoke`, `restaurant`, `hotel`, `apartment`, `factory_c`, `warehouse_abc`, `petrol_station` (call without it for all 45).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "floors",
      "in": "query",
      "required": false,
      "description": "Floors of the tallest building.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "floor_area_m2",
      "in": "query",
      "required": false,
      "description": "Total floor area, m².",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "business_area_m2",
      "in": "query",
      "required": false,
      "description": "Area used for business (shops, restaurants, house + business).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "volume_m3",
      "in": "query",
      "required": false,
      "description": "Building volume (factories, warehouses).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "seats",
      "in": "query",
      "required": false,
      "description": "Seats (theatres, stadiums, cultural houses); `children`, `beds` for kindergartens / hospitals.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gas_kg",
      "in": "query",
      "required": false,
      "description": "Gas stock (gas shops); `voltage_kv`, `length_m`, `area_ha`, `construction_class` for other types.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "workers",
      "in": "query",
      "required": false,
      "description": "People working there regularly (fire team); `workers_per_shift` for squads.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "type_vi": {
           "type": "string"
          },
          "type_en": {
           "type": "string"
          },
          "managed": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "basis": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "fire_explosion_risk": {
           "type": "object",
           "properties": {
            "group": {
             "type": "number"
            },
            "group_vi": {
             "type": "string"
            },
            "basis": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "periodic_inspection": {
           "type": "object",
           "properties": {
            "every_years": {
             "type": "number"
            },
            "by": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "compulsory_insurance": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "basis": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "ref": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "design_appraisal": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "basis": {
             "type": "array"
            },
            "ref": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "note_vi": {
             "type": "string"
            }
           }
          },
          "fire_alarm_connection": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "deadline": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "note_vi": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            }
           }
          },
          "fire_team": {
           "type": "object",
           "properties": {
            "required": {
             "type": "boolean"
            },
            "kind": {
             "type": "string"
            },
            "min_members": {
             "type": "number"
            },
            "leaders": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "specialised_note": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-social-housing": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Social Housing Eligibility",
    "description": "Implements the Housing Law 2023 (Articles 76–78; group 13 \"two or more children\" added by the Population Law from 1 July 2026) and Decree 100/2024/NĐ-CP as amended by Decrees 261/2025, 54/2026 and 136/2026. Income caps change by date: 15 / 30 million VND (single / couple) from 1/8/2024, 20 / 30 / 40 million (single / single raising a minor child / couple) from 10/10/2025, 25 / 35 / 50 million from 7/4/2026, measured as average monthly income over the last 12 months; they apply to low-income urban people, workers and civil servants.\n\nHousing condition: no house owned in the province of the project, or under 15 m² of floor per person; no earlier social-housing support. Groups that may only rent (students, enterprises) or get house-repair support (rural poor) are flagged; armed-forces income tests and group 13 (guidance pending) return `null` with a note. A provincial coefficient can be passed (`coefficient`); the known one (Hồ Chí Minh City, 1.25) is shown with its status. Preferential loan rate of the Social Policy Bank (5.4 %/year from 10/10/2025).\n\nThe rules changed three times in 12 months: reviewed every 30 days. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-social-housing/",
    "operationId": "vnSocialHousingGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-social-housing/"
    },
    "parameters": [
     {
      "name": "group",
      "in": "query",
      "required": true,
      "description": "Beneficiary group 1–13 or a key: `low_income`, `worker`, `civil_servant`, `armed_forces`, `two_children`…",
      "schema": {
       "type": "string"
      },
      "example": "worker"
     },
     {
      "name": "marital",
      "in": "query",
      "required": false,
      "description": "`single` or `married`; `single_with_minor_child=1` for a single parent.",
      "schema": {
       "type": "string"
      },
      "example": "single"
     },
     {
      "name": "income_vnd",
      "in": "query",
      "required": false,
      "description": "Average monthly income over the last 12 months, VND; `spouse_income_vnd` for couples.",
      "schema": {
       "type": "number"
      },
      "example": 22000000
     },
     {
      "name": "owns_house_in_province",
      "in": "query",
      "required": false,
      "description": "Owns a house in the province of the project; `house_area_per_person_m2` if yes.",
      "schema": {
       "type": "boolean"
      },
      "example": false
     },
     {
      "name": "previously_supported",
      "in": "query",
      "required": false,
      "description": "Already received social-housing / housing-land support.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "coefficient",
      "in": "query",
      "required": false,
      "description": "Provincial income coefficient (1–3); `province` shows known ones.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date of the rules, YYYY-MM-DD (default today).",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-15"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "group": {
           "type": "string"
          },
          "group_vi": {
           "type": "string"
          },
          "eligible": {
           "type": "boolean"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "check": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "khoan": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "monthly_income_vnd": {
              "type": "number"
             },
             "cap_vnd": {
              "type": "number"
             },
             "coefficient": {
              "type": "number"
             },
             "margin_vnd": {
              "type": "number"
             }
            }
           }
          },
          "income_caps_vnd": {
           "type": "object",
           "properties": {
            "single": {
             "type": "number"
            },
            "single_with_minor_child": {
             "type": "number"
            },
            "married_couple": {
             "type": "number"
            },
            "period": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "from": {
             "type": "string"
            }
           }
          },
          "preferential_loan": {
           "type": "object",
           "properties": {
            "lender": {
             "type": "string"
            },
            "rate_pct_year": {
             "type": "number"
            },
            "from": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "documents_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-15",
         "group": "worker",
         "group_vi": "Công nhân, người lao động đang làm việc tại doanh nghiệp, hợp tác xã trong và ngoài khu công nghiệp",
         "eligible": true,
         "checks": [
          {
           "check": "group",
           "ok": true,
           "khoan": "Điều 76 khoản 6"
          },
          {
           "check": "housing",
           "ok": true,
           "note": "No house owned in the province of the project.",
           "ref": "NĐ 100/2024 Điều 29 (sửa đổi bởi NĐ 54/2026)"
          },
          {
           "check": "income",
           "ok": true,
           "basis": "single",
           "monthly_income_vnd": 22000000,
           "cap_vnd": 25000000,
           "coefficient": 1,
           "margin_vnd": 3000000,
           "ref": "NĐ 136/2026/NĐ-CP sửa đổi khoản 1 Điều 30 NĐ 100/2024"
          }
         ],
         "income_caps_vnd": {
          "single": 25000000,
          "single_with_minor_child": 35000000,
          "married_couple": 50000000,
          "period": "average monthly income actually received (payroll / confirmed) over the 12 consecutive months before certification",
          "ref": "NĐ 136/2026/NĐ-CP sửa đổi khoản 1 Điều 30 NĐ 100/2024",
          "from": "2026-04-07"
         },
         "preferential_loan": {
          "lender": "Ngân hàng Chính sách xã hội",
          "rate_pct_year": 5.4,
          "from": "2025-10-10",
          "note": "Overdue interest 130 % of the loan rate; the bank decides the amount and term (see /v1/loan-calc)."
         },
         "documents_vi": [
          "Đơn đăng ký mua, thuê mua nhà ở xã hội theo mẫu hiện hành (mẫu ban hành kèm NĐ 136/2026/NĐ-CP)",
          "Giấy tờ chứng minh đối tượng (mẫu theo Thông tư của Bộ Xây dựng)",
          "Giấy tờ chứng minh điều kiện nhà ở",
          "Giấy tờ chứng minh điều kiện thu nhập (xác nhận của cơ quan, đơn vị hoặc Công an cấp xã đối với lao động tự do)"
         ],
         "note": "The project investor and the provincial Department of Construction make the final review.",
         "legal": [
          {
           "ref": "Luật Nhà ở số 27/2023/QH15, Điều 76, 77, 78 (khoản 13 Điều 76 bổ sung bởi Luật Dân số số 113/2025/QH15 từ 01/7/2026)",
           "effective_from": "2024-08-01"
          },
          {
           "ref": "Nghị định 100/2024/NĐ-CP, Điều 29 (nhà ở), Điều 30 (thu nhập); sửa đổi bởi NĐ 261/2025/NĐ-CP (10/10/2025), NĐ 54/2026/NĐ-CP, NĐ 136/2026/NĐ-CP (07/4/2026)",
           "url": "https://moc.gov.vn/Images/FileVanBan/BXD_24-VBHN-BXD_18052026.pdf"
          }
         ],
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hỏi cơ quan có thẩm quyền.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Social Housing Eligibility",
    "description": "Implements the Housing Law 2023 (Articles 76–78; group 13 \"two or more children\" added by the Population Law from 1 July 2026) and Decree 100/2024/NĐ-CP as amended by Decrees 261/2025, 54/2026 and 136/2026. Income caps change by date: 15 / 30 million VND (single / couple) from 1/8/2024, 20 / 30 / 40 million (single / single raising a minor child / couple) from 10/10/2025, 25 / 35 / 50 million from 7/4/2026, measured as average monthly income over the last 12 months; they apply to low-income urban people, workers and civil servants.\n\nHousing condition: no house owned in the province of the project, or under 15 m² of floor per person; no earlier social-housing support. Groups that may only rent (students, enterprises) or get house-repair support (rural poor) are flagged; armed-forces income tests and group 13 (guidance pending) return `null` with a note. A provincial coefficient can be passed (`coefficient`); the known one (Hồ Chí Minh City, 1.25) is shown with its status. Preferential loan rate of the Social Policy Bank (5.4 %/year from 10/10/2025).\n\nThe rules changed three times in 12 months: reviewed every 30 days. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-social-housing/",
    "operationId": "vnSocialHousingPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-social-housing/"
    },
    "parameters": [
     {
      "name": "group",
      "in": "query",
      "required": false,
      "description": "Beneficiary group 1–13 or a key: `low_income`, `worker`, `civil_servant`, `armed_forces`, `two_children`…",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "marital",
      "in": "query",
      "required": false,
      "description": "`single` or `married`; `single_with_minor_child=1` for a single parent.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "income_vnd",
      "in": "query",
      "required": false,
      "description": "Average monthly income over the last 12 months, VND; `spouse_income_vnd` for couples.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "owns_house_in_province",
      "in": "query",
      "required": false,
      "description": "Owns a house in the province of the project; `house_area_per_person_m2` if yes.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "previously_supported",
      "in": "query",
      "required": false,
      "description": "Already received social-housing / housing-land support.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "coefficient",
      "in": "query",
      "required": false,
      "description": "Provincial income coefficient (1–3); `province` shows known ones.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date of the rules, YYYY-MM-DD (default today).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "group": {
           "type": "string"
          },
          "group_vi": {
           "type": "string"
          },
          "eligible": {
           "type": "boolean"
          },
          "checks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "check": {
              "type": "string"
             },
             "ok": {
              "type": "boolean"
             },
             "khoan": {
              "type": "string"
             },
             "note": {
              "type": "string"
             },
             "ref": {
              "type": "string"
             },
             "basis": {
              "type": "string"
             },
             "monthly_income_vnd": {
              "type": "number"
             },
             "cap_vnd": {
              "type": "number"
             },
             "coefficient": {
              "type": "number"
             },
             "margin_vnd": {
              "type": "number"
             }
            }
           }
          },
          "income_caps_vnd": {
           "type": "object",
           "properties": {
            "single": {
             "type": "number"
            },
            "single_with_minor_child": {
             "type": "number"
            },
            "married_couple": {
             "type": "number"
            },
            "period": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "from": {
             "type": "string"
            }
           }
          },
          "preferential_loan": {
           "type": "object",
           "properties": {
            "lender": {
             "type": "string"
            },
            "rate_pct_year": {
             "type": "number"
            },
            "from": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "documents_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "note": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-dangerous-goods": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Dangerous Goods (Road)",
    "description": "The list of Appendix I of Decree 161/2024/NĐ-CP (in force 1 January 2025), imported from the Official Gazette: Vietnamese and English name, UN number, class / division (1–9), labels and the hazard identification number with its meaning (Appendix II, X = reacts dangerously with water). For one UN number the API adds the rules of the decree as amended by Decree 105/2025: which body issues the transport permit (Ministry of Industry and Trade; provincial People's Committee for pesticides; radiation rules for class 7; no permit for the remaining class 6 toxics), permit exemptions under 1,080 kg LNG / CNG, 2,250 kg LPG, 1,500 l liquid fuel or 1,000 kg pesticides (`kind` + `quantity_kg` / `quantity_l`), the ban on flammable / explosive goods in tunnels of 100 m or more and on passenger ferries, 16-hour driver / escort training every 2 years, and marking.\n\n`format=svg` draws the orange plate (hazard number over UN number) and simplified label diamonds (colours and class numbers, no pictograms — not a substitute for certified labels). Search folds Vietnamese accents (`q=axit sunphuric`, `q=xăng`). Rebuilt weekly from the Gazette PDFs. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-dangerous-goods/",
    "operationId": "vnDangerousGoodsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-dangerous-goods/"
    },
    "parameters": [
     {
      "name": "un",
      "in": "query",
      "required": false,
      "description": "UN number (e.g. 1203, UN1005).",
      "schema": {
       "type": "string"
      },
      "example": "1075"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name search, Vietnamese or English, accents optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Filter by class / division (3, 6.1, 8…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hazard_number",
      "in": "query",
      "required": false,
      "description": "Explain a hazard identification number (33, X886…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "description": "`lpg`, `lng_cng`, `fuel` or `pesticide` with `quantity_kg` / `quantity_l` for the permit exemption.",
      "schema": {
       "type": "string"
      },
      "example": "lpg"
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`svg` for the orange plate and label preview (with `un`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results (1–100).",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "object",
           "properties": {
            "un": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "un": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "class_en": {
              "type": "string"
             },
             "labels": {
              "type": "array"
             },
             "hazard_number": {
              "type": "string"
             },
             "hazard_meaning_vi": {
              "type": "string"
             },
             "water_reactive": {
              "type": "boolean"
             },
             "orange_plate": {
              "type": "object"
             },
             "permit": {
              "type": "object"
             },
             "tunnel_ban": {
              "type": "object"
             },
             "training": {
              "type": "object"
             },
             "marking": {
              "type": "object"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "source": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "effective": {
             "type": "string"
            },
            "gazette": {
             "type": "string"
            },
            "page": {
             "type": "string"
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "query": {
          "un": "1075"
         },
         "total": 1,
         "results": [
          {
           "un": "1075",
           "name_vi": "KHÍ DẦU MỎ, HÓA LỎNG",
           "name_en": "PETROLEUM GASES, LIQUEFIED",
           "class": "2",
           "class_vi": "Khí",
           "class_en": "Gases",
           "labels": [
            "2.1"
           ],
           "hazard_number": "23",
           "hazard_meaning_vi": "khí dễ cháy",
           "water_reactive": false,
           "orange_plate": {
            "top": "23",
            "bottom": "1075"
           },
           "permit": {
            "required": false,
            "authority": {
             "vi": "Bộ Công Thương (Bộ Quốc phòng đối với tổ chức, doanh nghiệp thuộc Bộ Quốc phòng và người vận tải do họ thuê)",
             "en": "Ministry of Industry and Trade (Ministry of Defence for its organisations and their carriers)",
             "ref": "Điều 14 khoản 2, 3 (khoản 3 sửa đổi bởi NĐ 105/2025)"
            },
            "exemption": {
             "kind": "lpg",
             "threshold": 2250,
             "unit": "kg",
             "amount": 2000,
             "permit_exempt": true,
             "ref": "Điều 14 khoản 8",
             "rule": "Total mass under 2,250 kg → no transport permit"
            },
            "validity": "up to 24 months, nationwide, not beyond the vehicle's service life (Điều 13 khoản 3)"
           },
           "tunnel_ban": {
            "banned": true,
            "rule": "Explosives, fuel gases, petrol, oil and other flammable / explosive substances or desensitized solids may not pass through tunnels 100 m or longer; not on the same ferry trip as passengers (Điều 11).",
            "rule_vi": "Không vận chuyển thuốc nổ, khí đốt, xăng, dầu và các chất dễ cháy, nổ, chất rắn khử nhạy qua hầm dài từ 100 m trở lên; không chở cùng chuyến phà với hành khách (Điều 11).",
            "interpretation": "class-based reading of Điều 11",
            "verified": true
           },
           "training": {
            "required": true,
            "who": "driver or escort (người lái xe hoặc người áp tải)",
            "min_hours": 16,
            "per": "each class / division carried",
            "repeat_years": 2,
            "ref": "Điều 8"
           },
           "marking": {
            "rule": "Hazard labels on every package; vehicle placards with the labels of all classes carried on both sides, front and rear; remove after unloading and cleaning (Điều 7, 9).",
            "ref": "Điều 7, 9; Phụ lục III"
           }
          }
         ],
         "legal": [
          {
           "ref": "Nghị định 161/2024/NĐ-CP quy định Danh mục hàng hóa nguy hiểm, vận chuyển hàng hóa nguy hiểm và cấp giấy phép, giấy chứng nhận tập huấn trên đường bộ (Điều 4, 8, 11, 14; Phụ lục I, II)",
           "effective_from": "2025-01-01",
           "url": "https://congbao.chinhphu.vn/cong-bao/cong-bao-so-25-26-ngay-08-01-2025-43640.htm"
          },
          {
           "ref": "Nghị định 105/2025/NĐ-CP Điều 44 khoản 4 (bãi bỏ khoản 1, sửa đổi khoản 3 Điều 14 NĐ 161/2024)",
           "effective_from": "2025-07-01"
          },
          "…"
         ],
         "source": {
          "decree": "161/2024/NĐ-CP",
          "date": "2024-12-18",
          "effective": "2025-01-01",
          "gazette": "Công báo số 25+26, 27+28, 29+30 ngày 08/01/2025",
          "page": "https://congbao.chinhphu.vn/cong-bao/cong-bao-so-25-26-ngay-08-01-2025-43640.htm"
         },
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hỏi cơ quan có thẩm quyền.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Dangerous Goods (Road)",
    "description": "The list of Appendix I of Decree 161/2024/NĐ-CP (in force 1 January 2025), imported from the Official Gazette: Vietnamese and English name, UN number, class / division (1–9), labels and the hazard identification number with its meaning (Appendix II, X = reacts dangerously with water). For one UN number the API adds the rules of the decree as amended by Decree 105/2025: which body issues the transport permit (Ministry of Industry and Trade; provincial People's Committee for pesticides; radiation rules for class 7; no permit for the remaining class 6 toxics), permit exemptions under 1,080 kg LNG / CNG, 2,250 kg LPG, 1,500 l liquid fuel or 1,000 kg pesticides (`kind` + `quantity_kg` / `quantity_l`), the ban on flammable / explosive goods in tunnels of 100 m or more and on passenger ferries, 16-hour driver / escort training every 2 years, and marking.\n\n`format=svg` draws the orange plate (hazard number over UN number) and simplified label diamonds (colours and class numbers, no pictograms — not a substitute for certified labels). Search folds Vietnamese accents (`q=axit sunphuric`, `q=xăng`). Rebuilt weekly from the Gazette PDFs. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-dangerous-goods/",
    "operationId": "vnDangerousGoodsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-dangerous-goods/"
    },
    "parameters": [
     {
      "name": "un",
      "in": "query",
      "required": false,
      "description": "UN number (e.g. 1203, UN1005).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Name search, Vietnamese or English, accents optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "class",
      "in": "query",
      "required": false,
      "description": "Filter by class / division (3, 6.1, 8…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hazard_number",
      "in": "query",
      "required": false,
      "description": "Explain a hazard identification number (33, X886…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "description": "`lpg`, `lng_cng`, `fuel` or `pesticide` with `quantity_kg` / `quantity_l` for the permit exemption.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`svg` for the orange plate and label preview (with `un`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results (1–100).",
      "schema": {
       "type": "number",
       "default": 20
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "object",
           "properties": {
            "un": {
             "type": "string"
            }
           }
          },
          "total": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "un": {
              "type": "string"
             },
             "name_vi": {
              "type": "string"
             },
             "name_en": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "class_en": {
              "type": "string"
             },
             "labels": {
              "type": "array"
             },
             "hazard_number": {
              "type": "string"
             },
             "hazard_meaning_vi": {
              "type": "string"
             },
             "water_reactive": {
              "type": "boolean"
             },
             "orange_plate": {
              "type": "object"
             },
             "permit": {
              "type": "object"
             },
             "tunnel_ban": {
              "type": "object"
             },
             "training": {
              "type": "object"
             },
             "marking": {
              "type": "object"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "source": {
           "type": "object",
           "properties": {
            "decree": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "effective": {
             "type": "string"
            },
            "gazette": {
             "type": "string"
            },
            "page": {
             "type": "string"
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-low-emission-zone": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Hanoi Low-Emission Zone",
    "description": "Hanoi's low-emission zone scheme for Ring Road 1 (adopted by the City People's Council on 15 June 2026): stage 1 (1/7–31/12/2026, in force) covers zones 1 and 2 of Hoàn Kiếm ward — all motor vehicles restricted 19:00–24:00 on Friday to Sunday in zone 1, coaches of 16+ seats and trucks under 2 t outside peak hours, trucks of 2 t or more only 21:00–06:00, petrol ride-hailing motorbikes and old motorbikes encouraged to limit trips; stage 2 (2027, planned) adds zone 3 (Hoàn Kiếm and Cửa Nam), bans fossil-fuel ride-hailing motorbikes and trucks over 3.5 t and requires emission level 4 for cars; stage 3 (from 2028, planned) covers all 9 wards of Ring Road 1 and bans petrol motorbikes below emission level 3.\n\nSend the vehicle (`motorcycle`, `moped`, `car` + `seats`, `truck` + `gvw_t`, `ebike`), fuel, use (`personal` / `ride_hailing`), emission level, place (`zone` kv1 / kv2 / kv3 / ring1, a `ward` or a boundary `street`) and `datetime` (Vietnam time): the answer is `restricted_now` true / false / null (null when it depends on peak hours, which the city sets, or on the emission level). Zones are described by their boundary streets, not by coordinates. Policy changes fast: reviewed every 30 days, each stage has a `status`. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-low-emission-zone/",
    "operationId": "vnLowEmissionZoneGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-low-emission-zone/"
    },
    "parameters": [
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`motorcycle`, `moped`, `car` (+ `seats`), `coach`, `bus`, `truck` (+ `gvw_t`), `ebike`, `bicycle`.",
      "schema": {
       "type": "string"
      },
      "example": "motorcycle"
     },
     {
      "name": "fuel",
      "in": "query",
      "required": false,
      "description": "`petrol`, `diesel`, `electric`, `hybrid`, `cng`, `lpg`.",
      "schema": {
       "type": "string",
       "default": "petrol"
      }
     },
     {
      "name": "use",
      "in": "query",
      "required": false,
      "description": "`personal`, `ride_hailing` (app-based ride / delivery) or `commercial`.",
      "schema": {
       "type": "string",
       "default": "personal"
      },
      "example": "ride_hailing"
     },
     {
      "name": "zone",
      "in": "query",
      "required": false,
      "description": "`kv1`, `kv2`, `kv3` or `ring1`; or `ward` / `street`.",
      "schema": {
       "type": "string"
      },
      "example": "kv1"
     },
     {
      "name": "datetime",
      "in": "query",
      "required": false,
      "description": "Vietnam time, YYYY-MM-DDTHH:MM (default now).",
      "schema": {
       "type": "string"
      },
      "example": "2026-12-04T20:00"
     },
     {
      "name": "emission_level",
      "in": "query",
      "required": false,
      "description": "Emission standard level of the vehicle (1–5).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "priority_vehicle",
      "in": "query",
      "required": false,
      "description": "Priority vehicle (exempt).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "datetime_vn": {
           "type": "string"
          },
          "vehicle": {
           "type": "string"
          },
          "fuel": {
           "type": "string"
          },
          "use": {
           "type": "string"
          },
          "zones": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "restricted_now": {
           "type": "boolean"
          },
          "summary": {
           "type": "string"
          },
          "stages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "stage": {
              "type": "number"
             },
             "status": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "to": {},
             "active": {
              "type": "boolean"
             },
             "in_zone": {
              "type": "boolean"
             },
             "verdicts": {
              "type": "array"
             }
            }
           }
          },
          "city": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "number": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "datetime_vn": "2026-12-04T20:00",
         "vehicle": "motorcycle",
         "fuel": "petrol",
         "use": "ride_hailing",
         "zones": [
          "kv1",
          "kv2",
          "kv3",
          "ring1"
         ],
         "restricted_now": true,
         "summary": "Restricted at this time.",
         "stages": [
          {
           "stage": 1,
           "status": "in_force",
           "from": "2026-07-01",
           "to": "2026-12-31",
           "active": true,
           "in_zone": true,
           "verdicts": [
            {
             "rule": "kv1-evening",
             "effect": "time_window",
             "restricted": true,
             "vi": "Khu vực 1: hạn chế mọi phương tiện cơ giới (ô tô, xe máy, xe gắn máy) từ 19h đến 24h thứ Sáu, thứ Bảy, Chủ nhật",
             "en": "Zone 1: all motor vehicles restricted 19:00–24:00 on Fridays, Saturdays and Sundays"
            },
            {
             "rule": "ride-hailing",
             "effect": "encouraged_to_limit",
             "restricted": false,
             "vi": "Xe máy chạy xăng kinh doanh qua ứng dụng (xe ôm công nghệ, shipper): khuyến khích hạn chế; ứng dụng phải điều hướng",
             "en": "Petrol ride-hailing / delivery motorbikes: encouraged to limit trips; platforms must re-route"
            }
           ]
          },
          {
           "stage": 2,
           "status": "planned",
           "from": "2027-01-01",
           "to": "2027-12-31",
           "active": false,
           "in_zone": true,
           "verdicts": [
            {
             "rule": "ride-hailing-ban",
             "effect": "banned",
             "restricted": true,
             "vi": "Cấm xe máy chạy nhiên liệu hóa thạch kinh doanh qua ứng dụng trong vùng",
             "en": "Fossil-fuel ride-hailing / delivery motorbikes banned in the zone"
            }
           ]
          },
          {
           "stage": 3,
           "status": "planned",
           "from": "2028-01-01",
           "to": null,
           "active": false,
           "in_zone": true,
           "verdicts": [
            {
             "rule": "ride-hailing-ban-r1",
             "effect": "banned",
             "restricted": true,
             "vi": "Cấm xe máy chạy xăng kinh doanh qua ứng dụng trong Vành đai 1",
             "en": "Petrol ride-hailing motorbikes banned inside Ring Road 1"
            }
           ]
          }
         ],
         "city": "Hà Nội",
         "legal": [
          {
           "ref": "Đề án vùng phát thải thấp trong Vành đai 1 thành phố Hà Nội (HĐND TP Hà Nội thông qua ngày 15/6/2026; thay thế lộ trình của Nghị quyết thông qua 26/11/2025)",
           "effective_from": "2026-07-01",
           "number": "unverified"
          },
          {
           "ref": "Luật Thủ đô 2024 (biện pháp hạn chế phương tiện, vùng phát thải thấp); QCVN 99:2025/BNNMT (khí thải mô tô, xe gắn máy)"
          }
         ],
         "coverage": "Hà Nội only. TP. Hồ Chí Minh has no low-emission zone in force (Nov 2026). Zones are given by name and boundary streets, not by coordinates.",
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hỏi cơ quan có thẩm quyền.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Hanoi Low-Emission Zone",
    "description": "Hanoi's low-emission zone scheme for Ring Road 1 (adopted by the City People's Council on 15 June 2026): stage 1 (1/7–31/12/2026, in force) covers zones 1 and 2 of Hoàn Kiếm ward — all motor vehicles restricted 19:00–24:00 on Friday to Sunday in zone 1, coaches of 16+ seats and trucks under 2 t outside peak hours, trucks of 2 t or more only 21:00–06:00, petrol ride-hailing motorbikes and old motorbikes encouraged to limit trips; stage 2 (2027, planned) adds zone 3 (Hoàn Kiếm and Cửa Nam), bans fossil-fuel ride-hailing motorbikes and trucks over 3.5 t and requires emission level 4 for cars; stage 3 (from 2028, planned) covers all 9 wards of Ring Road 1 and bans petrol motorbikes below emission level 3.\n\nSend the vehicle (`motorcycle`, `moped`, `car` + `seats`, `truck` + `gvw_t`, `ebike`), fuel, use (`personal` / `ride_hailing`), emission level, place (`zone` kv1 / kv2 / kv3 / ring1, a `ward` or a boundary `street`) and `datetime` (Vietnam time): the answer is `restricted_now` true / false / null (null when it depends on peak hours, which the city sets, or on the emission level). Zones are described by their boundary streets, not by coordinates. Policy changes fast: reviewed every 30 days, each stage has a `status`. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-low-emission-zone/",
    "operationId": "vnLowEmissionZonePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-low-emission-zone/"
    },
    "parameters": [
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`motorcycle`, `moped`, `car` (+ `seats`), `coach`, `bus`, `truck` (+ `gvw_t`), `ebike`, `bicycle`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "fuel",
      "in": "query",
      "required": false,
      "description": "`petrol`, `diesel`, `electric`, `hybrid`, `cng`, `lpg`.",
      "schema": {
       "type": "string",
       "default": "petrol"
      }
     },
     {
      "name": "use",
      "in": "query",
      "required": false,
      "description": "`personal`, `ride_hailing` (app-based ride / delivery) or `commercial`.",
      "schema": {
       "type": "string",
       "default": "personal"
      }
     },
     {
      "name": "zone",
      "in": "query",
      "required": false,
      "description": "`kv1`, `kv2`, `kv3` or `ring1`; or `ward` / `street`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "datetime",
      "in": "query",
      "required": false,
      "description": "Vietnam time, YYYY-MM-DDTHH:MM (default now).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "emission_level",
      "in": "query",
      "required": false,
      "description": "Emission standard level of the vehicle (1–5).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "priority_vehicle",
      "in": "query",
      "required": false,
      "description": "Priority vehicle (exempt).",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "datetime_vn": {
           "type": "string"
          },
          "vehicle": {
           "type": "string"
          },
          "fuel": {
           "type": "string"
          },
          "use": {
           "type": "string"
          },
          "zones": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "restricted_now": {
           "type": "boolean"
          },
          "summary": {
           "type": "string"
          },
          "stages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "stage": {
              "type": "number"
             },
             "status": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "to": {},
             "active": {
              "type": "boolean"
             },
             "in_zone": {
              "type": "boolean"
             },
             "verdicts": {
              "type": "array"
             }
            }
           }
          },
          "city": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "number": {
              "type": "string"
             }
            }
           }
          },
          "coverage": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-road-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Speed Limits & Road Signs",
    "description": "Speed (`action=speed`): Circular 38/2024/TT-BGTVT (in force 1/1/2025) — built-up areas 60 / 50 km/h (dual carriageway or one-way multi-lane / two-way), outside built-up areas 90 / 80 for cars up to 28 seats and trucks up to 3.5 t, 80 / 70 for larger coaches and trucks, 70 / 60 for buses, semi-trailers, motorcycles and special-purpose cars, 60 / 50 for trailers, tankers and mixers; mopeds and special machinery 40 km/h; four-wheel motor vehicles 30 / 50; expressways 120 maximum, 60 minimum. Signs on the road prevail. `speed_kmh` adds the safe distance of Article 11 (35 m at 60, 55 m to 80, 70 m to 100, 100 m to 120 km/h on a dry road).\n\nSigns (`action=sign`): codes and names of QCVN 41:2024/BGTVT (prohibitory P / DP, warning W, mandatory R / R.E, guide I, expressway IE, auxiliary S) imported from the Official Gazette with the meaning paragraphs of Appendices B–F; search by code (`sign=p102`, `W.201` returns a–d) or by words (`q=cấm đỗ`). Drawings are not included; the group gives shape and colours. Fines: /v1/vn-traffic-fines. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-road-rules/",
    "operationId": "vnRoadRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-road-rules/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`speed`, `distance` or `sign` (alias `mode`; guessed from the other parameters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`car` (+ `seats`), `truck` (+ `payload_t`), `bus`, `motorcycle`, `moped`, `tractor_semitrailer`, `trailer_towing`, `tanker`, `concrete_mixer`, `special_car`, `special_machine`, `four_wheel_passenger`, `four_wheel_cargo`.",
      "schema": {
       "type": "string"
      },
      "example": "car"
     },
     {
      "name": "area",
      "in": "query",
      "required": false,
      "description": "`residential` (built-up area), `outside` or `expressway`.",
      "schema": {
       "type": "string",
       "default": "outside"
      },
      "example": "outside"
     },
     {
      "name": "road",
      "in": "query",
      "required": false,
      "description": "`divided` (dual carriageway / one-way with 2+ lanes) or `two_way`.",
      "schema": {
       "type": "string",
       "default": "two_way"
      },
      "example": "divided"
     },
     {
      "name": "speed_kmh",
      "in": "query",
      "required": false,
      "description": "Current speed for the safe distance / over-limit check.",
      "schema": {
       "type": "number"
      },
      "example": 85
     },
     {
      "name": "sign",
      "in": "query",
      "required": false,
      "description": "Sign code (P.102, w201a, R.E,9a…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search sign names; `group` filters (prohibitory, warning, mandatory, guide, expressway, auxiliary).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle": {
           "type": "string"
          },
          "area": {
           "type": "string"
          },
          "road": {
           "type": "string"
          },
          "classification": {
           "type": "string"
          },
          "max_speed_kmh": {
           "type": "number"
          },
          "min_speed_kmh": {},
          "ref": {
           "type": "string"
          },
          "speed_kmh": {
           "type": "number"
          },
          "over_limit_kmh": {
           "type": "number"
          },
          "safe_distance": {
           "type": "object",
           "properties": {
            "min_m": {
             "type": "number"
            },
            "band": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "status_note": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "vehicle": "car",
         "area": "outside",
         "road": "divided",
         "classification": "7 seats (≤ 28)",
         "max_speed_kmh": 90,
         "min_speed_kmh": null,
         "ref": "Điều 6 khoản 2 Bảng 2 dòng 1",
         "speed_kmh": 85,
         "over_limit_kmh": 0,
         "safe_distance": {
          "min_m": 70,
          "band": "80 < V ≤ 100"
         },
         "notes": [
          "A speed sign on the road prevails over these defaults (Điều 4 khoản 2).",
          "Fines for speeding: /v1/vn-traffic-fines."
         ],
         "legal": [
          {
           "ref": "Thông tư 38/2024/TT-BGTVT quy định về tốc độ và khoảng cách an toàn của xe cơ giới, xe máy chuyên dùng tham gia giao thông trên đường bộ (Điều 6–9, 11), sửa đổi bởi TT 09/2025/TT-BXD",
           "effective_from": "2025-01-01"
          },
          {
           "ref": "QCVN 41:2024/BGTVT Quy chuẩn kỹ thuật quốc gia về báo hiệu đường bộ (Thông tư 51/2024/TT-BGTVT)",
           "effective_from": "2025-01-01",
           "url": "https://congbao.chinhphu.vn/noi-dung-van-ban-so-51-2024-tt-bgtvt-43387",
           "status_note": "A replacement QCVN 41:2026/BXD was published as a draft in September 2026 (not in force)."
          }
         ],
         "disclaimer": "Reference only, not legal advice; check the official text and the competent authority.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và hỏi cơ quan có thẩm quyền.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Speed Limits & Road Signs",
    "description": "Speed (`action=speed`): Circular 38/2024/TT-BGTVT (in force 1/1/2025) — built-up areas 60 / 50 km/h (dual carriageway or one-way multi-lane / two-way), outside built-up areas 90 / 80 for cars up to 28 seats and trucks up to 3.5 t, 80 / 70 for larger coaches and trucks, 70 / 60 for buses, semi-trailers, motorcycles and special-purpose cars, 60 / 50 for trailers, tankers and mixers; mopeds and special machinery 40 km/h; four-wheel motor vehicles 30 / 50; expressways 120 maximum, 60 minimum. Signs on the road prevail. `speed_kmh` adds the safe distance of Article 11 (35 m at 60, 55 m to 80, 70 m to 100, 100 m to 120 km/h on a dry road).\n\nSigns (`action=sign`): codes and names of QCVN 41:2024/BGTVT (prohibitory P / DP, warning W, mandatory R / R.E, guide I, expressway IE, auxiliary S) imported from the Official Gazette with the meaning paragraphs of Appendices B–F; search by code (`sign=p102`, `W.201` returns a–d) or by words (`q=cấm đỗ`). Drawings are not included; the group gives shape and colours. Fines: /v1/vn-traffic-fines. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-road-rules/",
    "operationId": "vnRoadRulesPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-road-rules/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`speed`, `distance` or `sign` (alias `mode`; guessed from the other parameters).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vehicle",
      "in": "query",
      "required": false,
      "description": "`car` (+ `seats`), `truck` (+ `payload_t`), `bus`, `motorcycle`, `moped`, `tractor_semitrailer`, `trailer_towing`, `tanker`, `concrete_mixer`, `special_car`, `special_machine`, `four_wheel_passenger`, `four_wheel_cargo`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "area",
      "in": "query",
      "required": false,
      "description": "`residential` (built-up area), `outside` or `expressway`.",
      "schema": {
       "type": "string",
       "default": "outside"
      }
     },
     {
      "name": "road",
      "in": "query",
      "required": false,
      "description": "`divided` (dual carriageway / one-way with 2+ lanes) or `two_way`.",
      "schema": {
       "type": "string",
       "default": "two_way"
      }
     },
     {
      "name": "speed_kmh",
      "in": "query",
      "required": false,
      "description": "Current speed for the safe distance / over-limit check.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "sign",
      "in": "query",
      "required": false,
      "description": "Sign code (P.102, w201a, R.E,9a…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Search sign names; `group` filters (prohibitory, warning, mandatory, guide, expressway, auxiliary).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "vehicle": {
           "type": "string"
          },
          "area": {
           "type": "string"
          },
          "road": {
           "type": "string"
          },
          "classification": {
           "type": "string"
          },
          "max_speed_kmh": {
           "type": "number"
          },
          "min_speed_kmh": {},
          "ref": {
           "type": "string"
          },
          "speed_kmh": {
           "type": "number"
          },
          "over_limit_kmh": {
           "type": "number"
          },
          "safe_distance": {
           "type": "object",
           "properties": {
            "min_m": {
             "type": "number"
            },
            "band": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "status_note": {
              "type": "string"
             }
            }
           }
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-traveler-customs": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Traveller Customs Allowances",
    "description": "Entry allowances of Decree 134/2016/NĐ-CP Article 6: 1.5 l of spirits of 20 % or more, or 2 l under 20 %, or 3 l of beer / other alcohol (one category; a whole bottle exceeding by up to 1 l is exempt), 200 cigarettes or 20 cigars or 250 g of tobacco, other goods up to 10,000,000 VND; nothing for alcohol / tobacco under 18; crew, drivers and border workers once every 90 days. Exit: no limit except prohibited goods.\n\nDeclaration: foreign cash over USD 5,000 in total (any currencies, converted with `usd_rates` or today's Vietcombank transfer buying rates) and Vietnamese cash over 15,000,000 VND (Circular 15/2011/TT-NHNN), gold jewellery of 300 g or more, gold bars not allowed with a passport (Circular 11/2014/TT-NHNN), and what to show when leaving with more. If not declared, the fine bracket of Decree 169/2026/NĐ-CP Article 11 (from 1 July 2026, up to 50 million VND on exit) is computed on the amount above the threshold. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-traveler-customs/",
    "operationId": "vnTravelerCustomsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-traveler-customs/"
    },
    "parameters": [
     {
      "name": "direction",
      "in": "query",
      "required": true,
      "description": "`entry` or `exit` (call without it for the summary).",
      "schema": {
       "type": "string"
      },
      "example": "exit"
     },
     {
      "name": "spirits_l",
      "in": "query",
      "required": false,
      "description": "Litres of spirits ≥ 20 %; `wine_l` (< 20 %), `beer_l`; `whole_bottle=1` if one bottle.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cigarettes",
      "in": "query",
      "required": false,
      "description": "Cigarettes; `cigars`, `tobacco_g`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "goods_value_vnd",
      "in": "query",
      "required": false,
      "description": "Customs value of other goods, VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cash",
      "in": "query",
      "required": false,
      "description": "Foreign cash by currency, e.g. {\"USD\":4000,\"EUR\":2000} or USD:4000,EUR:2000.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "vnd_cash",
      "in": "query",
      "required": false,
      "description": "Vietnamese cash, VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gold_jewellery_g",
      "in": "query",
      "required": false,
      "description": "Gold jewellery, grams; `gold_bars_g`; `gold_value_vnd` for the fine.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "declared",
      "in": "query",
      "required": false,
      "description": "Declared at customs (no fine computed).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "usd_rates",
      "in": "query",
      "required": false,
      "description": "Units per USD, e.g. {\"EUR\":0.92,\"VND\":26300}; or `vnd_per_usd`. Default: today's Vietcombank transfer buying rates (send this for currencies Vietcombank does not quote).",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "traveller",
      "in": "query",
      "required": false,
      "description": "`passenger`, `crew`, `driver`, `border_worker` (+ `last_exemption_date`); `age`; `document` passport / border_pass.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "direction": {
           "type": "string"
          },
          "traveller": {
           "type": "string"
          },
          "document": {
           "type": "string"
          },
          "duty_free": {
           "type": "object",
           "properties": {
            "unlimited": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "declaration": {
           "type": "object",
           "properties": {
            "foreign_cash_usd_equivalent": {
             "type": "number"
            },
            "foreign_cash_must_declare": {
             "type": "boolean"
            },
            "vnd_cash": {
             "type": "number"
            },
            "vnd_cash_must_declare": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            },
            "exit_documents": {
             "type": "string"
            },
            "gold": {
             "type": "object",
             "properties": {
              "jewellery_g": {
               "type": "number"
              },
              "jewellery_must_declare": {
               "type": "boolean"
              },
              "bars_g": {
               "type": "number"
              },
              "bars_allowed": {
               "type": "boolean"
              },
              "rule": {
               "type": "string"
              }
             }
            }
           }
          },
          "fine_if_undeclared": {
           "type": "object",
           "properties": {
            "value_vnd": {
             "type": "number"
            },
            "fine_min_vnd": {
             "type": "number"
            },
            "fine_max_vnd": {
             "type": "number"
            },
            "typical_vnd": {
             "type": "number"
            },
            "typical_note": {
             "type": "string"
            },
            "criminal_note": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "vnd_per_usd": {
             "type": "number"
            },
            "extra": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        },
        "example": {
         "direction": "exit",
         "traveller": "passenger",
         "document": "passport",
         "duty_free": {
          "unlimited": true,
          "rule": "Departing travellers may take luggage out duty-free without a quantity limit, except goods on the prohibited / suspended / conditional export lists (Điều 6 khoản 3)."
         },
         "declaration": {
          "foreign_cash_usd_equivalent": 10000,
          "foreign_cash_must_declare": true,
          "vnd_cash": 0,
          "vnd_cash_must_declare": false,
          "rule": "Declare foreign cash over USD 5,000 (or equivalent, all currencies together) and Vietnamese cash over 15,000,000 đ; cheques, cards, savings books and securities are not counted (TT 15/2011/TT-NHNN Điều 2).",
          "exit_documents": "Over the limit on exit: show a bank confirmation (giấy xác nhận mang ngoại tệ) or SBV approval; or, if not more than what you declared on your last entry, the customs-certified entry declaration (valid 12 months) — TT 15/2011/TT-NHNN Điều 3.",
          "gold": {
           "jewellery_g": 0,
           "jewellery_must_declare": false,
           "bars_g": 0,
           "bars_allowed": true,
           "rule": "Passport holders may not carry gold bars or raw gold; jewellery / fine-art gold of 300 g or more in total must be declared (TT 11/2014/TT-NHNN Điều 2)."
          }
         },
         "fine_if_undeclared": {
          "value_vnd": 130000000,
          "fine_min_vnd": 30000000,
          "fine_max_vnd": 50000000,
          "typical_vnd": 40000000,
          "typical_note": "Midpoint of the bracket, the usual fine without mitigating / aggravating circumstances (NĐ 169/2026 Điều 6).",
          "criminal_note": "Applies when the act is not a criminal offence.",
          "ref": "NĐ 169/2026/NĐ-CP Điều 11 khoản 1",
          "basis": "Value of the violation = amount carried minus the amount allowed without declaration (Điều 11 khoản 6), converted at the given rate.",
          "vnd_per_usd": 26000,
          "extra": "The undeclared excess may also be confiscated."
         },
         "legal": [
          {
           "ref": "Nghị định 134/2016/NĐ-CP Điều 6 (miễn thuế hành lý của người xuất cảnh, nhập cảnh); sửa đổi bởi NĐ 18/2021, 104/2022, 05/2025, 182/2025 (Điều 6 không đổi)",
           "effective_from": "2016-09-01"
          },
          {
           "ref": "Thông tư 15/2011/TT-NHNN Điều 2, 3 (mức ngoại tệ tiền mặt, đồng Việt Nam tiền mặt phải khai báo)",
           "effective_from": "2011-09-01"
          },
          "…"
         ],
         "disclaimer": "Reference only, not legal or tax advice; customs officers decide at the border. Check the official texts.",
         "disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý, thuế; công chức hải quan quyết định tại cửa khẩu. Hãy đối chiếu văn bản chính thức.",
         "reviewed": "2026-11-15"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Traveller Customs Allowances",
    "description": "Entry allowances of Decree 134/2016/NĐ-CP Article 6: 1.5 l of spirits of 20 % or more, or 2 l under 20 %, or 3 l of beer / other alcohol (one category; a whole bottle exceeding by up to 1 l is exempt), 200 cigarettes or 20 cigars or 250 g of tobacco, other goods up to 10,000,000 VND; nothing for alcohol / tobacco under 18; crew, drivers and border workers once every 90 days. Exit: no limit except prohibited goods.\n\nDeclaration: foreign cash over USD 5,000 in total (any currencies, converted with `usd_rates` or today's Vietcombank transfer buying rates) and Vietnamese cash over 15,000,000 VND (Circular 15/2011/TT-NHNN), gold jewellery of 300 g or more, gold bars not allowed with a passport (Circular 11/2014/TT-NHNN), and what to show when leaving with more. If not declared, the fine bracket of Decree 169/2026/NĐ-CP Article 11 (from 1 July 2026, up to 50 million VND on exit) is computed on the amount above the threshold. Results are reference information computed from the official texts cited in `legal`; they are not legal advice. The `reviewed` date shows when the rules were last checked.\n\nDocs: https://apibox.io.vn/docs/vn-traveler-customs/",
    "operationId": "vnTravelerCustomsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-traveler-customs/"
    },
    "parameters": [
     {
      "name": "direction",
      "in": "query",
      "required": false,
      "description": "`entry` or `exit` (call without it for the summary).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "spirits_l",
      "in": "query",
      "required": false,
      "description": "Litres of spirits ≥ 20 %; `wine_l` (< 20 %), `beer_l`; `whole_bottle=1` if one bottle.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cigarettes",
      "in": "query",
      "required": false,
      "description": "Cigarettes; `cigars`, `tobacco_g`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "goods_value_vnd",
      "in": "query",
      "required": false,
      "description": "Customs value of other goods, VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cash",
      "in": "query",
      "required": false,
      "description": "Foreign cash by currency, e.g. {\"USD\":4000,\"EUR\":2000} or USD:4000,EUR:2000.",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "vnd_cash",
      "in": "query",
      "required": false,
      "description": "Vietnamese cash, VND.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gold_jewellery_g",
      "in": "query",
      "required": false,
      "description": "Gold jewellery, grams; `gold_bars_g`; `gold_value_vnd` for the fine.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "declared",
      "in": "query",
      "required": false,
      "description": "Declared at customs (no fine computed).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "usd_rates",
      "in": "query",
      "required": false,
      "description": "Units per USD, e.g. {\"EUR\":0.92,\"VND\":26300}; or `vnd_per_usd`. Default: today's Vietcombank transfer buying rates (send this for currencies Vietcombank does not quote).",
      "schema": {
       "type": "object"
      }
     },
     {
      "name": "traveller",
      "in": "query",
      "required": false,
      "description": "`passenger`, `crew`, `driver`, `border_worker` (+ `last_exemption_date`); `age`; `document` passport / border_pass.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "direction": {
           "type": "string"
          },
          "traveller": {
           "type": "string"
          },
          "document": {
           "type": "string"
          },
          "duty_free": {
           "type": "object",
           "properties": {
            "unlimited": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            }
           }
          },
          "declaration": {
           "type": "object",
           "properties": {
            "foreign_cash_usd_equivalent": {
             "type": "number"
            },
            "foreign_cash_must_declare": {
             "type": "boolean"
            },
            "vnd_cash": {
             "type": "number"
            },
            "vnd_cash_must_declare": {
             "type": "boolean"
            },
            "rule": {
             "type": "string"
            },
            "exit_documents": {
             "type": "string"
            },
            "gold": {
             "type": "object",
             "properties": {
              "jewellery_g": {
               "type": "number"
              },
              "jewellery_must_declare": {
               "type": "boolean"
              },
              "bars_g": {
               "type": "number"
              },
              "bars_allowed": {
               "type": "boolean"
              },
              "rule": {
               "type": "string"
              }
             }
            }
           }
          },
          "fine_if_undeclared": {
           "type": "object",
           "properties": {
            "value_vnd": {
             "type": "number"
            },
            "fine_min_vnd": {
             "type": "number"
            },
            "fine_max_vnd": {
             "type": "number"
            },
            "typical_vnd": {
             "type": "number"
            },
            "typical_note": {
             "type": "string"
            },
            "criminal_note": {
             "type": "string"
            },
            "ref": {
             "type": "string"
            },
            "basis": {
             "type": "string"
            },
            "vnd_per_usd": {
             "type": "number"
            },
            "extra": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-salary-scale": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Salary Scale Builder (VN)",
    "description": "Give the region (`region` I–IV, or `ward` + `province` to look it up through /v1/vn-min-wage) and the job titles (`grades`: title, group, number of steps, % between steps or explicit coefficients). Step 1 starts at the regional minimum wage – the 2027 amounts of Nghị định 399/2026/NĐ-CP (I 5,700,000; II 5,080,000; III 4,450,000; IV 4,040,000 VND) when `date` is within 60 days of 1/1/2027 or `plan_for_next=true`, otherwise the amounts in force (NĐ 293/2025/NĐ-CP for 2026). Amounts are rounded up to `rounding` (1,000 VND).\n\nEvery grade says whether step 1 is legal now (`ok_now`) and after the next decree (`ok_next`). Send `employees` (JSON, CSV or an XLSX upload with name, title, step, salary) to find contract wages below the minimum wage or below their step. The old NĐ 49/2013 rules (+7 % for trained work, +5 % for hazardous work, ≥ 5 % between steps) were repealed in 2021; use `premium_trained`, `premium_hazardous` and `ratio` if your policy keeps them.\n\n`format=xlsx` returns the usual workbook: the salary scale sheet (titles × steps), the employee check and the legal basis. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/vn-salary-scale/",
    "operationId": "vnSalaryScaleGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-salary-scale/"
    },
    "parameters": [
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "Region `I`–`IV` (or `ward` + `province`).",
      "schema": {
       "type": "string"
      },
      "example": "I"
     },
     {
      "name": "ward",
      "in": "query",
      "required": false,
      "description": "Current ward / commune name or code; region looked up via /v1/vn-min-wage (with `province`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date the scale applies from (2026-01-01 or later).",
      "schema": {
       "type": "string",
       "default": "today"
      },
      "example": "2026-11-15"
     },
     {
      "name": "plan_for_next",
      "in": "query",
      "required": false,
      "description": "Build step 1 on the next decree’s minimum wage (default: yes within 60 days of it).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "premium_trained",
      "in": "query",
      "required": false,
      "description": "Optional % above the minimum for trained work (old rule 7); also `premium_hazardous`, `premium_very_hazardous`.",
      "schema": {
       "type": "number",
       "default": 0
      }
     },
     {
      "name": "rounding",
      "in": "query",
      "required": false,
      "description": "Round amounts up to this multiple.",
      "schema": {
       "type": "number",
       "default": 1000
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `xlsx` (with `company`).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "region_from": {
           "type": "string"
          },
          "min_wage": {
           "type": "object",
           "properties": {
            "monthly": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            }
           }
          },
          "next_min_wage": {
           "type": "object",
           "properties": {
            "monthly": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            }
           }
          },
          "base_for_step1": {
           "type": "number"
          },
          "based_on": {
           "type": "string"
          },
          "rounding": {
           "type": "number"
          },
          "grades": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "group": {
              "type": "string"
             },
             "group_vi": {
              "type": "string"
             },
             "steps": {
              "type": "array"
             },
             "step_ratio_pct": {
              "type": "number"
             },
             "premium_pct": {
              "type": "number"
             },
             "ok_now": {
              "type": "boolean"
             },
             "ok_next": {
              "type": "boolean"
             },
             "issues": {
              "type": "array"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "date": "2026-11-15",
         "region": "I",
         "region_from": "region",
         "min_wage": {
          "monthly": 5310000,
          "decree": "293/2025/NĐ-CP",
          "effective_from": "2026-01-01"
         },
         "next_min_wage": {
          "monthly": 5700000,
          "decree": "399/2026/NĐ-CP",
          "effective_from": "2027-01-01"
         },
         "base_for_step1": 5700000,
         "based_on": "next minimum wage (399/2026/NĐ-CP, 2027-01-01)",
         "rounding": 1000,
         "grades": [
          {
           "title": "Nhân viên",
           "group": "simple",
           "group_vi": "Công việc giản đơn",
           "steps": [
            {
             "step": 1,
             "amount": 5700000,
             "increase_pct": null
            },
            {
             "step": 2,
             "amount": 5985000,
             "increase_pct": 5
            },
            {
             "step": 3,
             "amount": 6285000,
             "increase_pct": 5.01
            }
           ],
           "step_ratio_pct": 5,
           "premium_pct": 0,
           "ok_now": true,
           "ok_next": true,
           "issues": []
          }
         ],
         "warnings": [],
         "notes": [
          "Since 2021 the law only requires every step to be at least the regional minimum wage; …",
          "…"
         ],
         "legal": [
          {
           "ref": "Bộ luật Lao động 45/2019/QH14, Điều 90, 93",
           "effective_from": "2021-01-01",
           "note": "…"
          },
          "…"
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Salary Scale Builder (VN)",
    "description": "Give the region (`region` I–IV, or `ward` + `province` to look it up through /v1/vn-min-wage) and the job titles (`grades`: title, group, number of steps, % between steps or explicit coefficients). Step 1 starts at the regional minimum wage – the 2027 amounts of Nghị định 399/2026/NĐ-CP (I 5,700,000; II 5,080,000; III 4,450,000; IV 4,040,000 VND) when `date` is within 60 days of 1/1/2027 or `plan_for_next=true`, otherwise the amounts in force (NĐ 293/2025/NĐ-CP for 2026). Amounts are rounded up to `rounding` (1,000 VND).\n\nEvery grade says whether step 1 is legal now (`ok_now`) and after the next decree (`ok_next`). Send `employees` (JSON, CSV or an XLSX upload with name, title, step, salary) to find contract wages below the minimum wage or below their step. The old NĐ 49/2013 rules (+7 % for trained work, +5 % for hazardous work, ≥ 5 % between steps) were repealed in 2021; use `premium_trained`, `premium_hazardous` and `ratio` if your policy keeps them.\n\n`format=xlsx` returns the usual workbook: the salary scale sheet (titles × steps), the employee check and the legal basis. Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/vn-salary-scale/",
    "operationId": "vnSalaryScalePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-salary-scale/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "region": {
          "type": "string",
          "description": "Region `I`–`IV` (or `ward` + `province`)."
         },
         "ward": {
          "type": "string",
          "description": "Current ward / commune name or code; region looked up via /v1/vn-min-wage (with `province`)."
         },
         "date": {
          "type": "string",
          "default": "today",
          "description": "Date the scale applies from (2026-01-01 or later)."
         },
         "grades": {
          "type": "array",
          "items": {},
          "description": "`[{ title, group (simple|trained|hazardous|very_hazardous|management), steps, ratio, start | coefficients }]`; or `title`, `steps`, `ratio` for one grade."
         },
         "employees": {
          "type": "array",
          "items": {},
          "description": "Employees to check: `[{ name, title, step, salary }]` (Vietnamese headers accepted), CSV text or an uploaded `file` (CSV / XLSX)."
         },
         "plan_for_next": {
          "type": "boolean",
          "description": "Build step 1 on the next decree’s minimum wage (default: yes within 60 days of it)."
         },
         "premium_trained": {
          "type": "number",
          "default": 0,
          "description": "Optional % above the minimum for trained work (old rule 7); also `premium_hazardous`, `premium_very_hazardous`."
         },
         "rounding": {
          "type": "number",
          "default": 1000,
          "description": "Round amounts up to this multiple."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx` (with `company`)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "region_from": {
           "type": "string"
          },
          "min_wage": {
           "type": "object",
           "properties": {
            "monthly": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            }
           }
          },
          "next_min_wage": {
           "type": "object",
           "properties": {
            "monthly": {
             "type": "number"
            },
            "decree": {
             "type": "string"
            },
            "effective_from": {
             "type": "string"
            }
           }
          },
          "base_for_step1": {
           "type": "number"
          },
          "based_on": {
           "type": "string"
          },
          "rounding": {
           "type": "number"
          },
          "grades": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "group": {
              "type": "string"
             },
             "group_vi": {
              "type": "string"
             },
             "steps": {
              "type": "array"
             },
             "step_ratio_pct": {
              "type": "number"
             },
             "premium_pct": {
              "type": "number"
             },
             "ok_now": {
              "type": "boolean"
             },
             "ok_next": {
              "type": "boolean"
             },
             "issues": {
              "type": "array"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-hazardous-jobs": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Hazardous Jobs List (VN)",
    "description": "The official list of heavy, hazardous or dangerous jobs (class IV) and especially heavy, hazardous or dangerous jobs (classes V and VI): Thông tư 11/2020/TT-BLĐTBXH (42 sectors, in force 01/03/2021) and the additions of Thông tư 19/2023/TT-BLĐTBXH (from 15/02/2024), read from the Official Gazette PDFs and refreshed weekly.\n\nSearch with `q` (accents optional, e.g. `han dien`), filter by `level` (IV, V, VI) and `sector` (roman numeral or name), or check up to 200 job titles of a social-insurance file at once with `batch`. Each row gives the circular, sector, class, row number, the job as worded and its working conditions; the best match also lists the legal consequences: 14 or 16 days of annual leave (BLLĐ Điều 113), retirement up to 5 years early after 15 years in such jobs (BLLĐ Điều 169, NĐ 135/2020 Điều 5, Luật BHXH 2024 Điều 64; underground coal mining up to 10 years), health checks every 6 months and the in-kind allowance.\n\nWithout `q` you get the sector list with counts. `id` (e.g. `tt11-I-VI-1`) returns one row. A job only counts when it appears in the list as worded; a fuzzy match is a hint, not a classification.\n\nDocs: https://apibox.io.vn/docs/vn-hazardous-jobs/",
    "operationId": "vnHazardousJobsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hazardous-jobs/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Job title or keywords (accents optional).",
      "schema": {
       "type": "string"
      },
      "example": "hàn điện"
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "`IV`, `V` or `VI`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "Sector: roman numeral of the circular (e.g. `II`) or name (e.g. `y te`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "One row, e.g. `tt11-I-VI-1`, with its consequences.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results (1–200).",
      "schema": {
       "type": "number",
       "default": 10
      },
      "example": 2
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "circular": {
              "type": "string"
             },
             "sector_no": {
              "type": "string"
             },
             "sector": {
              "type": "string"
             },
             "level": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "class_en": {
              "type": "string"
             },
             "no": {
              "type": "number"
             },
             "job": {
              "type": "string"
             },
             "conditions": {
              "type": "string"
             },
             "score": {
              "type": "number"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "consequences_of_best": {
           "type": "object",
           "properties": {
            "annual_leave_days": {
             "type": "number"
            },
            "annual_leave_ref": {
             "type": "string"
            },
            "early_retirement": {
             "type": "object",
             "properties": {
              "rule": {
               "type": "string"
              },
              "ref": {
               "type": "string"
              },
              "calculator": {
               "type": "string"
              }
             }
            },
            "health_checks": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "sources": {
           "type": "array",
           "items": {}
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "q": "hàn điện",
         "count": 2,
         "results": [
          {
           "id": "tt11-II-IV-52",
           "circular": "11/2020/TT-BLĐTBXH",
           "sector_no": "II",
           "sector": "CƠ KHÍ, LUYỆN KIM",
           "level": "IV",
           "class_vi": "Nặng nhọc, độc hại, nguy hiểm (điều kiện lao động loại IV)",
           "class_en": "Heavy, hazardous or dangerous (working-condition class IV)",
           "no": 52,
           "job": "Hàn điện, hàn hơi",
           "conditions": "Tiếp xúc với nóng và hơi khí độc",
           "score": 10.46
          },
          {
           "id": "tt11-II-IV-20",
           "circular": "11/2020/TT-BLĐTBXH",
           "sector_no": "II",
           "sector": "CƠ KHÍ, LUYỆN KIM",
           "level": "IV",
           "no": 20,
           "job": "Hàn điện trong thùng dài",
           "conditions": "Công việc nặng nhọc, ảnh hưởng khí CO2, Mn, hơi khí hàn và tia hồ quang",
           "score": 10.44,
           "…": "…"
          }
         ],
         "consequences_of_best": {
          "annual_leave_days": 14,
          "annual_leave_ref": "BLLĐ 2019 Điều 113 khoản 1 (…)",
          "early_retirement": {
           "rule": "At least 15 years in jobs of this list (class IV, V or VI) allows retirement up to 5 years before the normal age, with at least 15 years of social-insurance contributions.",
           "ref": "BLLĐ 2019 Điều 169 khoản 3; NĐ 135/2020/NĐ-CP Điều 5; Luật BHXH 41/2024/QH15 Điều 64 khoản 1",
           "calculator": "/v1/vn-retirement?condition=reduced"
          },
          "health_checks": "At least once every 6 months, plus occupational-disease screening (Luật An toàn, vệ sinh lao động 84/2015/QH13 Điều 21 khoản 1).",
          "…": "…"
         },
         "sources": [
          {
           "number": "11/2020/TT-BLĐTBXH",
           "date": "2020-11-12",
           "effective": "2021-03-01",
           "page": "https://congbao.chinhphu.vn/van-ban/thong-tu-so-11-2020-tt-bldtbxh-33183.htm"
          },
          "…"
         ],
         "legal": [
          "…"
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Hazardous Jobs List (VN)",
    "description": "The official list of heavy, hazardous or dangerous jobs (class IV) and especially heavy, hazardous or dangerous jobs (classes V and VI): Thông tư 11/2020/TT-BLĐTBXH (42 sectors, in force 01/03/2021) and the additions of Thông tư 19/2023/TT-BLĐTBXH (from 15/02/2024), read from the Official Gazette PDFs and refreshed weekly.\n\nSearch with `q` (accents optional, e.g. `han dien`), filter by `level` (IV, V, VI) and `sector` (roman numeral or name), or check up to 200 job titles of a social-insurance file at once with `batch`. Each row gives the circular, sector, class, row number, the job as worded and its working conditions; the best match also lists the legal consequences: 14 or 16 days of annual leave (BLLĐ Điều 113), retirement up to 5 years early after 15 years in such jobs (BLLĐ Điều 169, NĐ 135/2020 Điều 5, Luật BHXH 2024 Điều 64; underground coal mining up to 10 years), health checks every 6 months and the in-kind allowance.\n\nWithout `q` you get the sector list with counts. `id` (e.g. `tt11-I-VI-1`) returns one row. A job only counts when it appears in the list as worded; a fuzzy match is a hint, not a classification.\n\nDocs: https://apibox.io.vn/docs/vn-hazardous-jobs/",
    "operationId": "vnHazardousJobsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-hazardous-jobs/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Job title or keywords (accents optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "level",
      "in": "query",
      "required": false,
      "description": "`IV`, `V` or `VI`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "Sector: roman numeral of the circular (e.g. `II`) or name (e.g. `y te`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "query",
      "required": false,
      "description": "One row, e.g. `tt11-I-VI-1`, with its consequences.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max results (1–200).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "batch": {
          "type": "array",
          "items": {},
          "description": "Up to 200 job titles (array or one per line) → best match each, with `confident`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "q": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "circular": {
              "type": "string"
             },
             "sector_no": {
              "type": "string"
             },
             "sector": {
              "type": "string"
             },
             "level": {
              "type": "string"
             },
             "class_vi": {
              "type": "string"
             },
             "class_en": {
              "type": "string"
             },
             "no": {
              "type": "number"
             },
             "job": {
              "type": "string"
             },
             "conditions": {
              "type": "string"
             },
             "score": {
              "type": "number"
             },
             "…": {
              "type": "string"
             }
            }
           }
          },
          "consequences_of_best": {
           "type": "object",
           "properties": {
            "annual_leave_days": {
             "type": "number"
            },
            "annual_leave_ref": {
             "type": "string"
            },
            "early_retirement": {
             "type": "object",
             "properties": {
              "rule": {
               "type": "string"
              },
              "ref": {
               "type": "string"
              },
              "calculator": {
               "type": "string"
              }
             }
            },
            "health_checks": {
             "type": "string"
            },
            "…": {
             "type": "string"
            }
           }
          },
          "sources": {
           "type": "array",
           "items": {}
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-shift-roster": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Shift Roster (VN Labour Code)",
    "description": "`action=generate` (default) builds a month (`month=YYYY-MM`, or `from`/`to`, max 31 days) for `employees` (names, or objects with `no_night`, `off` dates, `max_shifts`) or `count` people. `pattern` picks the shifts: `3x8-4crew` (3 ca 4 kíp: 8-day cycle S S C C D D O O, crews offset by 2 days), `2x12-3crew`, `2x12-4crew`, `3x8`, `2x12`, `office`, or your own `shifts` ([{ code, start, end, break_minutes }]). With `demand` (people per shift) a greedy planner fills each shift with the least-loaded eligible person, spreads nights and weekends, keeps ≥ 12 h between shifts, ≤ 6 working days in a row and the weekly normal-hours cap, and reports `unfilled` slots (`partial=true`).\n\n`action=check` takes your `roster` ({ \"Name\": { \"2026-12-01\": \"S\", … } } or [{ employee, date, shift }]) and lists violations: more than 12 h of work in a day (BLLĐ Điều 107), less than 12 h of rest at a shift change (Điều 110), no 24 consecutive hours off in a 7-day block or fewer than 4 days off a month (Điều 111), overtime above 40 h/month and the yearly pace above 200 h (or `overtime_year_cap=300`), work on public holidays (overtime, from /v1/vn-holidays) and breaks to give inside shifts of 6 h or more (Điều 109). `regime=daily` uses the 8 h/day normal limit, `weekly` (default) 10 h/day and 48 h/week (`normal_week_hours`).\n\nResults: per-employee hours, night hours (22:00–06:00), overtime, weekend and holiday shifts, and the roster grid. `format=xlsx` returns the roster sheet with a warnings sheet, `format=ics` one calendar event per shift. Up to 200 employees.\n\nDocs: https://apibox.io.vn/docs/vn-shift-roster/",
    "operationId": "vnShiftRosterGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-shift-roster/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`generate` or `check` (auto when `roster` is sent).",
      "schema": {
       "type": "string",
       "default": "generate"
      }
     },
     {
      "name": "pattern",
      "in": "query",
      "required": false,
      "description": "`3x8-4crew`, `2x12-3crew`, `2x12-4crew`, `3x8`, `2x12`, `office`; or `shifts`.",
      "schema": {
       "type": "string",
       "default": "3x8-4crew"
      },
      "example": "3x8-4crew"
     },
     {
      "name": "month",
      "in": "query",
      "required": false,
      "description": "`YYYY-MM` (or `from` + `to`, max 31 days).",
      "schema": {
       "type": "string",
       "default": "this month"
      },
      "example": "2026-12"
     },
     {
      "name": "regime",
      "in": "query",
      "required": false,
      "description": "`weekly` (≤ 10 h/day, 48 h/week) or `daily` (8 h/day); also `normal_week_hours`, `overtime_year_cap`.",
      "schema": {
       "type": "string",
       "default": "weekly"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `xlsx` or `ics`.",
      "schema": {
       "type": "string",
       "default": "json"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "pattern": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "shifts": {
           "type": "array",
           "items": {}
          },
          "rules": {
           "type": "object",
           "properties": {
            "regime": {
             "type": "string"
            },
            "normal_day_hours": {
             "type": "number"
            },
            "normal_week_hours": {
             "type": "number"
            },
            "max_day_hours": {
             "type": "number"
            },
            "overtime_month_cap": {
             "type": "number"
            },
            "overtime_year_cap": {
             "type": "number"
            },
            "min_rest_between_shifts_h": {
             "type": "number"
            },
            "weekly_rest_h": {
             "type": "number"
            },
            "night": {
             "type": "string"
            }
           }
          },
          "holidays": {
           "type": "array"
          },
          "method": {
           "type": "string"
          },
          "unfilled": {
           "type": "array"
          },
          "partial": {
           "type": "boolean"
          },
          "ok": {
           "type": "boolean"
          },
          "violations": {
           "type": "array"
          },
          "summary": {
           "type": "array",
           "items": {}
          },
          "roster": {
           "type": "array",
           "items": {}
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "generate",
         "pattern": "3x8-4crew",
         "from": "2026-12-01",
         "to": "2026-12-31",
         "shifts": [
          {
           "code": "S",
           "label": "Ca sáng",
           "start": "06:00",
           "end": "14:00",
           "hours": 8,
           "night_hours": 0,
           "break_minutes": 0
          },
          "…"
         ],
         "rules": {
          "regime": "weekly",
          "normal_day_hours": 10,
          "normal_week_hours": 48,
          "max_day_hours": 12,
          "overtime_month_cap": 40,
          "overtime_year_cap": 200,
          "min_rest_between_shifts_h": 12,
          "weekly_rest_h": 24,
          "night": "22:00–06:00"
         },
         "holidays": [],
         "method": "rotation (3 shifts 4 crews (3 ca 4 kíp): 8-day cycle S S C C D D O O, crews offset by 2 days; employee n belongs to crew n mod 4)",
         "unfilled": [],
         "partial": false,
         "ok": true,
         "violations": [],
         "summary": [
          {
           "employee": "NV1",
           "shifts": 23,
           "hours": 184,
           "night_hours": 64,
           "overtime_hours": 0,
           "holiday_hours": 0,
           "weekend_shifts": 5,
           "days_off": 8,
           "overtime_year_pace": 0,
           "year_cap": 200
          },
          "…"
         ],
         "roster": [
          {
           "employee": "NV1",
           "days": {
            "2026-12-01": "C",
            "2026-12-02": "C",
            "2026-12-03": "D",
            "2026-12-04": "D",
            "…": "…"
           }
          },
          "…"
         ],
         "notes": [
          "Shift S: give a break of at least 30 minutes inside the shift (counted as working time for continuous work ≥ 6 h; BLLĐ Điều 109, NĐ 145/2020 Điều 64).",
          "…"
         ],
         "legal": [
          "…"
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Shift Roster (VN Labour Code)",
    "description": "`action=generate` (default) builds a month (`month=YYYY-MM`, or `from`/`to`, max 31 days) for `employees` (names, or objects with `no_night`, `off` dates, `max_shifts`) or `count` people. `pattern` picks the shifts: `3x8-4crew` (3 ca 4 kíp: 8-day cycle S S C C D D O O, crews offset by 2 days), `2x12-3crew`, `2x12-4crew`, `3x8`, `2x12`, `office`, or your own `shifts` ([{ code, start, end, break_minutes }]). With `demand` (people per shift) a greedy planner fills each shift with the least-loaded eligible person, spreads nights and weekends, keeps ≥ 12 h between shifts, ≤ 6 working days in a row and the weekly normal-hours cap, and reports `unfilled` slots (`partial=true`).\n\n`action=check` takes your `roster` ({ \"Name\": { \"2026-12-01\": \"S\", … } } or [{ employee, date, shift }]) and lists violations: more than 12 h of work in a day (BLLĐ Điều 107), less than 12 h of rest at a shift change (Điều 110), no 24 consecutive hours off in a 7-day block or fewer than 4 days off a month (Điều 111), overtime above 40 h/month and the yearly pace above 200 h (or `overtime_year_cap=300`), work on public holidays (overtime, from /v1/vn-holidays) and breaks to give inside shifts of 6 h or more (Điều 109). `regime=daily` uses the 8 h/day normal limit, `weekly` (default) 10 h/day and 48 h/week (`normal_week_hours`).\n\nResults: per-employee hours, night hours (22:00–06:00), overtime, weekend and holiday shifts, and the roster grid. `format=xlsx` returns the roster sheet with a warnings sheet, `format=ics` one calendar event per shift. Up to 200 employees.\n\nDocs: https://apibox.io.vn/docs/vn-shift-roster/",
    "operationId": "vnShiftRosterPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-shift-roster/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "generate",
          "description": "`generate` or `check` (auto when `roster` is sent)."
         },
         "pattern": {
          "type": "string",
          "default": "3x8-4crew",
          "description": "`3x8-4crew`, `2x12-3crew`, `2x12-4crew`, `3x8`, `2x12`, `office`; or `shifts`."
         },
         "month": {
          "type": "string",
          "default": "this month",
          "description": "`YYYY-MM` (or `from` + `to`, max 31 days)."
         },
         "employees": {
          "type": "array",
          "items": {},
          "description": "Names or `{ name, no_night, off: [dates], max_shifts }`; or `count`."
         },
         "demand": {
          "type": "object",
          "description": "People per shift, e.g. `{ \"S\": 2, \"C\": 2, \"D\": 1 }` (or one number)."
         },
         "shifts": {
          "type": "array",
          "items": {},
          "description": "Custom shifts `[{ code, start, end, break_minutes, label }]`."
         },
         "roster": {
          "type": "object",
          "description": "check: `{ \"Name\": { \"YYYY-MM-DD\": \"S\" } }` or `[{ employee, date, shift }]` (O = off)."
         },
         "regime": {
          "type": "string",
          "default": "weekly",
          "description": "`weekly` (≤ 10 h/day, 48 h/week) or `daily` (8 h/day); also `normal_week_hours`, `overtime_year_cap`."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `xlsx` or `ics`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "pattern": {
           "type": "string"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "shifts": {
           "type": "array",
           "items": {}
          },
          "rules": {
           "type": "object",
           "properties": {
            "regime": {
             "type": "string"
            },
            "normal_day_hours": {
             "type": "number"
            },
            "normal_week_hours": {
             "type": "number"
            },
            "max_day_hours": {
             "type": "number"
            },
            "overtime_month_cap": {
             "type": "number"
            },
            "overtime_year_cap": {
             "type": "number"
            },
            "min_rest_between_shifts_h": {
             "type": "number"
            },
            "weekly_rest_h": {
             "type": "number"
            },
            "night": {
             "type": "string"
            }
           }
          },
          "holidays": {
           "type": "array"
          },
          "method": {
           "type": "string"
          },
          "unfilled": {
           "type": "array"
          },
          "partial": {
           "type": "boolean"
          },
          "ok": {
           "type": "boolean"
          },
          "violations": {
           "type": "array"
          },
          "summary": {
           "type": "array",
           "items": {}
          },
          "roster": {
           "type": "array",
           "items": {}
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-military-service": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Military Service Check (VN)",
    "description": "From `birth_date` (or `birth_year`) and the call-up `year` (default: the next February) the API checks the age at the February–March call-up window (from 18 to the end of 25, the end of 27 for college / university students who were deferred – Luật NVQS Điều 30), flags birthdays inside the window and gives the first registration (April of the year you turn 17).\n\nHealth: `height_cm`, `weight_kg`, `chest_cm` are scored with the physical table of Thông tư 105/2023/TT-BQP (points 1–6), the BMI must be 18.0–29.9, myopia above 1.5 D and any hyperopia are not called up (Thông tư 148/2018/TT-BQP as amended by Thông tư 68/2025/TT-BQP), and a `health_grade` from the council must be 1–3. `education_grade` checks the grade-8 standard. `circumstances` (e.g. `sibling_in_service`, `student`, `sole_breadwinner`, `child_of_martyr`) map to the deferment and exemption cases of Điều 41 (amended up to Luật 14/2026/QH16) and the registration bars of Điều 13–14.\n\nThe answer has a `status` (callable, deferred, exempt, not_fit, too_young, over_age…), the reasons with their articles, the timeline (health checks 01/11–31/12, call-up in February or March, 24 months of service) and the legal sources. Nothing is stored; the military service council decides.\n\nDocs: https://apibox.io.vn/docs/vn-military-service/",
    "operationId": "vnMilitaryServiceGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-military-service/"
    },
    "parameters": [
     {
      "name": "birth_date",
      "in": "query",
      "required": false,
      "description": "Date of birth (or `birth_year`).",
      "schema": {
       "type": "string"
      },
      "example": "2007-05-10"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Call-up year (default: next February).",
      "schema": {
       "type": "number"
      },
      "example": 2027
     },
     {
      "name": "gender",
      "in": "query",
      "required": false,
      "description": "`male` or `female`.",
      "schema": {
       "type": "string",
       "default": "male"
      }
     },
     {
      "name": "height_cm",
      "in": "query",
      "required": false,
      "description": "Height; with `weight_kg` (BMI) and `chest_cm`.",
      "schema": {
       "type": "number"
      },
      "example": 170
     },
     {
      "name": "myopia_diopters",
      "in": "query",
      "required": false,
      "description": "Myopia in diopters (sign ignored); `hyperopia=true` for any hyperopia.",
      "schema": {
       "type": "number"
      },
      "example": -1
     },
     {
      "name": "health_grade",
      "in": "query",
      "required": false,
      "description": "Health grade 1–6 from the health council.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "education_grade",
      "in": "query",
      "required": false,
      "description": "Highest grade completed (0–12, or `university`).",
      "schema": {
       "type": "string"
      },
      "example": "12"
     },
     {
      "name": "studying",
      "in": "query",
      "required": false,
      "description": "`high_school`, `college` or `university` (full-time, deferment).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "circumstances",
      "in": "query",
      "required": false,
      "description": "Comma-separated codes; the response lists all `deferment_codes` / `exemption_codes`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "deferred_as_student",
      "in": "query",
      "required": false,
      "description": "Was deferred for college / university: age limit 27.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "status": {
           "type": "string"
          },
          "status_vi": {
           "type": "string"
          },
          "reasons": {
           "type": "array"
          },
          "deferments": {
           "type": "array"
          },
          "exemptions": {
           "type": "array"
          },
          "checks": {
           "type": "object",
           "properties": {
            "age": {
             "type": "object",
             "properties": {
              "at_window_start": {
               "type": "number"
              },
              "at_window_end": {
               "type": "number"
              },
              "window": {
               "type": "array"
              },
              "range": {
               "type": "string"
              },
              "ok": {
               "type": "boolean"
              },
              "turns_18": {
               "type": "string"
              },
              "last_callable_day": {
               "type": "string"
              },
              "first_registration": {
               "type": "string"
              }
             }
            },
            "physical": {
             "type": "object",
             "properties": {
              "points": {
               "type": "object"
              },
              "physical_grade": {
               "type": "number"
              },
              "bmi": {
               "type": "number"
              },
              "bmi_call_up_range": {
               "type": "string"
              },
              "bmi_ok": {
               "type": "boolean"
              },
              "table": {
               "type": "string"
              }
             }
            },
            "myopia": {
             "type": "object",
             "properties": {
              "diopters": {
               "type": "number"
              },
              "ok": {
               "type": "boolean"
              }
             }
            },
            "education": {
             "type": "object",
             "properties": {
              "grade": {
               "type": "number"
              },
              "ok": {
               "type": "boolean"
              },
              "rule": {
               "type": "string"
              }
             }
            }
           }
          },
          "timeline": {
           "type": "object",
           "properties": {
            "health_check": {
             "type": "string"
            },
            "call_up": {
             "type": "string"
            },
            "service": {
             "type": "string"
            },
            "decision": {
             "type": "string"
            }
           }
          },
          "standards": {
           "type": "object",
           "properties": {
            "…": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "privacy": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "year": 2027,
         "status": "callable",
         "status_vi": "Thuộc diện gọi nhập ngũ nếu đạt kết luận khám sức khỏe và tiêu chuẩn chính trị",
         "reasons": [],
         "deferments": [],
         "exemptions": [],
         "checks": {
          "age": {
           "at_window_start": 19,
           "at_window_end": 19,
           "window": [
            "2027-02-01",
            "2027-03-31"
           ],
           "range": "18–25",
           "ok": true,
           "turns_18": "2025-05-10",
           "last_callable_day": "2033-05-09",
           "first_registration": "Tháng 4/2024 (đăng ký nghĩa vụ quân sự lần đầu năm đủ 17 tuổi, Điều 16)"
          },
          "physical": {
           "points": {
            "height": 1,
            "weight": 1,
            "bmi": 1
           },
           "physical_grade": 1,
           "bmi": 20.76,
           "bmi_call_up_range": "18.0–29.9",
           "bmi_ok": true,
           "table": "…"
          },
          "myopia": {
           "diopters": 1,
           "ok": true
          },
          "education": {
           "grade": 12,
           "ok": true,
           "rule": "…"
          }
         },
         "timeline": {
          "health_check": "01/11/2026 – 31/12/2026 (Luật NVQS Điều 40 khoản 5)",
          "call_up": "Tháng 2 hoặc tháng 3/2027 (Điều 33)",
          "service": "24 tháng, có thể kéo dài tối đa 6 tháng (Điều 21)",
          "decision": "…"
         },
         "standards": {
          "…": "…"
         },
         "legal": [
          {
           "ref": "Luật Nghĩa vụ quân sự 78/2015/QH13, văn bản hợp nhất 09/2026 (sửa đổi bởi Luật 48/2019/QH14, 98/2025/QH15, 14/2026/QH16)",
           "effective_from": "2016-01-01",
           "…": "…"
          },
          "…"
         ],
         "reviewed": "2026-11-15",
         "privacy": "Nothing you send is stored.",
         "disclaimer": "Reference only, not legal advice; the military service council decides. Check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Military Service Check (VN)",
    "description": "From `birth_date` (or `birth_year`) and the call-up `year` (default: the next February) the API checks the age at the February–March call-up window (from 18 to the end of 25, the end of 27 for college / university students who were deferred – Luật NVQS Điều 30), flags birthdays inside the window and gives the first registration (April of the year you turn 17).\n\nHealth: `height_cm`, `weight_kg`, `chest_cm` are scored with the physical table of Thông tư 105/2023/TT-BQP (points 1–6), the BMI must be 18.0–29.9, myopia above 1.5 D and any hyperopia are not called up (Thông tư 148/2018/TT-BQP as amended by Thông tư 68/2025/TT-BQP), and a `health_grade` from the council must be 1–3. `education_grade` checks the grade-8 standard. `circumstances` (e.g. `sibling_in_service`, `student`, `sole_breadwinner`, `child_of_martyr`) map to the deferment and exemption cases of Điều 41 (amended up to Luật 14/2026/QH16) and the registration bars of Điều 13–14.\n\nThe answer has a `status` (callable, deferred, exempt, not_fit, too_young, over_age…), the reasons with their articles, the timeline (health checks 01/11–31/12, call-up in February or March, 24 months of service) and the legal sources. Nothing is stored; the military service council decides.\n\nDocs: https://apibox.io.vn/docs/vn-military-service/",
    "operationId": "vnMilitaryServicePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-military-service/"
    },
    "parameters": [
     {
      "name": "birth_date",
      "in": "query",
      "required": false,
      "description": "Date of birth (or `birth_year`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "description": "Call-up year (default: next February).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "gender",
      "in": "query",
      "required": false,
      "description": "`male` or `female`.",
      "schema": {
       "type": "string",
       "default": "male"
      }
     },
     {
      "name": "height_cm",
      "in": "query",
      "required": false,
      "description": "Height; with `weight_kg` (BMI) and `chest_cm`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "myopia_diopters",
      "in": "query",
      "required": false,
      "description": "Myopia in diopters (sign ignored); `hyperopia=true` for any hyperopia.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "health_grade",
      "in": "query",
      "required": false,
      "description": "Health grade 1–6 from the health council.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "education_grade",
      "in": "query",
      "required": false,
      "description": "Highest grade completed (0–12, or `university`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "studying",
      "in": "query",
      "required": false,
      "description": "`high_school`, `college` or `university` (full-time, deferment).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "circumstances",
      "in": "query",
      "required": false,
      "description": "Comma-separated codes; the response lists all `deferment_codes` / `exemption_codes`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "deferred_as_student",
      "in": "query",
      "required": false,
      "description": "Was deferred for college / university: age limit 27.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "year": {
           "type": "number"
          },
          "status": {
           "type": "string"
          },
          "status_vi": {
           "type": "string"
          },
          "reasons": {
           "type": "array"
          },
          "deferments": {
           "type": "array"
          },
          "exemptions": {
           "type": "array"
          },
          "checks": {
           "type": "object",
           "properties": {
            "age": {
             "type": "object",
             "properties": {
              "at_window_start": {
               "type": "number"
              },
              "at_window_end": {
               "type": "number"
              },
              "window": {
               "type": "array"
              },
              "range": {
               "type": "string"
              },
              "ok": {
               "type": "boolean"
              },
              "turns_18": {
               "type": "string"
              },
              "last_callable_day": {
               "type": "string"
              },
              "first_registration": {
               "type": "string"
              }
             }
            },
            "physical": {
             "type": "object",
             "properties": {
              "points": {
               "type": "object"
              },
              "physical_grade": {
               "type": "number"
              },
              "bmi": {
               "type": "number"
              },
              "bmi_call_up_range": {
               "type": "string"
              },
              "bmi_ok": {
               "type": "boolean"
              },
              "table": {
               "type": "string"
              }
             }
            },
            "myopia": {
             "type": "object",
             "properties": {
              "diopters": {
               "type": "number"
              },
              "ok": {
               "type": "boolean"
              }
             }
            },
            "education": {
             "type": "object",
             "properties": {
              "grade": {
               "type": "number"
              },
              "ok": {
               "type": "boolean"
              },
              "rule": {
               "type": "string"
              }
             }
            }
           }
          },
          "timeline": {
           "type": "object",
           "properties": {
            "health_check": {
             "type": "string"
            },
            "call_up": {
             "type": "string"
            },
            "service": {
             "type": "string"
            },
            "decision": {
             "type": "string"
            }
           }
          },
          "standards": {
           "type": "object",
           "properties": {
            "…": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "privacy": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-injury-rate": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Body Injury Rate (VN)",
    "description": "Search (`q`, accents optional, e.g. `gay xuong ban tay`) the four tables of body-injury percentages (tỷ lệ % tổn thương cơ thể) of Thông tư 22/2019/TT-BYT used in forensic assessment: Bảng 1 injuries, Bảng 2 diseases, Bảng 3–4 mental disorders. Each result gives the chapter, the code path, the injury, its parent headings and the range (e.g. 6–10 %). Filter by `table` and `chapter`; `action=chapters` lists them; `action=vision&right=4/10&left=3/10` reads the visual-acuity grid.\n\n`action=combine&rates=[63,41,22]` adds several injuries with the method of Điều 4: T1 is the first (largest) injury, each next one is taken on what remains: Tn = (100 − T1 − … − Tn−1) × rate / 100, two decimals per step and the total rounded half up to an integer (Điều 3 khoản 4). Rates can also be table row `id`s with `pick=min|mid|max` or a chosen `rate`. The worked examples of the circular are reproduced exactly (63 + 15.17 + 4.80 = 82.97 → 83 %; 45 + 20.35 → 65 %).\n\nThe total is compared with the bands of Bộ luật Hình sự Điều 134 (11–30 %, 31–60 %, 61 % and above; aggravating circumstances change the clause). The rate in a real case is chosen by the forensic examiner within the range; this is a reference tool.\n\nDocs: https://apibox.io.vn/docs/vn-injury-rate/",
    "operationId": "vnInjuryRateGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-injury-rate/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Injury name or keywords (accents optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`search`, `combine`, `vision`, `get` (with `id`) or `chapters`.",
      "schema": {
       "type": "string",
       "default": "search"
      },
      "example": "combine"
     },
     {
      "name": "rates",
      "in": "query",
      "required": false,
      "description": "combine: rates (`63,41,22`), `{ rate, label }` objects or row ids `{ id, rate | pick }`.",
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "order",
      "in": "query",
      "required": false,
      "description": "combine: `desc` (largest first) or `given`; `decimals=round|truncate`.",
      "schema": {
       "type": "string",
       "default": "desc"
      }
     },
     {
      "name": "table",
      "in": "query",
      "required": false,
      "description": "Table 1–4 (search filter, list, or vision grid 1 / 2); with `chapter`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "right",
      "in": "query",
      "required": false,
      "description": "vision: corrected acuity of the right eye (`10/10`, `4/10`, `1/20`, `ST(-)`); with `left`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max search results (1–100).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "order": {
           "type": "string"
          },
          "decimals": {
           "type": "string"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "n": {
              "type": "number"
             },
             "label": {},
             "rate": {
              "type": "number"
             },
             "remaining_before": {
              "type": "number"
             },
             "formula": {
              "type": "string"
             },
             "t": {
              "type": "number"
             },
             "cumulative": {
              "type": "number"
             }
            }
           }
          },
          "sum_exact": {
           "type": "number"
          },
          "total": {
           "type": "number"
          },
          "total_formatted": {
           "type": "string"
          },
          "rounding": {
           "type": "string"
          },
          "criminal_band": {
           "type": "object",
           "properties": {
            "band": {
             "type": "string"
            },
            "clause": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "method": "cộng lùi (Điều 4 TT 22/2019/TT-BYT): each further injury is applied to the remaining body capacity",
         "order": "desc",
         "decimals": "round",
         "steps": [
          {
           "n": 1,
           "label": null,
           "rate": 63,
           "remaining_before": 100,
           "formula": "T1 = 63",
           "t": 63,
           "cumulative": 63
          },
          {
           "n": 2,
           "label": null,
           "rate": 41,
           "remaining_before": 37,
           "formula": "T2 = (100 - T1) × 41/100 = 37 × 41/100",
           "t": 15.17,
           "cumulative": 78.17
          },
          {
           "n": 3,
           "label": null,
           "rate": 22,
           "remaining_before": 21.83,
           "formula": "T3 = (100 - T1 - T2) × 22/100 = 21.83 × 22/100",
           "t": 4.8,
           "cumulative": 82.97
          }
         ],
         "sum_exact": 82.97,
         "total": 83,
         "total_formatted": "83%",
         "rounding": "Two decimals per step; final total rounded half up to an integer (Điều 3 khoản 4)",
         "criminal_band": {
          "band": "≥ 61%",
          "clause": "Điều 134 khoản 3 (61% trở lên: 05–10 năm tù)",
          "note": "Heavier clauses apply with aggravating circumstances, several victims or death (khoản 4, 5)."
         },
         "notes": [
          "The total for one person is always below 100% (Điều 3 khoản 1).",
          "…"
         ],
         "legal": [
          {
           "ref": "Thông tư 22/2019/TT-BYT (28/08/2019), Bảng 1–4; Điều 3 (principles), Điều 4 (cộng lùi method)",
           "effective_from": "2019-11-01",
           "note": "Cases that arose before 01/11/2019 use TT 20/2014/TT-BYT (Điều 6)."
          },
          "…"
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal or medical advice; the rate is decided by the forensic examiner. Check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Body Injury Rate (VN)",
    "description": "Search (`q`, accents optional, e.g. `gay xuong ban tay`) the four tables of body-injury percentages (tỷ lệ % tổn thương cơ thể) of Thông tư 22/2019/TT-BYT used in forensic assessment: Bảng 1 injuries, Bảng 2 diseases, Bảng 3–4 mental disorders. Each result gives the chapter, the code path, the injury, its parent headings and the range (e.g. 6–10 %). Filter by `table` and `chapter`; `action=chapters` lists them; `action=vision&right=4/10&left=3/10` reads the visual-acuity grid.\n\n`action=combine&rates=[63,41,22]` adds several injuries with the method of Điều 4: T1 is the first (largest) injury, each next one is taken on what remains: Tn = (100 − T1 − … − Tn−1) × rate / 100, two decimals per step and the total rounded half up to an integer (Điều 3 khoản 4). Rates can also be table row `id`s with `pick=min|mid|max` or a chosen `rate`. The worked examples of the circular are reproduced exactly (63 + 15.17 + 4.80 = 82.97 → 83 %; 45 + 20.35 → 65 %).\n\nThe total is compared with the bands of Bộ luật Hình sự Điều 134 (11–30 %, 31–60 %, 61 % and above; aggravating circumstances change the clause). The rate in a real case is chosen by the forensic examiner within the range; this is a reference tool.\n\nDocs: https://apibox.io.vn/docs/vn-injury-rate/",
    "operationId": "vnInjuryRatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-injury-rate/"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Injury name or keywords (accents optional).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`search`, `combine`, `vision`, `get` (with `id`) or `chapters`.",
      "schema": {
       "type": "string",
       "default": "search"
      }
     },
     {
      "name": "order",
      "in": "query",
      "required": false,
      "description": "combine: `desc` (largest first) or `given`; `decimals=round|truncate`.",
      "schema": {
       "type": "string",
       "default": "desc"
      }
     },
     {
      "name": "table",
      "in": "query",
      "required": false,
      "description": "Table 1–4 (search filter, list, or vision grid 1 / 2); with `chapter`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "right",
      "in": "query",
      "required": false,
      "description": "vision: corrected acuity of the right eye (`10/10`, `4/10`, `1/20`, `ST(-)`); with `left`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max search results (1–100).",
      "schema": {
       "type": "number",
       "default": 10
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "rates": {
          "type": "array",
          "items": {},
          "description": "combine: rates (`63,41,22`), `{ rate, label }` objects or row ids `{ id, rate | pick }`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "method": {
           "type": "string"
          },
          "order": {
           "type": "string"
          },
          "decimals": {
           "type": "string"
          },
          "steps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "n": {
              "type": "number"
             },
             "label": {},
             "rate": {
              "type": "number"
             },
             "remaining_before": {
              "type": "number"
             },
             "formula": {
              "type": "string"
             },
             "t": {
              "type": "number"
             },
             "cumulative": {
              "type": "number"
             }
            }
           }
          },
          "sum_exact": {
           "type": "number"
          },
          "total": {
           "type": "number"
          },
          "total_formatted": {
           "type": "string"
          },
          "rounding": {
           "type": "string"
          },
          "criminal_band": {
           "type": "object",
           "properties": {
            "band": {
             "type": "string"
            },
            "clause": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-school-age": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "School Age by Birth Year (VN)",
    "description": "Vietnamese school ages count by calendar year (Luật Giáo dục 2019 Điều 28): a child born in year N starts grade 1 in the school year beginning in N+6, grade 6 in N+11 and grade 10 in N+15, and sits the high-school graduation exam in N+18 – the birth month does not matter. Send `birth_year` (or `birth_date`) and `school_year` (e.g. `2026-2027`, default the current one) to get the standard grade or kindergarten class (mầm, chồi, lá) and every milestone.\n\nReverse lookup: `grade=10&school_year=2026-2027` tells which birth year is at the standard age (2011) and the years allowed when one of the cases for an older age applies. The rules of the school charter of Thông tư 15/2026/TT-BGDĐT (in force 10/05/2026, replacing TT 28/2020 and TT 32/2020) are listed: up to 3 years older for pupils with disabilities, from disadvantaged areas, ethnic minorities, in hardship or back from abroad; repeating a grade at most 3 times per level; grade skipping within a level.\n\nPair it with /v1/vn-school-calendar for the dates of the school year.\n\nDocs: https://apibox.io.vn/docs/vn-school-age/",
    "operationId": "vnSchoolAgeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-school-age/"
    },
    "parameters": [
     {
      "name": "birth_year",
      "in": "query",
      "required": false,
      "description": "Birth year (or `birth_date`).",
      "schema": {
       "type": "number"
      },
      "example": 2020
     },
     {
      "name": "school_year",
      "in": "query",
      "required": false,
      "description": "School year, e.g. `2026-2027` (or the starting year).",
      "schema": {
       "type": "string",
       "default": "current"
      },
      "example": "2026-2027"
     },
     {
      "name": "grade",
      "in": "query",
      "required": false,
      "description": "Reverse lookup: grade 1–12 or `mam`, `choi`, `la`.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "birth_year": {
           "type": "number"
          },
          "school_year": {
           "type": "string"
          },
          "age_in_calendar_year": {
           "type": "number"
          },
          "standard_placement": {
           "type": "object",
           "properties": {
            "grade": {
             "type": "number"
            },
            "level": {
             "type": "string"
            }
           }
          },
          "milestones": {
           "type": "object",
           "properties": {
            "preschool_from": {
             "type": "number"
            },
            "kindergarten_3": {
             "type": "string"
            },
            "kindergarten_5_la": {
             "type": "string"
            },
            "grade1": {
             "type": "string"
            },
            "grade5_end": {
             "type": "string"
            },
            "grade6": {
             "type": "string"
            },
            "grade9_end": {
             "type": "string"
            },
            "grade10": {
             "type": "string"
            },
            "grade12": {
             "type": "string"
            },
            "graduation_exam": {
             "type": "number"
            },
            "university_entry": {
             "type": "string"
            }
           }
          },
          "rules": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "legal": {
           "type": "array",
           "items": {}
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "birth_year": 2020,
         "school_year": "2026-2027",
         "age_in_calendar_year": 6,
         "standard_placement": {
          "grade": 1,
          "level": "Tiểu học"
         },
         "milestones": {
          "preschool_from": 2020,
          "kindergarten_3": "2023-2024",
          "kindergarten_5_la": "2025-2026",
          "grade1": "2026-2027",
          "grade5_end": "2030-2031",
          "grade6": "2031-2032",
          "grade9_end": "2034-2035",
          "grade10": "2035-2036",
          "grade12": "2037-2038",
          "graduation_exam": 2038,
          "university_entry": "2038-2039"
         },
         "rules": [
          "Grade 1 at 6 years of age counted by calendar year (born in year N → grade 1 in the school year starting in N+6); grade 6 at 11; grade 10 at 15.",
          "…"
         ],
         "legal": [
          {
           "ref": "Luật Giáo dục 43/2019/QH14, Điều 28 khoản 1",
           "effective_from": "2020-07-01",
           "note": "…"
          },
          "…"
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal advice; check the official text."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-exam-rooms": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Exam Room Allocation (VN)",
    "description": "Send the candidate list as `students` (JSON array, CSV text or an uploaded CSV / XLSX `file`; Vietnamese headers such as `ho_ten`, `lop`, `ngay_sinh` are recognised) and the rooms (`rooms` as a number or `[{ name, capacity }]`, or just `capacity`, default 24). Candidates are ordered like Vietnamese class lists – by given name, then family and middle names, with the Vietnamese collation of /v1/vn-sort (An < Anh < Ánh < Bình, đ after d) – or by `order=class`, `random` (reproducible with `seed`) or `given`.\n\nCandidate numbers (`sbd_prefix`, `sbd_start`, `sbd_digits`) follow that order; rooms are filled to capacity (`fill=sequential`) or evenly (`balanced`), and `interleave_classes=true` seats neighbours from different classes. Extra columns (subject, exam code…) are kept on each candidate.\n\n`format=xlsx` gives the master list plus one sheet per room to post on the door and use as the signature sheet (sheets, exam code, signature, invigilators). Nothing is stored.\n\nDocs: https://apibox.io.vn/docs/vn-exam-rooms/",
    "operationId": "vnExamRoomsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-exam-rooms/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "students": {
          "type": "array",
          "items": {},
          "description": "Candidates: JSON `[{ ho_ten, lop, ngay_sinh, … }]`, CSV text, or `file` (CSV / XLSX)."
         },
         "rooms": {
          "type": "array",
          "items": {},
          "description": "Number of rooms or `[{ name, capacity }]`."
         },
         "capacity": {
          "type": "number",
          "default": 24,
          "description": "Seats per room."
         },
         "order": {
          "type": "string",
          "default": "name",
          "description": "`name`, `class`, `random` (+ `seed`) or `given`."
         },
         "sbd_prefix": {
          "type": "string",
          "description": "Candidate-number prefix; `sbd_start` (1), `sbd_digits`."
         },
         "fill": {
          "type": "string",
          "default": "sequential",
          "description": "`sequential` or `balanced`; `interleave_classes=true` to mix classes."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx` (with `exam`, `school`)."
         }
        },
        "required": [
         "students"
        ]
       },
       "example": {
        "students": [
         {
          "ho_ten": "Nguyễn Văn Bình",
          "lop": "9A"
         },
         {
          "ho_ten": "Trần Thị An",
          "lop": "9B"
         },
         {
          "ho_ten": "Lê Văn Đức",
          "lop": "9A"
         }
        ],
        "capacity": 2,
        "sbd_prefix": "HK1-"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "students": {
          "type": "array",
          "items": {},
          "description": "Candidates: JSON `[{ ho_ten, lop, ngay_sinh, … }]`, CSV text, or `file` (CSV / XLSX)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "CSV or XLSX list (multipart)."
         },
         "rooms": {
          "type": "array",
          "items": {},
          "description": "Number of rooms or `[{ name, capacity }]`."
         },
         "capacity": {
          "type": "number",
          "default": 24,
          "description": "Seats per room."
         },
         "order": {
          "type": "string",
          "default": "name",
          "description": "`name`, `class`, `random` (+ `seed`) or `given`."
         },
         "sbd_prefix": {
          "type": "string",
          "description": "Candidate-number prefix; `sbd_start` (1), `sbd_digits`."
         },
         "fill": {
          "type": "string",
          "default": "sequential",
          "description": "`sequential` or `balanced`; `interleave_classes=true` to mix classes."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` or `xlsx` (with `exam`, `school`)."
         }
        },
        "required": [
         "students"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "number"
          },
          "rooms": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "room": {
              "type": "string"
             },
             "capacity": {
              "type": "number"
             },
             "candidates": {
              "type": "number"
             },
             "sbd_from": {
              "type": "string"
             },
             "sbd_to": {
              "type": "string"
             }
            }
           }
          },
          "order": {
           "type": "string"
          },
          "fill": {
           "type": "string"
          },
          "interleave_classes": {
           "type": "boolean"
          },
          "candidates": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "sbd": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "class": {
              "type": "string"
             },
             "dob": {},
             "room": {
              "type": "string"
             },
             "seat": {
              "type": "number"
             }
            }
           }
          },
          "privacy": {
           "type": "string"
          }
         }
        },
        "example": {
         "count": 3,
         "rooms": [
          {
           "room": "Phòng 01",
           "capacity": 2,
           "candidates": 2,
           "sbd_from": "HK1-001",
           "sbd_to": "HK1-002"
          },
          {
           "room": "Phòng 02",
           "capacity": 2,
           "candidates": 1,
           "sbd_from": "HK1-003",
           "sbd_to": "HK1-003"
          }
         ],
         "order": "name",
         "fill": "sequential",
         "interleave_classes": false,
         "candidates": [
          {
           "sbd": "HK1-001",
           "name": "Trần Thị An",
           "class": "9B",
           "dob": null,
           "room": "Phòng 01",
           "seat": 1
          },
          {
           "sbd": "HK1-002",
           "name": "Nguyễn Văn Bình",
           "class": "9A",
           "dob": null,
           "room": "Phòng 01",
           "seat": 2
          },
          {
           "sbd": "HK1-003",
           "name": "Lê Văn Đức",
           "class": "9A",
           "dob": null,
           "room": "Phòng 02",
           "seat": 1
          }
         ],
         "privacy": "Nothing you send is stored."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/har-tools": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "HAR Sanitizer & Analyzer",
    "description": "A HAR file exported from the browser DevTools records every request of a page, including session cookies, `Authorization` headers, API keys in query strings and passwords in form posts. Support teams ask customers for HAR files all the time, and leaked HARs have been used to hijack sessions. `action=sanitize` (default) returns a cleaned HAR plus a report of what was redacted: all cookie values (`Cookie`, `Set-Cookie` and the `cookies` arrays), authentication headers (`Authorization`, `X-Api-Key`, CSRF tokens…), query and form parameters and JSON fields whose names look secret (`token`, `password`, `secret`, `session`, `api_key`, `code`, `sig`…), JWT signatures (the header and payload stay readable, like Cloudflare's HAR sanitizer), bearer tokens and well-known key formats (AWS, GitHub, Google, Stripe, Slack, OpenAI, PEM private keys) anywhere in headers, URLs and bodies. Add your own names with `keys`, keep some with `allow_keys`, or drop all bodies with `strip_bodies=1`. `action=report` only lists what would be redacted.\n\n`action=analyze` summarizes the capture: number of requests, transfer and content bytes, total time, status classes and failed requests, bytes by type (document, script, stylesheet, image, font, XHR), first-party domain and third-party domains, the slowest and largest requests, cache hits and 304s, text responses served without compression, and DNS / connect / TLS / wait / receive times. `waterfall=1` adds a per-request timeline and `format=svg` draws it as an SVG waterfall. URLs in the report are sanitized too.\n\n`action=convert` turns entries into ready-to-run `curl` commands, a k6 load-test script, a Postman v2.1 collection, or code in any `curl-convert` language (`python`, `fetch`, `node`, `go`, `php`…). Pick entries with `entries=0,3,5-7`, `filter` (URL substring), `methods` or `xhr_only=1`; secrets are redacted first unless `sanitize=0`. Send the HAR as a file field `file`, as `har` (JSON or string) or as the raw JSON body, up to 20 MB (and your plan's file limit). Nothing is stored or logged.\n\nDocs: https://apibox.io.vn/docs/har-tools/",
    "operationId": "harToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/har-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "har": {
          "type": "object",
          "description": "HAR as a JSON object or string ({\"log\": {\"entries\": [...]}}), max 20 MB."
         },
         "action": {
          "type": "string",
          "default": "sanitize",
          "description": "`sanitize`, `report` (list only), `analyze` or `convert`. Alias: `mode`."
         },
         "keys": {
          "type": "string",
          "description": "Extra parameter / header / JSON field names to redact (comma-separated; also matched as substrings when longer than 2 characters)."
         },
         "allow_keys": {
          "type": "string",
          "description": "Names never to redact (e.g. `code` when it is a product code)."
         },
         "strip_bodies": {
          "type": "boolean",
          "description": "`1`: remove all request and response bodies (or only one side with `strip_request_bodies` / `strip_response_bodies`)."
         },
         "placeholder": {
          "type": "string",
          "default": "redacted",
          "description": "Text written in place of secrets."
         },
         "format": {
          "type": "string",
          "description": "sanitize: `har` downloads the cleaned file; analyze: `svg` returns the waterfall chart."
         },
         "waterfall": {
          "type": "boolean",
          "description": "analyze: include the per-request timeline (`waterfall_limit`, default 100)."
         },
         "top": {
          "type": "number",
          "default": 10,
          "description": "analyze: number of slowest / largest requests listed."
         },
         "to": {
          "type": "string",
          "default": "curl",
          "description": "convert: `curl`, `k6`, `postman`, or a curl-convert target (`python`, `fetch`, `node`, `go`, `php`, `java`, `csharp`, `ruby`, `rust`, `powershell`, `httpie`…; max 20 entries)."
         },
         "entries": {
          "type": "string",
          "description": "convert: entry indexes, e.g. `0,3,5-7`. Also `filter` (URL substring), `methods` (GET,POST), `xhr_only=1`, `limit` (default 50)."
         },
         "sanitize": {
          "type": "boolean",
          "default": true,
          "description": "analyze / convert: redact secrets first (`0` to keep them, e.g. to replay your own requests)."
         }
        }
       },
       "example": {
        "action": "report",
        "har": {
         "log": {
          "entries": [
           "… 3 entries: a page with a session query parameter and cookies, a login POST with a Bearer JWT and a password, a third-party script …"
          ]
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .har file (multipart). Alternatively send `har` or the raw JSON body."
         },
         "har": {
          "type": "object",
          "description": "HAR as a JSON object or string ({\"log\": {\"entries\": [...]}}), max 20 MB."
         },
         "action": {
          "type": "string",
          "default": "sanitize",
          "description": "`sanitize`, `report` (list only), `analyze` or `convert`. Alias: `mode`."
         },
         "keys": {
          "type": "string",
          "description": "Extra parameter / header / JSON field names to redact (comma-separated; also matched as substrings when longer than 2 characters)."
         },
         "allow_keys": {
          "type": "string",
          "description": "Names never to redact (e.g. `code` when it is a product code)."
         },
         "strip_bodies": {
          "type": "boolean",
          "description": "`1`: remove all request and response bodies (or only one side with `strip_request_bodies` / `strip_response_bodies`)."
         },
         "placeholder": {
          "type": "string",
          "default": "redacted",
          "description": "Text written in place of secrets."
         },
         "format": {
          "type": "string",
          "description": "sanitize: `har` downloads the cleaned file; analyze: `svg` returns the waterfall chart."
         },
         "waterfall": {
          "type": "boolean",
          "description": "analyze: include the per-request timeline (`waterfall_limit`, default 100)."
         },
         "top": {
          "type": "number",
          "default": 10,
          "description": "analyze: number of slowest / largest requests listed."
         },
         "to": {
          "type": "string",
          "default": "curl",
          "description": "convert: `curl`, `k6`, `postman`, or a curl-convert target (`python`, `fetch`, `node`, `go`, `php`, `java`, `csharp`, `ruby`, `rust`, `powershell`, `httpie`…; max 20 entries)."
         },
         "entries": {
          "type": "string",
          "description": "convert: entry indexes, e.g. `0,3,5-7`. Also `filter` (URL substring), `methods` (GET,POST), `xhr_only=1`, `limit` (default 50)."
         },
         "sanitize": {
          "type": "boolean",
          "default": true,
          "description": "analyze / convert: redact secrets first (`0` to keep them, e.g. to replay your own requests)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "entries": {
           "type": "number"
          },
          "report": {
           "type": "object",
           "properties": {
            "redacted": {
             "type": "number"
            },
            "by_type": {
             "type": "object",
             "properties": {
              "query": {
               "type": "number"
              },
              "cookie": {
               "type": "number"
              },
              "header": {
               "type": "number"
              },
              "body_field": {
               "type": "number"
              }
             }
            },
            "names": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "items": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "items_truncated": {
             "type": "boolean"
            }
           }
          },
          "note": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "report",
         "entries": 3,
         "report": {
          "redacted": 6,
          "by_type": {
           "query": 2,
           "cookie": 2,
           "header": 1,
           "body_field": 1
          },
          "names": [
           {
            "type": "query",
            "name": "session",
            "count": 2
           },
           {
            "type": "cookie",
            "name": "sid",
            "count": 1
           },
           {
            "type": "cookie",
            "name": "theme",
            "count": 1
           },
           {
            "type": "header",
            "name": "Authorization",
            "count": 1
           },
           {
            "type": "body_field",
            "name": "password",
            "count": 1
           }
          ],
          "items": [
           {
            "entry": 0,
            "type": "query",
            "location": "request.url",
            "name": "session"
           },
           {
            "entry": 0,
            "type": "query",
            "location": "request.queryString",
            "name": "session"
           },
           {
            "entry": 0,
            "type": "cookie",
            "location": "request.headers",
            "name": "sid"
           },
           {
            "entry": 0,
            "type": "cookie",
            "location": "request.headers",
            "name": "theme"
           },
           {
            "entry": 1,
            "type": "header",
            "location": "request.headers",
            "name": "Authorization"
           },
           {
            "entry": 1,
            "type": "body_field",
            "location": "request.postData",
            "name": "password"
           }
          ],
          "items_truncated": false
         },
         "note": "Nothing was changed or stored. Call action=sanitize to get the cleaned HAR."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/app-links-check": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "App Links & Universal Links Checker",
    "description": "Deep links silently fall back to the browser when the association files are wrong. Give a `domain` and the API fetches `https://<domain>/.well-known/assetlinks.json` (Android App Links) and `/.well-known/apple-app-site-association` plus the legacy root location (iOS Universal Links), then checks what the operating systems check: HTTPS, status 200, no redirects, `Content-Type: application/json`, size (AASA at most 128 KB) and valid JSON.\n\nAndroid: each statement needs `relation` `delegate_permission/common.handle_all_urls` and a target with `namespace: android_app`, `package_name` and upper-case colon-separated SHA-256 certificate fingerprints. Pass `package` and `sha256` (colons optional) to confirm your app and signing key are listed (with Play App Signing, use the app signing key from Play Console). iOS: `applinks.details` with `appIDs` (Team ID + bundle ID) and `components` (iOS 13+) or legacy `paths`, plus `webcredentials` and `appclips`. Pass `app_id` (or `team_id` + `bundle_id`) and `paths` to see whether each URL opens the app: the matcher follows Apple's rules (`*`, `?`, `exclude`, query dictionaries, `#` fragments, `caseSensitive`, `percentEncoded`, `substitutionVariables` and `NOT` paths), first matching rule wins.\n\n`cdn=1` also fetches Apple's CDN copy (app-site-association.cdn-apple.com), which devices actually use, and tells you whether it is still stale. You can validate files before deploying by posting `assetlinks` and / or `aasa` contents instead of a domain. When package, fingerprints or app IDs are given, the response includes a correct `suggested` file to copy.\n\nDocs: https://apibox.io.vn/docs/app-links-check/",
    "operationId": "appLinksCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/app-links-check/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "description": "Host to check (e.g. `www.example.com`; a URL is accepted). Not needed when `assetlinks` / `aasa` contents are sent.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "platform",
      "in": "query",
      "required": false,
      "description": "`android`, `ios` or `both`.",
      "schema": {
       "type": "string",
       "default": "both"
      }
     },
     {
      "name": "package",
      "in": "query",
      "required": false,
      "description": "Android package name to look for, e.g. `vn.example.shop`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sha256",
      "in": "query",
      "required": false,
      "description": "SHA-256 signing certificate fingerprint(s), comma-separated; colons optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "app_id",
      "in": "query",
      "required": false,
      "description": "iOS app ID(s) `TEAMID.bundle.id` (or `team_id` + `bundle_id`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "paths",
      "in": "query",
      "required": false,
      "description": "Paths or URLs to test against the AASA rules (comma-separated, max 50), e.g. `/product/123?ref=fb`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cdn",
      "in": "query",
      "required": false,
      "description": "`1`: also fetch Apple's CDN copy and compare it with your file.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "domain": {
           "type": "string"
          },
          "ios": {
           "type": "object",
           "properties": {
            "file": {},
            "app_ids": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "webcredentials": {
             "type": "array"
            },
            "appclips": {
             "type": "array"
            },
            "match": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "paths": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "valid": {
             "type": "boolean"
            },
            "issues": {
             "type": "array"
            },
            "suggested": {
             "type": "object",
             "properties": {
              "applinks": {
               "type": "object"
              },
              "webcredentials": {
               "type": "object"
              }
             }
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "App Links & Universal Links Checker",
    "description": "Deep links silently fall back to the browser when the association files are wrong. Give a `domain` and the API fetches `https://<domain>/.well-known/assetlinks.json` (Android App Links) and `/.well-known/apple-app-site-association` plus the legacy root location (iOS Universal Links), then checks what the operating systems check: HTTPS, status 200, no redirects, `Content-Type: application/json`, size (AASA at most 128 KB) and valid JSON.\n\nAndroid: each statement needs `relation` `delegate_permission/common.handle_all_urls` and a target with `namespace: android_app`, `package_name` and upper-case colon-separated SHA-256 certificate fingerprints. Pass `package` and `sha256` (colons optional) to confirm your app and signing key are listed (with Play App Signing, use the app signing key from Play Console). iOS: `applinks.details` with `appIDs` (Team ID + bundle ID) and `components` (iOS 13+) or legacy `paths`, plus `webcredentials` and `appclips`. Pass `app_id` (or `team_id` + `bundle_id`) and `paths` to see whether each URL opens the app: the matcher follows Apple's rules (`*`, `?`, `exclude`, query dictionaries, `#` fragments, `caseSensitive`, `percentEncoded`, `substitutionVariables` and `NOT` paths), first matching rule wins.\n\n`cdn=1` also fetches Apple's CDN copy (app-site-association.cdn-apple.com), which devices actually use, and tells you whether it is still stale. You can validate files before deploying by posting `assetlinks` and / or `aasa` contents instead of a domain. When package, fingerprints or app IDs are given, the response includes a correct `suggested` file to copy.\n\nDocs: https://apibox.io.vn/docs/app-links-check/",
    "operationId": "appLinksCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/app-links-check/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "Host to check (e.g. `www.example.com`; a URL is accepted). Not needed when `assetlinks` / `aasa` contents are sent.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "platform",
      "in": "query",
      "required": false,
      "description": "`android`, `ios` or `both`.",
      "schema": {
       "type": "string",
       "default": "both"
      }
     },
     {
      "name": "package",
      "in": "query",
      "required": false,
      "description": "Android package name to look for, e.g. `vn.example.shop`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sha256",
      "in": "query",
      "required": false,
      "description": "SHA-256 signing certificate fingerprint(s), comma-separated; colons optional.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "app_id",
      "in": "query",
      "required": false,
      "description": "iOS app ID(s) `TEAMID.bundle.id` (or `team_id` + `bundle_id`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "paths",
      "in": "query",
      "required": false,
      "description": "Paths or URLs to test against the AASA rules (comma-separated, max 50), e.g. `/product/123?ref=fb`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "cdn",
      "in": "query",
      "required": false,
      "description": "`1`: also fetch Apple's CDN copy and compare it with your file.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "assetlinks": {
          "type": "object",
          "description": "assetlinks.json contents to validate offline (JSON or string)."
         },
         "aasa": {
          "type": "object",
          "description": "apple-app-site-association contents to validate offline."
         }
        }
       },
       "example": {
        "platform": "ios",
        "app_id": "ABCDE12345.vn.example.shop",
        "paths": "/product/123,/admin/login",
        "aasa": {
         "applinks": {
          "details": [
           {
            "appIDs": [
             "ABCDE12345.vn.example.shop"
            ],
            "components": [
             {
              "/": "/admin/*",
              "exclude": true
             },
             {
              "/": "/product/*"
             }
            ]
           }
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "domain": {
           "type": "string"
          },
          "ios": {
           "type": "object",
           "properties": {
            "file": {},
            "app_ids": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "webcredentials": {
             "type": "array"
            },
            "appclips": {
             "type": "array"
            },
            "match": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "paths": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            },
            "errors": {
             "type": "number"
            },
            "warnings": {
             "type": "number"
            },
            "valid": {
             "type": "boolean"
            },
            "issues": {
             "type": "array"
            },
            "suggested": {
             "type": "object",
             "properties": {
              "applinks": {
               "type": "object"
              },
              "webcredentials": {
               "type": "object"
              }
             }
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "domain": "example.com",
         "ios": {
          "file": null,
          "app_ids": [
           "ABCDE12345.vn.example.shop"
          ],
          "webcredentials": [],
          "appclips": [],
          "match": [
           {
            "app_id": "ABCDE12345.vn.example.shop",
            "applinks": true,
            "webcredentials": false,
            "appclips": false
           }
          ],
          "paths": [
           {
            "path": "/product/123",
            "apps": [
             {
              "app_id": "ABCDE12345.vn.example.shop",
              "opens_app": true,
              "matched_rule": {
               "/": "/product/*"
              }
             }
            ]
           },
           {
            "path": "/admin/login",
            "apps": [
             {
              "app_id": "ABCDE12345.vn.example.shop",
              "opens_app": false,
              "matched_rule": {
               "/": "/admin/*",
               "exclude": true
              }
             }
            ]
           }
          ],
          "errors": 0,
          "warnings": 0,
          "valid": true,
          "issues": [],
          "suggested": {
           "applinks": {
            "details": [
             {
              "appIDs": [
               "ABCDE12345.vn.example.shop"
              ],
              "components": [
               {
                "/": "/product/123"
               },
               {
                "/": "/admin/login"
               }
              ]
             }
            ]
           },
           "webcredentials": {
            "apps": [
             "ABCDE12345.vn.example.shop"
            ]
           }
          }
         },
         "valid": true,
         "notes": [
          "Both files must be served over HTTPS with status 200, no redirects and Content-Type application/json; each subdomain needs its own files.",
          "…"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/web-vitals": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Core Web Vitals (Chrome UX Report)",
    "description": "Lab tools like Lighthouse measure one synthetic load; Google's ranking signal and the \"Core Web Vitals assessment\" in PageSpeed Insights use field data from real Chrome users, published in the Chrome UX Report (CrUX). This endpoint queries the CrUX API for a `url` (one page) or an origin (`scope=origin`, or any URL without a path) and returns, for LCP, INP, CLS, FCP and TTFB, the 75th percentile, a rating (`good`, `needs_improvement`, `poor`) against Google's thresholds and the share of visits in each band, plus the Core Web Vitals verdict (`passed` when LCP, INP and CLS are all good at p75), p75 round-trip time, navigation types, the device mix and the 28-day collection period.\n\nFilter by device with `form_factor=phone|desktop|tablet`, or get all three with `form_factor=each`. `history=1` returns up to 40 weekly data points (`weeks`, default 25) from the CrUX History API, ready to chart with `chart-image`. Send up to 10 URLs at once with `urls`. Results are cached for 6 hours (CrUX updates daily with a lag of about two days).\n\nPages and origins need enough Chrome traffic to be in CrUX: small sites get `found: false` (try the origin instead of one page). Data: Chrome UX Report by Google, licensed CC BY 4.0.\n\nBring your own Google API key: pass it as `crux_key` (or the `X-Crux-Key` header). Creating one is free in Google Cloud (enable the Chrome UX Report API); the key is only forwarded to Google for that request and never stored or logged. APIBox does not resell access to Google APIs.\n\nDocs: https://apibox.io.vn/docs/web-vitals/",
    "operationId": "webVitalsGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/web-vitals/"
    },
    "parameters": [
     {
      "name": "crux_key",
      "in": "query",
      "required": true,
      "description": "Your Google API key with the Chrome UX Report API enabled (or header `X-Crux-Key`). Forwarded to Google only, never stored.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Page URL or origin (`example.com` = origin).",
      "schema": {
       "type": "string"
      },
      "example": "https://example.vn"
     },
     {
      "name": "scope",
      "in": "query",
      "required": false,
      "description": "`auto` (origin when the URL has no path), `url` or `origin`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "form_factor",
      "in": "query",
      "required": false,
      "description": "`all`, `phone`, `desktop`, `tablet` or `each` (three results).",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "history",
      "in": "query",
      "required": false,
      "description": "`1`: weekly p75 series from the CrUX History API.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "weeks",
      "in": "query",
      "required": false,
      "description": "History length, 1–40 weekly periods.",
      "schema": {
       "type": "number",
       "default": 25
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "origin": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "form_factor": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "key": {
           "type": "object",
           "properties": {
            "origin": {
             "type": "string"
            }
           }
          },
          "core_web_vitals": {
           "type": "string"
          },
          "cwv_metrics_used": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "metrics": {
           "type": "object",
           "properties": {
            "lcp": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "inp": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "cls": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "fcp": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "ttfb": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            }
           }
          },
          "round_trip_time_p75_ms": {
           "type": "number"
          },
          "navigation_types": {
           "type": "object",
           "properties": {
            "navigate": {
             "type": "number"
            },
            "reload": {
             "type": "number"
            },
            "back_forward": {
             "type": "number"
            }
           }
          },
          "form_factors": {
           "type": "object",
           "properties": {
            "phone": {
             "type": "number"
            },
            "desktop": {
             "type": "number"
            },
            "tablet": {
             "type": "number"
            }
           }
          },
          "collection_period": {
           "type": "object",
           "properties": {
            "first": {
             "type": "string"
            },
            "last": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "origin": "https://example.vn",
         "source": "Chrome UX Report (CrUX), 28-day rolling window of real Chrome users; CrUX data by Google, CC BY 4.0",
         "form_factor": "all",
         "found": true,
         "key": {
          "origin": "https://example.vn"
         },
         "core_web_vitals": "passed",
         "cwv_metrics_used": [
          "lcp",
          "inp",
          "cls"
         ],
         "metrics": {
          "lcp": {
           "p75": 2480,
           "unit": "ms",
           "rating": "good",
           "distribution": {
            "good": 0.7871,
            "needs_improvement": 0.1371,
            "poor": 0.0758
           },
           "thresholds": {
            "good": 2500,
            "poor": 4000
           }
          },
          "inp": {
           "p75": 150,
           "unit": "ms",
           "rating": "good",
           "distribution": {
            "good": 0.8,
            "needs_improvement": 0.15,
            "poor": 0.05
           },
           "thresholds": {
            "good": 200,
            "poor": 500
           }
          },
          "cls": {
           "p75": 0.03,
           "rating": "good",
           "distribution": {
            "good": 0.9,
            "needs_improvement": 0.06,
            "poor": 0.04
           },
           "thresholds": {
            "good": 0.1,
            "poor": 0.25
           }
          },
          "fcp": {
           "p75": 1700,
           "unit": "ms",
           "rating": "good",
           "distribution": {
            "good": 0.7,
            "needs_improvement": 0.2,
            "poor": 0.1
           },
           "thresholds": {
            "good": 1800,
            "poor": 3000
           }
          },
          "ttfb": {
           "p75": 950,
           "unit": "ms",
           "rating": "needs_improvement",
           "distribution": {
            "good": 0.6,
            "needs_improvement": 0.3,
            "poor": 0.1
           },
           "thresholds": {
            "good": 800,
            "poor": 1800
           }
          }
         },
         "round_trip_time_p75_ms": 180,
         "navigation_types": {
          "navigate": 0.8,
          "reload": 0.05,
          "back_forward": 0.1
         },
         "form_factors": {
          "phone": 0.7,
          "desktop": 0.28,
          "tablet": 0.02
         },
         "collection_period": {
          "first": "2026-10-16",
          "last": "2026-11-12"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Core Web Vitals (Chrome UX Report)",
    "description": "Lab tools like Lighthouse measure one synthetic load; Google's ranking signal and the \"Core Web Vitals assessment\" in PageSpeed Insights use field data from real Chrome users, published in the Chrome UX Report (CrUX). This endpoint queries the CrUX API for a `url` (one page) or an origin (`scope=origin`, or any URL without a path) and returns, for LCP, INP, CLS, FCP and TTFB, the 75th percentile, a rating (`good`, `needs_improvement`, `poor`) against Google's thresholds and the share of visits in each band, plus the Core Web Vitals verdict (`passed` when LCP, INP and CLS are all good at p75), p75 round-trip time, navigation types, the device mix and the 28-day collection period.\n\nFilter by device with `form_factor=phone|desktop|tablet`, or get all three with `form_factor=each`. `history=1` returns up to 40 weekly data points (`weeks`, default 25) from the CrUX History API, ready to chart with `chart-image`. Send up to 10 URLs at once with `urls`. Results are cached for 6 hours (CrUX updates daily with a lag of about two days).\n\nPages and origins need enough Chrome traffic to be in CrUX: small sites get `found: false` (try the origin instead of one page). Data: Chrome UX Report by Google, licensed CC BY 4.0.\n\nBring your own Google API key: pass it as `crux_key` (or the `X-Crux-Key` header). Creating one is free in Google Cloud (enable the Chrome UX Report API); the key is only forwarded to Google for that request and never stored or logged. APIBox does not resell access to Google APIs.\n\nDocs: https://apibox.io.vn/docs/web-vitals/",
    "operationId": "webVitalsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/web-vitals/"
    },
    "parameters": [
     {
      "name": "crux_key",
      "in": "query",
      "required": false,
      "description": "Your Google API key with the Chrome UX Report API enabled (or header `X-Crux-Key`). Forwarded to Google only, never stored.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Page URL or origin (`example.com` = origin).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "scope",
      "in": "query",
      "required": false,
      "description": "`auto` (origin when the URL has no path), `url` or `origin`.",
      "schema": {
       "type": "string",
       "default": "auto"
      }
     },
     {
      "name": "form_factor",
      "in": "query",
      "required": false,
      "description": "`all`, `phone`, `desktop`, `tablet` or `each` (three results).",
      "schema": {
       "type": "string",
       "default": "all"
      }
     },
     {
      "name": "history",
      "in": "query",
      "required": false,
      "description": "`1`: weekly p75 series from the CrUX History API.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "weeks",
      "in": "query",
      "required": false,
      "description": "History length, 1–40 weekly periods.",
      "schema": {
       "type": "number",
       "default": 25
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "urls": {
          "type": "array",
          "items": {},
          "description": "Batch: up to 10 URLs / origins (array or comma-separated)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "origin": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "form_factor": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "key": {
           "type": "object",
           "properties": {
            "origin": {
             "type": "string"
            }
           }
          },
          "core_web_vitals": {
           "type": "string"
          },
          "cwv_metrics_used": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "metrics": {
           "type": "object",
           "properties": {
            "lcp": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "inp": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "cls": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "fcp": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            },
            "ttfb": {
             "type": "object",
             "properties": {
              "p75": {
               "type": "number"
              },
              "unit": {
               "type": "string"
              },
              "rating": {
               "type": "string"
              },
              "distribution": {
               "type": "object"
              },
              "thresholds": {
               "type": "object"
              }
             }
            }
           }
          },
          "round_trip_time_p75_ms": {
           "type": "number"
          },
          "navigation_types": {
           "type": "object",
           "properties": {
            "navigate": {
             "type": "number"
            },
            "reload": {
             "type": "number"
            },
            "back_forward": {
             "type": "number"
            }
           }
          },
          "form_factors": {
           "type": "object",
           "properties": {
            "phone": {
             "type": "number"
            },
            "desktop": {
             "type": "number"
            },
            "tablet": {
             "type": "number"
            }
           }
          },
          "collection_period": {
           "type": "object",
           "properties": {
            "first": {
             "type": "string"
            },
            "last": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/web-carbon": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Website Carbon Calculator",
    "description": "Give a `url` and the API loads the page like a first visit: the HTML, stylesheets, scripts, non-lazy images, preloads, icons, iframes and the web fonts referenced by same-site CSS (up to `max_resources`, default 40, max 80), and adds up the bytes sent over the network (Content-Length, or a gzip estimate for compressed responses without it). Or skip the crawl and send `bytes` yourself, e.g. the transfer size from DevTools, WebPageTest or `har-tools`.\n\nEmissions use the Sustainable Web Design model version 4 as implemented by CO2.js (Green Web Foundation): energy per gigabyte for data centres, networks and user devices, operational plus embodied, multiplied by grid carbon intensity — the world average (494 g/kWh) by default, or a country's average with `country=VN` (or per segment: `device_country`, `network_country`, `datacenter_country`). The result is grams CO2e per view, the SWD digital carbon rating from A+ (≤ 0.040 g) to F (> 0.359 g), and monthly / yearly totals with `views` (per month). `green=true` applies the green-hosting factor when your host runs on verified renewable energy (check it at thegreenwebfoundation.org; the API does not look it up).\n\nThe page report lists bytes by type, third-party bytes, the largest files and concrete suggestions: oversized images, JPEG / PNG that could be WebP / AVIF, heavy web fonts, third-party and total JavaScript, text files served without compression. It is an estimate: only static HTML is read (no JavaScript execution), so tag managers, lazy-loaded content and video streams are not counted.\n\nDocs: https://apibox.io.vn/docs/web-carbon/",
    "operationId": "webCarbonGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/web-carbon/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "Page to measure (or send `bytes`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "bytes",
      "in": "query",
      "required": false,
      "description": "Transfer size in bytes instead of crawling a URL.",
      "schema": {
       "type": "number"
      },
      "example": 2000000
     },
     {
      "name": "views",
      "in": "query",
      "required": false,
      "description": "Page views per month: adds monthly and yearly kg CO2e.",
      "schema": {
       "type": "number"
      },
      "example": 10000
     },
     {
      "name": "green",
      "in": "query",
      "required": false,
      "description": "`true` when the site runs on verified green hosting.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Grid intensity of a country for all segments (ISO alpha-2 or alpha-3, e.g. `VN`); or `device_country`, `network_country`, `datacenter_country`.",
      "schema": {
       "type": "string"
      },
      "example": "VN"
     },
     {
      "name": "max_resources",
      "in": "query",
      "required": false,
      "description": "Maximum sub-resources fetched (0–80).",
      "schema": {
       "type": "number",
       "default": 40
      }
     },
     {
      "name": "green_hosting_factor",
      "in": "query",
      "required": false,
      "description": "Advanced (0–1): share of data-centre energy that is renewable. Also `first_visit_ratio`, `return_visit_ratio`, `data_reload_ratio`.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "bytes": {
           "type": "number"
          },
          "green_hosting": {
           "type": "boolean"
          },
          "green_hosting_source": {
           "type": "string"
          },
          "co2e_grams_per_view": {
           "type": "number"
          },
          "co2e_grams_per_page_load": {
           "type": "number"
          },
          "rating": {
           "type": "string"
          },
          "rating_scale": {
           "type": "object",
           "properties": {
            "A+": {
             "type": "string"
            },
            "A": {
             "type": "string"
            },
            "B": {
             "type": "string"
            },
            "C": {
             "type": "string"
            },
            "D": {
             "type": "string"
            },
            "E": {
             "type": "string"
            },
            "F": {
             "type": "string"
            }
           }
          },
          "views_per_month": {
           "type": "number"
          },
          "co2e_kg_per_month": {
           "type": "number"
          },
          "co2e_kg_per_year": {
           "type": "number"
          },
          "variables": {
           "type": "object",
           "properties": {
            "grid_intensity_g_per_kwh": {
             "type": "object",
             "properties": {
              "device": {
               "type": "object"
              },
              "dataCenter": {
               "type": "object"
              },
              "network": {
               "type": "object"
              }
             }
            },
            "first_visit_ratio": {
             "type": "number"
            },
            "return_visit_ratio": {
             "type": "number"
            },
            "data_reload_ratio": {
             "type": "number"
            },
            "green_hosting_factor": {
             "type": "number"
            }
           }
          },
          "model": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "bytes": 2000000,
         "green_hosting": false,
         "green_hosting_source": "default (not green; pass green=true if your host is verified green, e.g. at thegreenwebfoundation.org)",
         "co2e_grams_per_view": 0.2933,
         "co2e_grams_per_page_load": 0.2933,
         "rating": "E",
         "rating_scale": {
          "A+": "≤ 0.040 g",
          "A": "≤ 0.079 g",
          "B": "≤ 0.145 g",
          "C": "≤ 0.209 g",
          "D": "≤ 0.278 g",
          "E": "≤ 0.359 g",
          "F": "> 0.359 g"
         },
         "views_per_month": 10000,
         "co2e_kg_per_month": 2.933,
         "co2e_kg_per_year": 35.196,
         "variables": {
          "grid_intensity_g_per_kwh": {
           "device": {
            "country": "VNM",
            "value": 486.13
           },
           "dataCenter": {
            "country": "VNM",
            "value": 486.13
           },
           "network": {
            "country": "VNM",
            "value": 486.13
           }
          },
          "first_visit_ratio": 1,
          "return_visit_ratio": 0,
          "data_reload_ratio": 0,
          "green_hosting_factor": 0
         },
         "model": "Sustainable Web Design model v4 (CO2.js 0.19 by the Green Web Foundation, Apache-2.0; grid intensity data from Ember, CC BY 4.0)",
         "disclaimer": "Estimate only: models average energy per byte; real emissions depend on networks, devices and hosting."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "Website Carbon Calculator",
    "description": "Give a `url` and the API loads the page like a first visit: the HTML, stylesheets, scripts, non-lazy images, preloads, icons, iframes and the web fonts referenced by same-site CSS (up to `max_resources`, default 40, max 80), and adds up the bytes sent over the network (Content-Length, or a gzip estimate for compressed responses without it). Or skip the crawl and send `bytes` yourself, e.g. the transfer size from DevTools, WebPageTest or `har-tools`.\n\nEmissions use the Sustainable Web Design model version 4 as implemented by CO2.js (Green Web Foundation): energy per gigabyte for data centres, networks and user devices, operational plus embodied, multiplied by grid carbon intensity — the world average (494 g/kWh) by default, or a country's average with `country=VN` (or per segment: `device_country`, `network_country`, `datacenter_country`). The result is grams CO2e per view, the SWD digital carbon rating from A+ (≤ 0.040 g) to F (> 0.359 g), and monthly / yearly totals with `views` (per month). `green=true` applies the green-hosting factor when your host runs on verified renewable energy (check it at thegreenwebfoundation.org; the API does not look it up).\n\nThe page report lists bytes by type, third-party bytes, the largest files and concrete suggestions: oversized images, JPEG / PNG that could be WebP / AVIF, heavy web fonts, third-party and total JavaScript, text files served without compression. It is an estimate: only static HTML is read (no JavaScript execution), so tag managers, lazy-loaded content and video streams are not counted.\n\nDocs: https://apibox.io.vn/docs/web-carbon/",
    "operationId": "webCarbonPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/web-carbon/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Page to measure (or send `bytes`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "bytes",
      "in": "query",
      "required": false,
      "description": "Transfer size in bytes instead of crawling a URL.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "views",
      "in": "query",
      "required": false,
      "description": "Page views per month: adds monthly and yearly kg CO2e.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "green",
      "in": "query",
      "required": false,
      "description": "`true` when the site runs on verified green hosting.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Grid intensity of a country for all segments (ISO alpha-2 or alpha-3, e.g. `VN`); or `device_country`, `network_country`, `datacenter_country`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "max_resources",
      "in": "query",
      "required": false,
      "description": "Maximum sub-resources fetched (0–80).",
      "schema": {
       "type": "number",
       "default": 40
      }
     },
     {
      "name": "green_hosting_factor",
      "in": "query",
      "required": false,
      "description": "Advanced (0–1): share of data-centre energy that is renewable. Also `first_visit_ratio`, `return_visit_ratio`, `data_reload_ratio`.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "bytes": {
           "type": "number"
          },
          "green_hosting": {
           "type": "boolean"
          },
          "green_hosting_source": {
           "type": "string"
          },
          "co2e_grams_per_view": {
           "type": "number"
          },
          "co2e_grams_per_page_load": {
           "type": "number"
          },
          "rating": {
           "type": "string"
          },
          "rating_scale": {
           "type": "object",
           "properties": {
            "A+": {
             "type": "string"
            },
            "A": {
             "type": "string"
            },
            "B": {
             "type": "string"
            },
            "C": {
             "type": "string"
            },
            "D": {
             "type": "string"
            },
            "E": {
             "type": "string"
            },
            "F": {
             "type": "string"
            }
           }
          },
          "views_per_month": {
           "type": "number"
          },
          "co2e_kg_per_month": {
           "type": "number"
          },
          "co2e_kg_per_year": {
           "type": "number"
          },
          "variables": {
           "type": "object",
           "properties": {
            "grid_intensity_g_per_kwh": {
             "type": "object",
             "properties": {
              "device": {
               "type": "object"
              },
              "dataCenter": {
               "type": "object"
              },
              "network": {
               "type": "object"
              }
             }
            },
            "first_visit_ratio": {
             "type": "number"
            },
            "return_visit_ratio": {
             "type": "number"
            },
            "data_reload_ratio": {
             "type": "number"
            },
            "green_hosting_factor": {
             "type": "number"
            }
           }
          },
          "model": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/ads-txt": {
   "get": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "ads.txt / app-ads.txt Validator",
    "description": "Buyers skip inventory that is not authorised in ads.txt (websites) or app-ads.txt (apps, on the developer website listed in the store). Give a `domain` (and `type=app-ads` for apps) and the API fetches `/ads.txt` over HTTPS (falling back to HTTP), follows redirects within the IAB rules (only one hop outside the root domain), and parses every line with the IAB Tech Lab ads.txt 1.1 grammar: records `<ad system domain>, <publisher ID>, <DIRECT|RESELLER>[, <certification authority ID>]` with optional `;` extensions, comments, and the variables `CONTACT`, `SUBDOMAIN`, `INVENTORYPARTNERDOMAIN`, `OWNERDOMAIN` and `MANAGERDOMAIN` (with optional country code). You can also post the file `content` before publishing it.\n\nEach issue has a level, a code and the line number: wrong field count, URLs instead of domains, invalid relationship (e.g. \"RESLLER\"), IDs with spaces, duplicates, accounts listed both as DIRECT and RESELLER, aliases such as `adsense.com` instead of `google.com`, a wrong Google TAG ID or publisher ID format, more than one OWNERDOMAIN or MANAGERDOMAIN per country, an HTML page served instead of the file, a wrong Content-Type. Pass `required` (the lines your ad networks ask for, e.g. the AdSense or AdMob line) to see which are missing.\n\n`sellers=1` cross-checks the publisher IDs with the `sellers.json` of the ad systems (the `max_systems` most used, default 5, max 10): whether each ID exists, the seller name and domain, and whether `seller_type` PUBLISHER / INTERMEDIARY matches DIRECT / RESELLER. Large files such as Google's (over 100 MB) are streamed and only the needed IDs are kept; results are cached for a day.\n\nDocs: https://apibox.io.vn/docs/ads-txt/",
    "operationId": "adsTxtGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ads-txt/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "description": "Website (or app developer website) to fetch the file from. Not needed with `content`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`ads` (ads.txt) or `app-ads` (app-ads.txt).",
      "schema": {
       "type": "string",
       "default": "ads"
      }
     },
     {
      "name": "sellers",
      "in": "query",
      "required": false,
      "description": "`1`: cross-check publisher IDs with the ad systems' sellers.json.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "max_systems",
      "in": "query",
      "required": false,
      "description": "Number of ad systems checked with sellers=1 (1–10, most used first).",
      "schema": {
       "type": "number",
       "default": 5
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum records returned (0–5000); issues are always complete up to 500.",
      "schema": {
       "type": "number",
       "default": 500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "stats": {
           "type": "object",
           "properties": {
            "lines": {
             "type": "number"
            },
            "records": {
             "type": "number"
            },
            "variables": {
             "type": "number"
            },
            "comments": {
             "type": "number"
            },
            "blank": {
             "type": "number"
            },
            "direct": {
             "type": "number"
            },
            "reseller": {
             "type": "number"
            },
            "ad_systems": {
             "type": "number"
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "issues": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "level": {
              "type": "string"
             },
             "code": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "line": {
              "type": "number"
             }
            }
           }
          },
          "variables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "value": {
              "type": "string"
             }
            }
           }
          },
          "records": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "domain": {
              "type": "string"
             },
             "account_id": {
              "type": "string"
             },
             "relationship": {
              "type": "string"
             },
             "cert_id": {}
            }
           }
          },
          "records_truncated": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Web & SEO"
    ],
    "summary": "ads.txt / app-ads.txt Validator",
    "description": "Buyers skip inventory that is not authorised in ads.txt (websites) or app-ads.txt (apps, on the developer website listed in the store). Give a `domain` (and `type=app-ads` for apps) and the API fetches `/ads.txt` over HTTPS (falling back to HTTP), follows redirects within the IAB rules (only one hop outside the root domain), and parses every line with the IAB Tech Lab ads.txt 1.1 grammar: records `<ad system domain>, <publisher ID>, <DIRECT|RESELLER>[, <certification authority ID>]` with optional `;` extensions, comments, and the variables `CONTACT`, `SUBDOMAIN`, `INVENTORYPARTNERDOMAIN`, `OWNERDOMAIN` and `MANAGERDOMAIN` (with optional country code). You can also post the file `content` before publishing it.\n\nEach issue has a level, a code and the line number: wrong field count, URLs instead of domains, invalid relationship (e.g. \"RESLLER\"), IDs with spaces, duplicates, accounts listed both as DIRECT and RESELLER, aliases such as `adsense.com` instead of `google.com`, a wrong Google TAG ID or publisher ID format, more than one OWNERDOMAIN or MANAGERDOMAIN per country, an HTML page served instead of the file, a wrong Content-Type. Pass `required` (the lines your ad networks ask for, e.g. the AdSense or AdMob line) to see which are missing.\n\n`sellers=1` cross-checks the publisher IDs with the `sellers.json` of the ad systems (the `max_systems` most used, default 5, max 10): whether each ID exists, the seller name and domain, and whether `seller_type` PUBLISHER / INTERMEDIARY matches DIRECT / RESELLER. Large files such as Google's (over 100 MB) are streamed and only the needed IDs are kept; results are cached for a day.\n\nDocs: https://apibox.io.vn/docs/ads-txt/",
    "operationId": "adsTxtPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/ads-txt/"
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "description": "Website (or app developer website) to fetch the file from. Not needed with `content`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`ads` (ads.txt) or `app-ads` (app-ads.txt).",
      "schema": {
       "type": "string",
       "default": "ads"
      }
     },
     {
      "name": "sellers",
      "in": "query",
      "required": false,
      "description": "`1`: cross-check publisher IDs with the ad systems' sellers.json.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "max_systems",
      "in": "query",
      "required": false,
      "description": "Number of ad systems checked with sellers=1 (1–10, most used first).",
      "schema": {
       "type": "number",
       "default": 5
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Maximum records returned (0–5000); issues are always complete up to 500.",
      "schema": {
       "type": "number",
       "default": 500
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "content": {
          "type": "string",
          "description": "File contents to validate instead of fetching (max 2 MB); a text/plain body works too."
         },
         "required": {
          "type": "string",
          "description": "Lines that must be present, one per line (or an array)."
         }
        }
       },
       "example": {
        "content": "OWNERDOMAIN=example.vn\ngoogle.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0\ngoogle.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0\nadsense.com, pub-1234567890123456, DIRECT\nopenx.com, 537120563, RESELLER, 6a698e2ec38604c6"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "found": {
           "type": "boolean"
          },
          "stats": {
           "type": "object",
           "properties": {
            "lines": {
             "type": "number"
            },
            "records": {
             "type": "number"
            },
            "variables": {
             "type": "number"
            },
            "comments": {
             "type": "number"
            },
            "blank": {
             "type": "number"
            },
            "direct": {
             "type": "number"
            },
            "reseller": {
             "type": "number"
            },
            "ad_systems": {
             "type": "number"
            }
           }
          },
          "valid": {
           "type": "boolean"
          },
          "errors": {
           "type": "number"
          },
          "warnings": {
           "type": "number"
          },
          "issues": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "level": {
              "type": "string"
             },
             "code": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "line": {
              "type": "number"
             }
            }
           }
          },
          "variables": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "name": {
              "type": "string"
             },
             "value": {
              "type": "string"
             }
            }
           }
          },
          "records": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "domain": {
              "type": "string"
             },
             "account_id": {
              "type": "string"
             },
             "relationship": {
              "type": "string"
             },
             "cert_id": {}
            }
           }
          },
          "records_truncated": {
           "type": "boolean"
          }
         }
        },
        "example": {
         "type": "ads",
         "found": true,
         "stats": {
          "lines": 5,
          "records": 4,
          "variables": 1,
          "comments": 0,
          "blank": 0,
          "direct": 3,
          "reseller": 1,
          "ad_systems": 3
         },
         "valid": true,
         "errors": 0,
         "warnings": 2,
         "issues": [
          {
           "level": "warning",
           "code": "duplicate",
           "message": "Duplicate of line 2",
           "line": 3
          },
          {
           "level": "warning",
           "code": "domain_alias",
           "message": "Use \"google.com\" as the ad system domain instead of \"adsense.com\"",
           "line": 4
          }
         ],
         "variables": [
          {
           "line": 1,
           "name": "OWNERDOMAIN",
           "value": "example.vn"
          }
         ],
         "records": [
          {
           "line": 2,
           "domain": "google.com",
           "account_id": "pub-1234567890123456",
           "relationship": "DIRECT",
           "cert_id": "f08c47fec0942fa0"
          },
          {
           "line": 3,
           "domain": "google.com",
           "account_id": "pub-1234567890123456",
           "relationship": "DIRECT",
           "cert_id": "f08c47fec0942fa0"
          },
          {
           "line": 4,
           "domain": "adsense.com",
           "account_id": "pub-1234567890123456",
           "relationship": "DIRECT",
           "cert_id": null
          },
          {
           "line": 5,
           "domain": "openx.com",
           "account_id": "537120563",
           "relationship": "RESELLER",
           "cert_id": "6a698e2ec38604c6"
          }
         ],
         "records_truncated": false
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/sbom-tools": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "SBOM Generator & Validator (CycloneDX / SPDX)",
    "description": "A Software Bill of Materials lists every component inside your software. The EU Cyber Resilience Act makes SBOMs mandatory for products sold in the EU (vulnerability reporting from 11 September 2026, full obligations from 11 December 2027), and US federal buyers already ask for them. `action=generate` builds one from a lockfile: `package-lock.json` / `npm-shrinkwrap.json`, `yarn.lock` (v1 and Berry), `pnpm-lock.yaml`, `requirements.txt` (pinned `==` lines), `poetry.lock`, `Pipfile.lock`, `composer.lock`, `go.sum` / `go.mod`, `Cargo.lock` and `Gemfile.lock`. Each component gets a package URL (purl), the lockfile hash (npm SHA-512 integrity, Cargo SHA-256 checksum, Composer SHA-1), the licence when the lockfile has it (normalised to an SPDX expression) and the dependency graph when the lockfile records it.\n\nOutput is CycloneDX 1.6 JSON (default) or SPDX 2.3 JSON (`output=spdx`); `download=1` returns the file itself. `action=validate` checks a CycloneDX (1.2–1.7) or SPDX 2.x JSON document: required fields, enumerations, unique bom-refs / SPDXIDs, references that resolve, hash length, purl syntax, SPDX licence expressions, plus the NTIA minimum elements (supplier, name, version, unique identifier, dependencies, author, timestamp) with coverage percentages. `action=convert` turns CycloneDX into SPDX and back, `action=diff` compares two SBOMs (added, removed, upgraded, downgraded, licence changes) and `action=merge` combines up to 20.\n\n`vulns=1` looks every component up on OSV.dev and adds the advisories (CycloneDX `vulnerabilities`, SPDX security references). The code is APIBox's own (no CycloneDX library); validation follows the specifications' rules but is not a full JSON Schema run. An SBOM built from a lockfile cannot see vendored code, native libraries or OS packages.\n\nDocs: https://apibox.io.vn/docs/sbom-tools/",
    "operationId": "sbomToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/sbom-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "generate",
          "description": "`generate`, `validate`, `convert`, `diff` or `merge` (alias `op`)."
         },
         "lockfile": {
          "type": "string",
          "description": "generate: lockfile text (or upload it as `file`, or send it as the raw body)."
         },
         "filename": {
          "type": "string",
          "description": "Lockfile name when the format cannot be detected (e.g. `poetry.lock`)."
         },
         "output": {
          "type": "string",
          "default": "cyclonedx",
          "description": "`cyclonedx` (1.6 JSON) or `spdx` (2.3 JSON)."
         },
         "name": {
          "type": "string",
          "description": "Name of your application (root component, alias `app_name`); `version`, `supplier`, `author`, `license` too."
         },
         "include_dev": {
          "type": "boolean",
          "default": true,
          "description": "`false` leaves out dev dependencies."
         },
         "vulns": {
          "type": "boolean",
          "description": "`1`: add known vulnerabilities from OSV.dev."
         },
         "sbom": {
          "type": "object",
          "description": "validate / convert: the SBOM (JSON object or text)."
         },
         "sbom_a": {
          "type": "object",
          "description": "diff: the old SBOM; `sbom_b` the new one. merge: `sboms` array."
         },
         "download": {
          "type": "boolean",
          "description": "`1`: return the SBOM file instead of JSON with a summary."
         }
        }
       },
       "example": {
        "action": "generate",
        "lockfile": "# yarn lockfile v1\n\n\"@babel/code-frame@^7.0.0\":\n  version \"7.12.13\"\n  resolved \"https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz\"\n  integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==\n  dependencies:\n    \"@babel/highlight\" \"^7.12.13\"\n\n\"@babel/highlight@^7.12.13\":\n  version \"7.13.10\"\n  integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==\n  dependencies:\n    js-tokens \"^4.0.0\"\n\njs-tokens@^4.0.0:\n  version \"4.0.0\"\n  integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\n",
        "name": "my-app",
        "version": "1.0.0"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "generate",
          "description": "`generate`, `validate`, `convert`, `diff` or `merge` (alias `op`)."
         },
         "lockfile": {
          "type": "string",
          "description": "generate: lockfile text (or upload it as `file`, or send it as the raw body)."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "Lockfile or SBOM file upload (multipart)."
         },
         "filename": {
          "type": "string",
          "description": "Lockfile name when the format cannot be detected (e.g. `poetry.lock`)."
         },
         "output": {
          "type": "string",
          "default": "cyclonedx",
          "description": "`cyclonedx` (1.6 JSON) or `spdx` (2.3 JSON)."
         },
         "name": {
          "type": "string",
          "description": "Name of your application (root component, alias `app_name`); `version`, `supplier`, `author`, `license` too."
         },
         "include_dev": {
          "type": "boolean",
          "default": true,
          "description": "`false` leaves out dev dependencies."
         },
         "vulns": {
          "type": "boolean",
          "description": "`1`: add known vulnerabilities from OSV.dev."
         },
         "sbom": {
          "type": "object",
          "description": "validate / convert: the SBOM (JSON object or text)."
         },
         "sbom_a": {
          "type": "object",
          "description": "diff: the old SBOM; `sbom_b` the new one. merge: `sboms` array."
         },
         "download": {
          "type": "boolean",
          "description": "`1`: return the SBOM file instead of JSON with a summary."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "input_format": {
           "type": "string"
          },
          "output": {
           "type": "string"
          },
          "summary": {
           "type": "object",
           "properties": {
            "components": {
             "type": "number"
            },
            "direct": {
             "type": "number"
            },
            "with_hashes": {
             "type": "number"
            },
            "with_licence": {
             "type": "number"
            },
            "by_type": {
             "type": "object",
             "properties": {
              "npm": {
               "type": "number"
              }
             }
            },
            "licences": {
             "type": "object",
             "properties": {
              "unknown": {
               "type": "number"
              }
             }
            }
           }
          },
          "note": {
           "type": "string"
          },
          "sbom": {
           "type": "object",
           "properties": {
            "$schema": {
             "type": "string"
            },
            "bomFormat": {
             "type": "string"
            },
            "specVersion": {
             "type": "string"
            },
            "serialNumber": {
             "type": "string"
            },
            "version": {
             "type": "number"
            },
            "metadata": {
             "type": "object",
             "properties": {
              "timestamp": {
               "type": "string"
              },
              "lifecycles": {
               "type": "array"
              },
              "tools": {
               "type": "object"
              },
              "component": {
               "type": "object"
              }
             }
            },
            "components": {
             "type": "array",
             "items": {}
            },
            "dependencies": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {}
             }
            }
           }
          }
         }
        },
        "example": {
         "action": "generate",
         "input_format": "yarn.lock",
         "output": "CycloneDX 1.6 JSON",
         "summary": {
          "components": 3,
          "direct": 1,
          "with_hashes": 3,
          "with_licence": 0,
          "by_type": {
           "npm": 3
          },
          "licences": {
           "unknown": 3
          }
         },
         "note": "Built from the lockfile only: vendored code, native libraries and system packages are not visible. Licences come from the lockfile when it has them (package-lock, composer.lock).",
         "sbom": {
          "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
          "bomFormat": "CycloneDX",
          "specVersion": "1.6",
          "serialNumber": "urn:uuid:da83b698-18a4-4fb0-adb4-731efa0d9901",
          "version": 1,
          "metadata": {
           "timestamp": "2026-11-15T16:20:25Z",
           "lifecycles": [
            {
             "phase": "build"
            }
           ],
           "tools": {
            "components": [
             {
              "type": "application",
              "name": "APIBox sbom-tools",
              "version": "1.0",
              "externalReferences": [
               {
                "type": "website",
                "url": "https://apibox.io.vn/docs/sbom-tools/"
               }
              ]
             }
            ]
           },
           "component": {
            "type": "application",
            "bom-ref": "root-component",
            "name": "my-app",
            "version": "1.0.0"
           }
          },
          "components": [
           {
            "type": "library",
            "bom-ref": "pkg:npm/%40babel/code-frame@7.12.13",
            "group": "@babel",
            "name": "code-frame",
            "version": "7.12.13",
            "hashes": [
             {
              "alg": "SHA-512",
              "content": "1d5d429b443766ba4247dded9163988ae60880bc595d91551b65602be3015a352a653ba776ea5b7f1d9a5daad7bb0e4aa3968c723b4981b4ace2f506052e6fea"
             }
            ],
            "purl": "pkg:npm/%40babel/code-frame@7.12.13",
            "externalReferences": [
             {
              "type": "distribution",
              "url": "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz"
             }
            ]
           },
           "…"
          ],
          "dependencies": [
           {
            "ref": "root-component",
            "dependsOn": [
             "pkg:npm/%40babel/code-frame@7.12.13"
            ]
           },
           {
            "ref": "pkg:npm/%40babel/code-frame@7.12.13",
            "dependsOn": [
             "pkg:npm/%40babel/highlight@7.13.10"
            ]
           },
           {
            "ref": "pkg:npm/%40babel/highlight@7.13.10",
            "dependsOn": [
             "pkg:npm/js-tokens@4.0.0"
            ]
           },
           {
            "ref": "pkg:npm/js-tokens@4.0.0",
            "dependsOn": []
           }
          ]
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/eol-check": {
   "get": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "End-of-Life Date Checker",
    "description": "Running software past its end of life means no more security fixes. Give a product and a version (`product=php&version=7.4.33`, `q=Ubuntu 20.04`, `product=windows server&version=2016`) and get its release cycle, release date, end of active support, end of life (end of security support), extended / commercial support where it exists, whether it is LTS, the latest patch release, whether your version is up to date and the number of days left. Without a version you get every cycle and the list still supported. Product names are matched with aliases (`node`, `postgres`, `k8s`, `mssql`, `.net`…) and versions with the longest matching cycle (`7.4.33` → `7.4`, `18.19.0` → `18`, codenames such as `bookworm`).\n\nBatch mode (`items` array, or `text` with one item per line) understands `nginx/1.18.0`, `PHP 8.1`, `node@18` and raw `Server:` / `X-Powered-By:` header lines, so you can feed it the output of the tech-detect or http-headers endpoints and flag everything that is out of support; the summary counts end_of_life, security_only, supported and unknown items. `format=ics` returns an iCalendar file with the upcoming milestones to subscribe to. Statuses are recomputed from the dates at request time (`date=` to check another day, `warn_days` for the \"EOL soon\" flag, default 180).\n\nData: endoflife.date (MIT licence), about 490 products and 9,400 release cycles, refreshed weekly. Dates are the vendors' published policies; some vendors sell longer paid support that is not always listed.\n\nDocs: https://apibox.io.vn/docs/eol-check/",
    "operationId": "eolCheckGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/eol-check/"
    },
    "parameters": [
     {
      "name": "product",
      "in": "query",
      "required": false,
      "description": "Product name, id or alias (`php`, `nodejs`, `ubuntu`, `windows-server`…).",
      "schema": {
       "type": "string"
      },
      "example": "php"
     },
     {
      "name": "version",
      "in": "query",
      "required": false,
      "description": "Version or cycle (`7.4.33`, `20.04`, `bookworm`). Omit to list all cycles.",
      "schema": {
       "type": "string"
      },
      "example": "7.4.33"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Free text instead of product + version, e.g. `PHP/7.4.33` or `Ubuntu 22.04`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`products` lists all products (filter with `category`, `search`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `ics` (calendar of upcoming milestones).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Check the status at this date (YYYY-MM-DD). Default today.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "warn_days",
      "in": "query",
      "required": false,
      "description": "Days before EOL that set `eol_soon`.",
      "schema": {
       "type": "number",
       "default": 180
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "data_generated_at": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "product": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "category": {
           "type": "string"
          },
          "aliases": {
           "type": "array"
          },
          "purl": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "cpe": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "version_command": {
           "type": "string"
          },
          "labels": {
           "type": "object",
           "properties": {
            "eoas": {
             "type": "string"
            },
            "discontinued": {},
            "eol": {
             "type": "string"
            },
            "eoes": {}
           }
          },
          "release_policy": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "cycle": {
           "type": "string"
          },
          "label": {
           "type": "string"
          },
          "release_date": {
           "type": "string"
          },
          "lts": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "maintained": {
           "type": "boolean"
          },
          "eol_soon": {
           "type": "boolean"
          },
          "active_support_until": {
           "type": "string"
          },
          "eol": {
           "type": "string"
          },
          "days_to_eol": {
           "type": "number"
          },
          "latest": {
           "type": "string"
          },
          "latest_date": {
           "type": "string"
          },
          "version": {
           "type": "string"
          },
          "up_to_date": {
           "type": "boolean"
          },
          "newest_cycle": {
           "type": "string"
          },
          "newest_latest": {
           "type": "string"
          }
         }
        },
        "example": {
         "source": "endoflife.date (https://endoflife.date), MIT licence",
         "data_generated_at": "2026-11-14T22:22:52+00:00",
         "as_of": "2026-11-15",
         "product": "php",
         "name": "PHP",
         "category": "lang",
         "aliases": [],
         "purl": [
          "pkg:deb/ubuntu/php",
          "pkg:deb/debian/php",
          "pkg:generic/php",
          "pkg:generic/php-cli",
          "pkg:generic/php-fpm"
         ],
         "cpe": [
          "cpe:2.3:a:php:php",
          "cpe:/a:php:php"
         ],
         "version_command": "php --version",
         "labels": {
          "eoas": "Active Support",
          "discontinued": null,
          "eol": "Security Support",
          "eoes": null
         },
         "release_policy": "https://www.php.net/supported-versions.php",
         "url": "https://endoflife.date/php",
         "cycle": "7.4",
         "label": "7.4",
         "release_date": "2019-11-28",
         "lts": false,
         "status": "end_of_life",
         "maintained": false,
         "eol_soon": false,
         "active_support_until": "2021-11-28",
         "eol": "2022-11-28",
         "days_to_eol": -1448,
         "latest": "7.4.33",
         "latest_date": "2022-11-03",
         "version": "7.4.33",
         "up_to_date": true,
         "newest_cycle": "8.5",
         "newest_latest": "8.5.12"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "End-of-Life Date Checker",
    "description": "Running software past its end of life means no more security fixes. Give a product and a version (`product=php&version=7.4.33`, `q=Ubuntu 20.04`, `product=windows server&version=2016`) and get its release cycle, release date, end of active support, end of life (end of security support), extended / commercial support where it exists, whether it is LTS, the latest patch release, whether your version is up to date and the number of days left. Without a version you get every cycle and the list still supported. Product names are matched with aliases (`node`, `postgres`, `k8s`, `mssql`, `.net`…) and versions with the longest matching cycle (`7.4.33` → `7.4`, `18.19.0` → `18`, codenames such as `bookworm`).\n\nBatch mode (`items` array, or `text` with one item per line) understands `nginx/1.18.0`, `PHP 8.1`, `node@18` and raw `Server:` / `X-Powered-By:` header lines, so you can feed it the output of the tech-detect or http-headers endpoints and flag everything that is out of support; the summary counts end_of_life, security_only, supported and unknown items. `format=ics` returns an iCalendar file with the upcoming milestones to subscribe to. Statuses are recomputed from the dates at request time (`date=` to check another day, `warn_days` for the \"EOL soon\" flag, default 180).\n\nData: endoflife.date (MIT licence), about 490 products and 9,400 release cycles, refreshed weekly. Dates are the vendors' published policies; some vendors sell longer paid support that is not always listed.\n\nDocs: https://apibox.io.vn/docs/eol-check/",
    "operationId": "eolCheckPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/eol-check/"
    },
    "parameters": [
     {
      "name": "product",
      "in": "query",
      "required": false,
      "description": "Product name, id or alias (`php`, `nodejs`, `ubuntu`, `windows-server`…).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "version",
      "in": "query",
      "required": false,
      "description": "Version or cycle (`7.4.33`, `20.04`, `bookworm`). Omit to list all cycles.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Free text instead of product + version, e.g. `PHP/7.4.33` or `Ubuntu 22.04`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`products` lists all products (filter with `category`, `search`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` or `ics` (calendar of upcoming milestones).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Check the status at this date (YYYY-MM-DD). Default today.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "warn_days",
      "in": "query",
      "required": false,
      "description": "Days before EOL that set `eol_soon`.",
      "schema": {
       "type": "number",
       "default": 180
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {},
          "description": "Batch: array of `{product, version}` objects or strings (max 500)."
         },
         "text": {
          "type": "string",
          "description": "Batch: one item per line; HTTP `Server:` / `X-Powered-By:` lines are understood."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "data_generated_at": {
           "type": "string"
          },
          "as_of": {
           "type": "string"
          },
          "product": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "category": {
           "type": "string"
          },
          "aliases": {
           "type": "array"
          },
          "purl": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "cpe": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "version_command": {
           "type": "string"
          },
          "labels": {
           "type": "object",
           "properties": {
            "eoas": {
             "type": "string"
            },
            "discontinued": {},
            "eol": {
             "type": "string"
            },
            "eoes": {}
           }
          },
          "release_policy": {
           "type": "string"
          },
          "url": {
           "type": "string"
          },
          "cycle": {
           "type": "string"
          },
          "label": {
           "type": "string"
          },
          "release_date": {
           "type": "string"
          },
          "lts": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "maintained": {
           "type": "boolean"
          },
          "eol_soon": {
           "type": "boolean"
          },
          "active_support_until": {
           "type": "string"
          },
          "eol": {
           "type": "string"
          },
          "days_to_eol": {
           "type": "number"
          },
          "latest": {
           "type": "string"
          },
          "latest_date": {
           "type": "string"
          },
          "version": {
           "type": "string"
          },
          "up_to_date": {
           "type": "boolean"
          },
          "newest_cycle": {
           "type": "string"
          },
          "newest_latest": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/apk-info": {
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "APK / AAB / IPA Inspector",
    "description": "Upload an app package and see what is inside without installing Android Studio or Xcode. For an APK APIBox reads the binary AndroidManifest.xml and resources.arsc itself: package name, versionCode / versionName, app label and launcher icon (resolved through the resources, `icon=1` returns the PNG), min / target / compile SDK, every permission marked normal, dangerous (runtime) or special, features, activities / services / receivers / providers with their exported state and intent filters, deep links and App Links (`autoVerify`), and warnings (debuggable, cleartext traffic, missing `android:exported` on targetSdk 31+, v1-only signature). Signatures are read from the APK Signing Block (v2, v3, v3.1) and the JAR v1 files: subject, issuer, validity and SHA-1 / SHA-256 fingerprints, the values you register for Google sign-in, Firebase or App Links.\n\nThe Google Play target API check uses the current rule: since 31 August 2026 new apps and updates must target Android 16 (API 36); Wear OS and Android Automotive OS apps 35, Android TV and XR apps 34. For an AAB the protobuf manifest is decoded (resource references are shown by name). For an IPA: bundle id, version and build, minimum iOS, device families, URL schemes, privacy usage descriptions, App Transport Security, background modes, frameworks, and the embedded provisioning profile (Team ID, profile type, expiry, provisioned devices, entitlements, associated domains, developer certificates).\n\nOnly the needed entries are decompressed. The file size limit follows your plan (Free 5 MB, Starter 20 MB, Pro 50 MB). Nothing is stored. The tool does not verify signatures cryptographically or scan code for malware.\n\nDocs: https://apibox.io.vn/docs/apk-info/",
    "operationId": "apkInfoPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/apk-info/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "icon": {
          "type": "boolean",
          "description": "`1`: include the APK launcher icon as a PNG / WebP data URL."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The .apk, .aab or .ipa (multipart, raw body or `file_base64`). Max size by plan."
         },
         "icon": {
          "type": "boolean",
          "description": "`1`: include the APK launcher icon as a PNG / WebP data URL."
         }
        },
        "required": [
         "file"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "file": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            },
            "entries": {
             "type": "number"
            }
           }
          },
          "platform": {
           "type": "string"
          },
          "format": {
           "type": "string"
          },
          "package": {
           "type": "string"
          },
          "version_code": {
           "type": "number"
          },
          "version_name": {
           "type": "string"
          },
          "label": {
           "type": "string"
          },
          "min_sdk": {
           "type": "number"
          },
          "target_sdk": {
           "type": "number"
          },
          "compile_sdk": {
           "type": "number"
          },
          "target_android": {
           "type": "string"
          },
          "google_play": {
           "type": "object",
           "properties": {
            "required_target_sdk": {
             "type": "number"
            },
            "form_factor": {
             "type": "string"
            },
            "rule_since": {
             "type": "string"
            },
            "existing_apps_min": {
             "type": "number"
            },
            "meets_requirement": {
             "type": "boolean"
            },
            "message": {
             "type": "string"
            },
            "source": {
             "type": "string"
            },
            "reviewed": {
             "type": "string"
            }
           }
          },
          "permissions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "level": {
              "type": "string"
             }
            }
           }
          },
          "permission_counts": {
           "type": "object",
           "properties": {
            "total": {
             "type": "number"
            },
            "dangerous": {
             "type": "number"
            },
            "special": {
             "type": "number"
            }
           }
          },
          "features": {
           "type": "array"
          },
          "deep_links": {
           "type": "array"
          },
          "components": {
           "type": "object",
           "properties": {
            "activities": {
             "type": "array",
             "items": {}
            },
            "services": {
             "type": "array"
            },
            "receivers": {
             "type": "array"
            },
            "providers": {
             "type": "array"
            }
           }
          },
          "exported_without_permission": {
           "type": "number"
          },
          "application": {
           "type": "object",
           "properties": {
            "name": {},
            "debuggable": {
             "type": "boolean"
            },
            "allow_backup": {
             "type": "boolean"
            },
            "uses_cleartext_traffic": {},
            "network_security_config": {
             "type": "boolean"
            },
            "icon": {
             "type": "string"
            }
           }
          },
          "warnings": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "native_abis": {
           "type": "array"
          },
          "dex_files": {
           "type": "number"
          },
          "icon": {
           "type": "object",
           "properties": {
            "path": {
             "type": "string"
            },
            "bytes": {
             "type": "number"
            }
           }
          },
          "signatures": {
           "type": "array",
           "items": {}
          },
          "signature_schemes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "ms": {
           "type": "number"
          }
         }
        },
        "example": {
         "file": {
          "name": "org.billthefarmer.shorty_116.apk",
          "bytes": 126299,
          "entries": 59
         },
         "platform": "android",
         "format": "apk",
         "package": "org.billthefarmer.shorty",
         "version_code": 116,
         "version_name": "1.16",
         "label": "Shorty",
         "min_sdk": 14,
         "target_sdk": 28,
         "compile_sdk": 28,
         "target_android": "9",
         "google_play": {
          "required_target_sdk": 36,
          "form_factor": "phone",
          "rule_since": "2026-08-31",
          "existing_apps_min": 35,
          "meets_requirement": false,
          "message": "targetSdk 28 is below the Google Play requirement: new apps and updates must target API 36 (Android 16) since 2026-08-31.",
          "source": "https://developer.android.com/google/play/requirements/target-sdk",
          "reviewed": "2026-11-15"
         },
         "permissions": [
          {
           "name": "android.permission.WRITE_EXTERNAL_STORAGE",
           "level": "dangerous"
          },
          {
           "name": "com.android.launcher.permission.INSTALL_SHORTCUT",
           "level": "custom / third-party"
          }
         ],
         "permission_counts": {
          "total": 2,
          "dangerous": 1,
          "special": 0
         },
         "features": [],
         "deep_links": [],
         "components": {
          "activities": [
           {
            "name": "org.billthefarmer.shorty.MainActivity",
            "exported": true,
            "launcher": true,
            "intent_filters": [
             {
              "actions": [
               "android.intent.action.MAIN"
              ],
              "categories": [
               "android.intent.category.LAUNCHER"
              ]
             }
            ]
           },
           "…"
          ],
          "services": [],
          "receivers": [],
          "providers": []
         },
         "exported_without_permission": 2,
         "application": {
          "name": null,
          "debuggable": false,
          "allow_backup": true,
          "uses_cleartext_traffic": null,
          "network_security_config": false,
          "icon": "res/I8.png"
         },
         "warnings": [
          "allowBackup is not false: app data can be included in device backups."
         ],
         "native_abis": [],
         "dex_files": 1,
         "icon": {
          "path": "res/I8.png",
          "bytes": 27959
         },
         "signatures": [
          {
           "scheme": "v2",
           "certificates": [
            {
             "subject": "C=UK, ST=ORG, L=ORG, O=fdroid.org, OU=FDroid, CN=FDroid",
             "issuer": "C=UK, ST=ORG, L=ORG, O=fdroid.org, OU=FDroid, CN=FDroid",
             "self_signed": true,
             "serial": "4c3f146e",
             "not_before": "2015-04-22T08:00:25.000Z",
             "not_after": "2042-09-07T08:00:25.000Z",
             "expired": false,
             "signature_algorithm": "SHA256withRSA",
             "public_key": "RSA 2048",
             "sha1": "41:4C:C9:7B:BF:CB:C3:0E:F6:15:97:F5:B2:E1:10:50:92:7E:E1:60",
             "sha256": "9B:BC:63:DE:B6:AB:8A:9B:94:76:EE:1B:05:0B:3A:84:A8:E6:48:06:6F:C9:F3:74:23:77:A1:B2:8A:8A:77:61"
            }
           ]
          },
          "… v3, v1 (JAR)"
         ],
         "signature_schemes": [
          "v2",
          "v3",
          "v1"
         ],
         "ms": 78
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/parquet-tools": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Parquet Viewer & Converter",
    "description": "Parquet is the column format of data lakes and exports from BigQuery, Snowflake, Databricks, AWS Cost and Usage Reports or Stripe Data Pipeline, but you need special software to open it. Upload a `.parquet` file (or give a public `url`) and the default `action=info` returns the row count, schema (logical types such as DECIMAL(12,2), TIMESTAMP, UTF8, nested groups), row groups with each column's codec, encodings, compressed size and min / max / null statistics, key-value metadata and a 10-row preview.\n\n`action=read` returns rows as JSON with `columns` (selection), `offset` / `limit` paging (up to 10,000 rows per call), a MongoDB-style `filter` (`{\"country\":\"VN\",\"amount\":{\"$gt\":100}}`) and `order_by`; `action=convert` downloads CSV (UTF-8 with BOM, opens in Excel) or NDJSON (up to 200,000 rows per call). 64-bit integers that do not fit in JavaScript numbers are returned as strings, dates as ISO 8601, binary as base64.\n\n`action=write` builds a Parquet file from JSON rows (`rows`), NDJSON or CSV (`csv`, types inferred: INT32 / INT64 / DOUBLE / BOOLEAN / STRING / JSON, or set `types`), compressed with SNAPPY (default), GZIP, BROTLI or none. Reading supports SNAPPY, GZIP, BROTLI and uncompressed files (ZSTD / LZ4 only where the runtime provides them). Built on hyparquet and hyparquet-writer (MIT). The file size limit follows your plan; files are processed in memory and not stored.\n\nDocs: https://apibox.io.vn/docs/parquet-tools/",
    "operationId": "parquetToolsPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/parquet-tools/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of a Parquet file instead of an upload."
         },
         "action": {
          "type": "string",
          "default": "info",
          "description": "`info` (schema + preview), `schema`, `read`, `convert` or `write` (alias `op`)."
         },
         "columns": {
          "type": "string",
          "description": "Comma-separated columns to read."
         },
         "offset": {
          "type": "number",
          "default": 0,
          "description": "First row (after filtering)."
         },
         "limit": {
          "type": "number",
          "default": 100,
          "description": "Rows to return (JSON max 10,000; CSV / NDJSON max 200,000)."
         },
         "filter": {
          "type": "object",
          "description": "MongoDB-style filter: `$eq $ne $gt $gte $lt $lte $in $nin $and $or $not`."
         },
         "order_by": {
          "type": "string",
          "description": "Sort by this column."
         },
         "format": {
          "type": "string",
          "description": "read / convert: `json`, `ndjson` or `csv`."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "write: JSON array of objects (or `csv` text)."
         },
         "response": {
          "type": "string",
          "description": "write: `json` returns `parquet_base64` in JSON instead of the .parquet file."
         },
         "compression": {
          "type": "string",
          "default": "snappy",
          "description": "write: `snappy`, `gzip`, `brotli` or `uncompressed`."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The Parquet file (multipart, raw body or `file_base64`); for `write`, a CSV / JSON file."
         },
         "url": {
          "type": "string",
          "description": "Public URL of a Parquet file instead of an upload."
         },
         "action": {
          "type": "string",
          "default": "info",
          "description": "`info` (schema + preview), `schema`, `read`, `convert` or `write` (alias `op`)."
         },
         "columns": {
          "type": "string",
          "description": "Comma-separated columns to read."
         },
         "offset": {
          "type": "number",
          "default": 0,
          "description": "First row (after filtering)."
         },
         "limit": {
          "type": "number",
          "default": 100,
          "description": "Rows to return (JSON max 10,000; CSV / NDJSON max 200,000)."
         },
         "filter": {
          "type": "object",
          "description": "MongoDB-style filter: `$eq $ne $gt $gte $lt $lte $in $nin $and $or $not`."
         },
         "order_by": {
          "type": "string",
          "description": "Sort by this column."
         },
         "format": {
          "type": "string",
          "description": "read / convert: `json`, `ndjson` or `csv`."
         },
         "rows": {
          "type": "array",
          "items": {},
          "description": "write: JSON array of objects (or `csv` text)."
         },
         "response": {
          "type": "string",
          "description": "write: `json` returns `parquet_base64` in JSON instead of the .parquet file."
         },
         "compression": {
          "type": "string",
          "default": "snappy",
          "description": "write: `snappy`, `gzip`, `brotli` or `uncompressed`."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "rows": {
           "type": "number"
          },
          "columns": {
           "type": "number"
          },
          "leaf_columns": {
           "type": "number"
          },
          "row_groups": {
           "type": "number"
          },
          "version": {
           "type": "number"
          },
          "created_by": {
           "type": "string"
          },
          "file_bytes": {
           "type": "number"
          },
          "footer_bytes": {
           "type": "number"
          },
          "codecs": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "schema": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "physical_type": {
              "type": "string"
             },
             "repetition": {
              "type": "string"
             }
            }
           }
          },
          "key_value_metadata": {
           "type": "array"
          },
          "row_group_details": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "rows": {
              "type": "number"
             },
             "total_byte_size": {
              "type": "number"
             },
             "columns": {
              "type": "array"
             }
            }
           }
          },
          "preview": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "number"
             },
             "city": {
              "type": "string"
             },
             "amount": {
              "type": "number"
             }
            }
           }
          }
         }
        },
        "example": {
         "rows": 3,
         "columns": 3,
         "leaf_columns": 3,
         "row_groups": 1,
         "version": 2,
         "created_by": "APIBox parquet-tools (hyparquet-writer)",
         "file_bytes": 453,
         "footer_bytes": 296,
         "codecs": [
          "SNAPPY"
         ],
         "schema": [
          {
           "name": "id",
           "type": "INT32",
           "physical_type": "INT32",
           "repetition": "OPTIONAL"
          },
          {
           "name": "city",
           "type": "UTF8",
           "physical_type": "BYTE_ARRAY",
           "repetition": "OPTIONAL"
          },
          {
           "name": "amount",
           "type": "DOUBLE",
           "physical_type": "DOUBLE",
           "repetition": "OPTIONAL"
          }
         ],
         "key_value_metadata": [],
         "row_group_details": [
          {
           "index": 0,
           "rows": 3,
           "total_byte_size": 143,
           "columns": [
            {
             "path": "id",
             "codec": "SNAPPY",
             "encodings": [
              "PLAIN"
             ],
             "compressed_bytes": 37,
             "uncompressed_bytes": 35,
             "values": 3,
             "min": 1,
             "max": 3,
             "null_count": 0
            },
            {
             "path": "city",
             "codec": "SNAPPY",
             "encodings": [
              "PLAIN"
             ],
             "compressed_bytes": 61,
             "uncompressed_bytes": 61,
             "values": 3,
             "min": "Hà Nội",
             "max": "Đà Nẵng",
             "null_count": 0
            },
            {
             "path": "amount",
             "codec": "SNAPPY",
             "encodings": [
              "PLAIN"
             ],
             "compressed_bytes": 47,
             "uncompressed_bytes": 47,
             "values": 3,
             "min": 99,
             "max": 250,
             "null_count": 0
            }
           ]
          }
         ],
         "preview": [
          {
           "id": 1,
           "city": "Hà Nội",
           "amount": 120.5
          },
          {
           "id": 2,
           "city": "Đà Nẵng",
           "amount": 99
          },
          {
           "id": 3,
           "city": "TP.HCM",
           "amount": 250
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/dbml": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "DBML ↔ SQL & ERD Diagram",
    "description": "DBML is the readable schema language of dbdiagram.io. Send `dbml` and get CREATE statements for `to=postgres` (default), `mysql`, `mssql` or `sqlite`: tables with schemas, column types, primary keys (also composite), `increment` (IDENTITY / AUTO_INCREMENT / AUTOINCREMENT), unique, not null, defaults (strings, numbers, booleans, `expressions`), enums (CREATE TYPE in PostgreSQL, ENUM in MySQL, CHECK constraints elsewhere), indexes (composite, expression, unique, named, `type: hash`), notes as COMMENT ON / COMMENT / extended properties, and foreign keys from inline or block refs (`>`, `<`, `-`, composite, `delete: cascade`). Many-to-many refs (`<>`) create a junction table.\n\nThe reverse works too: send `sql` (CREATE TABLE, CREATE INDEX, CREATE TYPE … AS ENUM, ALTER TABLE ADD FOREIGN KEY / PRIMARY KEY, COMMENT ON, MySQL inline KEY / ENUM / COMMENT, SQL Server [brackets] and IDENTITY) and get DBML, the JSON model (`to=json`) or the DDL of another database, e.g. MySQL dump to PostgreSQL.\n\n`to=svg` or `to=png` draws an entity-relationship diagram: tables placed in layers (referenced tables to the left of the tables that point to them), primary keys highlighted, foreign keys marked, crow's-foot ends for \"many\", header colours from `headercolor`, `theme=dark`. The parser is APIBox's own (no @dbml/core); TablePartial, records and DBML 3 sticky notes are not supported, and expression indexes are written as given for every database.\n\nDocs: https://apibox.io.vn/docs/dbml/",
    "operationId": "dbmlPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/dbml/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "dbml": {
          "type": "string",
          "description": "DBML source (or send `sql`)."
         },
         "sql": {
          "type": "string",
          "description": "SQL DDL (CREATE TABLE …) to convert."
         },
         "to": {
          "type": "string",
          "description": "`postgres` (default for DBML), `mysql`, `mssql`, `sqlite`, `dbml` (default for SQL), `json`, `svg` or `png`."
         },
         "theme": {
          "type": "string",
          "default": "light",
          "description": "ERD: `light` or `dark`."
         },
         "show_types": {
          "type": "boolean",
          "default": true,
          "description": "ERD: `false` hides column types."
         },
         "scale": {
          "type": "number",
          "default": 1,
          "description": "PNG scale (1–3)."
         }
        }
       },
       "example": {
        "dbml": "Table users {\n  id int [pk, increment]\n  email varchar(255) [unique, not null]\n}\n\nTable posts {\n  id int [pk]\n  user_id int [ref: > users.id]\n  title varchar\n}",
        "to": "postgres"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "tables": {
           "type": "number"
          },
          "columns": {
           "type": "number"
          },
          "refs": {
           "type": "number"
          },
          "enums": {
           "type": "number"
          },
          "indexes": {
           "type": "number"
          },
          "sql": {
           "type": "string"
          }
         }
        },
        "example": {
         "from": "dbml",
         "to": "postgres",
         "tables": 2,
         "columns": 5,
         "refs": 1,
         "enums": 0,
         "indexes": 0,
         "sql": "CREATE TABLE \"users\" (\n  \"id\" INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,\n  \"email\" varchar(255) UNIQUE NOT NULL\n);\n\nCREATE TABLE \"posts\" (\n  \"id\" int PRIMARY KEY,\n  \"user_id\" int,\n  \"title\" varchar\n);\n\nALTER TABLE \"posts\" ADD FOREIGN KEY (\"user_id\") REFERENCES \"users\" (\"id\");\n"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/crypto-address": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Crypto Wallet Address Validator & EVM ABI",
    "description": "A wrong character in a withdrawal address loses the money for good. `action=validate` (default) checks the format and checksum of an address and detects the network: Bitcoin legacy P2PKH / P2SH (base58check), SegWit v0 (bech32, BIP-173) and Taproot / v1+ (bech32m, BIP-350) on mainnet and testnet; Ethereum and every EVM chain with the EIP-55 mixed-case checksum (the correctly checksummed form is returned); TRON base58 addresses (the format USDT-TRC20 uses) and their 41… hex form; Solana (32-byte base58 keys); XRP classic addresses with destination tag and X-addresses; TON raw and user-friendly forms (bounceable / non-bounceable, CRC16); Litecoin, Dogecoin and Dash. `network=` restricts the check (e.g. `trc20`, `bsc`, `btc`) and explains when an address belongs to another chain. Send `addresses` to check up to 500 at once.\n\n`action=units` converts amounts exactly with big integers: wei / gwei / ether, sat / BTC, sun / TRX, lamports / SOL, drops / XRP, nanoton / TON, or any token with `decimals`; it refuses values with more decimals than the base unit allows instead of rounding.\n\n`action=abi` encodes and decodes Solidity ABI data from a JSON ABI (or a Hardhat / Foundry artifact) or human-readable signatures such as `transfer(address,uint256)`: calldata for a function call, decoding calldata (also `Error(string)` reverts and custom errors), return data and event logs (indexed topics + data), raw parameter encoding, with static and dynamic types, arrays and tuples. `action=selector` gives function selectors and event topics; `action=keccak` the keccak256 hash. Validation only: no network calls, no private keys, no transactions, and no sanctions screening.\n\nDocs: https://apibox.io.vn/docs/crypto-address/",
    "operationId": "cryptoAddressGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/crypto-address/"
    },
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": false,
      "description": "Address to validate (default action).",
      "schema": {
       "type": "string"
      },
      "example": "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed"
     },
     {
      "name": "network",
      "in": "query",
      "required": false,
      "description": "Expected network: `bitcoin`, `ethereum` (or `bsc`, `polygon`, `erc20`…), `tron` / `trc20`, `solana`, `xrp`, `ton`, `litecoin`, `dogecoin`, `dash`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "destination_tag",
      "in": "query",
      "required": false,
      "description": "XRP destination tag to check (0–4294967295).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`validate`, `units`, `abi`, `selector` or `keccak`.",
      "schema": {
       "type": "string",
       "default": "validate"
      }
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "units: the amount; `from` and `to` units (`wei`, `gwei`, `ether`, `sat`, `btc`, `sun`, `trx`, `token` + `decimals`…).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "address": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "network": {
           "type": "string"
          },
          "chain": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "checksummed": {
           "type": "string"
          },
          "checksum": {
           "type": "string"
          },
          "also_valid_on": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        },
        "example": {
         "address": "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed",
         "valid": true,
         "network": "ethereum",
         "chain": "EVM (Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Base, Avalanche C…)",
         "type": "account (EOA or contract)",
         "normalized": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
         "checksummed": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
         "checksum": "none (all lower / upper case)",
         "also_valid_on": [
          "every EVM chain (same address format)"
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "Crypto Wallet Address Validator & EVM ABI",
    "description": "A wrong character in a withdrawal address loses the money for good. `action=validate` (default) checks the format and checksum of an address and detects the network: Bitcoin legacy P2PKH / P2SH (base58check), SegWit v0 (bech32, BIP-173) and Taproot / v1+ (bech32m, BIP-350) on mainnet and testnet; Ethereum and every EVM chain with the EIP-55 mixed-case checksum (the correctly checksummed form is returned); TRON base58 addresses (the format USDT-TRC20 uses) and their 41… hex form; Solana (32-byte base58 keys); XRP classic addresses with destination tag and X-addresses; TON raw and user-friendly forms (bounceable / non-bounceable, CRC16); Litecoin, Dogecoin and Dash. `network=` restricts the check (e.g. `trc20`, `bsc`, `btc`) and explains when an address belongs to another chain. Send `addresses` to check up to 500 at once.\n\n`action=units` converts amounts exactly with big integers: wei / gwei / ether, sat / BTC, sun / TRX, lamports / SOL, drops / XRP, nanoton / TON, or any token with `decimals`; it refuses values with more decimals than the base unit allows instead of rounding.\n\n`action=abi` encodes and decodes Solidity ABI data from a JSON ABI (or a Hardhat / Foundry artifact) or human-readable signatures such as `transfer(address,uint256)`: calldata for a function call, decoding calldata (also `Error(string)` reverts and custom errors), return data and event logs (indexed topics + data), raw parameter encoding, with static and dynamic types, arrays and tuples. `action=selector` gives function selectors and event topics; `action=keccak` the keccak256 hash. Validation only: no network calls, no private keys, no transactions, and no sanctions screening.\n\nDocs: https://apibox.io.vn/docs/crypto-address/",
    "operationId": "cryptoAddressPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/crypto-address/"
    },
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": false,
      "description": "Address to validate (default action).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "network",
      "in": "query",
      "required": false,
      "description": "Expected network: `bitcoin`, `ethereum` (or `bsc`, `polygon`, `erc20`…), `tron` / `trc20`, `solana`, `xrp`, `ton`, `litecoin`, `dogecoin`, `dash`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "destination_tag",
      "in": "query",
      "required": false,
      "description": "XRP destination tag to check (0–4294967295).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`validate`, `units`, `abi`, `selector` or `keccak`.",
      "schema": {
       "type": "string",
       "default": "validate"
      }
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "description": "units: the amount; `from` and `to` units (`wei`, `gwei`, `ether`, `sat`, `btc`, `sun`, `trx`, `token` + `decimals`…).",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "addresses": {
          "type": "array",
          "items": {},
          "description": "Batch validation (max 500)."
         },
         "abi": {
          "type": "string",
          "description": "abi: JSON ABI, artifact or signatures (one per line). Or `signature` for selector."
         },
         "function": {
          "type": "string",
          "description": "abi encode / decode_output: function name or full signature; `args` array of values."
         },
         "data": {
          "type": "string",
          "description": "abi decode: calldata / return data / log data (hex); `topics` for logs."
         },
         "mode": {
          "type": "string",
          "description": "abi: `encode`, `decode`, `decode_output`, `decode_log`, `encode_params`, `decode_params` (auto-detected)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "address": {
           "type": "string"
          },
          "valid": {
           "type": "boolean"
          },
          "network": {
           "type": "string"
          },
          "chain": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "normalized": {
           "type": "string"
          },
          "checksummed": {
           "type": "string"
          },
          "checksum": {
           "type": "string"
          },
          "also_valid_on": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/xml-dsig": {
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "XML Signature Verifier (XMLDSig / XAdES)",
    "description": "Send an XML document (Vietnamese e-invoice, tax return, social insurance file, UBL / Peppol invoice, SAML message or any XML) and every `ds:Signature` in it is checked. For each `Reference` the target element is canonicalised (C14N 1.0 / 1.1, exclusive C14N, with or without comments; enveloped-signature and the `not(ancestor-or-self::ds:Signature)` XPath transform) and its digest compared: `modified_elements` names the element that was changed after signing, e.g. `/HDon/DLHDon` when an amount on an invoice was edited. The `SignatureValue` is then verified (RSA SHA-1 / 256 / 384 / 512, ECDSA P-256 / 384 / 521) over the canonical `SignedInfo`.\n\nThe signer certificate (embedded `X509Certificate`, or your own `cert`) is decoded with the Vietnamese identifiers commonly put in the subject (MST, CCCD, budget code), and its chain is built against the Vietnamese public CA list published by NEAC (rootca.gov.vn) and Ban Cơ yếu Chính phủ: `status` is `valid` (trusted chain or your certificate), `valid_untrusted` (mathematically valid, unknown issuer) or `invalid`. The signing time comes from XAdES `SigningTime` or the `SignatureProperties` used by Vietnamese e-invoices, with whether it is covered by the signature; XAdES `SigningCertificate` digests are compared too. On e-invoices the role (seller, buyer, tax authority) is read from `DSCKS`.\n\nSame-document references only; DTDs and custom entities are refused (XXE protection); max 1 MB. Revocation (OCSP / CRL) is not checked. The service never takes private keys and never signs. Technical check only, not a legal validation.\n\nDocs: https://apibox.io.vn/docs/xml-dsig/",
    "operationId": "xmlDsigPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/xml-dsig/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "The signed XML (or send it as a raw `application/xml` body, a multipart `file`, `xml_base64` or `xml_url`). Max 1 MB."
         },
         "cert": {
          "type": "string",
          "description": "Expected signer certificate(s), PEM or base64 DER: a signature verified with it gets status `valid`."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "The signed XML (or send it as a raw `application/xml` body, a multipart `file`, `xml_base64` or `xml_url`). Max 1 MB."
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "XML file (multipart)."
         },
         "cert": {
          "type": "string",
          "description": "Expected signer certificate(s), PEM or base64 DER: a signature verified with it gets status `valid`."
         }
        }
       }
      },
      "application/xml": {
       "schema": {
        "type": "string"
       },
       "example": "<ToKhai Id=\"tk1\"><MST>0101234567</MST><KyKKhai>10/2026</KyKKhai><Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo>…</SignedInfo><SignatureValue>…</SignatureValue><KeyInfo><X509Data><X509Certificate>MIIDoTCC…</X509Certificate></X509Data></KeyInfo></Signature></ToKhai>"
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "signature_count": {
           "type": "number"
          },
          "all_valid": {
           "type": "boolean"
          },
          "summary": {
           "type": "string"
          },
          "summary_vi": {
           "type": "string"
          },
          "signatures": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "id": {},
             "canonicalization": {
              "type": "string"
             },
             "signature_algorithm": {
              "type": "string"
             },
             "references": {
              "type": "array"
             },
             "modified_elements": {
              "type": "array"
             },
             "signature_valid": {
              "type": "boolean"
             },
             "digests_valid": {
              "type": "boolean"
             },
             "valid": {
              "type": "boolean"
             },
             "key_source": {
              "type": "string"
             },
             "signing_time": {},
             "signing_time_source": {},
             "certificate": {
              "type": "object"
             },
             "chain": {
              "type": "array"
             },
             "trusted_root": {
              "type": "boolean"
             },
             "trusted_root_name": {},
             "covers_document_content": {
              "type": "boolean"
             },
             "status": {
              "type": "string"
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "signature_count": 1,
         "all_valid": true,
         "summary": "All 1 signature(s) are cryptographically valid",
         "summary_vi": "Tất cả 1 chữ ký hợp lệ về mặt mật mã",
         "signatures": [
          {
           "path": "/ToKhai/Signature",
           "id": null,
           "canonicalization": "c14n",
           "signature_algorithm": "rsa-sha1",
           "references": [
            {
             "uri": "#tk1",
             "type": null,
             "target": "/ToKhai",
             "digest_algorithm": "sha1",
             "transforms": [
              "enveloped-signature",
              "c14n"
             ],
             "digest_valid": true
            }
           ],
           "modified_elements": [],
           "signature_valid": true,
           "digests_valid": true,
           "valid": true,
           "key_source": "embedded X509Certificate",
           "signing_time": null,
           "signing_time_source": null,
           "certificate": {
            "subject": {
             "C": "VN",
             "O": "CONG TY TEST",
             "CN": "CONG TY TNHH TEST",
             "UID": "MST:0101234567"
            },
            "common_name": "CONG TY TNHH TEST",
            "organization": "CONG TY TEST",
            "tax_code": "0101234567",
            "citizen_id": null,
            "budget_code": null,
            "issuer": "C=VN, O=CONG TY TEST, CN=CONG TY TNHH TEST, UID=MST:0101234567",
            "serial_number": "1AE94B54DF7EA46919E9A2FF7E43594FE7431E2E",
            "not_before": "2026-11-15T16:03:53.000Z",
            "not_after": "2036-11-12T16:03:53.000Z",
            "valid_at_signing": null,
            "expired_now": false,
            "sha256_fingerprint": "4d323f124af82795da1738852ebec9c98f533dbf61e7a8e3eb4c67c8c9539490"
           },
           "chain": [
            {
             "subject": "CONG TY TNHH TEST",
             "issuer": "CONG TY TNHH TEST",
             "not_after": "2036-11-12T16:03:53.000Z",
             "signature_verified_by_issuer": true,
             "in_vn_ca_list": false,
             "trust_anchor": false
            }
           ],
           "trusted_root": false,
           "trusted_root_name": null,
           "covers_document_content": true,
           "status": "valid_untrusted"
          }
         ],
         "notes": [
          "Revocation (OCSP / CRL) is not checked.",
          "trusted_root: the certificate chains to a Vietnamese public CA listed by NEAC (rootca.gov.vn) or Ban Cơ yếu Chính phủ."
         ],
         "disclaimer": "Technical check only, not a legal validation of the document."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/xsd-validate": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "XML Schema (XSD) Validator",
    "description": "Send the XML and its schema and get every validation error with `line`, `col`, `xpath` and the libxml2 message, plus a bilingual summary. The `stage` tells where it failed: `xsd_parse` (the schema is not well-formed), `xsd_compile` (the schema itself is wrong, e.g. an unknown type or a missing include), `xml_parse` (the document is not well-formed) or `validate`.\n\nSchemas split over several files (`xs:include`, `xs:import`, e.g. UBL 2.1, ISO 20022, Vietnamese e-invoice and tax XSD packages) are supported: upload them as a ZIP in `schema_zip` and name the entry point with `schema_main`, or pass `schemas` as a `{ \"file.xsd\": \"<xs:schema…>\" }` object. Files are resolved by their name or path inside the ZIP; nothing is fetched from the network.\n\nEngine: libxml2 (MIT) compiled to WebAssembly, running in a separate APIBox Worker. XML Schema 1.0 only (no XSD 1.1 assertions); Schematron rules are not evaluated. External entities are never loaded. XML and schema up to 10 MB each (less on the free plan).\n\nDocs: https://apibox.io.vn/docs/xsd-validate/",
    "operationId": "xsdValidatePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/xsd-validate/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "The XML document (or a multipart `xml` / `file` upload, `xml_base64`, `xml_url`)."
         },
         "xsd": {
          "type": "string",
          "description": "The schema (text, multipart `xsd`, `xsd_base64` or `xsd_url`)."
         },
         "schema_main": {
          "type": "string",
          "description": "Name of the main schema inside the ZIP."
         },
         "schemas": {
          "type": "object",
          "description": "Extra schema files `{ \"name.xsd\": \"<xs:schema…>\" }` for includes / imports."
         }
        },
        "required": [
         "xml"
        ]
       },
       "example": {
        "xml": "<invoice><no>A1</no><total>100</total></invoice>",
        "xsd": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"><xs:element name=\"invoice\"><xs:complexType><xs:sequence><xs:element name=\"no\" type=\"xs:int\"/><xs:element name=\"total\" type=\"xs:decimal\"/></xs:sequence></xs:complexType></xs:element></xs:schema>"
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "xml": {
          "type": "string",
          "description": "The XML document (or a multipart `xml` / `file` upload, `xml_base64`, `xml_url`)."
         },
         "xsd": {
          "type": "string",
          "description": "The schema (text, multipart `xsd`, `xsd_base64` or `xsd_url`)."
         },
         "schema_zip": {
          "type": "string",
          "format": "binary",
          "description": "ZIP with several .xsd files (multipart, `schema_zip_base64` or `schema_zip_url`)."
         },
         "schema_main": {
          "type": "string",
          "description": "Name of the main schema inside the ZIP."
         },
         "schemas": {
          "type": "object",
          "description": "Extra schema files `{ \"name.xsd\": \"<xs:schema…>\" }` for includes / imports."
         }
        },
        "required": [
         "xml"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "valid": {
           "type": "boolean"
          },
          "stage": {
           "type": "string"
          },
          "summary": {
           "type": "string"
          },
          "summary_vi": {
           "type": "string"
          },
          "error_count": {
           "type": "number"
          },
          "errors": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "line": {
              "type": "number"
             },
             "col": {
              "type": "number"
             },
             "level": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "xpath": {
              "type": "string"
             },
             "file": {
              "type": "string"
             }
            }
           }
          },
          "schema_files": {
           "type": "number"
          },
          "ms": {
           "type": "number"
          },
          "engine": {
           "type": "string"
          }
         }
        },
        "example": {
         "valid": false,
         "stage": "validate",
         "summary": "1 problem(s) at stage validate",
         "summary_vi": "XML không khớp XSD (1 lỗi)",
         "error_count": 1,
         "errors": [
          {
           "line": 1,
           "col": 0,
           "level": "error",
           "message": "Element 'no': 'A1' is not a valid value of the atomic type 'xs:int'.",
           "xpath": "/invoice/no",
           "file": "document.xml"
          }
         ],
         "schema_files": 1,
         "ms": 57,
         "engine": "libxml2 (XML Schema 1.0)"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/pdf-render": {
   "get": {
    "tags": [
     "Files"
    ],
    "summary": "PDF to Image (render pages)",
    "description": "Upload a PDF (multipart `file`, raw body with `Content-Type: application/pdf`, `file_base64`) or give its `url`, pick the `pages` (`1`, `1-3,5`, `last`, `all`) and the resolution (`dpi`, default 96, or an exact pixel `width`, or `scale`), and get each page as PNG or JPEG. The default JSON answer lists every page with its pixel and point size and the image as a data URI; `format=png` or `format=jpeg` returns the image of one `page` directly, handy for `<img src>` previews and chat bots.\n\nRendering uses PDFium, the PDF engine of Chrome (BSD / Apache-2.0, via @hyzyla/pdfium, MIT) compiled to WebAssembly and running in a separate APIBox Worker; standard PDF fonts are built in, form fields are drawn, encrypted files open with `password`. `text=true` also returns the text of each page. `transparent=true` keeps the page background transparent (PNG).\n\nLimits: PDF up to 20 MB (5 MB on the free plan), 20 pages per request (5 on Free), 12 megapixels per page and 30 MP per request: lower `dpi` or `width` for big pages.\n\nDocs: https://apibox.io.vn/docs/pdf-render/",
    "operationId": "pdfRenderGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-render/"
    },
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": false,
      "description": "Public URL of the PDF instead of an upload.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pages",
      "in": "query",
      "required": false,
      "description": "Pages for JSON output: `1`, `1-3,5`, `2-`, `last`, `all`.",
      "schema": {
       "type": "string",
       "default": "1"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "description": "The page returned with `format=png|jpeg`.",
      "schema": {
       "type": "number",
       "default": 1
      }
     },
     {
      "name": "dpi",
      "in": "query",
      "required": false,
      "description": "Resolution, 18-600.",
      "schema": {
       "type": "number",
       "default": 96
      }
     },
     {
      "name": "width",
      "in": "query",
      "required": false,
      "description": "Exact image width in pixels (overrides dpi).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json`, `png` or `jpeg` (binary image of one page).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "image_format",
      "in": "query",
      "required": false,
      "description": "Image type inside the JSON: `png` or `jpeg`; `quality` 10-100 for JPEG.",
      "schema": {
       "type": "string",
       "default": "png"
      }
     },
     {
      "name": "text",
      "in": "query",
      "required": false,
      "description": "Also return the text of each page.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "page_count": {
           "type": "number"
          },
          "image_format": {
           "type": "string"
          },
          "scale": {
           "type": "number"
          },
          "pages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "page": {
              "type": "number"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "width_pt": {
              "type": "number"
             },
             "height_pt": {
              "type": "number"
             },
             "bytes": {
              "type": "number"
             },
             "text": {
              "type": "string"
             },
             "image": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Files"
    ],
    "summary": "PDF to Image (render pages)",
    "description": "Upload a PDF (multipart `file`, raw body with `Content-Type: application/pdf`, `file_base64`) or give its `url`, pick the `pages` (`1`, `1-3,5`, `last`, `all`) and the resolution (`dpi`, default 96, or an exact pixel `width`, or `scale`), and get each page as PNG or JPEG. The default JSON answer lists every page with its pixel and point size and the image as a data URI; `format=png` or `format=jpeg` returns the image of one `page` directly, handy for `<img src>` previews and chat bots.\n\nRendering uses PDFium, the PDF engine of Chrome (BSD / Apache-2.0, via @hyzyla/pdfium, MIT) compiled to WebAssembly and running in a separate APIBox Worker; standard PDF fonts are built in, form fields are drawn, encrypted files open with `password`. `text=true` also returns the text of each page. `transparent=true` keeps the page background transparent (PNG).\n\nLimits: PDF up to 20 MB (5 MB on the free plan), 20 pages per request (5 on Free), 12 megapixels per page and 30 MP per request: lower `dpi` or `width` for big pages.\n\nDocs: https://apibox.io.vn/docs/pdf-render/",
    "operationId": "pdfRenderPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/pdf-render/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Public URL of the PDF instead of an upload."
         },
         "pages": {
          "type": "string",
          "default": "1",
          "description": "Pages for JSON output: `1`, `1-3,5`, `2-`, `last`, `all`."
         },
         "page": {
          "type": "number",
          "default": 1,
          "description": "The page returned with `format=png|jpeg`."
         },
         "dpi": {
          "type": "number",
          "default": 96,
          "description": "Resolution, 18-600."
         },
         "width": {
          "type": "number",
          "description": "Exact image width in pixels (overrides dpi)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `png` or `jpeg` (binary image of one page)."
         },
         "image_format": {
          "type": "string",
          "default": "png",
          "description": "Image type inside the JSON: `png` or `jpeg`; `quality` 10-100 for JPEG."
         },
         "text": {
          "type": "boolean",
          "default": false,
          "description": "Also return the text of each page."
         },
         "password": {
          "type": "string",
          "description": "Password of an encrypted PDF."
         }
        }
       }
      },
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary",
          "description": "The PDF (multipart, raw body with Content-Type application/pdf, or `file_base64`)."
         },
         "url": {
          "type": "string",
          "description": "Public URL of the PDF instead of an upload."
         },
         "pages": {
          "type": "string",
          "default": "1",
          "description": "Pages for JSON output: `1`, `1-3,5`, `2-`, `last`, `all`."
         },
         "page": {
          "type": "number",
          "default": 1,
          "description": "The page returned with `format=png|jpeg`."
         },
         "dpi": {
          "type": "number",
          "default": 96,
          "description": "Resolution, 18-600."
         },
         "width": {
          "type": "number",
          "description": "Exact image width in pixels (overrides dpi)."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json`, `png` or `jpeg` (binary image of one page)."
         },
         "image_format": {
          "type": "string",
          "default": "png",
          "description": "Image type inside the JSON: `png` or `jpeg`; `quality` 10-100 for JPEG."
         },
         "text": {
          "type": "boolean",
          "default": false,
          "description": "Also return the text of each page."
         },
         "password": {
          "type": "string",
          "description": "Password of an encrypted PDF."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "page_count": {
           "type": "number"
          },
          "image_format": {
           "type": "string"
          },
          "scale": {
           "type": "number"
          },
          "pages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "page": {
              "type": "number"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "width_pt": {
              "type": "number"
             },
             "height_pt": {
              "type": "number"
             },
             "bytes": {
              "type": "number"
             },
             "text": {
              "type": "string"
             },
             "image": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "example": {
         "source": "upload",
         "page_count": 3,
         "image_format": "png",
         "scale": 1,
         "pages": [
          {
           "page": 1,
           "width": 595,
           "height": 842,
           "width_pt": 595,
           "height_pt": 842,
           "bytes": 8794,
           "text": "Trang 1 - Hoá đơn giá trị gia tăng",
           "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlMAAANKCAIAAA…"
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/escpos-receipt": {
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "ESC/POS Receipt Generator (Vietnamese-safe)",
    "description": "Describe the receipt as `blocks` (`text` with align / bold / size / underline / invert, `row` with left and right text, `divider`, `feed`, `qr`, `barcode` (Code 128, EAN-13, Code 39), `image` (PNG / JPEG, dithered)) or as a simple `receipt` object (`store`, `header`, `title`, `info`, `items` with name / qty / price, `discount`, `vat`, `total`, `paid`, `qr`, `footer`) and get the ESC/POS byte stream (base64) plus a PNG preview of exactly what will print.\n\nThermal printers sold in Vietnam often have no Vietnamese code page, so `mode=raster` (default) draws all text with the Be Vietnam Pro font and sends the receipt as a GS v 0 bit image: diacritics print correctly on any ESC/POS printer. `mode=tcvn3` sends native text in the TCVN-3 code page (ESC t 30, Epson-compatible printers; faster, but toned capitals are missing), `mode=ascii` removes diacritics. In the text modes QR codes and barcodes use the printer’s own commands. `cut` (default on) adds a partial cut, `open_drawer=true` kicks the cash drawer.\n\nAPIBox cannot reach a printer on your network: send the bytes yourself through WebUSB, Web Bluetooth, a TCP socket to port 9100, or the RawBT app on Android. `format=bin` returns the raw bytes, `format=png` the preview only.\n\nDocs: https://apibox.io.vn/docs/escpos-receipt/",
    "operationId": "escposReceiptPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/escpos-receipt/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "receipt": {
          "type": "object",
          "description": "Simple receipt: `store`, `header`, `title`, `info`, `items` [{name, qty, price}], `discount`, `vat`, `total`, `paid`, `qr`, `qr_caption`, `barcode`, `footer`, `currency`."
         },
         "blocks": {
          "type": "array",
          "items": {},
          "description": "Layout blocks: `text`, `row`, `divider`, `feed`, `qr`, `barcode`, `image` (max 500)."
         },
         "paper": {
          "type": "string",
          "default": "80",
          "description": "`58` or `80` (mm)."
         },
         "mode": {
          "type": "string",
          "default": "raster",
          "description": "`raster` (text as image, any printer), `tcvn3` (code page 30) or `ascii` (no diacritics)."
         },
         "cut": {
          "type": "boolean",
          "default": true,
          "description": "Partial cut at the end."
         },
         "open_drawer": {
          "type": "boolean",
          "default": false,
          "description": "Kick the cash drawer."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (base64 + preview), `bin` (raw bytes) or `png` (preview)."
         }
        }
       },
       "example": {
        "paper": "58",
        "receipt": {
         "store": "Quán Cà Phê",
         "items": [
          {
           "name": "Cà phê sữa đá",
           "qty": 2,
           "price": 29000
          }
         ],
         "paid": 100000,
         "footer": "Cảm ơn quý khách!"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "paper_mm": {
           "type": "number"
          },
          "mode": {
           "type": "string"
          },
          "width_dots": {
           "type": "number"
          },
          "height_dots": {
           "type": "number"
          },
          "length_mm": {
           "type": "number"
          },
          "bytes": {
           "type": "number"
          },
          "escpos_base64": {
           "type": "string"
          },
          "preview_png": {
           "type": "string"
          },
          "warnings": {
           "type": "array"
          },
          "notes": {
           "type": "string"
          }
         }
        },
        "example": {
         "paper_mm": 58,
         "mode": "raster",
         "width_dots": 384,
         "height_dots": 318,
         "length_mm": 39.8,
         "bytes": 15289,
         "escpos_base64": "G0AddjAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…",
         "preview_png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAE+CAAAAA…",
         "warnings": [],
         "notes": "Raster mode (GS v 0) prints Vietnamese on any ESC/POS printer."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/zpl-render": {
   "get": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "ZPL Viewer (render ZPL to PNG / PDF)",
    "description": "Send ZPL (one or many `^XA … ^XZ` labels) with the printer density `dpmm` (6, 8 = 203 dpi default, 12 = 300 dpi, 24) and the label size in inches (`width` 4, `height` 6 by default; `^PW` / `^LL` in the code win when smaller), and get a PNG per label (JSON), one label as PNG (`format=png`, `index`), or all labels as a PDF whose pages have the real label size (`format=pdf`), ready for a laser printer or a PDF viewer.\n\nSupported commands: `^FO` `^FT` `^LH` `^PW` `^LL` `^LR` `^A` / `^CF` (font 0 scalable, bitmap fonts A–H, orientations N / R / I / B) `^FW` `^FB` (wrapping, justification, max lines) `^FD` `^FV` `^FS` `^FH` (hex escapes) `^FR` (reverse) `^GB` (boxes, lines, rounding) `^GC` `^GE` `^GD` `^GF` (ASCII hex, with ZPL compression) `^BY` `^BC` (Code 128) `^B3` (Code 39) `^BE` (EAN-13) `^BQ` (QR) `^CI28` (UTF-8: Vietnamese prints) `^PQ` `^FX`. Unsupported commands are listed in `warnings` (DataMatrix and PDF417 are drawn as placeholders).\n\nFonts are open substitutes (Be Vietnam Pro for font 0, JetBrains Mono for the bitmap fonts), so text widths differ slightly from a Zebra printer; positions, boxes and barcodes are exact dots. Up to 50 labels per request.\n\nDocs: https://apibox.io.vn/docs/zpl-render/",
    "operationId": "zplRenderGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/zpl-render/"
    },
    "parameters": [
     {
      "name": "zpl",
      "in": "query",
      "required": true,
      "description": "ZPL code (or a raw text body / `file`). Max 3 MB, 50 labels.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "dpmm",
      "in": "query",
      "required": false,
      "description": "Printer density: 6, 8, 12 or 24 dots per mm.",
      "schema": {
       "type": "number",
       "default": 8
      }
     },
     {
      "name": "width",
      "in": "query",
      "required": false,
      "description": "Label width in inches.",
      "schema": {
       "type": "number",
       "default": 4
      }
     },
     {
      "name": "height",
      "in": "query",
      "required": false,
      "description": "Label height in inches.",
      "schema": {
       "type": "number",
       "default": 6
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "description": "`json` (PNG per label), `png` (one label) or `pdf` (all labels).",
      "schema": {
       "type": "string",
       "default": "json"
      }
     },
     {
      "name": "index",
      "in": "query",
      "required": false,
      "description": "Render only this label (1-based).",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "label_count": {
           "type": "number"
          },
          "dpmm": {
           "type": "number"
          },
          "dpi": {
           "type": "number"
          },
          "labels": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "fields": {
              "type": "number"
             },
             "copies": {
              "type": "number"
             },
             "png": {
              "type": "string"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Images & Codes"
    ],
    "summary": "ZPL Viewer (render ZPL to PNG / PDF)",
    "description": "Send ZPL (one or many `^XA … ^XZ` labels) with the printer density `dpmm` (6, 8 = 203 dpi default, 12 = 300 dpi, 24) and the label size in inches (`width` 4, `height` 6 by default; `^PW` / `^LL` in the code win when smaller), and get a PNG per label (JSON), one label as PNG (`format=png`, `index`), or all labels as a PDF whose pages have the real label size (`format=pdf`), ready for a laser printer or a PDF viewer.\n\nSupported commands: `^FO` `^FT` `^LH` `^PW` `^LL` `^LR` `^A` / `^CF` (font 0 scalable, bitmap fonts A–H, orientations N / R / I / B) `^FW` `^FB` (wrapping, justification, max lines) `^FD` `^FV` `^FS` `^FH` (hex escapes) `^FR` (reverse) `^GB` (boxes, lines, rounding) `^GC` `^GE` `^GD` `^GF` (ASCII hex, with ZPL compression) `^BY` `^BC` (Code 128) `^B3` (Code 39) `^BE` (EAN-13) `^BQ` (QR) `^CI28` (UTF-8: Vietnamese prints) `^PQ` `^FX`. Unsupported commands are listed in `warnings` (DataMatrix and PDF417 are drawn as placeholders).\n\nFonts are open substitutes (Be Vietnam Pro for font 0, JetBrains Mono for the bitmap fonts), so text widths differ slightly from a Zebra printer; positions, boxes and barcodes are exact dots. Up to 50 labels per request.\n\nDocs: https://apibox.io.vn/docs/zpl-render/",
    "operationId": "zplRenderPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/zpl-render/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "zpl": {
          "type": "string",
          "description": "ZPL code (or a raw text body / `file`). Max 3 MB, 50 labels."
         },
         "dpmm": {
          "type": "number",
          "default": 8,
          "description": "Printer density: 6, 8, 12 or 24 dots per mm."
         },
         "width": {
          "type": "number",
          "default": 4,
          "description": "Label width in inches."
         },
         "height": {
          "type": "number",
          "default": 6,
          "description": "Label height in inches."
         },
         "format": {
          "type": "string",
          "default": "json",
          "description": "`json` (PNG per label), `png` (one label) or `pdf` (all labels)."
         },
         "index": {
          "type": "number",
          "description": "Render only this label (1-based)."
         }
        },
        "required": [
         "zpl"
        ]
       },
       "example": {
        "zpl": "^XA\n^FO40,40^A0N,40,40^FDXin chào^FS\n^FO40,100^BY2^BCN,80,Y,N,N^FD12345678^FS\n^XZ",
        "width": 2,
        "height": 1
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "label_count": {
           "type": "number"
          },
          "dpmm": {
           "type": "number"
          },
          "dpi": {
           "type": "number"
          },
          "labels": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "index": {
              "type": "number"
             },
             "width": {
              "type": "number"
             },
             "height": {
              "type": "number"
             },
             "fields": {
              "type": "number"
             },
             "copies": {
              "type": "number"
             },
             "png": {
              "type": "string"
             }
            }
           }
          },
          "warnings": {
           "type": "array"
          }
         }
        },
        "example": {
         "label_count": 1,
         "dpmm": 8,
         "dpi": 203,
         "labels": [
          {
           "index": 1,
           "width": 406,
           "height": 203,
           "fields": 2,
           "copies": 1,
           "png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZYAAADLCAAAAA…"
          }
         ],
         "warnings": []
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/i18n-convert": {
   "post": {
    "tags": [
     "Developer utilities"
    ],
    "summary": "Translation File Converter (i18n)",
    "description": "Read and write the common localisation formats through one model (key, value, plural forms, note, context, source text): JSON flat or nested (i18next, vue-i18n, with `_one` / `_other` plural suffixes), ARB (Flutter, `@key` descriptions, ICU plurals), XLIFF 1.2 and 2.0 (inline tags kept), gettext PO / POT (context, plurals, translator comments), iOS `.strings`, Android `strings.xml` (`string`, `plurals`, `string-array`, escapes), .NET `.resx`, Rails YAML and CSV for translators. `from` is detected from the content; set `to` and the target `locale`.\n\n`action=diff` compares a `base` file with one `translation` or several `translations` ({ \"vi\": …, \"ja\": … }) and lists missing, extra, untranslated and unchanged keys, placeholder mismatches (`{name}`, `{{name}}`, `%s`, `%1$d`, `%{name}`, `${name}`, ICU arguments), HTML tag mismatches and ICU MessageFormat syntax errors (e.g. a plural without `other`), with a coverage percentage. `action=pseudo` makes a pseudo-locale (accented, ~35 % longer, bracketed, placeholders and tags untouched) to find hard-coded strings and truncation. `action=parse` returns the entries.\n\nPass `source` (the source-language file) to fill XLIFF `<source>` and PO `msgid` with real text. `download=true` returns the file itself. Up to 5 MB and 50,000 keys.\n\nDocs: https://apibox.io.vn/docs/i18n-convert/",
    "operationId": "i18nConvertPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/i18n-convert/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "content": {
          "type": "string",
          "description": "The translation file (text, multipart `file` or raw body). For diff: `base`."
         },
         "action": {
          "type": "string",
          "default": "convert",
          "description": "`convert`, `parse`, `diff` or `pseudo` (alias `op`)."
         },
         "from": {
          "type": "string",
          "default": "auto",
          "description": "Input format: `json`, `json-nested`, `arb`, `xliff12`, `xliff20`, `po`, `strings`, `android`, `resx`, `yaml`, `csv`."
         },
         "to": {
          "type": "string",
          "description": "Output format (same list)."
         },
         "locale": {
          "type": "string",
          "description": "Target locale written into the file (XLIFF, ARB, PO, YAML)."
         },
         "source": {
          "type": "string",
          "description": "Source-language file: real text for XLIFF `<source>` / PO `msgid`."
         },
         "translation": {
          "type": "string",
          "description": "diff: one translation file; or `translations` { lang: file }."
         },
         "download": {
          "type": "boolean",
          "default": false,
          "description": "Return the converted file instead of JSON."
         }
        },
        "required": [
         "content"
        ]
       },
       "example": {
        "content": "{\"home\":{\"title\":\"Welcome, {{name}}!\",\"items_one\":\"{{count}} item\",\"items_other\":\"{{count}} items\"}}",
        "to": "po",
        "locale": "vi"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "locale": {
           "type": "string"
          },
          "count": {
           "type": "number"
          },
          "warnings": {
           "type": "array"
          },
          "output": {
           "type": "string"
          }
         }
        },
        "example": {
         "from": "json-nested",
         "to": "po",
         "locale": "vi",
         "count": 2,
         "warnings": [],
         "output": "msgid \"\"\nmsgstr \"\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Language: vi\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: home.title\nmsgid \"home.title\"\nmsgstr \"Welcome, {{name}}!\"\n\n#: home.items\nmsgid \"home.items\"\nmsgid_plural \"home.items\"\nmsgstr[0] \"{{count}} item\"\nmsgstr[1] \"{{count}} items\"\n"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-beneficial-owner": {
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Beneficial Owner Finder",
    "description": "Send the ownership structure – `entities` (individuals, organisations, legal arrangements such as trusts, state shareholders), `holdings` (who owns what percentage of the charter capital or voting shares) and optionally `controls` (rights over the company) and `managers` – and the API returns the individuals who are beneficial owners (chủ sở hữu hưởng lợi), with the basis, the direct, indirect and effective percentages and every ownership chain. Indirect ownership is the product of the percentages along a chain, summed over all chains; circular holdings are cut and reported.\n\nThe rule set follows the `date`: from 1/7/2025 Nghị định 168/2025/NĐ-CP Điều 17 (≥ 25 % ownership or a control right, applied side by side); from 23/7/2026 the replacement articles of Nghị định 296/2026/NĐ-CP, applied in order: tier 1 ownership ≥ 25 % (including family groups and contract groups that reach 25 % together, all general partners of a partnership, chains through legal arrangements), tier 2 control (appointing the board or director, amending the charter, changing the structure, deciding financial / investment policy, reorganising) only when nobody qualifies or a tier-1 holder is a nominee, tier 3 the manager with the greatest authority. State-capital representatives are excluded.\n\nThe answer includes a `declaration` table (name, direct / indirect percentage, control rights, basis) to copy into the business-registration filing. Data is processed in the request only and never stored.\n\nDocs: https://apibox.io.vn/docs/vn-beneficial-owner/",
    "operationId": "vnBeneficialOwnerPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-beneficial-owner/"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "company": {
          "type": "string",
          "description": "Id of the enterprise being declared (an entity of type organization)."
         },
         "entities": {
          "type": "array",
          "items": {},
          "description": "List of `{id, name, type}`; type `individual` (default), `organization`, `legal_arrangement` (with `parties: [{person, role}]`) or `state`. Optional `family_group`, `contract_group`, `general_partner`, `nominee`, `state_representative`."
         },
         "holdings": {
          "type": "array",
          "items": {},
          "description": "List of `{owner, owned, percent}` (percentage of charter capital or voting shares)."
         },
         "controls": {
          "type": "array",
          "items": {},
          "description": "List of `{holder, rights}`; rights: `appoint_board`, `appoint_director`, `amend_charter`, `change_structure`, `decide_policy` (from 23/7/2026), `reorganize_dissolve`."
         },
         "managers": {
          "type": "array",
          "items": {},
          "description": "List of `{person, title, highest_authority}` for the tier-3 fallback."
         },
         "company_type": {
          "type": "string",
          "description": "`partnership` to declare every general partner."
         },
         "date": {
          "type": "string",
          "description": "Date of the rules (YYYY-MM-DD), default today."
         }
        },
        "required": [
         "company",
         "entities",
         "holdings"
        ]
       },
       "example": {
        "company": "X",
        "date": "2026-11-15",
        "entities": [
         {
          "id": "X",
          "name": "Công ty CP X",
          "type": "organization"
         },
         {
          "id": "H",
          "name": "Công ty TNHH H",
          "type": "organization"
         },
         {
          "id": "A",
          "name": "Nguyễn Văn A"
         },
         {
          "id": "B",
          "name": "Trần Thị B"
         },
         {
          "id": "D",
          "name": "Phạm Văn D",
          "family_group": "gia đình Phạm"
         },
         {
          "id": "E",
          "name": "Phạm Thị E",
          "family_group": "gia đình Phạm"
         }
        ],
        "holdings": [
         {
          "owner": "A",
          "owned": "X",
          "percent": 20
         },
         {
          "owner": "H",
          "owned": "X",
          "percent": 40
         },
         {
          "owner": "A",
          "owned": "H",
          "percent": 30
         },
         {
          "owner": "B",
          "owned": "H",
          "percent": 70
         },
         {
          "owner": "D",
          "owned": "X",
          "percent": 15
         },
         {
          "owner": "E",
          "owned": "X",
          "percent": 12
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "company": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            }
           }
          },
          "date": {
           "type": "string"
          },
          "regime": {
           "type": "string"
          },
          "tiers_applied": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "beneficial_owners": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "basis": {
              "type": "array"
             },
             "effective_percent": {
              "type": "number"
             },
             "direct_percent": {
              "type": "number"
             },
             "indirect_percent": {
              "type": "number"
             },
             "paths": {
              "type": "array"
             },
             "basis_vi": {
              "type": "array"
             },
             "group": {
              "type": "string"
             },
             "group_percent": {
              "type": "number"
             }
            }
           }
          },
          "individuals": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "effective_percent": {
              "type": "number"
             },
             "direct_percent": {
              "type": "number"
             },
             "beneficial_owner": {
              "type": "boolean"
             }
            }
           }
          },
          "declaration": {
           "type": "array",
           "items": {}
          },
          "method": {
           "type": "string"
          },
          "control_rights": {
           "type": "string"
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             },
             "effective_to": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        },
        "example": {
         "company": {
          "id": "X",
          "name": "Công ty CP X"
         },
         "date": "2026-11-15",
         "regime": "NĐ 296/2026/NĐ-CP",
         "tiers_applied": [
          1
         ],
         "beneficial_owners": [
          {
           "id": "A",
           "name": "Nguyễn Văn A",
           "basis": [
            "ownership_25"
           ],
           "effective_percent": 32,
           "direct_percent": 20,
           "indirect_percent": 12,
           "paths": [
            {
             "chain": [
              "Nguyễn Văn A",
              "Công ty CP X"
             ],
             "percent": 20
            },
            {
             "chain": [
              "Nguyễn Văn A",
              "Công ty TNHH H",
              "Công ty CP X"
             ],
             "percent": 12
            }
           ],
           "basis_vi": [
            "Sở hữu trực tiếp / gián tiếp từ 25% vốn điều lệ hoặc cổ phần có quyền biểu quyết"
           ]
          },
          {
           "id": "B",
           "name": "Trần Thị B",
           "basis": [
            "ownership_25"
           ],
           "effective_percent": 28,
           "direct_percent": 0,
           "indirect_percent": 28,
           "paths": [
            {
             "chain": [
              "Trần Thị B",
              "Công ty TNHH H",
              "Công ty CP X"
             ],
             "percent": 28
            }
           ],
           "basis_vi": [
            "Sở hữu trực tiếp / gián tiếp từ 25% vốn điều lệ hoặc cổ phần có quyền biểu quyết"
           ]
          },
          {
           "id": "D",
           "name": "Phạm Văn D",
           "basis": [
            "family_group_25"
           ],
           "effective_percent": 15,
           "direct_percent": 15,
           "indirect_percent": 0,
           "paths": [
            {
             "chain": [
              "Phạm Văn D",
              "Công ty CP X"
             ],
             "percent": 15
            }
           ],
           "group": "gia đình Phạm",
           "group_percent": 27,
           "basis_vi": [
            "Nhóm cá nhân có quan hệ gia đình cùng sở hữu từ 25%"
           ]
          }
         ],
         "individuals": [
          {
           "id": "A",
           "name": "Nguyễn Văn A",
           "effective_percent": 32,
           "direct_percent": 20,
           "beneficial_owner": true
          },
          {
           "id": "B",
           "name": "Trần Thị B",
           "effective_percent": 28,
           "direct_percent": 0,
           "beneficial_owner": true
          },
          {
           "id": "D",
           "name": "Phạm Văn D",
           "effective_percent": 15,
           "direct_percent": 15,
           "beneficial_owner": true
          },
          {
           "id": "E",
           "name": "Phạm Thị E",
           "effective_percent": 12,
           "direct_percent": 12,
           "beneficial_owner": true
          }
         ],
         "declaration": [
          {
           "stt": 1,
           "ho_ten": "Nguyễn Văn A",
           "ty_le_so_huu_truc_tiep": 20,
           "ty_le_so_huu_gian_tiep": 12,
           "quyen_chi_phoi": null,
           "can_cu": "Sở hữu trực tiếp / gián tiếp từ 25% vốn điều lệ hoặc cổ phần có quyền biểu quyết"
          },
          {
           "stt": 2,
           "ho_ten": "Trần Thị B",
           "ty_le_so_huu_truc_tiep": 0,
           "ty_le_so_huu_gian_tiep": 28,
           "quyen_chi_phoi": null,
           "can_cu": "Sở hữu trực tiếp / gián tiếp từ 25% vốn điều lệ hoặc cổ phần có quyền biểu quyết"
          },
          "…"
         ],
         "method": "Indirect ownership = product of the percentages along each chain, summed over all chains (the decrees do not give a formula; this is the common practice). Control through an organisation is attributed to the individuals who hold > 50 % of it.",
         "control_rights": "…",
         "legal": [
          {
           "ref": "Luật Doanh nghiệp 59/2020/QH14 sửa đổi bởi Luật 76/2025/QH15 (Điều 4 khoản 35, Điều 11, 216a)",
           "effective_from": "2025-07-01"
          },
          {
           "ref": "Nghị định 168/2025/NĐ-CP Điều 17, 18 (bản gốc)",
           "effective_from": "2025-07-01",
           "effective_to": "2026-07-22"
          },
          {
           "ref": "Nghị định 296/2026/NĐ-CP Điều 3, 4 (thay thế Điều 17, 18 NĐ 168/2025)",
           "effective_from": "2026-07-23"
          }
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal / tax advice; check the official text.",
         "disclaimer_vi": "Chỉ mang tính tham khảo, không phải tư vấn pháp lý / thuế; đối chiếu văn bản gốc."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-pay-gateway": {
   "get": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "VNPay, MoMo, ZaloPay, OnePay Signature",
    "description": "`action=create` builds a ready request: the VNPay payment URL (vnp_ fields sorted, encoded like PHP urlencode, HMAC-SHA512 `vnp_SecureHash`, API 2.1.0), the MoMo v2 body with its HMAC-SHA256 `signature` over the fixed rawSignature, the ZaloPay order with `mac` = HMAC-SHA256(key1, app_id|app_trans_id|app_user|amount|app_time|embed_data|item), or the OnePay URL with the upper-case HMAC-SHA256 `vpc_SecureHash` (hex-decoded secure secret, sorted vpc_ / user_ fields). `action=query` signs the MoMo and ZaloPay status queries.\n\n`action=verify` takes the return URL / IPN query string (`query`) or the JSON body (`fields`) and recomputes the signature: `valid`, the expected and received values, the decoded order id, amount and response code, and `signed_data` – the exact string that was signed. Send your own signed string in `signed_data` and the answer points to the first character that differs. ZaloPay callbacks (`data` + `mac`, key2) and redirect checksums are supported. `action=codes` explains vnp_ResponseCode, vnp_TransactionStatus, MoMo resultCode, ZaloPay return_code / sub_return_code and OnePay vpc_TxnResponseCode in Vietnamese and English.\n\nThe API never contacts the gateways and never stores or returns the secret (`secret`, or `key1` / `key2` for ZaloPay). Use sandbox credentials while developing; keep production secrets on your own server.\n\nDocs: https://apibox.io.vn/docs/vn-pay-gateway/",
    "operationId": "vnPayGatewayGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pay-gateway/"
    },
    "parameters": [
     {
      "name": "provider",
      "in": "query",
      "required": true,
      "description": "`vnpay`, `momo`, `zalopay` or `onepay`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`create`, `verify`, `query` (MoMo, ZaloPay) or `codes` (alias `mode`).",
      "schema": {
       "type": "string",
       "default": "codes"
      }
     },
     {
      "name": "environment",
      "in": "query",
      "required": false,
      "description": "`sandbox` or `production` (gateway URLs).",
      "schema": {
       "type": "string",
       "default": "sandbox"
      }
     },
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Codes: one response code to explain.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "provider": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "environment": {
           "type": "string"
          },
          "payment_url": {
           "type": "string"
          },
          "fields": {
           "type": "object",
           "properties": {
            "vnp_Version": {
             "type": "string"
            },
            "vnp_Command": {
             "type": "string"
            },
            "vnp_TmnCode": {
             "type": "string"
            },
            "vnp_Amount": {
             "type": "string"
            },
            "vnp_CreateDate": {
             "type": "string"
            },
            "vnp_CurrCode": {
             "type": "string"
            },
            "vnp_IpAddr": {
             "type": "string"
            },
            "vnp_Locale": {
             "type": "string"
            },
            "vnp_OrderInfo": {
             "type": "string"
            },
            "vnp_OrderType": {
             "type": "string"
            },
            "vnp_ReturnUrl": {
             "type": "string"
            },
            "vnp_TxnRef": {
             "type": "string"
            },
            "vnp_ExpireDate": {
             "type": "string"
            },
            "vnp_SecureHash": {
             "type": "string"
            }
           }
          },
          "signed_data": {
           "type": "string"
          },
          "algorithm": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "secret_used": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Security & Crypto"
    ],
    "summary": "VNPay, MoMo, ZaloPay, OnePay Signature",
    "description": "`action=create` builds a ready request: the VNPay payment URL (vnp_ fields sorted, encoded like PHP urlencode, HMAC-SHA512 `vnp_SecureHash`, API 2.1.0), the MoMo v2 body with its HMAC-SHA256 `signature` over the fixed rawSignature, the ZaloPay order with `mac` = HMAC-SHA256(key1, app_id|app_trans_id|app_user|amount|app_time|embed_data|item), or the OnePay URL with the upper-case HMAC-SHA256 `vpc_SecureHash` (hex-decoded secure secret, sorted vpc_ / user_ fields). `action=query` signs the MoMo and ZaloPay status queries.\n\n`action=verify` takes the return URL / IPN query string (`query`) or the JSON body (`fields`) and recomputes the signature: `valid`, the expected and received values, the decoded order id, amount and response code, and `signed_data` – the exact string that was signed. Send your own signed string in `signed_data` and the answer points to the first character that differs. ZaloPay callbacks (`data` + `mac`, key2) and redirect checksums are supported. `action=codes` explains vnp_ResponseCode, vnp_TransactionStatus, MoMo resultCode, ZaloPay return_code / sub_return_code and OnePay vpc_TxnResponseCode in Vietnamese and English.\n\nThe API never contacts the gateways and never stores or returns the secret (`secret`, or `key1` / `key2` for ZaloPay). Use sandbox credentials while developing; keep production secrets on your own server.\n\nDocs: https://apibox.io.vn/docs/vn-pay-gateway/",
    "operationId": "vnPayGatewayPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-pay-gateway/"
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "description": "Codes: one response code to explain.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "provider": {
          "type": "string",
          "description": "`vnpay`, `momo`, `zalopay` or `onepay`."
         },
         "action": {
          "type": "string",
          "default": "codes",
          "description": "`create`, `verify`, `query` (MoMo, ZaloPay) or `codes` (alias `mode`)."
         },
         "secret": {
          "type": "string",
          "description": "vnp_HashSecret, MoMo secretKey or OnePay secure secret (hex). ZaloPay: `key1` (create / query) or `key2` (verify). Never returned."
         },
         "query": {
          "type": "string",
          "description": "Verify: the full return URL / IPN query string."
         },
         "fields": {
          "type": "object",
          "description": "Verify: the JSON body (MoMo IPN, ZaloPay callback); create: extra provider fields (vnp_…, vpc_…)."
         },
         "amount": {
          "type": "number",
          "description": "Create: amount in VND (the API multiplies by 100 where the gateway expects it)."
         },
         "order_id": {
          "type": "string",
          "description": "Create: your order reference (vnp_TxnRef, orderId, app_trans_id suffix, vpc_MerchTxnRef)."
         },
         "tmn_code / access_key / partner_code / app_id / merchant / access_code": {
          "type": "string",
          "description": "Create: merchant identifiers of VNPay / MoMo / ZaloPay / OnePay."
         },
         "return_url / ipn_url": {
          "type": "string",
          "description": "Create: customer return URL (MoMo redirectUrl) and MoMo ipnUrl."
         },
         "signed_data": {
          "type": "string",
          "description": "Verify: your own signed string, to locate the first difference."
         },
         "environment": {
          "type": "string",
          "default": "sandbox",
          "description": "`sandbox` or `production` (gateway URLs)."
         }
        },
        "required": [
         "provider"
        ]
       },
       "example": {
        "provider": "vnpay",
        "action": "create",
        "secret": "SANDBOXSECRETKEY0123456789ABCDEF",
        "tmn_code": "DEMOV210",
        "amount": 150000,
        "order_id": "DH001",
        "order_info": "Thanh toan don hang DH001",
        "return_url": "https://shop.example/vnpay_return",
        "create_date": "20261115103000",
        "expire_date": "20261115104500"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "provider": {
           "type": "string"
          },
          "action": {
           "type": "string"
          },
          "environment": {
           "type": "string"
          },
          "payment_url": {
           "type": "string"
          },
          "fields": {
           "type": "object",
           "properties": {
            "vnp_Version": {
             "type": "string"
            },
            "vnp_Command": {
             "type": "string"
            },
            "vnp_TmnCode": {
             "type": "string"
            },
            "vnp_Amount": {
             "type": "string"
            },
            "vnp_CreateDate": {
             "type": "string"
            },
            "vnp_CurrCode": {
             "type": "string"
            },
            "vnp_IpAddr": {
             "type": "string"
            },
            "vnp_Locale": {
             "type": "string"
            },
            "vnp_OrderInfo": {
             "type": "string"
            },
            "vnp_OrderType": {
             "type": "string"
            },
            "vnp_ReturnUrl": {
             "type": "string"
            },
            "vnp_TxnRef": {
             "type": "string"
            },
            "vnp_ExpireDate": {
             "type": "string"
            },
            "vnp_SecureHash": {
             "type": "string"
            }
           }
          },
          "signed_data": {
           "type": "string"
          },
          "algorithm": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "secret_used": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "provider": "vnpay",
         "action": "create",
         "environment": "sandbox",
         "payment_url": "https://sandbox.vnpayment.vn/paymentv2/vpcpay.html?vnp_Amount=15000000&vnp_Command=pay&vnp_CreateDate=20261115103000&vnp_CurrCode=VND&vnp_ExpireDate=20261115104500&vnp_IpAddr=127.0.0.1&vnp_Locale=vn&vnp_OrderInfo=Thanh+toan+don+hang+DH001&vnp_OrderType=other&vnp_ReturnUrl=https%3A%2F%2Fshop.example%2Fvnpay_return&vnp_TmnCode=DEMOV210&vnp_TxnRef=DH001&vnp_Version=2.1.0&vnp_SecureHash=764fe85f07a9a71b9ba519f7f36c1ec6798f78aa58f89fdd84defa720140866bd670b0612c646aeb95ea0e7cc5c9df2e09b9694c184a0cfb3f37af9bb3eaa3b9",
         "fields": {
          "vnp_Version": "2.1.0",
          "vnp_Command": "pay",
          "vnp_TmnCode": "DEMOV210",
          "vnp_Amount": "15000000",
          "vnp_CreateDate": "20261115103000",
          "vnp_CurrCode": "VND",
          "vnp_IpAddr": "127.0.0.1",
          "vnp_Locale": "vn",
          "vnp_OrderInfo": "Thanh toan don hang DH001",
          "vnp_OrderType": "other",
          "vnp_ReturnUrl": "https://shop.example/vnpay_return",
          "vnp_TxnRef": "DH001",
          "vnp_ExpireDate": "20261115104500",
          "vnp_SecureHash": "764fe85f07a9a71b9ba519f7f36c1ec6798f78aa58f89fdd84defa720140866bd670b0612c646aeb95ea0e7cc5c9df2e09b9694c184a0cfb3f37af9bb3eaa3b9"
         },
         "signed_data": "vnp_Amount=15000000&vnp_Command=pay&vnp_CreateDate=20261115103000&vnp_CurrCode=VND&vnp_ExpireDate=20261115104500&vnp_IpAddr=127.0.0.1&vnp_Locale=vn&vnp_OrderInfo=Thanh+toan+don+hang+DH001&vnp_OrderType=other&vnp_ReturnUrl=https%3A%2F%2Fshop.example%2Fvnpay_return&vnp_TmnCode=DEMOV210&vnp_TxnRef=DH001&vnp_Version=2.1.0",
         "algorithm": "HMAC-SHA512(vnp_HashSecret, signed_data), hex",
         "note": "Fields sorted by name, keys and values encoded like PHP urlencode (space = \"+\"), empty values skipped, vnp_SecureHash / vnp_SecureHashType excluded. Redirect the customer to payment_url; never trust the return URL alone – update the order from the IPN.",
         "secret_used": "in memory only, not logged or returned",
         "reviewed": "2026-11-15",
         "disclaimer": "Signing helper for integration and debugging. Prefer sandbox credentials; production secrets should stay on your own server."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-related-party": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Related-Party & Interest Cap",
    "description": "`action=relationship` checks the facts between two parties – shareholdings, a common third-party owner, loans or guarantees against owner’s equity and medium / long-term debt, appointed board members, family control, head office / PE, de-facto control, capital transfers and loans with individuals – against each point of Điều 5 khoản 2: Nghị định 132/2020/NĐ-CP, as amended by Nghị định 20/2025/NĐ-CP from tax year 2024 (independent bank loans excluded, independent branches, credit-institution groups) and Nghị định 255/2026/NĐ-CP from tax year 2026 (state debt-trading companies excluded, “mượn, cho mượn”). Each point says related / not related / not assessed.\n\n`action=interest_cap` computes, year by year, the deductible interest: net interest (interest − deposit interest − lending interest) capped at 30 % × (net business profit + net interest + depreciation), the disallowed part carried forward for at most 5 years and used first-in first-out when a later year is below the cap, expired amounts, and the Nghị định 20/2025 transition (2020–2023 amounts spread equally when the only related party was a bank). `action=exemptions` tells whether the taxpayer is exempt from declaring prices or from the TP documentation (revenue < 50 bn and related-party transactions < 30 bn, APA, low-risk with minimum margins 5 / 10 / 15 % – revenue < 200 bn until 2025, < 500 bn from 2026) and the CbCR threshold.\n\nDocs: https://apibox.io.vn/docs/vn-related-party/",
    "operationId": "vnRelatedPartyGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-related-party/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`relationship`, `interest_cap` or `exemptions` (alias `mode`).",
      "schema": {
       "type": "string",
       "default": "relationship"
      }
     },
     {
      "name": "tax_year",
      "in": "query",
      "required": false,
      "description": "Tax year (selects the decree). Default the current year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "a_holds_b_percent / b_holds_a_percent / third_party_in_a_percent / third_party_in_b_percent",
      "in": "query",
      "required": false,
      "description": "Relationship: shareholdings (direct + indirect, %).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "loan_balance / borrower_equity / borrower_medium_long_debt",
      "in": "query",
      "required": false,
      "description": "Relationship point d (VND); with `lender_is_credit_institution`, `lender_participates`, `common_control_with_lender`, `lender_is_state_debt_trading`.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "board_appointed_percent, common_board_percent, family_control, head_office_and_pe, controlled_by_same_individual, de_facto_control, independent_branch, capital_transfer_percent, individual_loan_percent, credit_institution_group",
      "in": "query",
      "required": false,
      "description": "Relationship: the other points (numbers or true / false).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "revenue, rpt_value, apa, intangibles, simple_functions, sector, margin, domestic_same_rate_no_incentive",
      "in": "query",
      "required": false,
      "description": "Exemptions: revenue and related-party transaction value (VND), sector `distribution` / `manufacturing` / `processing`, margin %.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "formula_vi": {
           "type": "string"
          },
          "exclusions_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "schedule": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "number"
             },
             "regime": {
              "type": "string"
             },
             "net_interest_expense": {
              "type": "number"
             },
             "cap_base": {
              "type": "number"
             },
             "cap": {
              "type": "number"
             },
             "deductible_current_year": {
              "type": "number"
             },
             "disallowed_current_year": {
              "type": "number"
             },
             "carried_forward_used": {
              "type": "array"
             },
             "total_deductible": {
              "type": "number"
             },
             "expired_unused": {
              "type": "array"
             },
             "carried_forward_balance": {
              "type": "array"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "applies": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Related-Party & Interest Cap",
    "description": "`action=relationship` checks the facts between two parties – shareholdings, a common third-party owner, loans or guarantees against owner’s equity and medium / long-term debt, appointed board members, family control, head office / PE, de-facto control, capital transfers and loans with individuals – against each point of Điều 5 khoản 2: Nghị định 132/2020/NĐ-CP, as amended by Nghị định 20/2025/NĐ-CP from tax year 2024 (independent bank loans excluded, independent branches, credit-institution groups) and Nghị định 255/2026/NĐ-CP from tax year 2026 (state debt-trading companies excluded, “mượn, cho mượn”). Each point says related / not related / not assessed.\n\n`action=interest_cap` computes, year by year, the deductible interest: net interest (interest − deposit interest − lending interest) capped at 30 % × (net business profit + net interest + depreciation), the disallowed part carried forward for at most 5 years and used first-in first-out when a later year is below the cap, expired amounts, and the Nghị định 20/2025 transition (2020–2023 amounts spread equally when the only related party was a bank). `action=exemptions` tells whether the taxpayer is exempt from declaring prices or from the TP documentation (revenue < 50 bn and related-party transactions < 30 bn, APA, low-risk with minimum margins 5 / 10 / 15 % – revenue < 200 bn until 2025, < 500 bn from 2026) and the CbCR threshold.\n\nDocs: https://apibox.io.vn/docs/vn-related-party/",
    "operationId": "vnRelatedPartyPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-related-party/"
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "default": "relationship",
          "description": "`relationship`, `interest_cap` or `exemptions` (alias `mode`)."
         },
         "tax_year": {
          "type": "number",
          "description": "Tax year (selects the decree). Default the current year."
         },
         "a_holds_b_percent / b_holds_a_percent / third_party_in_a_percent / third_party_in_b_percent": {
          "type": "number",
          "description": "Relationship: shareholdings (direct + indirect, %)."
         },
         "loan_balance / borrower_equity / borrower_medium_long_debt": {
          "type": "number",
          "description": "Relationship point d (VND); with `lender_is_credit_institution`, `lender_participates`, `common_control_with_lender`, `lender_is_state_debt_trading`."
         },
         "board_appointed_percent, common_board_percent, family_control, head_office_and_pe, controlled_by_same_individual, de_facto_control, independent_branch, capital_transfer_percent, individual_loan_percent, credit_institution_group": {
          "type": "string",
          "description": "Relationship: the other points (numbers or true / false)."
         },
         "years": {
          "type": "array",
          "items": {},
          "description": "Interest cap: `[{year, net_profit, interest_expense, deposit_interest, lending_interest, depreciation, excluded_interest}]` (consecutive years, VND)."
         },
         "carried_forward": {
          "type": "array",
          "items": {},
          "description": "Interest cap: amounts brought forward `[{from_year, amount}]`."
         },
         "no_related_party_from_2024 / exempt_taxpayer": {
          "type": "boolean",
          "description": "Interest cap: NĐ 20/2025 transition case; credit institution / insurer."
         },
         "revenue, rpt_value, apa, intangibles, simple_functions, sector, margin, domestic_same_rate_no_incentive": {
          "type": "string",
          "description": "Exemptions: revenue and related-party transaction value (VND), sector `distribution` / `manufacturing` / `processing`, margin %."
         }
        }
       },
       "example": {
        "action": "interest_cap",
        "years": [
         {
          "year": 2025,
          "net_profit": 10000000000,
          "interest_expense": 8000000000,
          "deposit_interest": 500000000,
          "depreciation": 2000000000
         },
         {
          "year": 2026,
          "net_profit": 20000000000,
          "interest_expense": 3000000000,
          "depreciation": 2000000000
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "formula_vi": {
           "type": "string"
          },
          "exclusions_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "schedule": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "number"
             },
             "regime": {
              "type": "string"
             },
             "net_interest_expense": {
              "type": "number"
             },
             "cap_base": {
              "type": "number"
             },
             "cap": {
              "type": "number"
             },
             "deductible_current_year": {
              "type": "number"
             },
             "disallowed_current_year": {
              "type": "number"
             },
             "carried_forward_used": {
              "type": "array"
             },
             "total_deductible": {
              "type": "number"
             },
             "expired_unused": {
              "type": "array"
             },
             "carried_forward_balance": {
              "type": "array"
             }
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "applies": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "interest_cap",
         "formula_vi": "Tổng chi phí lãi vay (sau khi trừ lãi tiền gửi và lãi cho vay) được trừ không vượt quá 30% × (lợi nhuận thuần từ hoạt động kinh doanh + chi phí lãi vay sau khi trừ lãi tiền gửi và lãi cho vay + chi phí khấu hao) trong kỳ. Phần vượt được chuyển sang kỳ sau khi chi phí lãi vay của kỳ đó thấp hơn mức khống chế, liên tục không quá 5 năm kể từ năm sau năm phát sinh.",
         "exclusions_vi": [
          "Người nộp thuế là tổ chức tín dụng, doanh nghiệp bảo hiểm (exempt_taxpayer=true)",
          "Khoản vay ODA, vay ưu đãi của Chính phủ, vay thực hiện chương trình mục tiêu quốc gia, chính sách an sinh xã hội… (nhập vào excluded_interest)"
         ],
         "schedule": [
          {
           "year": 2025,
           "regime": "NĐ 132/2020 Điều 16 khoản 3",
           "net_interest_expense": 7500000000,
           "cap_base": 19500000000,
           "cap": 5850000000,
           "deductible_current_year": 5850000000,
           "disallowed_current_year": 1650000000,
           "carried_forward_used": [],
           "total_deductible": 5850000000,
           "expired_unused": [],
           "carried_forward_balance": [
            {
             "from_year": 2025,
             "amount": 1650000000,
             "usable_until": 2030
            }
           ]
          },
          {
           "year": 2026,
           "regime": "NĐ 255/2026 Điều 16 khoản 3",
           "net_interest_expense": 3000000000,
           "cap_base": 25000000000,
           "cap": 7500000000,
           "deductible_current_year": 3000000000,
           "disallowed_current_year": 0,
           "carried_forward_used": [
            {
             "from_year": 2025,
             "amount": 1650000000,
             "rule": "within the 30 % cap"
            }
           ],
           "total_deductible": 4650000000,
           "expired_unused": [],
           "carried_forward_balance": []
          }
         ],
         "legal": [
          {
           "ref": "Nghị định 132/2020/NĐ-CP Điều 16 khoản 3",
           "applies": "tax years 2020–2025"
          },
          {
           "ref": "Nghị định 20/2025/NĐ-CP Điều 2 (chuyển tiếp 2020–2023)",
           "effective_from": "2025-03-27"
          },
          {
           "ref": "Nghị định 255/2026/NĐ-CP Điều 16 khoản 3",
           "applies": "tax years from 2026",
           "effective_from": "2026-07-01"
          }
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal / tax advice; check the official text.",
         "disclaimer_vi": "Chỉ mang tính tham khảo, không phải tư vấn pháp lý / thuế; đối chiếu văn bản gốc."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-sme-size": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam SME Size & Accounting Regime",
    "description": "Give the `sector` (agriculture, industry and construction, trade and services) or the main business line as a VSIC code (`vsic`, section letter or number), the average number of employees with social insurance, last year’s total revenue and/or total capital. The API applies Nghị định 80/2021/NĐ-CP Điều 5: the employee limit AND either the revenue or the capital limit; enterprises under one year or without revenue are sized by capital. The thresholds of the three sizes are returned for comparison.\n\nIt also lists the accounting regimes that may be chosen on `date` – Thông tư 58/2026/TT-BTC for micro enterprises from 1/7/2026 (before: TT 132/2018), Thông tư 133/2016/TT-BTC for SMEs, Thông tư 99/2025/TT-BTC (from 1/1/2026, replacing TT 200/2014) – and the CIT rate by revenue under Luật Thuế TNDN 67/2025/QH15 (15 % up to 3 bn, 17 % up to 50 bn, otherwise 20 %). The pending amendment of the SME Support Law (draft: ≤ 300 employees, revenue ≤ 400 bn) is shown as `pending`.\n\nDocs: https://apibox.io.vn/docs/vn-sme-size/",
    "operationId": "vnSmeSizeGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sme-size/"
    },
    "parameters": [
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "`agriculture`, `industry` (incl. construction) or `trade` (incl. services). Or use `vsic`.",
      "schema": {
       "type": "string"
      },
      "example": "trade"
     },
     {
      "name": "vsic",
      "in": "query",
      "required": false,
      "description": "Main business line: VSIC section letter (A–U) or code (e.g. `4100`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "employees",
      "in": "query",
      "required": true,
      "description": "Average employees with social insurance in the year.",
      "schema": {
       "type": "number"
      },
      "example": 40
     },
     {
      "name": "revenue",
      "in": "query",
      "required": false,
      "description": "Total revenue of the previous year (VND).",
      "schema": {
       "type": "number"
      },
      "example": 80000000000
     },
     {
      "name": "capital",
      "in": "query",
      "required": false,
      "description": "Total capital (tổng nguồn vốn, VND).",
      "schema": {
       "type": "number"
      },
      "example": 30000000000
     },
     {
      "name": "under_one_year",
      "in": "query",
      "required": false,
      "description": "Enterprise under one year old (sized by capital).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date for the accounting regimes (YYYY-MM-DD), default today.",
      "schema": {
       "type": "string"
      },
      "example": "2026-11-15"
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sector": {
           "type": "string"
          },
          "sector_vi": {
           "type": "string"
          },
          "sector_from": {
           "type": "string"
          },
          "size": {
           "type": "string"
          },
          "size_vi": {
           "type": "string"
          },
          "inputs": {
           "type": "object",
           "properties": {
            "employees": {
             "type": "number"
            },
            "revenue": {
             "type": "number"
            },
            "capital": {
             "type": "number"
            },
            "under_one_year": {
             "type": "boolean"
            }
           }
          },
          "criteria": {
           "type": "object",
           "properties": {
            "micro": {
             "type": "object",
             "properties": {
              "employees_max": {
               "type": "number"
              },
              "revenue_max": {
               "type": "number"
              },
              "capital_max": {
               "type": "number"
              }
             }
            },
            "small": {
             "type": "object",
             "properties": {
              "employees_max": {
               "type": "number"
              },
              "revenue_max": {
               "type": "number"
              },
              "capital_max": {
               "type": "number"
              }
             }
            },
            "medium": {
             "type": "object",
             "properties": {
              "employees_max": {
               "type": "number"
              },
              "revenue_max": {
               "type": "number"
              },
              "capital_max": {
               "type": "number"
              }
             }
            }
           }
          },
          "rule_vi": {
           "type": "string"
          },
          "accounting_regimes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "regime": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "default": {
              "type": "boolean"
             }
            }
           }
          },
          "cit_rate_percent": {
           "type": "number"
          },
          "cit_note": {
           "type": "string"
          },
          "support_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "pending": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "status": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        },
        "example": {
         "sector": "trade",
         "sector_vi": "Thương mại và dịch vụ",
         "sector_from": "sector",
         "size": "small",
         "size_vi": "Doanh nghiệp nhỏ",
         "inputs": {
          "employees": 40,
          "revenue": 80000000000,
          "capital": 30000000000,
          "under_one_year": false
         },
         "criteria": {
          "micro": {
           "employees_max": 10,
           "revenue_max": 10000000000,
           "capital_max": 3000000000
          },
          "small": {
           "employees_max": 50,
           "revenue_max": 100000000000,
           "capital_max": 50000000000
          },
          "medium": {
           "employees_max": 100,
           "revenue_max": 300000000000,
           "capital_max": 100000000000
          }
         },
         "rule_vi": "Số lao động tham gia BHXH bình quân năm không vượt ngưỡng VÀ (tổng doanh thu năm trước HOẶC tổng nguồn vốn) không vượt ngưỡng (NĐ 80/2021 Điều 5).",
         "accounting_regimes": [
          {
           "regime": "TT 133/2016/TT-BTC",
           "vi": "Chế độ kế toán doanh nghiệp nhỏ và vừa",
           "default": true
          },
          {
           "regime": "TT 99/2025/TT-BTC",
           "vi": "Chế độ kế toán doanh nghiệp (thay TT 200/2014 từ 01/01/2026)",
           "default": false
          }
         ],
         "cit_rate_percent": 20,
         "cit_note": "Thuế suất TNDN theo tổng doanh thu năm trước liền kề: ≤ 3 tỷ: 15%; > 3–50 tỷ: 17%; còn lại 20% (Luật 67/2025/QH15 Điều 10, từ kỳ tính thuế 2025; không áp dụng cho DN là công ty con / có quan hệ liên kết mà toàn bộ doanh thu với bên liên kết…).",
         "support_vi": [
          "Hỗ trợ theo Luật Hỗ trợ DNNVV 04/2017/QH14 và NĐ 80/2021 (tư vấn, đào tạo, chuyển đổi số, tiếp cận tín dụng…)",
          "…"
         ],
         "pending": {
          "vi": "Dự thảo Luật Hỗ trợ DNNVV (sửa đổi) đề xuất tiêu chí: lao động bình quân không quá 300 người và doanh thu năm trước không quá 400 tỷ đồng; chưa có hiệu lực.",
          "status": "draft"
         },
         "legal": [
          {
           "ref": "Nghị định 80/2021/NĐ-CP Điều 5, 6",
           "effective_from": "2021-10-15"
          },
          {
           "ref": "Thông tư 58/2026/TT-BTC",
           "effective_from": "2026-07-01"
          },
          {
           "ref": "Thông tư 133/2016/TT-BTC"
          },
          {
           "ref": "Thông tư 99/2025/TT-BTC",
           "effective_from": "2026-01-01"
          },
          {
           "ref": "Luật Thuế TNDN 67/2025/QH15 Điều 10",
           "effective_from": "2025-10-01"
          }
         ],
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal / tax advice; check the official text.",
         "disclaimer_vi": "Chỉ mang tính tham khảo, không phải tư vấn pháp lý / thuế; đối chiếu văn bản gốc."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam SME Size & Accounting Regime",
    "description": "Give the `sector` (agriculture, industry and construction, trade and services) or the main business line as a VSIC code (`vsic`, section letter or number), the average number of employees with social insurance, last year’s total revenue and/or total capital. The API applies Nghị định 80/2021/NĐ-CP Điều 5: the employee limit AND either the revenue or the capital limit; enterprises under one year or without revenue are sized by capital. The thresholds of the three sizes are returned for comparison.\n\nIt also lists the accounting regimes that may be chosen on `date` – Thông tư 58/2026/TT-BTC for micro enterprises from 1/7/2026 (before: TT 132/2018), Thông tư 133/2016/TT-BTC for SMEs, Thông tư 99/2025/TT-BTC (from 1/1/2026, replacing TT 200/2014) – and the CIT rate by revenue under Luật Thuế TNDN 67/2025/QH15 (15 % up to 3 bn, 17 % up to 50 bn, otherwise 20 %). The pending amendment of the SME Support Law (draft: ≤ 300 employees, revenue ≤ 400 bn) is shown as `pending`.\n\nDocs: https://apibox.io.vn/docs/vn-sme-size/",
    "operationId": "vnSmeSizePost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-sme-size/"
    },
    "parameters": [
     {
      "name": "sector",
      "in": "query",
      "required": false,
      "description": "`agriculture`, `industry` (incl. construction) or `trade` (incl. services). Or use `vsic`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "vsic",
      "in": "query",
      "required": false,
      "description": "Main business line: VSIC section letter (A–U) or code (e.g. `4100`).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "employees",
      "in": "query",
      "required": false,
      "description": "Average employees with social insurance in the year.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "revenue",
      "in": "query",
      "required": false,
      "description": "Total revenue of the previous year (VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "capital",
      "in": "query",
      "required": false,
      "description": "Total capital (tổng nguồn vốn, VND).",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "under_one_year",
      "in": "query",
      "required": false,
      "description": "Enterprise under one year old (sized by capital).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Date for the accounting regimes (YYYY-MM-DD), default today.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sector": {
           "type": "string"
          },
          "sector_vi": {
           "type": "string"
          },
          "sector_from": {
           "type": "string"
          },
          "size": {
           "type": "string"
          },
          "size_vi": {
           "type": "string"
          },
          "inputs": {
           "type": "object",
           "properties": {
            "employees": {
             "type": "number"
            },
            "revenue": {
             "type": "number"
            },
            "capital": {
             "type": "number"
            },
            "under_one_year": {
             "type": "boolean"
            }
           }
          },
          "criteria": {
           "type": "object",
           "properties": {
            "micro": {
             "type": "object",
             "properties": {
              "employees_max": {
               "type": "number"
              },
              "revenue_max": {
               "type": "number"
              },
              "capital_max": {
               "type": "number"
              }
             }
            },
            "small": {
             "type": "object",
             "properties": {
              "employees_max": {
               "type": "number"
              },
              "revenue_max": {
               "type": "number"
              },
              "capital_max": {
               "type": "number"
              }
             }
            },
            "medium": {
             "type": "object",
             "properties": {
              "employees_max": {
               "type": "number"
              },
              "revenue_max": {
               "type": "number"
              },
              "capital_max": {
               "type": "number"
              }
             }
            }
           }
          },
          "rule_vi": {
           "type": "string"
          },
          "accounting_regimes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "regime": {
              "type": "string"
             },
             "vi": {
              "type": "string"
             },
             "default": {
              "type": "boolean"
             }
            }
           }
          },
          "cit_rate_percent": {
           "type": "number"
          },
          "cit_note": {
           "type": "string"
          },
          "support_vi": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "pending": {
           "type": "object",
           "properties": {
            "vi": {
             "type": "string"
            },
            "status": {
             "type": "string"
            }
           }
          },
          "legal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "ref": {
              "type": "string"
             },
             "effective_from": {
              "type": "string"
             }
            }
           }
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-stock-rules": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Stock Price Limits & T+2",
    "description": "`action=price`: from the `exchange` (hose, hnx, upcom), security `type` (stock, fund, etf, cw) and `reference` price, the ceiling and floor rounded to the tick: HOSE ±7 % (20 % on the first trading day), HNX ±10 % (30 %), UPCoM ±15 % (40 %); HOSE ticks 10 / 50 / 100 đ by price range, 10 đ for ETFs and covered warrants, 100 đ on HNX and UPCoM; ceiling and floor move one tick away when rounding lands on the reference. Covered warrants use the underlying’s band divided by the conversion ratio. `list=1` returns every valid price; `quantity` checks board / odd lots.\n\n`action=settlement`: T+2 settlement date of a `trade_date` and the ex-rights date (one trading day before the `record_date`) and the last day to buy, skipping weekends and Vietnamese public holidays. `action=pnl`: profit of a round trip after broker fees (default 0.15 %), the 0.1 % personal income tax on the sale value and 5 % on cash dividends, with the break-even price. `action=rules`: the full table (lots, maximum order 500 000 on HOSE, put-through minimums). Prices are not provided.\n\nDocs: https://apibox.io.vn/docs/vn-stock-rules/",
    "operationId": "vnStockRulesGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-stock-rules/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`price`, `settlement`, `pnl` or `rules` (alias `mode`); guessed from the other parameters.",
      "schema": {
       "type": "string"
      },
      "example": "price"
     },
     {
      "name": "exchange",
      "in": "query",
      "required": false,
      "description": "`hose`, `hnx` or `upcom`.",
      "schema": {
       "type": "string",
       "default": "hose"
      },
      "example": "hose"
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "description": "`stock`, `fund`, `etf` or `cw` (covered warrant, HOSE).",
      "schema": {
       "type": "string",
       "default": "stock"
      }
     },
     {
      "name": "reference",
      "in": "query",
      "required": false,
      "description": "Price: reference price (VND).",
      "schema": {
       "type": "number"
      },
      "example": 39000
     },
     {
      "name": "first_day",
      "in": "query",
      "required": false,
      "description": "Price: first trading day / after a suspension of more than 25 sessions.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "underlying_reference / conversion_ratio",
      "in": "query",
      "required": false,
      "description": "Covered warrant: reference price of the underlying and conversion ratio.",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "list / quantity",
      "in": "query",
      "required": false,
      "description": "Price: `list=1` for every valid price; `quantity` to check lots.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "trade_date / record_date",
      "in": "query",
      "required": false,
      "description": "Settlement: trade date (T+2) and/or record date (ex-rights date).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "buy_price, sell_price, quantity, buy_fee_percent, sell_fee_percent, cash_dividends",
      "in": "query",
      "required": false,
      "description": "P&L inputs.",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "exchange": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "reference": {
           "type": "number"
          },
          "first_day": {
           "type": "boolean"
          },
          "band_percent": {
           "type": "number"
          },
          "ceiling": {
           "type": "number"
          },
          "floor": {
           "type": "number"
          },
          "notes": {
           "type": "array"
          },
          "tick_at_ceiling": {
           "type": "number"
          },
          "tick_at_floor": {
           "type": "number"
          },
          "board_lot": {
           "type": "number"
          },
          "max_order_volume": {
           "type": "number"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "price",
         "exchange": "hose",
         "type": "stock",
         "reference": 39000,
         "first_day": false,
         "band_percent": 7,
         "ceiling": 41700,
         "floor": 36300,
         "notes": [],
         "tick_at_ceiling": 50,
         "tick_at_floor": 50,
         "board_lot": 100,
         "max_order_volume": 500000,
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not investment or tax advice; exchanges may announce special bands (e.g. after corporate actions) – check the exchange notice."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-trademark": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Trademark Classes & Fees",
    "description": "`action=classify`: describe the goods or services in Vietnamese or English (`q`) and get the most likely Nice classes with the closest standard terms from the WIPO Nice Classification (NCL 13-2026, 45 classes, about 10 000 goods / services, used with acknowledgement of WIPO’s copyright) and a short Vietnamese title of each class. `action=classes` lists the 45 class headings; `class=N` (with `filter`) lists the goods / services of one class with their basic numbers.\n\n`action=fees`: the official fees for a number of classes and goods per class (`items_per_class=8,6`): filing fee, publication, search and examination per class with the surcharge from the 7th item, priority claims, grant fee, publication and registration of the certificate – Thông tư 263/2016/TT-BTC as amended by Thông tư 63/2023/TT-BTC, with the 50 % reduction of “lệ phí” until 31/12/2026 (Thông tư 64/2025/TT-BTC) and the VNeID waiver (`via_vneid`); `renewal=1` for renewal with late months. `action=timeline`: from the `filing_date`, the statutory deadlines for formal examination, publication, substantive examination (5 months from publication under Luật 131/2025/QH15 from 1/4/2026, 3 months expedited), the 10-year term and the renewal windows.\n\nDocs: https://apibox.io.vn/docs/vn-trademark/",
    "operationId": "vnTrademarkGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-trademark/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`classify`, `fees`, `timeline`, `classes` or `class` (alias `mode`); guessed from the other parameters.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Classify: description of the goods / services.",
      "schema": {
       "type": "string"
      },
      "example": "cà phê rang xay"
     },
     {
      "name": "classes / items / items_per_class",
      "in": "query",
      "required": false,
      "description": "Fees: number of classes and items per class, or the list `8,6`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "priority_claims, search, classification_by_office, via_vneid, renewal, late_months, date",
      "in": "query",
      "required": false,
      "description": "Fees options (date selects the reductions).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "filing_date / expedited",
      "in": "query",
      "required": false,
      "description": "Timeline: filing date (YYYY-MM-DD) and expedited examination.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "class / filter / limit",
      "in": "query",
      "required": false,
      "description": "Class list: class number 1–45, keyword filter, number of items.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "q": {
           "type": "string"
          },
          "suggestions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "class": {
              "type": "number"
             },
             "kind": {
              "type": "string"
             },
             "title_vi": {
              "type": "string"
             },
             "heading": {
              "type": "string"
             },
             "score": {
              "type": "number"
             },
             "matched_vietnamese_keywords": {
              "type": "boolean"
             },
             "items": {
              "type": "array"
             }
            }
           }
          },
          "found": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          },
          "nice_version": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        },
        "example": {
         "action": "classify",
         "q": "cà phê rang xay",
         "suggestions": [
          {
           "class": 30,
           "kind": "good",
           "title_vi": "Cà phê, trà, gạo, bột, bánh kẹo, gia vị, mì",
           "heading": "Coffee, tea, cocoa and substitutes therefor; rice, pasta and noodles; tapioca and sago; flour and preparations made from cereals; bread, pastries and confectionery; chocolate; ice cream, sorbets and other edible ices; sugar, honey, treacle; yeast, baking-powder; salt, seasonings, spices, preserved herbs; vinegar, sauces and other condiments; ice (frozen water)",
           "score": 11,
           "matched_vietnamese_keywords": true,
           "items": [
            {
             "basic_number": "300026",
             "label": "coffee"
            },
            {
             "basic_number": "300010",
             "label": "coffee flavourings"
            },
            {
             "basic_number": "300152",
             "label": "coffee substitutes"
            },
            {
             "basic_number": "300320",
             "label": "roasted coffee beans"
            }
           ]
          },
          {
           "class": 43,
           "kind": "service",
           "title_vi": "Nhà hàng, quán ăn, cà phê, khách sạn, lưu trú",
           "heading": "Services for providing food and drink; temporary accommodation",
           "score": 5,
           "matched_vietnamese_keywords": true,
           "items": []
          }
         ],
         "found": true,
         "note": "Suggestions by keyword match; choose the goods / services wording from the class list and check the classification with the IP Office (NOIP) list for the edition in force.",
         "nice_version": "NCL 13-2026",
         "attribution": "© WIPO, Nice Classification (NCL), used with acknowledgement of WIPO’s copyright",
         "reviewed": "2026-11-15",
         "disclaimer": "Reference only, not legal / tax advice; check the official text.",
         "disclaimer_vi": "Chỉ mang tính tham khảo, không phải tư vấn pháp lý / thuế; đối chiếu văn bản gốc."
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   },
   "post": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam Trademark Classes & Fees",
    "description": "`action=classify`: describe the goods or services in Vietnamese or English (`q`) and get the most likely Nice classes with the closest standard terms from the WIPO Nice Classification (NCL 13-2026, 45 classes, about 10 000 goods / services, used with acknowledgement of WIPO’s copyright) and a short Vietnamese title of each class. `action=classes` lists the 45 class headings; `class=N` (with `filter`) lists the goods / services of one class with their basic numbers.\n\n`action=fees`: the official fees for a number of classes and goods per class (`items_per_class=8,6`): filing fee, publication, search and examination per class with the surcharge from the 7th item, priority claims, grant fee, publication and registration of the certificate – Thông tư 263/2016/TT-BTC as amended by Thông tư 63/2023/TT-BTC, with the 50 % reduction of “lệ phí” until 31/12/2026 (Thông tư 64/2025/TT-BTC) and the VNeID waiver (`via_vneid`); `renewal=1` for renewal with late months. `action=timeline`: from the `filing_date`, the statutory deadlines for formal examination, publication, substantive examination (5 months from publication under Luật 131/2025/QH15 from 1/4/2026, 3 months expedited), the 10-year term and the renewal windows.\n\nDocs: https://apibox.io.vn/docs/vn-trademark/",
    "operationId": "vnTrademarkPost",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-trademark/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`classify`, `fees`, `timeline`, `classes` or `class` (alias `mode`); guessed from the other parameters.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Classify: description of the goods / services.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "classes / items / items_per_class",
      "in": "query",
      "required": false,
      "description": "Fees: number of classes and items per class, or the list `8,6`.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "priority_claims, search, classification_by_office, via_vneid, renewal, late_months, date",
      "in": "query",
      "required": false,
      "description": "Fees options (date selects the reductions).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "filing_date / expedited",
      "in": "query",
      "required": false,
      "description": "Timeline: filing date (YYYY-MM-DD) and expedited examination.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "class / filter / limit",
      "in": "query",
      "required": false,
      "description": "Class list: class number 1–45, keyword filter, number of items.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {}
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "q": {
           "type": "string"
          },
          "suggestions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "class": {
              "type": "number"
             },
             "kind": {
              "type": "string"
             },
             "title_vi": {
              "type": "string"
             },
             "heading": {
              "type": "string"
             },
             "score": {
              "type": "number"
             },
             "matched_vietnamese_keywords": {
              "type": "boolean"
             },
             "items": {
              "type": "array"
             }
            }
           }
          },
          "found": {
           "type": "boolean"
          },
          "note": {
           "type": "string"
          },
          "nice_version": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "reviewed": {
           "type": "string"
          },
          "disclaimer": {
           "type": "string"
          },
          "disclaimer_vi": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  },
  "/v1/vn-cpi": {
   "get": {
    "tags": [
     "Data & JSON"
    ],
    "summary": "Vietnam CPI & Inflation Adjustment",
    "description": "Monthly consumer price index of Viet Nam published by the National Statistics Office (Cục Thống kê, Ministry of Finance) since 12/2020: change on the previous month, the same month last year and December last year, the year-to-date average, core inflation, the gold and US dollar price indices and the 11 CPI groups (food, housing, transport, education…), plus a chained index (2024 = 100) linking the 2019 and 2024 base years. The data is rebuilt every week from the official monthly workbooks with consistency checks (the chained year-on-year rates match the published ones within 0.15 point).\n\n`action=adjust`: `amount` + `from` month + `to` month (default the latest) → the amount adjusted by the CPI, for rent-indexation clauses, long-term contracts or real-wage comparisons; when the months are whole years apart the product of the published year-on-year rates is also given. `action=latest` (default), `month=YYYY-MM` and `action=series&from=&to=` return the figures. Source: Cục Thống kê – Bộ Tài chính (nso.gov.vn); cite it when reusing.\n\nDocs: https://apibox.io.vn/docs/vn-cpi/",
    "operationId": "vnCpiGet",
    "externalDocs": {
     "url": "https://apibox.io.vn/docs/vn-cpi/"
    },
    "parameters": [
     {
      "name": "action",
      "in": "query",
      "required": false,
      "description": "`latest`, `month`, `series` or `adjust` (alias `mode`); guessed from the other parameters.",
      "schema": {
       "type": "string",
       "default": "latest"
      }
     },
     {
      "name": "month",
      "in": "query",
      "required": false,
      "description": "Month (YYYY-MM).",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from / to",
      "in": "query",
      "required": false,
      "description": "Series or adjustment months (YYYY-MM); `to` defaults to the latest month.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "amount",
      "in": "query",
      "required": false,
      "description": "Adjust: amount to adjust.",
      "schema": {
       "type": "number"
      },
      "example": 10000000
     },
     {
      "name": "groups",
      "in": "query",
      "required": false,
      "description": "Series: include the 11 groups.",
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "action": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          },
          "from": {
           "type": "string"
          },
          "to": {
           "type": "string"
          },
          "index_from": {
           "type": "number"
          },
          "index_to": {
           "type": "number"
          },
          "factor": {
           "type": "number"
          },
          "change_percent": {
           "type": "number"
          },
          "adjusted_amount": {
           "type": "number"
          },
          "yoy_method": {
           "type": "object",
           "properties": {
            "factor": {
             "type": "number"
            },
            "steps": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "adjusted_amount": {
             "type": "number"
            },
            "note": {
             "type": "string"
            }
           }
          },
          "note": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "coverage": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "action": "adjust",
         "amount": 10000000,
         "from": "2025-10",
         "to": "2026-10",
         "index_from": 103.601,
         "index_to": 108.878,
         "factor": 1.0509,
         "change_percent": 5.09,
         "adjusted_amount": 10509358,
         "yoy_method": {
          "factor": 1.0509,
          "steps": [
           {
            "month": "2026-10",
            "yoy_percent": 5.09
           }
          ],
          "adjusted_amount": 10509000,
          "note": "Product of the published year-on-year CPI of each anniversary month"
         },
         "note": "adjusted_amount = amount × CPI(to) / CPI(from) using the chained national CPI (2024 = 100). Contracts may define a different index (e.g. the average CPI of a year or a province) – follow the contract.",
         "source": "Cục Thống kê (National Statistics Office of Viet Nam), monthly CPI workbooks, https://www.nso.gov.vn",
         "licence": "Published state statistics; cite \"Cục Thống kê – Bộ Tài chính\" when reusing (Luật Thống kê 2015, Điều 5).",
         "coverage": {
          "from": "2020-12",
          "to": "2026-10"
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearerAuth": {
    "type": "http",
    "scheme": "bearer",
    "description": "API key (starts with `abx_`) as a bearer token."
   },
   "apiKeyHeader": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key",
    "description": "API key in the X-API-Key header."
   },
   "apiKeyQuery": {
    "type": "apiKey",
    "in": "query",
    "name": "api_key",
    "description": "API key in the query string, for URLs used directly in HTML (images, QR codes). Visible to visitors: use a separate key."
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "examples": [
         "missing_parameter"
        ]
       },
       "message": {
        "type": "string"
       }
      }
     }
    }
   }
  },
  "responses": {
   "BadRequest": {
    "description": "Wrong or missing parameter (`invalid_request`, `missing_parameter`, …)",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Unauthorized": {
    "description": "Missing, unknown or revoked API key (`missing_api_key`, `invalid_api_key`)",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "TooManyRequests": {
    "description": "Per-minute rate limit or monthly quota reached (`rate_limited`, `quota_exceeded`); see `Retry-After`",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  }
 }
}