{
 "openapi": "3.1.0",
 "info": {
  "title": "Tino API (gateway /v1)",
  "version": "v1",
  "description": "Gọi API Tino thay khách: https://developers.tino.vn/docs/api"
 },
 "servers": [
  {
   "url": "https://api.tino.vn"
  }
 ],
 "components": {
  "securitySchemes": {
   "oauth": {
    "type": "oauth2",
    "description": "Đăng nhập bằng Tino: access token tinoat_",
    "flows": {
     "authorizationCode": {
      "authorizationUrl": "https://auth.tino.vn/oauth/consent",
      "tokenUrl": "https://api.tino.vn/oauth/token",
      "refreshUrl": "https://api.tino.vn/oauth/token",
      "scopes": {
       "profile:read": "Xem thông tin tài khoản",
       "profile:write": "Sửa thông tin tài khoản",
       "services:read": "Xem dịch vụ, gồm cả thông tin đăng nhập dịch vụ",
       "services:write": "Quản lý dịch vụ",
       "domains:read": "Xem tên miền",
       "domains:write": "Quản lý tên miền",
       "dns:read": "Xem bản ghi DNS",
       "dns:write": "Sửa bản ghi DNS",
       "billing:read": "Xem hoá đơn và thanh toán",
       "billing:write": "Thanh toán, nạp tiền",
       "tickets:read": "Xem ticket hỗ trợ",
       "tickets:write": "Tạo và trả lời ticket"
      }
     }
    }
   },
   "personalToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Token API cá nhân tinopat_ (https://developers.tino.vn/docs/personal-tokens)"
   },
   "session": {
    "type": "http",
    "scheme": "bearer",
    "description": "TinoPay, Tino Uptime, TinoPage Builder: token đăng nhập của chủ dịch vụ (https://developers.tino.vn/docs/tinopay-start, https://developers.tino.vn/docs/uptime-start, https://developers.tino.vn/docs/builder-start)"
   }
  }
 },
 "paths": {
  "/v1/clientarea": {
   "get": {
    "operationId": "get_clientarea",
    "summary": "Tổng quan tài khoản",
    "description": "Số hoá đơn, tên miền, ticket và dịch vụ của tài khoản.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-clientarea"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "total": {
          "invoices": 1,
          "domains": 1,
          "tickets": 3,
          "services": 3
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/clientarea/nav/service": {
   "get": {
    "operationId": "get_clientarea_nav_service",
    "summary": "Danh mục dịch vụ",
    "description": "Danh mục và danh mục con của các loại dịch vụ, dùng dựng menu dịch vụ.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-clientarea-nav-service"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/clientarea/search/{query}": {
   "post": {
    "operationId": "post_clientarea_search_query",
    "summary": "Tìm dịch vụ, sản phẩm",
    "description": "Tìm trong dịch vụ và sản phẩm của tài khoản theo chuỗi `@query` (ví dụ một tên miền). Chỉ đọc, dù là `POST`.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-clientarea-search-query"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [
     {
      "name": "query",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Chuỗi cần tìm"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/clientarea/statuses": {
   "get": {
    "operationId": "get_clientarea_statuses",
    "summary": "Danh sách trạng thái",
    "description": "Các giá trị trạng thái của hoá đơn, tên miền, ticket, dịch vụ và báo giá.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-clientarea-statuses"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "invoice": [
          "Paid",
          "Unpaid",
          "… 4 more item(s)"
         ],
         "domain": [
          "Pending",
          "Active",
          "… 4 more item(s)"
         ],
         "ticket": [
          "Open",
          "Closed",
          "… 4 more item(s)"
         ],
         "service": [
          "Pending",
          "Active",
          "… 4 more item(s)"
         ],
         "estimates": [
          "Draft",
          "Sent",
          "… 3 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/contact": {
   "get": {
    "operationId": "get_contact",
    "summary": "Danh sách liên hệ",
    "description": "Các liên hệ (tài khoản phụ) của tài khoản.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-contact"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "contacts": null,
         "page": {
          "current": 0,
          "total": 0
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/contact/{id}": {
   "get": {
    "operationId": "get_contact_id",
    "summary": "Chi tiết liên hệ",
    "description": "Thông tin và quyền của một liên hệ.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-contact-id"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID liên hệ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/contact/privileges": {
   "get": {
    "operationId": "get_contact_privileges",
    "summary": "Quyền có thể cấp cho liên hệ",
    "description": "Các quyền có thể cấp cho liên hệ. Mỗi tên miền và dịch vụ có thể có thêm quyền, tuỳ tính năng.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-contact-privileges"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/contacts": {
   "get": {
    "operationId": "get_contacts",
    "summary": "Danh sách liên hệ (contacts)",
    "description": "Các liên hệ (tài khoản phụ) của tài khoản.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-contacts"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "contacts": null,
         "page": {
          "current": 0,
          "total": 0
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/details": {
   "get": {
    "operationId": "get_details",
    "summary": "Thông tin tài khoản",
    "description": "Thông tin đăng ký của tài khoản.\n\n`verify.phone` (bool) và khối `phone` `{status, verified_at}` cho biết trạng thái số điện thoại; `status` là `verified`, `unverified`, `taken_by_other` hoặc `missing`. `update_required` ở gốc nói về hồ sơ (số giấy tờ, địa chỉ), không về số điện thoại.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-details"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "client": {
          "id": "700001",
          "group_id": "0",
          "email": "user@example.com",
          "lastlogin": "2026-08-02 10:00:00",
          "ip": "203.0.113.10",
          "host": "host.example",
          "firstname": "Nguyen Van",
          "lastname": "A",
          "companyname": "Example Company Ltd",
          "address1": "123 Example Street",
          "city": "Phường Bến Thành",
          "state": "Thành phố Hồ Chí Minh",
          "country": "VN",
          "phonenumber": "+84.900000000",
          "language": "vietnamese",
          "company": false,
          "currency_id": "0",
          "taxid": "0100000000",
          "nationalid": "000000000000",
          "birthday": "01/01/1990",
          "…": "3 more key(s)"
         },
         "update_required": true,
         "currency": {
          "code": "đ",
          "iso": "VND",
          "sign": "",
          "format": "1,234.56",
          "decimal": "0",
          "id": 0
         },
         "verify": {
          "email": "user@example.com"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/notifications": {
   "get": {
    "operationId": "get_notifications",
    "summary": "Danh sách thông báo",
    "description": "Mọi thông báo trên trang quản lý của tài khoản.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-notifications"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [
     {
      "name": "rel_type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Optional, return only by relation type"
      }
     },
     {
      "name": "rel_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Optional, return only by relation id"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "notifications": [
          {
           "id": 920001,
           "client_id": "<redacted>",
           "rel_type": "account",
           "rel_id": "100001",
           "seen": "0",
           "subject": "Thông tin tài khoản Hosting tại TinoGroup.",
           "body": "Dear Nguyen Van A,<br />\n<br />\nTh&ocirc;ng tin t&agrave;i khoản hosting của bạn đ&atilde; được khởi tạo.<br />\n<br />\nTh&ocirc;ng tin dịch vụ<br />\n<br />\nDịch vụ: WH 1<br />\nT&ecirc;n miền: example.com<br />\nThanh to&aacute;n lần đầu: 79,000 đ<br />\nThanh to&aacute;n gia hạn: 79,000 đ<br …",
           "metadata": "[]",
           "type": "direct",
           "date_added": "2026-07-26 10:00:00",
           "date_seen": null,
           "url": false
          },
          {
           "id": 171464,
           "client_id": "<redacted>",
           "rel_type": "ticket",
           "rel_id": "445776",
           "seen": "0",
           "subject": "Nhân viên hỗ trợ đã phản hồi ticket",
           "body": "On 24 Jul 2026, at 20:18, Nguyen Van A &lt;user@example.com&gt; wrote:  Nơi tiếp nhận những y&ecirc;u cầu hỗ trợ bản khai, x&aacute;c thực t&ecirc;n miền. Kh&aacute;ch h&agrave;ng c&oacute; thể li&ecirc;n hệ trực tiếp qua hotline 0364.333.333 nhấn ph&iacute;m 2 \n\nBest Regards!\n\n/----------------…",
           "metadata": "[]",
           "type": "direct",
           "date_added": "2026-07-24 10:00:00",
           "date_seen": null,
           "url": false
          },
          "… 12 more item(s)"
         ],
         "page": {
          "total": 14,
          "pages": 1,
          "current": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/notifications/{id}/ack": {
   "put": {
    "operationId": "put_notifications_id_ack",
    "summary": "Đánh dấu đã đọc thông báo",
    "description": "Đánh dấu thông báo `@id` là đã đọc. Gửi thêm `seen_all=true` để đánh dấu mọi thông báo.",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-notifications-id-ack"
    },
    "security": [
     {
      "oauth": [
       "profile:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID thông báo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "id": "171464",
         "success": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/notifications/new": {
   "get": {
    "operationId": "get_notifications_new",
    "summary": "Thông báo chưa đọc",
    "description": "Chỉ các thông báo mới (chưa đọc).",
    "tags": [
     "Tài khoản"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-notifications-new"
    },
    "security": [
     {
      "oauth": [
       "profile:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "profile:read",
    "parameters": [
     {
      "name": "rel_type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Optional, return only by relation type"
      }
     },
     {
      "name": "rel_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Optional, return only by relation id"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "notifications": [
          {
           "id": 920001,
           "rel_type": "account",
           "rel_id": "100001",
           "seen": "0",
           "subject": "Thông tin tài khoản Hosting tại TinoGroup.",
           "body": "Dear Nguyen Van A,<br />\n<br />\nTh&ocirc;ng tin t&agrave;i khoản hosting của bạn đ&atilde; được khởi tạo.<br />\n<br />\nTh&ocirc;ng tin dịch vụ<br />\n<br />\nDịch vụ: WH 1<br />\nT&ecirc;n miền: example.com<br />\nThanh to&aacute;n lần đầu: 79,000 đ<br />\nThanh to&aacute;n gia hạn: 79,000 đ<br …",
           "metadata": "[]",
           "date_added": "2026-07-26 10:00:00",
           "date_seen": null,
           "url": false
          },
          {
           "id": 171464,
           "rel_type": "ticket",
           "rel_id": "445776",
           "seen": "0",
           "subject": "Nhân viên hỗ trợ đã phản hồi ticket",
           "body": "On 24 Jul 2026, at 20:18, Nguyen Van A &lt;user@example.com&gt; wrote:  Nơi tiếp nhận những y&ecirc;u cầu hỗ trợ bản khai, x&aacute;c thực t&ecirc;n miền. Kh&aacute;ch h&agrave;ng c&oacute; thể li&ecirc;n hệ trực tiếp qua hotline 0364.333.333 nhấn ph&iacute;m 2 \n\nBest Regards!\n\n/----------------…",
           "metadata": "[]",
           "date_added": "2026-07-24 10:00:00",
           "date_seen": null,
           "url": false
          },
          "… 12 more item(s)"
         ],
         "success": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service": {
   "get": {
    "operationId": "get_service",
    "summary": "Danh sách dịch vụ",
    "description": "Mọi dịch vụ của tài khoản.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "services": [
          {
           "id": "100001",
           "domain": "example.com",
           "total": "79000.00",
           "status": "Active",
           "billingcycle": "Monthly",
           "next_due": "2026-08-26",
           "expires": "2026-08-26",
           "category": "Platinum Hosting",
           "category_url": "platinum-hosting",
           "name": "WH 1"
          },
          {
           "id": "100002",
           "domain": "vps-demo.example.net",
           "total": "199000.00",
           "status": "Active",
           "billingcycle": "Monthly",
           "next_due": "2026-08-26",
           "expires": "2026-08-26",
           "category": "NVMe VPS ",
           "category_url": "nvme-vps",
           "name": "VPS 20 GB NVMe"
          },
          "… 9 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}": {
   "get": {
    "operationId": "get_service_id",
    "summary": "Chi tiết dịch vụ",
    "description": "Thông tin dịch vụ `@id`: gói, chu kỳ, hạn dùng, trạng thái, thông tin đăng nhập dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "service": {
          "id": "100001",
          "product_id": "2122",
          "date_created": "2026-07-26",
          "domain": "example.com",
          "firstpayment": "79000.00",
          "total": "79000.00",
          "billingcycle": "Monthly",
          "next_due": "2026-08-26",
          "due_day": "26",
          "expires": "2026-08-26",
          "autorenew": "1",
          "next_invoice": "2026-08-11",
          "status": "Active",
          "label": "",
          "username": "exampleuser",
          "password": "<redacted>",
          "rootpassword": null,
          "commitment_date": null,
          "date_suspended": "0000-00-00",
          "date_terminated": "0000-00-00",
          "…": "9 more key(s)"
         },
         "addons": [],
         "haveaddons": [],
         "unpaid_invoice": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/cancel": {
   "post": {
    "operationId": "post_service_id_cancel",
    "summary": "Yêu cầu huỷ dịch vụ",
    "description": "Gửi yêu cầu huỷ dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-cancel"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "immediate": {
          "type": "string",
          "description": "set to false to terminate service at the end of billing date, true - terminate immediately"
         },
         "reason": {
          "type": "string",
          "description": "Reason for this request"
         }
        },
        "required": []
       },
       "example": {
        "immediate": "<immediate>",
        "reason": "<reason>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "info": [
          "cancell_sent"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/cycle": {
   "get": {
    "operationId": "get_service_id_cycle",
    "summary": "Các chu kỳ thanh toán",
    "description": "Chu kỳ thanh toán hiện tại và các chu kỳ có thể đổi sang.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-cycle"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "current": "m",
         "cycles": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_id_cycle",
    "summary": "Đổi chu kỳ thanh toán",
    "description": "Đổi chu kỳ thanh toán định kỳ của dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-cycle"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "cycle": {
          "type": "string",
          "description": "New billing cycle"
         }
        },
        "required": []
       },
       "example": {
        "cycle": "<cycle>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/emails": {
   "get": {
    "operationId": "get_service_id_emails",
    "summary": "Tài khoản email của hosting",
    "description": "Các tài khoản email trên hosting cPanel của dịch vụ (`listentrys`).",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-emails"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "Name",
      "in": "In",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Description"
      }
     },
     {
      "name": "---",
      "in": "---",
      "required": false,
      "schema": {
       "type": "string",
       "description": "---"
      }
     },
     {
      "name": "module",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Service type module (Cpanel2|DirectAdmin2|Zimbra|Wilduck)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "listentrys": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/invoices": {
   "get": {
    "operationId": "get_service_id_invoices",
    "summary": "Hoá đơn của dịch vụ",
    "description": "Các hoá đơn liên quan đến dịch vụ (`rel_invoices`).",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-invoices"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "rel_invoices": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/label": {
   "get": {
    "operationId": "get_service_id_label",
    "summary": "Xem nhãn dịch vụ",
    "description": "Nhãn tự đặt hiện tại của dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-label"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "label": ""
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_id_label",
    "summary": "Đặt nhãn dịch vụ",
    "description": "Đặt nhãn tự đặt để nhận ra dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-label"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "label": {
          "type": "string",
          "description": "New label"
         }
        },
        "required": []
       },
       "example": {
        "label": "<label>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "service_label_updated"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/manualrenew": {
   "post": {
    "operationId": "post_service_id_manualrenew",
    "summary": "Tạo hoá đơn gia hạn dịch vụ",
    "description": "Tạo hoá đơn gia hạn dịch vụ. Dịch vụ đã có hoá đơn chưa thanh toán thì trả `invoice_id` của hoá đơn đó; dịch vụ đang chờ nâng cấp thì báo lỗi.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-manualrenew"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "invoice_id": null,
         "info": [
          "manualrenew_ok"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/methods": {
   "get": {
    "operationId": "get_service_id_methods",
    "summary": "Thao tác hỗ trợ của dịch vụ",
    "description": "Các route dùng được với dịch vụ này (tên, method, đường dẫn).",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-methods"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "methods": [
          {
           "name": "Upgrade Options",
           "method": "GET",
           "route": "/service/@id/upgrade"
          },
          {
           "name": "Upgrade Request",
           "method": "POST",
           "route": "/service/@id/upgrade"
          },
          "… 30 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/renew": {
   "post": {
    "operationId": "post_service_id_renew",
    "summary": "Gia hạn dịch vụ",
    "description": "Tạo hoá đơn gia hạn dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-renew"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/upgrade": {
   "get": {
    "operationId": "get_service_id_upgrade",
    "summary": "Tuỳ chọn nâng cấp",
    "description": "Các gói và tài nguyên có thể nâng cấp, kèm giá theo chu kỳ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-upgrade"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "resources": [],
         "package": [
          {
           "id": "2007",
           "name": "Host 5GB NVMe",
           "category": "Hosting NVMe",
           "price": {
            "Monthly": "79000.00",
            "Quarterly": "237000.00",
            "Semi-Annually": "474000.00",
            "Annually": "853200.00",
            "Biennially": "1611600.00",
            "Triennially": "2275200.00",
            "Quadrennially": "2844000.00",
            "Quinquennially": "3318000.00"
           }
          },
          {
           "id": "2008",
           "name": "Host Starter NVMe",
           "category": "Hosting NVMe",
           "price": {
            "Monthly": "339000.00",
            "Quarterly": "1017000.00",
            "Semi-Annually": "1830600.00",
            "Annually": "3254400.00",
            "Biennially": "5695200.00",
            "Triennially": "7322400.00",
            "Quadrennially": "8136000.00",
            "Quinquennially": "9153000.00"
           }
          },
          "… 6 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_id_upgrade",
    "summary": "Báo giá hoặc yêu cầu nâng cấp",
    "description": "Tính giá nâng cấp; gửi `send=true` để gửi yêu cầu nâng cấp.\n\nDạng tham số `resources`:\n\n```json\n{\n  \"resource_id\": \"qty_value\",\n  \"resource_id\": \"item_id\",\n  \"resource_id\": { \"item_id\": \"qty_value\" }\n}\n```\n\n- `\"qty_value\"`: thanh trượt và ô số lượng\n- `\"item_id\"`: danh sách chọn và nút chọn\n- `{ \"item_id\": \"qty_value\" }`: danh sách chọn có ô số lượng",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-upgrade"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "resources": {
          "type": "array",
          "description": "array with resource values"
         },
         "package": {
          "type": "integer",
          "description": "New package id, optonal when upgrading resources"
         },
         "cycle": {
          "type": "string",
          "description": "New billing cycle, optonal when upgrading resources"
         },
         "send": {
          "type": "boolean",
          "description": "Set to true when you want to send your upgrade request"
         }
        },
        "required": []
       },
       "example": {
        "resources": "<resources>",
        "package": "<package>",
        "cycle": "<cycle>",
        "send": "<send>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/widgets": {
   "get": {
    "operationId": "get_service_id_widgets",
    "summary": "Tiện ích của dịch vụ",
    "description": "Các tiện ích (widget) của dịch vụ.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-widgets"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "methods": [
          {
           "name": "Upgrade Options",
           "method": "GET",
           "route": "/service/@id/upgrade"
          },
          {
           "name": "Upgrade Request",
           "method": "POST",
           "route": "/service/@id/upgrade"
          },
          "… 30 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/cpanel2/{id}/statistics": {
   "get": {
    "operationId": "get_service_cpanel2_id_statistics",
    "summary": "Thống kê cPanel",
    "description": "Dung lượng, băng thông và các chỉ số sử dụng khác của hosting cPanel, theo `id` của từng chỉ số.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-cpanel2-id-statistics"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ hosting cPanel"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/cpanel2/{id}/unblock": {
   "post": {
    "operationId": "post_service_cpanel2_id_unblock",
    "summary": "Gỡ chặn IP trên cPanel",
    "description": "Gỡ chặn IP trên tường lửa của máy chủ cPanel chứa dịch vụ. Trả `block` và `myip`.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-cpanel2-id-unblock"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ hosting cPanel"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/services/{cid}": {
   "get": {
    "operationId": "get_services_cid",
    "summary": "Dịch vụ theo danh mục",
    "description": "Dịch vụ của tài khoản trong danh mục `@cid` (`0`: mọi danh mục).\n\nLọc: `filter[hide_terminated]=1`, `filter[hide_cancelled]=1`, `filter[hide_suspended]=1`, `filter[hide_fraud]=1`, `filter[status]=Active`.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-services-cid"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "cid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID danh mục dịch vụ; `0`: mọi danh mục"
      }
     },
     {
      "name": "Name",
      "in": "In",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Description"
      }
     },
     {
      "name": "---",
      "in": "---",
      "required": false,
      "schema": {
       "type": "string",
       "description": "---"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "services": [
          {
           "id": "100001",
           "domain": "example.com",
           "total": "79000.00",
           "status": "Active",
           "billingcycle": "Monthly",
           "next_due": "2026-08-26",
           "category": "Platinum Hosting",
           "category_url": "platinum-hosting",
           "name": "WH 1"
          },
          {
           "id": "100002",
           "domain": "vps-demo.example.net",
           "total": "199000.00",
           "status": "Active",
           "billingcycle": "Monthly",
           "next_due": "2026-08-26",
           "category": "NVMe VPS ",
           "category_url": "nvme-vps",
           "name": "VPS 20 GB NVMe"
          },
          "… 1 more item(s)"
         ],
         "total": 3,
         "page": {
          "current": 0,
          "total": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/services/active": {
   "get": {
    "operationId": "get_services_active",
    "summary": "Dịch vụ đang hoạt động",
    "description": "Các dịch vụ đang hoạt động của tài khoản.",
    "tags": [
     "Dịch vụ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-services-active"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "services": [
          {
           "id": "100001",
           "domain": "example.com",
           "total": "79000.00",
           "status": "Active",
           "billingcycle": "Monthly",
           "next_due": "2026-08-26",
           "category": "Platinum Hosting",
           "category_url": "platinum-hosting",
           "name": "WH 1"
          },
          {
           "id": "100002",
           "domain": "vps-demo.example.net",
           "total": "199000.00",
           "status": "Active",
           "billingcycle": "Monthly",
           "next_due": "2026-08-26",
           "category": "NVMe VPS ",
           "category_url": "nvme-vps",
           "name": "VPS 20 GB NVMe"
          },
          "… 1 more item(s)"
         ],
         "total": 3,
         "page": {
          "current": 0,
          "total": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/networks": {
   "get": {
    "operationId": "get_service_id_networks",
    "summary": "Mạng và dải IP",
    "description": "Các mạng và dải IP dùng được khi tạo máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-networks"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/resources": {
   "get": {
    "operationId": "get_service_id_resources",
    "summary": "Tài nguyên VPS",
    "description": "Tài nguyên còn trống và đã dùng (CPU, RAM, ổ đĩa, IP).",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-resources"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "limit": {
          "mem": 0,
          "cpu": 0,
          "ips": 0,
          "priv_ips": 0,
          "disk": 0,
          "additional_storage": 0
         },
         "total": {
          "cpu": 1,
          "mem": 1024,
          "ips": 1,
          "priv_ips": 0,
          "disk": 20,
          "additional_storage": 0
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/templates": {
   "get": {
    "operationId": "get_service_id_templates",
    "summary": "Mẫu hệ điều hành",
    "description": "Các mẫu hệ điều hành dùng tạo máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-templates"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "templates": [
          {
           "id": "a37411b5-4136-29f6-9dc0-d07f78a6ad5e",
           "name": "Ubuntu 26.04",
           "price": 0,
           "type": "template",
           "group": "public",
           "size_gb": 4,
           "interfaces": [
            {
             "name": "net0",
             "zones": null,
             "zone": "vmbr0",
             "ip_required": true
            }
           ]
          },
          {
           "id": "8c93b9af-1bd8-5a73-8190-f7e272bd4157",
           "name": "Almalinux 10",
           "price": 0,
           "type": "template",
           "group": "public",
           "size_gb": 10,
           "interfaces": [
            {
             "name": "net0",
             "zones": null,
             "zone": "vmbr0",
             "ip_required": true
            }
           ]
          },
          "… 12 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms": {
   "get": {
    "operationId": "get_service_id_vms",
    "summary": "Danh sách máy ảo",
    "description": "Các máy ảo của dịch vụ VPS.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "vms": {
          "600001": {
           "id": 600001,
           "ha": false,
           "built": true,
           "locked": false,
           "power": true,
           "status": "running",
           "status_lang": "vm_state_running",
           "password": "<redacted>",
           "sshkeys": [
            "ssh-ed25519 AAAA<public-key> user@example.com"
           ],
           "username": "root",
           "memory": 1024,
           "disk": 20,
           "swap": null,
           "additional_storage": [],
           "uptime": 639603,
           "template_id": "template-vm:321/321/base-321-disk-0.raw",
           "template_name": "Ubuntu 26.04",
           "template_data": [],
           "replication": false,
           "cloudinit": true,
           "…": "14 more key(s)"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}": {
   "get": {
    "operationId": "get_service_id_vms_vmid",
    "summary": "Chi tiết máy ảo",
    "description": "Thông tin một máy ảo: trạng thái, tài nguyên, mẫu hệ điều hành, khoá SSH.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms-vmid"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "vm": {
          "id": 600001,
          "ha": false,
          "built": true,
          "locked": false,
          "power": true,
          "status": "running",
          "status_lang": "vm_state_running",
          "password": "<redacted>",
          "sshkeys": [
           "ssh-ed25519 AAAA<public-key> user@example.com"
          ],
          "username": "root",
          "memory": 1024,
          "disk": 20,
          "swap": null,
          "additional_storage": [],
          "uptime": 639639,
          "template_id": "template-vm:321/321/base-321-disk-0.raw",
          "template_name": "Ubuntu 26.04",
          "template_data": [],
          "replication": false,
          "cloudinit": true,
          "…": "14 more key(s)"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/hostname": {
   "post": {
    "operationId": "post_service_id_vms_vmid_hostname",
    "summary": "Đổi hostname máy ảo",
    "description": "Đổi hostname của máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-vms-vmid-hostname"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "server_name": {
          "type": "string",
          "description": "Virtual server name"
         }
        },
        "required": [
         "server_name"
        ]
       },
       "example": {
        "server_name": "<server_name>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": 1
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/interfaces": {
   "get": {
    "operationId": "get_service_id_vms_vmid_interfaces",
    "summary": "Card mạng của máy ảo",
    "description": "Các card mạng gắn với máy ảo, kèm IP.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms-vmid-interfaces"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": [
         {
          "id": 0,
          "name": "net0",
          "model": "virtio",
          "mac": "02:00:00:00:00:01",
          "firewall": "1",
          "ip": [
           {
            "id": 930001,
            "interface": 0,
            "mac": "02:00:00:00:00:01",
            "ip": "203.0.113.10",
            "wanip": "",
            "mask": "/24",
            "network": "203.0.113.10",
            "gateway": "203.0.113.10",
            "main": 1,
            "type": "ipv4"
           },
           {
            "id": 27930,
            "interface": 0,
            "mac": "02:00:00:00:00:01",
            "ip": "203.0.113.10",
            "wanip": "",
            "mask": "/64",
            "network": "2001:db8::1",
            "gateway": "2001:db8::1",
            "main": 1,
            "type": "ipv6"
           }
          ],
          "bridge": "vmbr0",
          "vlan": "136",
          "link_down": null,
          "can_edit": true,
          "can_remove": false
         }
        ]
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/interfaces/{iface}": {
   "get": {
    "operationId": "get_service_id_vms_vmid_interfaces_iface",
    "summary": "Chi tiết card mạng",
    "description": "Thông tin một card mạng của máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms-vmid-interfaces-iface"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     },
     {
      "name": "iface",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Tên hoặc số card mạng, ví dụ `0` hoặc `net0`"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": []
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/ippool": {
   "get": {
    "operationId": "get_service_id_vms_vmid_ippool",
    "summary": "Dải IP của máy ảo",
    "description": "Các dải IP cho một card mạng hoặc một bridge mạng.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms-vmid-ippool"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     },
     {
      "name": "Name",
      "in": "In",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Description"
      }
     },
     {
      "name": "---",
      "in": "---",
      "required": false,
      "schema": {
       "type": "string",
       "description": "---"
      }
     },
     {
      "name": "iface",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Interface number [optional]"
      }
     },
     {
      "name": "bridge",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Bridge name [optional, ignored if interface provided]"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": [
         {
          "id": "public",
          "name": "Public IP(s)",
          "type": "ipv4",
          "vlan_id": "41",
          "firstip": "203.0.113.10",
          "mask": "/24",
          "gateway": "203.0.113.10"
         },
         {
          "id": "public",
          "name": "Public IP(s)",
          "type": "ipv6",
          "vlan_id": "42",
          "firstip": "2001:db8::",
          "mask": "/64",
          "gateway": "2001:db8::1"
         }
        ]
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/ips": {
   "get": {
    "operationId": "get_service_id_vms_vmid_ips",
    "summary": "IP của máy ảo",
    "description": "Các địa chỉ IP của máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms-vmid-ips"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     },
     {
      "name": "Name",
      "in": "In",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Description"
      }
     },
     {
      "name": "---",
      "in": "---",
      "required": false,
      "schema": {
       "type": "string",
       "description": "---"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "ipv4 or ipv6"
      }
     },
     {
      "name": "iface",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Interface number [optional]"
      }
     },
     {
      "name": "bridge",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Bridge name [optional, ignored if interface provided]"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": [
         {
          "id": 930001,
          "interface": 0,
          "mac": "02:00:00:00:00:01",
          "ip": "203.0.113.10",
          "wanip": "",
          "mask": "/24",
          "network": "203.0.113.10",
          "gateway": "203.0.113.10",
          "main": 1,
          "type": "ipv4"
         },
         {
          "id": 27930,
          "interface": 0,
          "mac": "02:00:00:00:00:01",
          "ip": "203.0.113.10",
          "wanip": "",
          "mask": "/64",
          "network": "2001:db8::1",
          "gateway": "2001:db8::1",
          "main": 1,
          "type": "ipv6"
         }
        ]
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/reboot": {
   "post": {
    "operationId": "post_service_id_vms_vmid_reboot",
    "summary": "Khởi động lại máy ảo",
    "description": "Khởi động lại máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-vms-vmid-reboot"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/reset": {
   "post": {
    "operationId": "post_service_id_vms_vmid_reset",
    "summary": "Reset máy ảo",
    "description": "Reset nguồn máy ảo (như rút điện cắm lại).",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-vms-vmid-reset"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/shutdown": {
   "post": {
    "operationId": "post_service_id_vms_vmid_shutdown",
    "summary": "Tắt máy ảo",
    "description": "Tắt máy ảo theo cách thông thường (gửi lệnh tắt cho hệ điều hành).",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-vms-vmid-shutdown"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/start": {
   "post": {
    "operationId": "post_service_id_vms_vmid_start",
    "summary": "Bật máy ảo",
    "description": "Bật máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-vms-vmid-start"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/stop": {
   "post": {
    "operationId": "post_service_id_vms_vmid_stop",
    "summary": "Dừng máy ảo",
    "description": "Dừng máy ảo ngay.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-vms-vmid-stop"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/vms/{vmid}/traffic": {
   "get": {
    "operationId": "get_service_id_vms_vmid_traffic",
    "summary": "Lưu lượng mạng của máy ảo",
    "description": "Lưu lượng mạng của máy ảo.",
    "tags": [
     "Máy chủ VPS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-vms-vmid-traffic"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "vmid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID máy ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/certificate": {
   "get": {
    "operationId": "get_certificate",
    "summary": "Danh sách chứng chỉ SSL",
    "description": "Mọi dịch vụ chứng chỉ SSL của tài khoản.",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-certificate"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/certificate/{id}": {
   "get": {
    "operationId": "get_certificate_id",
    "summary": "Chi tiết chứng chỉ SSL",
    "description": "Thông tin dịch vụ chứng chỉ SSL `@id`.",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-certificate-id"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ chứng chỉ SSL"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "products": [
          {
           "id": "26",
           "name": "Comodo PositiveSSL",
           "description": "<ul></ul>",
           "category": "Comodo SSL",
           "category_url": "comodo-ssl",
           "periods": [
            {
             "years": 1,
             "price": 175000,
             "renew": 175000
            },
            {
             "years": 2,
             "price": 297600,
             "renew": 297600
            },
            "… 1 more item(s)"
           ]
          },
          {
           "id": "27",
           "name": "Comodo PositiveSSL Wildcard",
           "description": "<ul></ul>",
           "category": "Comodo SSL",
           "category_url": "comodo-ssl",
           "periods": [
            {
             "years": 1,
             "price": 2139000,
             "renew": 2139000
            },
            {
             "years": 2,
             "price": 4278000,
             "renew": 4278000
            },
            "… 1 more item(s)"
           ]
          },
          "… 12 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/certificate/{id}/crt": {
   "get": {
    "operationId": "get_certificate_id_crt",
    "summary": "Tải chứng chỉ",
    "description": "Dữ liệu chứng chỉ X.509 của dịch vụ.",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-certificate-id-crt"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ chứng chỉ SSL"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": []
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/certificate/order": {
   "get": {
    "operationId": "get_certificate_order",
    "summary": "Chứng chỉ có thể mua",
    "description": "Các loại chứng chỉ SSL đang bán, kèm giá theo số năm.",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-certificate-order"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "products": [
          {
           "id": "26",
           "name": "Comodo PositiveSSL",
           "description": "<ul></ul>",
           "category": "Comodo SSL",
           "category_url": "comodo-ssl",
           "periods": [
            {
             "years": 1,
             "price": 175000,
             "renew": 175000
            },
            {
             "years": 2,
             "price": 297600,
             "renew": 297600
            },
            "… 1 more item(s)"
           ]
          },
          {
           "id": "27",
           "name": "Comodo PositiveSSL Wildcard",
           "description": "<ul></ul>",
           "category": "Comodo SSL",
           "category_url": "comodo-ssl",
           "periods": [
            {
             "years": 1,
             "price": 2139000,
             "renew": 2139000
            },
            {
             "years": 2,
             "price": 4278000,
             "renew": 4278000
            },
            "… 1 more item(s)"
           ]
          },
          "… 12 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_certificate_order",
    "summary": "Đặt mua chứng chỉ SSL",
    "description": "Tạo đơn hàng chứng chỉ SSL riêng lẻ.",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-certificate-order"
    },
    "security": [
     {
      "oauth": [
       "services:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "product_id": {
          "type": "integer",
          "description": "Certificate product ID"
         },
         "csr": {
          "type": "string",
          "description": "Domain name"
         },
         "years": {
          "type": "integer",
          "description": "Number of years"
         },
         "pay_method": {
          "type": "integer",
          "description": "Payment method ID"
         },
         "approver_email": {
          "type": "string",
          "description": "Email addres used in domain validation"
         },
         "admin": {
          "type": "integer",
          "description": "Admin contact ID"
         },
         "tech": {
          "type": "integer",
          "description": "Tech contact ID"
         },
         "billing": {
          "type": "integer",
          "description": "Billing contact ID"
         },
         "organization": {
          "type": "array",
          "description": "Organization details"
         },
         "software": {
          "type": "integer",
          "description": "Server/Software ID"
         },
         "data": {
          "type": "array",
          "description": "Addditional data required for some products"
         },
         "aff_id": {
          "type": "integer",
          "description": "Affiliate ID"
         }
        },
        "required": []
       },
       "example": {
        "product_id": "<product_id>",
        "csr": "example.com",
        "years": "<years>",
        "pay_method": "<pay_method>",
        "approver_email": "<approver_email>",
        "admin": "<admin>",
        "tech": "<tech>",
        "billing": "<billing>",
        "organization": "<organization>",
        "software": "<software>",
        "data": "<data>",
        "aff_id": 55
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/certificate/order/{product_id}/software": {
   "get": {
    "operationId": "get_certificate_order_product_id_software",
    "summary": "Phần mềm máy chủ cho chứng chỉ",
    "description": "Danh sách phần mềm máy chủ (ID dùng khi đặt mua chứng chỉ).",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-certificate-order-product-id-software"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "product_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID sản phẩm (gói dịch vụ, chứng chỉ)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "software": [
          {
           "id": 1,
           "name": "Apache + MOD SSL"
          },
          {
           "id": 2,
           "name": "Apache + Raven"
          },
          "… 26 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/certificates": {
   "get": {
    "operationId": "get_certificates",
    "summary": "Danh sách dịch vụ SSL (certificates)",
    "description": "Mọi dịch vụ chứng chỉ SSL của tài khoản (`sslservices`).",
    "tags": [
     "Chứng chỉ SSL"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-certificates"
    },
    "security": [
     {
      "oauth": [
       "services:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "services:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "sslservices": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain": {
   "get": {
    "operationId": "get_domain",
    "summary": "Danh sách tên miền",
    "description": "Các tên miền của tài khoản.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domains": [
          {
           "id": "200001",
           "name": "example.com",
           "expires": "2026-12-07",
           "label": "",
           "recurring_amount": "585366.00",
           "date_created": "2025-12-07",
           "status": "Active",
           "period": "1",
           "idprotection": "1",
           "autorenew": "1",
           "daytoexpire": "127"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}": {
   "get": {
    "operationId": "get_domain_id",
    "summary": "Chi tiết tên miền",
    "description": "Thông tin tên miền: hạn dùng, nameserver, tự gia hạn, khoá, các liên hệ.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/autorenew": {
   "get": {
    "operationId": "get_domain_id_autorenew",
    "summary": "Xem tự gia hạn tên miền",
    "description": "Tên miền có đang bật tự gia hạn không.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-autorenew"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "allowrenew": null,
         "autorenew": "1"
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domain_id_autorenew",
    "summary": "Bật/tắt tự gia hạn tên miền",
    "description": "Bật hoặc tắt tự gia hạn tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-autorenew"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "autorenew": {
          "type": "boolean",
          "description": "true|false"
         }
        },
        "required": [
         "autorenew"
        ]
       },
       "example": {
        "autorenew": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "success_changes_save"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/contact": {
   "get": {
    "operationId": "get_domain_id_contact",
    "summary": "Xem liên hệ tên miền",
    "description": "Thông tin liên hệ chủ thể, quản trị, kỹ thuật, thanh toán của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-contact"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domain_id_contact",
    "summary": "Đổi liên hệ (chủ thể) tên miền",
    "description": "Cập nhật thông tin liên hệ của tên miền, gồm chủ thể. Cần quyền `domains:owner`: chỉ token API cá nhân có giới hạn IP.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-contact"
    },
    "security": [
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:owner",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "contact_info": {
          "type": "array"
         }
        },
        "required": []
       },
       "example": {
        "contact_info": "<contact_info>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/dnssec": {
   "get": {
    "operationId": "get_domain_id_dnssec",
    "summary": "Danh sách khoá DNSSEC",
    "description": "Các bản ghi DS và khoá DNSSEC của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-dnssec"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "ds_list": null,
         "key_list": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domain_id_dnssec",
    "summary": "Thêm khoá DNSSEC",
    "description": "Thêm khoá DNSSEC cho tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-dnssec"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "success_changes_save"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/dnssec/{key}": {
   "delete": {
    "operationId": "delete_domain_id_dnssec_key",
    "summary": "Xoá khoá DNSSEC",
    "description": "Xoá khoá DNSSEC `@key` của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-domain-id-dnssec-key"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     },
     {
      "name": "key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Khoá DNSSEC cần xoá"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/dnssec/flags": {
   "get": {
    "operationId": "get_domain_id_dnssec_flags",
    "summary": "Tham số DNSSEC hỗ trợ",
    "description": "Các giá trị flag, protocol, algorithm, digest dùng khi thêm khoá DNSSEC.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-dnssec-flags"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "flag": null,
         "protocol": null,
         "algorithm": null,
         "digest": null,
         "form_type": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/emforwarding": {
   "get": {
    "operationId": "get_domain_id_emforwarding",
    "summary": "Xem chuyển tiếp email",
    "description": "Các quy tắc chuyển tiếp email của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-emforwarding"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domain_id": "200001",
         "email_forwarding": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domain_id_emforwarding",
    "summary": "Cập nhật chuyển tiếp email",
    "description": "Đặt quy tắc chuyển tiếp email của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-emforwarding"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "from": {
          "type": "string",
          "description": "Email address that you want to forward"
         },
         "to": {
          "type": "string",
          "description": "Email address that will receive forwarded emails"
         },
         "records": {
          "type": "array",
          "description": "Multiple forwarding rules [{\"from\":\"info\",\"to\":\"dest@example.com\"},{\"from\":\"support\",\"to\":\"help@example.com\"}]"
         }
        },
        "required": []
       },
       "example": {
        "from": "info@example.com",
        "to": "destination@example.com",
        "records": "<records>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "success_changes_save"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/epp": {
   "get": {
    "operationId": "get_domain_id_epp",
    "summary": "Lấy mã chuyển tên miền (EPP)",
    "description": "Mã EPP để chuyển tên miền sang nhà đăng ký khác. Cần quyền `domains:owner`: chỉ token API cá nhân có giới hạn IP.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-epp"
    },
    "security": [
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:owner",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domain_id": "200001",
         "epp_code": "<redacted>"
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/forwarding": {
   "put": {
    "operationId": "put_domain_id_forwarding",
    "summary": "Cập nhật chuyển hướng tên miền",
    "description": "Đặt chuyển hướng (forwarding) cho tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-forwarding"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": []
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/idprotection": {
   "put": {
    "operationId": "put_domain_id_idprotection",
    "summary": "Bật/tắt ẩn thông tin chủ thể",
    "description": "Bật hoặc tắt bảo vệ thông tin chủ thể (ID Protection) của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-idprotection"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "switch": {
          "type": "boolean",
          "description": "true|false"
         }
        },
        "required": []
       },
       "example": {
        "switch": "true|false"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/invoices": {
   "get": {
    "operationId": "get_domain_id_invoices",
    "summary": "Hoá đơn của tên miền",
    "description": "Các hoá đơn liên quan đến tên miền (`rel_invoices`).",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-invoices"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "rel_invoices": [
          {
           "id": "300001",
           "client_id": "<redacted>",
           "date": "2026-03-30",
           "dateorig": "2026-03-30",
           "duedate": "2026-12-07",
           "paybefore": "2026-12-07",
           "currency_id": "0",
           "total": "574723.00",
           "paid_id": "",
           "subtotal": "532151.00",
           "tax": "42572.00",
           "tax2": "0.00",
           "datepaid": "0000-00-00 10:00:00",
           "status": "Unpaid",
           "merge_id": "300001"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/ns": {
   "get": {
    "operationId": "get_domain_id_ns",
    "summary": "Xem nameserver",
    "description": "Các nameserver tên miền đang dùng.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-ns"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domain_id": "200001",
         "nameservers": [
          "ns1.tino.vn",
          "ns2.tino.vn"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domain_id_ns",
    "summary": "Đổi nameserver",
    "description": "Đổi nameserver của tên miền; để trống `nameservers` thì dùng nameserver mặc định.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-ns"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "nameservers": {
          "type": "array",
          "description": "List of nameservers to use"
         }
        },
        "required": []
       },
       "example": {
        "nameservers": "<nameservers>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "success_changes_save"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/reg": {
   "get": {
    "operationId": "get_domain_id_reg",
    "summary": "Nameserver riêng đã đăng ký",
    "description": "Các nameserver riêng (glue record) đã đăng ký dưới tên miền. Không phải nhà đăng ký nào cũng hỗ trợ; khi không hỗ trợ, danh sách có thể rỗng.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-reg"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domain_id": "200001",
         "nameservers": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_domain_id_reg",
    "summary": "Quản lý nameserver riêng",
    "description": "Đăng ký, sửa hoặc xoá nameserver riêng (glue record) của tên miền; chọn thao tác bằng `action`:\n\n- `registerNameServer`: đăng ký glue record mới (cần `nameserver`, `ip`)\n- `modifyNameServer`: đổi IP của glue record (cần `nameserver`, `oldip`, `newip`)\n- `deleteNameServer`: xoá glue record (cần `nameserver`)",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-domain-id-reg"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string",
          "description": "Operation: registerNameServer, modifyNameServer, deleteNameServer"
         },
         "nameserver": {
          "type": "string",
          "description": "Full nameserver hostname"
         },
         "ip": {
          "type": "string",
          "description": "IP address for the nameserver – required for registerNameServer"
         },
         "oldip": {
          "type": "string",
          "description": "Current IP address – required for modifyNameServer"
         },
         "newip": {
          "type": "string",
          "description": "New IP address – required for modifyNameServer"
         }
        },
        "required": []
       },
       "example": {
        "action": "registerNameServer",
        "nameserver": "ns1.example.com",
        "ip": "203.0.113.10",
        "oldip": "203.0.113.10",
        "newip": "203.0.113.11"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "info": [
          "0 of 1 events processed",
          "actionsuccess"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/reglock": {
   "get": {
    "operationId": "get_domain_id_reglock",
    "summary": "Xem khoá tên miền",
    "description": "Trạng thái khoá chuyển (registrar lock) của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-reglock"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "registrar_lock": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domain_id_reglock",
    "summary": "Bật/tắt khoá tên miền",
    "description": "Bật hoặc tắt khoá chuyển (registrar lock) của tên miền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-reglock"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "switch": {
          "type": "boolean",
          "description": "true|false"
         }
        },
        "required": []
       },
       "example": {
        "switch": "true|false"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "success_changes_save"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/renew": {
   "post": {
    "operationId": "post_domain_id_renew",
    "summary": "Gia hạn tên miền",
    "description": "Tạo đơn gia hạn tên miền; trả số đơn, hoá đơn và tổng tiền.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-domain-id-renew"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "years": {
          "type": "string",
          "description": "Number of years"
         },
         "pay_method": {
          "type": "integer",
          "description": "Payment method ID"
         }
        },
        "required": []
       },
       "example": {
        "years": "<years>",
        "pay_method": "<pay_method>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "order_num": 626303876,
         "invoice_id": "1201939",
         "total": "588109",
         "items": [
          {
           "type": "Domain Renew",
           "id": "200001",
           "name": "example.com",
           "product_id": "1435"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/sync": {
   "get": {
    "operationId": "get_domain_id_sync",
    "summary": "Đồng bộ tên miền",
    "description": "Đồng bộ trạng thái và hạn dùng của tên miền với nhà đăng ký.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-sync"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/lookup": {
   "post": {
    "operationId": "post_domain_lookup",
    "summary": "Kiểm tra tên miền còn trống",
    "description": "Kiểm tra tên miền có đăng ký được không, kèm giá đăng ký, chuyển, gia hạn theo số năm. `status: \"ok\"` khi còn trống.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-domain-lookup"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Domain name, ie. example.com"
         }
        },
        "required": []
       },
       "example": {
        "name": "<name>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "domain": "example.com",
         "name": "example.com",
         "sld": "example",
         "tld": ".com",
         "description": "",
         "premium": false,
         "avaliable": true,
         "transfer": false,
         "status": "ok",
         "type": "register",
         "category_id": "58",
         "tld_id": "346",
         "periods": [
          {
           "id": "346",
           "period": "1",
           "register": "319000.00",
           "transfer": "399000.00",
           "renew": "399000.00",
           "redemption": "3990000.00",
           "before": "399000.00",
           "vatFee": 29000,
           "feeRegOrigin": 290000
          },
          {
           "id": "346",
           "period": "2",
           "register": "638000.00",
           "transfer": "798000.00",
           "renew": "798000.00",
           "redemption": "7980000.00",
           "before": "-1.00",
           "vatFee": 58000,
           "feeRegOrigin": 580000
          },
          "… 8 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/name/{name}": {
   "get": {
    "operationId": "get_domain_name_name",
    "summary": "Chi tiết tên miền theo tên",
    "description": "Thông tin tên miền theo tên (ví dụ `example.com`) thay vì ID.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-name-name"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domains": [
          {
           "id": "200001",
           "name": "example.com",
           "date_created": "2025-12-07",
           "firstpayment": "50000.00",
           "recurring_amount": "585366.00",
           "period": "1",
           "expires": "2026-12-07",
           "status": "Active",
           "next_due": "2026-12-07",
           "next_invoice": "2026-11-22",
           "idprotection": "1",
           "nameservers": [
            "ns1.tino.vn",
            "ns2.tino.vn"
           ],
           "autorenew": "1"
          }
         ],
         "page": {
          "current": 0,
          "total": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/order": {
   "get": {
    "operationId": "get_domain_order",
    "summary": "Đuôi tên miền có thể đăng ký",
    "description": "Các đuôi tên miền đăng ký và chuyển về được.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-order"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_domain_order",
    "summary": "Đặt mua tên miền",
    "description": "Tạo đơn đăng ký hoặc chuyển tên miền riêng lẻ. Kiểm tra tên miền còn trống trước (`POST /v1/domain/lookup`), nếu không đơn có thể bị huỷ.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-domain-order"
    },
    "security": [
     {
      "oauth": [
       "domains:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Domain name"
         },
         "years": {
          "type": "string",
          "description": "Number of years"
         },
         "action": {
          "type": "string",
          "description": "register|transfer"
         },
         "tld_id": {
          "type": "string",
          "description": "TLD id"
         },
         "pay_method": {
          "type": "integer",
          "description": "Payment method ID"
         },
         "epp": {
          "type": "string",
          "description": "EPP Transfer code, required when transfering some domains"
         },
         "nameservers": {
          "type": "array",
          "description": "Optional array with 2 - 4 nameservers that you want to use"
         },
         "registrant": {
          "type": "integer",
          "description": "Optional contact ID to use for registrant contact this domain"
         },
         "admin": {
          "type": "integer",
          "description": "Optional contact ID to use for admin contact this domain"
         },
         "tech": {
          "type": "integer",
          "description": "Optional contact ID to use for tech contact this domain"
         },
         "billing": {
          "type": "integer",
          "description": "Optional contact ID to use for billing contact this domain"
         },
         "data": {
          "type": "array",
          "description": "Addditional data required for some TLDs"
         },
         "aff_id": {
          "type": "integer",
          "description": "Affiliate ID"
         }
        },
        "required": []
       },
       "example": {
        "name": "example.com",
        "years": "<years>",
        "action": "<action>",
        "tld_id": "<tld_id>",
        "pay_method": "<pay_method>",
        "epp": "<epp>",
        "nameservers": "<nameservers>",
        "registrant": "<registrant>",
        "admin": "<admin>",
        "tech": "<tech>",
        "billing": "<billing>",
        "data": "<data>",
        "aff_id": 55
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/order/{id}/form": {
   "get": {
    "operationId": "get_domain_order_id_form",
    "summary": "Thông tin bổ sung theo đuôi tên miền",
    "description": "Các trường bổ sung một số đuôi tên miền yêu cầu khi đặt mua. `@id` là ID sản phẩm của đuôi tên miền (ví dụ 1298 cho `.io.vn`), không phải ID một tên miền đã đăng ký.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-order-id-form"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID sản phẩm của đuôi tên miền"
      }
     },
     {
      "name": "Name",
      "in": "In",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Description"
      }
     },
     {
      "name": "---",
      "in": "---",
      "required": false,
      "schema": {
       "type": "string",
       "description": "---"
      }
     },
     {
      "name": "tld_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "TLD ID"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "forms": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domains": {
   "get": {
    "operationId": "get_domains",
    "summary": "Danh sách tên miền (phân trang)",
    "description": "Các tên miền của tài khoản, phân trang bằng `page` (bắt đầu từ 0) và `perpage`.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domains"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domains": [
          {
           "id": "200001",
           "name": "example.com",
           "expires": "2026-12-07",
           "label": "",
           "recurring_amount": "585366.00",
           "date_created": "2025-12-07",
           "status": "Active",
           "period": "1",
           "idprotection": "1",
           "autorenew": "1",
           "daytoexpire": "127"
          }
         ],
         "total": 1,
         "page": {
          "current": 0,
          "total": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domains/{id}/registrant": {
   "get": {
    "operationId": "get_domains_id_registrant",
    "summary": "Xem chủ thể tên miền đang chờ",
    "description": "Chủ thể (cả chủ hộ của hộ kinh doanh), tình trạng eKYC, bản khai và việc còn phải làm của một tên miền đang chờ đăng ký. Cần quyền `domains:registrant`: chỉ token API cá nhân có giới hạn IP. Dạng câu trả lời: [Hồ sơ chủ thể tên miền](/docs/domain-registrant#xem-chu-the).",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domains-id-registrant"
    },
    "security": [
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:registrant",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_domains_id_registrant",
    "summary": "Lưu chủ thể tên miền đang chờ",
    "description": "Body JSON `{\"registrant\": {…}, \"owner\": {…} | null}` hoặc `{\"from_domain_id\": N}` (chủ thể của tên miền đang chạy N, lấy ở GET /v1/registrants). Lưu xong Tino thử đăng ký ngay và trả hồ sơ mới. Cần quyền `domains:registrant`: chỉ token API cá nhân có giới hạn IP. Trường bắt buộc: [Hồ sơ chủ thể tên miền](/docs/domain-registrant#luu-chu-the).",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domains-id-registrant"
    },
    "security": [
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:registrant",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domains/pending": {
   "get": {
    "operationId": "get_domains_pending",
    "summary": "Tên miền chờ hoàn tất hồ sơ",
    "description": "Tên miền đã thanh toán nhưng chưa đăng ký được vì chủ thể chưa đủ thông tin hoặc hồ sơ (eKYC, bản khai), kèm việc còn phải làm (`actions`), `ready` khi Tino đang đăng ký. Cần quyền `domains:registrant`: chỉ token API cá nhân có giới hạn IP. Hướng dẫn: [Hồ sơ chủ thể tên miền](/docs/domain-registrant).",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domains-pending"
    },
    "security": [
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:registrant",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/registrants": {
   "get": {
    "operationId": "get_registrants",
    "summary": "Chủ thể đã dùng",
    "description": "Chủ thể của các tên miền đang chạy của khách, mới trước, mỗi người / tổ chức một dòng, để chọn lại cho tên miền đang chờ (`from_domain_id`). `ready: true` khi dùng là đăng ký được ngay. Cần quyền `domains:registrant`: chỉ token API cá nhân có giới hạn IP.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-registrants"
    },
    "security": [
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:registrant",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/whois/{domain}": {
   "get": {
    "operationId": "get_v1_whois_domain",
    "summary": "Tra whois tên miền (bằng token)",
    "description": "Cùng kết quả với [route công khai](/docs/api/get-whois-domain) `GET https://api.tino.vn/whois/<tên miền>`, gọi qua gateway `/v1` bằng token có quyền `domains:read`: phần mềm đã có token thì dùng chung một gốc địa chỉ, lượt tra được ghi theo tài khoản.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-v1-whois-domain"
    },
    "security": [
     {
      "oauth": [
       "domains:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "domains:read",
    "parameters": [
     {
      "name": "domain",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Tên miền cần tra (vd `example.com`), hoặc một đuôi (vd `vn`)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domain": "example.com",
         "available": false,
         "status": "",
         "whois": {
          "domain": "example.com",
          "registrar": "Web Commerce Communications Ltd.",
          "createDate": "2025-12-07T11:00:00.471Z",
          "expiredDate": "2026-12-07T11:00:00.471Z",
          "updatedDate": "2026-03-30T16:00:00.697Z",
          "nameservers": [
           "ns1.tino.vn",
           "ns2.tino.vn"
          ],
          "status": [
           "clientDeleteProhibited https://example.org/epp#clientDeleteProhibited",
           "clientUpdateProhibited https://example.org/epp#clientUpdateProhibited",
           "… 1 more item(s)"
          ],
          "WhoisServer": "whois.webnic.cc"
         },
         "raw": "Domain Name: example.com<br />Registry Domain ID: DO_d59b4fbe41112c70f4c72e6116f376a3-ARUBA<br />Registrar WHOIS Server: whois.webnic.cc<br />Registrar URL: https://www.webnic.cc<br />Updated Date: 2026-03-30T16:00:00.697Z<br />Creation Date: 2025-12-07T11:00:00.471Z<br />Registry Expiry D…"
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/dns": {
   "get": {
    "operationId": "get_dns",
    "summary": "Danh sách vùng DNS",
    "description": "Mọi vùng DNS của tài khoản, kèm dịch vụ DNS chứa chúng.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-dns"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "service_ids": [
          "100003"
         ],
         "zones": [
          {
           "domain_id": "500001",
           "name": "example.com",
           "service_id": "100003"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/dns/templates": {
   "get": {
    "operationId": "get_dns_templates",
    "summary": "Mẫu bản ghi DNS",
    "description": "Các mẫu bản ghi DNS dựng sẵn (ví dụ mẫu mặc định, LadiPage).",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-dns-templates"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/dns": {
   "get": {
    "operationId": "get_domain_id_dns",
    "summary": "Bản ghi DNS của tên miền",
    "description": "Các bản ghi DNS của tên miền.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-dns"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_domain_id_dns",
    "summary": "Thêm bản ghi DNS cho tên miền",
    "description": "Thêm một bản ghi DNS cho tên miền.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-domain-id-dns"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Reord name"
         },
         "type": {
          "type": "string",
          "description": "Reord type"
         },
         "priority": {
          "type": "string",
          "description": "Reord priority"
         },
         "content": {
          "type": "string",
          "description": "Reord content eg. IP addres for A records"
         }
        },
        "required": []
       },
       "example": {
        "name": "<name>",
        "type": "<type>",
        "priority": "<priority>",
        "content": "<content>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/dns/{index}": {
   "put": {
    "operationId": "put_domain_id_dns_index",
    "summary": "Sửa bản ghi DNS của tên miền",
    "description": "Sửa bản ghi DNS thứ `@index` của tên miền.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-domain-id-dns-index"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     },
     {
      "name": "index",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Số thứ tự bản ghi trong danh sách bản ghi DNS của tên miền"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "record_id": {
          "type": "integer",
          "description": "Recod index"
         },
         "name": {
          "type": "string",
          "description": "Record name"
         },
         "type": {
          "type": "string",
          "description": "Record type"
         },
         "priority": {
          "type": "string",
          "description": "Record priority"
         },
         "content": {
          "type": "string",
          "description": "Record content eg. IP address for A records"
         }
        },
        "required": []
       },
       "example": {
        "record_id": "<record_id>",
        "name": "<name>",
        "type": "<type>",
        "priority": "<priority>",
        "content": "<content>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "delete_domain_id_dns_index",
    "summary": "Xoá bản ghi DNS của tên miền",
    "description": "Xoá bản ghi DNS thứ `@index` của tên miền.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-domain-id-dns-index"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     },
     {
      "name": "index",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Số thứ tự bản ghi trong danh sách bản ghi DNS của tên miền"
      }
     },
     {
      "name": "record_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Recod index"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/domain/{id}/dns/types": {
   "get": {
    "operationId": "get_domain_id_dns_types",
    "summary": "Loại bản ghi DNS hỗ trợ",
    "description": "Các loại bản ghi DNS dùng được cho tên miền.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-domain-id-dns-types"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tên miền"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{service_id}/dns": {
   "get": {
    "operationId": "get_service_service_id_dns",
    "summary": "Vùng DNS của dịch vụ",
    "description": "Các vùng DNS thuộc dịch vụ DNS `@service_id`.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-service-id-dns"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "zones": [
          {
           "domain_id": "500001",
           "name": "example.com",
           "service_id": "100003"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_service_id_dns",
    "summary": "Thêm vùng DNS",
    "description": "Tạo vùng DNS mới trong dịch vụ DNS.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-service-id-dns"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ DNS"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Zone name"
         }
        },
        "required": []
       },
       "example": {
        "name": "example.com"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{service_id}/dns/{zone_id}": {
   "get": {
    "operationId": "get_service_service_id_dns_zone_id",
    "summary": "Chi tiết vùng DNS",
    "description": "Thông tin vùng DNS và mọi bản ghi của nó.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-service-id-dns-zone-id"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID vùng DNS"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_service_service_id_dns_zone_id",
    "summary": "Sửa vùng DNS",
    "description": "Cập nhật ghi chú của vùng DNS.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-service-service-id-dns-zone-id"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID vùng DNS"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "comment": {
          "type": "string",
          "description": "Zone comment"
         }
        },
        "required": []
       },
       "example": {
        "comment": "<comment>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "delete_service_service_id_dns_zone_id",
    "summary": "Xoá vùng DNS",
    "description": "Xoá vùng DNS.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-service-service-id-dns-zone-id"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID vùng DNS"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{service_id}/dns/{zone_id}/dnssec": {
   "get": {
    "operationId": "get_service_service_id_dns_zone_id_dnssec",
    "summary": "Xem DNSSEC của vùng DNS",
    "description": "Vùng DNS có bật DNSSEC không.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-service-id-dns-zone-id-dnssec"
    },
    "security": [
     {
      "oauth": [
       "dns:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:read",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID vùng DNS"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "dnssec": false
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_service_service_id_dns_zone_id_dnssec",
    "summary": "Bật/tắt DNSSEC của vùng DNS",
    "description": "Bật hoặc tắt DNSSEC cho vùng DNS; chọn thao tác bằng `widgetdo`.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-service-service-id-dns-zone-id-dnssec"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID vùng DNS"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "widgetdo": {
          "type": "string",
          "description": "widgetdo action"
         }
        },
        "required": [
         "widgetdo"
        ]
       },
       "example": {
        "widgetdo": "<widgetdo>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{service_id}/dns/{zone_id}/records": {
   "post": {
    "operationId": "post_service_service_id_dns_zone_id_records",
    "summary": "Thêm bản ghi DNS",
    "description": "Thêm một bản ghi vào vùng DNS.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-service-id-dns-zone-id-records"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID vùng DNS"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Record name"
         },
         "ttl": {
          "type": "integer",
          "description": "Record ttl"
         },
         "priority": {
          "type": "integer",
          "description": "Priority of the record"
         },
         "type": {
          "type": "string",
          "description": "Record type"
         },
         "content": {
          "type": "string",
          "description": "Contents of the record"
         }
        },
        "required": []
       },
       "example": {
        "name": "example.com",
        "ttl": 3600,
        "priority": 10,
        "type": "A",
        "content": "203.0.113.10"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "record": {
          "name": "tino-sdk-capture",
          "type": "TXT",
          "ttl": 3600,
          "priority": 0,
          "content": "<redacted>"
         },
         "info": [
          [
           "dnsnewrecordadded",
           "TXT"
          ]
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{service_id}/dns/{zone_id}/records/{record_id}": {
   "put": {
    "operationId": "put_service_service_id_dns_zone_id_records_record_id",
    "summary": "Sửa bản ghi DNS",
    "description": "Sửa một bản ghi của vùng DNS.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-service-service-id-dns-zone-id-records-record-id"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID vùng DNS"
      }
     },
     {
      "name": "record_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID bản ghi DNS"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Record name"
         },
         "ttl": {
          "type": "integer",
          "description": "Record ttl"
         },
         "priority": {
          "type": "integer",
          "description": "Priority of the record"
         },
         "type": {
          "type": "string",
          "description": "Record type"
         },
         "content": {
          "type": "string",
          "description": "Contents of the record"
         }
        },
        "required": []
       },
       "example": {
        "name": "example.com",
        "ttl": 3600,
        "priority": 10,
        "type": "A",
        "content": "203.0.113.10"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "record": {
          "id": "419192",
          "type": "TXT",
          "ttl": 3600,
          "name": "tino-sdk-capture",
          "priority": 0,
          "content": "<redacted>"
         },
         "info": [
          "dnsrecordupdated"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "delete_service_service_id_dns_zone_id_records_record_id",
    "summary": "Xoá bản ghi DNS",
    "description": "Xoá một bản ghi của vùng DNS.",
    "tags": [
     "DNS"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-service-service-id-dns-zone-id-records-record-id"
    },
    "security": [
     {
      "oauth": [
       "dns:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "dns:write",
    "parameters": [
     {
      "name": "service_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ DNS"
      }
     },
     {
      "name": "zone_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID vùng DNS"
      }
     },
     {
      "name": "record_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID bản ghi DNS"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/addfunds": {
   "get": {
    "operationId": "get_addfunds",
    "summary": "Thông tin nạp tiền",
    "description": "Số tiền nạp tối thiểu, tối đa và các cổng thanh toán dùng được.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-addfunds"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "min_amount": 50000,
         "max_amount": 500000000,
         "gateways": [
          {
           "id": 190,
           "name": "Thanh toán bằng chuyển khoản - QR Code - Momo - ZaloPay"
          },
          {
           "id": 70,
           "name": "Ví điện tử MoMo"
          },
          "… 2 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_addfunds",
    "summary": "Nạp tiền",
    "description": "Tạo hoá đơn nạp tiền vào tài khoản; `gateway` lấy từ `GET /v1/addfunds`.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-addfunds"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "amount": {
          "type": "number",
          "description": "Amount to add to account"
         },
         "gateway": {
          "type": "number",
          "description": "Payment gateway ID, use `GET /addfunds` to list available gateways"
         }
        },
        "required": []
       },
       "example": {
        "amount": "100.00",
        "gateway": "<gateway>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "invoice_id": 1201937
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/balance": {
   "get": {
    "operationId": "get_balance",
    "summary": "Số dư tài khoản",
    "description": "Tổng tiền hoá đơn chưa thanh toán (`acc_balance`) và số dư tín dụng (`acc_credit`).",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-balance"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "details": {
          "currency": "đ",
          "acc_balance": 574723,
          "acc_credit": "0.00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/billing/{invoice_id}/pay/{gateway_id}": {
   "get": {
    "operationId": "get_billing_invoice_id_pay_gateway_id",
    "summary": "Link thanh toán hoá đơn",
    "description": "Nội dung thanh toán hoá đơn `@invoice_id` qua cổng `@gateway_id`.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-billing-invoice-id-pay-gateway-id"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [
     {
      "name": "invoice_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID hoá đơn"
      }
     },
     {
      "name": "gateway_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID cổng thanh toán"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "content": "<redacted>"
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/billing/addfunds": {
   "post": {
    "operationId": "post_billing_addfunds",
    "summary": "Nạp tiền (billing)",
    "description": "Tạo hoá đơn nạp tiền vào tài khoản.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-billing-addfunds"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "funds": {
          "type": "integer",
          "description": "Amount of money"
         },
         "gateway": {
          "type": "integer",
          "description": "Payment Method"
         }
        },
        "required": []
       },
       "example": {
        "funds": 0,
        "gateway": 0
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "invoice_id": "1201937",
         "info": [
          "An invoice add credits have created"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/billing/creditlogs": {
   "get": {
    "operationId": "get_billing_creditlogs",
    "summary": "Lịch sử số dư tín dụng",
    "description": "Các lần cộng, trừ số dư tín dụng của tài khoản.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-billing-creditlogs"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "logs": [],
         "page": {
          "total": 0,
          "pages": 0,
          "current": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/billing/creditvoucher": {
   "post": {
    "operationId": "post_billing_creditvoucher",
    "summary": "Dùng mã nạp tiền",
    "description": "Nạp tín dụng bằng mã voucher.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-billing-creditvoucher"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "description": "Voucher Code"
         }
        },
        "required": []
       },
       "example": {
        "code": "<code>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/estimate/{id}/pdf": {
   "get": {
    "operationId": "get_estimate_id_pdf",
    "summary": "Tải PDF báo giá",
    "description": "File PDF của báo giá `@id`.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-estimate-id-pdf"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID báo giá"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/estimates": {
   "get": {
    "operationId": "get_estimates",
    "summary": "Danh sách báo giá",
    "description": "Các báo giá của tài khoản, phân trang bằng `page` (bắt đầu từ 0) và `perpage`.\n\nLọc: `filter[service_status]` theo trạng thái dịch vụ, `filter[service]` theo ID dịch vụ.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-estimates"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "estimates": [],
         "total": 0,
         "page": {
          "total": 0,
          "pages": 0,
          "current": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/estimates/{id}": {
   "get": {
    "operationId": "get_estimates_id",
    "summary": "Chi tiết báo giá",
    "description": "Thông tin một báo giá.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-estimates-id"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID báo giá"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoice": {
   "get": {
    "operationId": "get_invoice",
    "summary": "Danh sách hoá đơn",
    "description": "Mọi hoá đơn của tài khoản.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-invoice"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "invoices": [
          {
           "id": "300001",
           "date": "2026-03-30",
           "dateorig": "2026-03-30",
           "duedate": "2026-12-07",
           "paybefore": "2026-12-07",
           "total": "574723.00",
           "subtotal": "532151.00",
           "tax": "42572.00",
           "tax2": "0.00",
           "datepaid": "0000-00-00 10:00:00",
           "status": "Unpaid",
           "merge_id": null,
           "number": "TNG300001",
           "currency": "VND"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoice/{id}": {
   "get": {
    "operationId": "get_invoice_id",
    "summary": "Chi tiết hoá đơn",
    "description": "Thông tin hoá đơn: dòng tiền, thuế, trạng thái, giao dịch.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-invoice-id"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID hoá đơn"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "invoice": {
          "id": "300001",
          "status": "Unpaid",
          "contact_id": "0",
          "date": "2026-03-30",
          "duedate": "2026-12-07",
          "paybefore": "2026-12-07",
          "datepaid": "0000-00-00 10:00:00",
          "subtotal": 532151,
          "credit": 0,
          "tax": 42572,
          "taxrate": 10,
          "tax2": 0,
          "taxrate2": 0,
          "taxexempt": "0",
          "total": 574723,
          "grandtotal": 574723,
          "payment_module": "190",
          "rate": 1,
          "rate2": 0,
          "rate3": 1,
          "…": "11 more key(s)"
         },
         "cancancelinvoice": false,
         "invoicebody": "",
         "transactions": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "delete_invoice_id",
    "summary": "Xoá hoá đơn",
    "description": "Xoá hoá đơn `@id`.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-invoice-id"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID hoá đơn"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "info": [
          "invs_deleted"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoice/{id}/credit": {
   "post": {
    "operationId": "post_invoice_id_credit",
    "summary": "Trả hoá đơn bằng số dư",
    "description": "Dùng số dư tín dụng của tài khoản để trả hoá đơn.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-invoice-id-credit"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID hoá đơn"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "amount": {
          "type": "string"
         }
        },
        "required": []
       },
       "example": {
        "amount": "short"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoice/{id}/pdf": {
   "get": {
    "operationId": "get_invoice_id_pdf",
    "summary": "Tải PDF hoá đơn",
    "description": "File PDF của hoá đơn, dạng chuỗi base64.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-invoice-id-pdf"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID hoá đơn"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "invoice": "JVBERi0xLjQK…"
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoices": {
   "get": {
    "operationId": "get_invoices",
    "summary": "Danh sách hoá đơn (phân trang)",
    "description": "Các hoá đơn của tài khoản, phân trang bằng `page` (bắt đầu từ 0) và `perpage`.\n\nLọc: `filter[service_status]` theo trạng thái dịch vụ, `filter[service]` theo ID dịch vụ.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-invoices"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "invoices": [
          {
           "id": "300001",
           "date": "2026-03-30",
           "dateorig": "2026-03-30",
           "duedate": "2026-12-07",
           "paybefore": "2026-12-07",
           "total": "574723.00",
           "subtotal": "532151.00",
           "tax": "42572.00",
           "tax2": "0.00",
           "datepaid": "0000-00-00 10:00:00",
           "status": "Unpaid",
           "merge_id": null,
           "number": "TNG300001",
           "currency": "VND"
          }
         ],
         "total": 1,
         "page": {
          "total": 1,
          "pages": 1,
          "current": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoices/due": {
   "get": {
    "operationId": "get_invoices_due",
    "summary": "Hoá đơn đến hạn",
    "description": "Các hoá đơn chưa thanh toán, phân trang bằng `page` (bắt đầu từ 0) và `perpage`.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-invoices-due"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "invoices_due": [
          {
           "id": "300001",
           "date": "2026-03-30",
           "duedate": "2026-12-07",
           "paybefore": "2026-12-07",
           "total": "574723.00",
           "status": "Unpaid",
           "number": "TNG300001",
           "currency": "VND"
          }
         ],
         "total": 1,
         "page": {
          "total": 1,
          "pages": 1,
          "current": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/invoices/payall": {
   "post": {
    "operationId": "post_invoices_payall",
    "summary": "Thanh toán gộp hoá đơn",
    "description": "Thanh toán gộp các hoá đơn chọn trong `selected`; trả `invoice_id` của hoá đơn cần thanh toán.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-invoices-payall"
    },
    "security": [
     {
      "oauth": [
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "selected": {
          "type": "array",
          "description": "selected invoice id"
         }
        },
        "required": []
       },
       "example": {
        "selected": []
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "invoice_id": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/payment": {
   "get": {
    "operationId": "get_payment",
    "summary": "Phương thức thanh toán",
    "description": "Các phương thức thanh toán dùng được.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-payment"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "payments": {
          "43": "VCB - Ngân hàng TMCP Ngoại Thương Việt Nam",
          "70": "Ví điện tử MoMo",
          "71": "Thanh toán Thẻ tín dụng - ATM",
          "190": "Thanh toán bằng chuyển khoản - QR Code - Momo - ZaloPay"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/payment/fees": {
   "get": {
    "operationId": "get_payment_fees",
    "summary": "Phí phương thức thanh toán",
    "description": "Các phương thức thanh toán kèm phí cố định và phí phần trăm.",
    "tags": [
     "Hoá đơn & thanh toán"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-payment-fees"
    },
    "security": [
     {
      "oauth": [
       "billing:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "billing:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "payments": [
          {
           "id": 190,
           "name": "Thanh toán bằng chuyển khoản - QR Code - Momo - ZaloPay",
           "fixed_fee": "0",
           "percent_fee": "0",
           "icon": "payment-logo-190"
          },
          {
           "id": 70,
           "name": "Ví điện tử MoMo",
           "fixed_fee": "0",
           "percent_fee": "0",
           "icon": "payment-logo-70"
          },
          "… 2 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/carts": {
   "post": {
    "operationId": "post_carts",
    "summary": "Tạo giỏ hàng",
    "description": "Tạo giỏ của tài khoản (token gắn giỏ vào tài khoản), có thể kèm `items`, `vat_info`, `aff_id`. Trả `uuid` của giỏ.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-carts"
    },
    "security": [
     {
      "oauth": [
       "orders:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "description": "Món theo định dạng POST /quote (product; domain đăng ký/chuyển)"
         }
        },
        "required": []
       },
       "example": {
        "items": "<items>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/carts/{uuid}": {
   "get": {
    "operationId": "get_carts_uuid",
    "summary": "Xem giỏ hàng",
    "description": "Giỏ và giá tính tại thời điểm gọi; chủ giỏ thấy thêm số dư, `amount_due`, mã nội dung chuyển khoản `pay_code`, `ready`.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-carts-uuid"
    },
    "security": [
     {
      "oauth": [
       "orders:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [
     {
      "name": "uuid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Mã giỏ hàng (`uuid` trả về ở POST /carts)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_carts_uuid",
    "summary": "Sửa giỏ hàng",
    "description": "Thay `items`, `vat_info`, `aff_id` và/hoặc `current_step` (`cart`, `account`, `payment`). Gửi cả danh sách món.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-carts-uuid"
    },
    "security": [
     {
      "oauth": [
       "orders:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [
     {
      "name": "uuid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Mã giỏ hàng (`uuid` trả về ở POST /carts)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/carts/{uuid}/confirm": {
   "post": {
    "operationId": "post_carts_uuid_confirm",
    "summary": "Chốt đơn từ giỏ",
    "description": "Đủ tiền (số dư hoặc chuyển khoản theo `pay_code`) và đủ thông tin thì tạo đơn và hoá đơn đã trả. Gọi lại nhiều lần không tạo đơn thứ hai. Cần cả `orders:write` và `billing:write`: thiếu một trong hai trả 403 `insufficient_scope`.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-carts-uuid-confirm"
    },
    "security": [
     {
      "oauth": [
       "orders:write",
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [
     {
      "name": "uuid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Mã giỏ hàng (`uuid` trả về ở POST /carts)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/carts/latest": {
   "get": {
    "operationId": "get_carts_latest",
    "summary": "Giỏ hàng gần nhất",
    "description": "Giỏ chưa có đơn, sửa gần nhất, của tài khoản.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-carts-latest"
    },
    "security": [
     {
      "oauth": [
       "orders:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/order": {
   "post": {
    "operationId": "post_order",
    "summary": "Đặt mua nhiều dịch vụ",
    "description": "Tạo đơn và hoá đơn cho nhiều món một lần (gói dịch vụ, tên miền, chứng chỉ); thanh toán theo `pay_method`. Lỗi từng món trả HTTP 200 với `error` = `[\"item_error\", {code, message, item}]` (`item`: vị trí món trong `items`); gói hosting phải có `domain`. Cần cả `orders:write` và `billing:write`: thiếu một trong hai trả 403 `insufficient_scope`.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-order"
    },
    "security": [
     {
      "oauth": [
       "orders:write",
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pay_method": {
          "type": "integer",
          "description": "Payment method ID"
         },
         "ignore_errors": {
          "type": "boolean",
          "description": "Process order even if some of the items were rejected due to errors"
         },
         "items": {
          "type": "array",
          "description": "list with order items"
         },
         "aff_id": {
          "type": "integer",
          "description": "Affiliate ID"
         }
        },
        "required": []
       },
       "example": {
        "pay_method": 1,
        "ignore_errors": "No error",
        "items": [
         {
          "type": "certificate",
          "product_id": 840,
          "csr": "-----BEGIN CERTIFICATE REQUEST----- (...)",
          "years": 1,
          "approver_email": "admin@example.com"
         }
        ],
        "aff_id": 55
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/order/{product_id}": {
   "post": {
    "operationId": "post_order_product_id",
    "summary": "Đặt mua một dịch vụ",
    "description": "Tạo đơn cho một gói theo `product_id`, `cycle`, `domain` (dạng cũ; nên dùng POST /v1/order). Cần cả `orders:write` và `billing:write`: thiếu một trong hai trả 403 `insufficient_scope`.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-order-product-id"
    },
    "security": [
     {
      "oauth": [
       "orders:write",
       "billing:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [
     {
      "name": "product_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID sản phẩm (gói dịch vụ, chứng chỉ)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "domain": {
          "type": "string",
          "description": "Domain name, ie. example.com, may be optional"
         },
         "cycle": {
          "type": "string",
          "description": "Billing period symbol"
         },
         "pay_method": {
          "type": "integer",
          "description": "Payment method ID"
         },
         "custom": {
          "type": "array",
          "description": "Additional options data available for sop products"
         },
         "promocode": {
          "type": "string",
          "description": "Promotion code"
         },
         "aff_id": {
          "type": "integer",
          "description": "Affiliate ID"
         }
        },
        "required": []
       },
       "example": {
        "domain": "<domain>",
        "cycle": "<cycle>",
        "pay_method": "<pay_method>",
        "custom": "<custom>",
        "promocode": "<promocode>",
        "aff_id": 55
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/quote": {
   "post": {
    "operationId": "post_quote",
    "summary": "Báo giá đơn hàng",
    "description": "Tính tiền một danh sách món (gói dịch vụ, tên miền) như sẽ đặt: tạm tính, thuế, giảm giá, giá gia hạn. Không tạo đơn, không tạo hoá đơn. Cùng dạng `items` với POST /v1/order.",
    "tags": [
     "Đặt hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-quote"
    },
    "security": [
     {
      "oauth": [
       "orders:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "orders:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pay_method": {
          "type": "integer",
          "description": "Payment method ID"
         },
         "output": {
          "type": "string",
          "description": "Type of output, default is short. Possible options    short - Basic details about the item in cart</li>  config- Basic details and form components</li>  full - All details available in cart</li> </ul>"
         },
         "items": {
          "type": "array",
          "description": "list with order items"
         }
        },
        "required": []
       },
       "example": {
        "pay_method": "<pay_method>",
        "output": "short",
        "items": [
         {
          "type": "certificate",
          "product_id": 840,
          "csr": "-----BEGIN CERTIFICATE REQUEST----- (...)",
          "years": 1,
          "approver_email": "admin@example.com"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "summary": {
          "subtotal": 79000,
          "total": 85320,
          "setup_fee": 0,
          "credit": 0,
          "discount": 0,
          "cost": 79000,
          "recurring": [
           {
            "title": "1 tháng",
            "price": 85320,
            "value": "m"
           }
          ],
          "recurring_discount": [],
          "tax": [
           {
            "name": "VAT",
            "tax": 6320,
            "value": 8
           }
          ]
         },
         "items": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/knowledgebase": {
   "get": {
    "operationId": "get_knowledgebase",
    "summary": "Danh mục bài hướng dẫn",
    "description": "Mọi danh mục của thư viện hướng dẫn.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-knowledgebase"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "categories": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/knowledgebase/{category_id}": {
   "get": {
    "operationId": "get_knowledgebase_category_id",
    "summary": "Bài hướng dẫn trong danh mục",
    "description": "Danh mục con và bài viết của một danh mục hướng dẫn.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-knowledgebase-category-id"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "category_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID danh mục hướng dẫn"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "subcategories": null,
         "articles": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/knowledgebase/article/{article_id}": {
   "get": {
    "operationId": "get_knowledgebase_article_article_id",
    "summary": "Chi tiết bài hướng dẫn",
    "description": "Nội dung một bài hướng dẫn.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-knowledgebase-article-article-id"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "article_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID bài hướng dẫn"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "article": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/news": {
   "get": {
    "operationId": "get_news",
    "summary": "Danh sách tin tức",
    "description": "Các tin tức, thông báo của Tino.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-news"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "news": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/news/{news_id}": {
   "get": {
    "operationId": "get_news_news_id",
    "summary": "Chi tiết tin tức",
    "description": "Nội dung một tin tức.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-news-news-id"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "news_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tin tức"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "annoucement": null
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/ticket/attachment/{file}": {
   "get": {
    "operationId": "get_ticket_attachment_file",
    "summary": "Tải tệp đính kèm ticket",
    "description": "Tệp đính kèm của ticket.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-ticket-attachment-file"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Mã tệp đính kèm của ticket"
      }
     },
     {
      "name": "Name",
      "in": "In",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Description"
      }
     },
     {
      "name": "---",
      "in": "---",
      "required": false,
      "schema": {
       "type": "string",
       "description": "---"
      }
     },
     {
      "name": "number",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Ticket number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": [
         "file_not_found"
        ]
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/ticket/departments": {
   "get": {
    "operationId": "get_ticket_departments",
    "summary": "Phòng ban hỗ trợ",
    "description": "Các phòng ban nhận ticket (`id` dùng làm `dept_id` khi tạo ticket).",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-ticket-departments"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "departments": [
          {
           "id": "2",
           "name": "Phòng hỗ trợ kỹ thuật",
           "description": "Nơi tiếp nhận những yêu cầu hỗ trợ kỹ thuật. Khách hàng có thể liên hệ trực tiếp qua hotline 0364.333.333 nhấn phím 2 hoặc email user@example.com trong trường hợp khẩn cấp.",
           "allow_priority": true
          },
          {
           "id": "3",
           "name": "Phòng Kinh Doanh",
           "description": "Nơi tiếp nhận và giải quyết những vấn đề liên quan đến báo giá, hợp đồng và dịch vụ. Khách hàng có thể liên hệ trực tiếp hotline 0364.333.333 nhấn phím 1 hoặc email user@example.com trong trường hợp khẩn cấp.",
           "allow_priority": false
          },
          "… 5 more item(s)"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/tickets": {
   "get": {
    "operationId": "get_tickets",
    "summary": "Danh sách ticket",
    "description": "Các ticket hỗ trợ của tài khoản.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-tickets"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Zero-based page index. page=0 is the first page; the response echoes it 1-based in page.current. Default: `0`."
      }
     },
     {
      "name": "perpage",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Rows per page. Defaults to the account's RecordsPerPage setting."
      }
     },
     {
      "name": "orderby",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Sort expression in the form `field|DESC` or `field|ASC`, e.g. `date|DESC`."
      }
     },
     {
      "name": "filter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "object",
       "description": "Endpoint-specific filters, serialised as filter[key]=value."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "tickets": [
          {
           "client_read": "1",
           "ticket_number": "400001",
           "date": "2026-07-24 10:00:00",
           "deptname": "Phòng hỗ trợ kỹ thuật",
           "subject": "test example.org",
           "status": "Closed",
           "lastreply": "2026-07-24 10:00:00"
          },
          {
           "client_read": "1",
           "ticket_number": "400002",
           "date": "2026-07-24 10:00:00",
           "deptname": "Phòng quản lý tên miền",
           "subject": "test email",
           "status": "Answered",
           "lastreply": "2026-07-24 10:00:00"
          },
          "… 5 more item(s)"
         ],
         "page": {
          "current": 0,
          "total": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_tickets",
    "summary": "Tạo ticket",
    "description": "Tạo ticket hỗ trợ mới. Trả số ticket ở trường `ticket` (không phải `ticket_number`), ví dụ `{\"ticket\": 886174}`; dùng số này làm `@number` ở các route ticket khác.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-tickets"
    },
    "security": [
     {
      "oauth": [
       "tickets:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:write",
    "parameters": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "dept_id": {
          "type": "integer",
          "description": "Department id"
         },
         "subject": {
          "type": "string",
          "description": "Ticket subject"
         },
         "body": {
          "type": "string",
          "description": "Ticket message"
         }
        },
        "required": []
       },
       "example": {
        "dept_id": 1,
        "subject": "Subject",
        "body": "Message ..."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "ticket": 886174
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/tickets/{number}": {
   "get": {
    "operationId": "get_tickets_number",
    "summary": "Chi tiết ticket",
    "description": "Nội dung ticket và mọi phản hồi.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-tickets-number"
    },
    "security": [
     {
      "oauth": [
       "tickets:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:read",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "Số ticket"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "ticket": {
          "date": "2026-07-24 10:00:00",
          "ticket_number": "400001",
          "name": "Nguyen Van A",
          "email": "user@example.com",
          "subject": "test example.org",
          "body": "Nơi tiếp nhận những yêu cầu hỗ trợ bản khai, xác thực tên miền. Khách hàng có thể liên hệ trực tiếp qua hotline 0364.333.333 nhấn phím 2",
          "status": "Closed",
          "client_read": "1",
          "type": "Email",
          "deptname": "Phòng hỗ trợ kỹ thuật",
          "attachments": []
         },
         "replies": []
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_tickets_number",
    "summary": "Trả lời ticket",
    "description": "Gửi phản hồi vào ticket.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-tickets-number"
    },
    "security": [
     {
      "oauth": [
       "tickets:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:write",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Số ticket"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "body": {
          "type": "string",
          "description": "Reply message"
         }
        },
        "required": []
       },
       "example": {
        "body": "reply text .."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "info": [
          "reply_added"
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/tickets/{number}/close": {
   "put": {
    "operationId": "put_tickets_number_close",
    "summary": "Đóng ticket",
    "description": "Đóng ticket.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-tickets-number-close"
    },
    "security": [
     {
      "oauth": [
       "tickets:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:write",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Số ticket"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/tickets/{number}/open": {
   "put": {
    "operationId": "put_tickets_number_open",
    "summary": "Mở lại ticket",
    "description": "Mở lại ticket đã đóng.",
    "tags": [
     "Ticket & hỗ trợ"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-tickets-number-open"
    },
    "security": [
     {
      "oauth": [
       "tickets:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "tickets:write",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Số ticket"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "status": true
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/events": {
   "get": {
    "operationId": "get_service_id_waf_events",
    "summary": "Tóm tắt sự kiện",
    "description": "Tổng số, số bị chặn, số bị thử thách theo ngày và 5 lý do nhiều nhất. Query `days` (mặc định 7).",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-events"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "days",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Number of days to summarise. Default: `7`."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/ip-rules": {
   "get": {
    "operationId": "get_service_id_waf_ip_rules",
    "summary": "Danh sách IP chặn, cho phép",
    "description": "Luật IP của tài khoản, áp cho mọi website. Query: `action`, `page`, `per_page`.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-ip-rules"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Only entries with this action: `block` or `allow`."
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Page number, from 1."
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Items per page."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_id_waf_ip_rules",
    "summary": "Chặn hoặc cho phép IP",
    "description": "Body `value` (IP hoặc dải IP), `action` (chặn hoặc cho phép), `note` (không bắt buộc). Mục đã có thì trả HTTP 200 thay vì 201.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-waf-ip-rules"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "value": {
          "type": "string",
          "description": "IP address or range (CIDR), e.g. `203.0.113.10` or `203.0.113.0/24`."
         },
         "action": {
          "type": "string",
          "description": "`block` or `allow`."
         },
         "note": {
          "type": "string",
          "description": "Note shown in the list."
         }
        },
        "required": [
         "value",
         "action"
        ]
       },
       "example": {
        "value": "203.0.113.0/24",
        "action": "block",
        "note": "Quét cổng"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/ip-rules/{rule}": {
   "delete": {
    "operationId": "delete_service_id_waf_ip_rules_rule",
    "summary": "Xoá mục IP",
    "description": "Xoá một mục chặn, cho phép theo ID (UUID).",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-service-id-waf-ip-rules-rule"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "rule",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) mục IP chặn/cho phép"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/ip-rules/apply": {
   "post": {
    "operationId": "post_service_id_waf_ip_rules_apply",
    "summary": "Áp lại luật IP",
    "description": "Đặt lại luật IP lên mọi website còn thiếu; trả về `not_enforced`.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-waf-ip-rules-apply"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/overview": {
   "get": {
    "operationId": "get_service_id_waf_overview",
    "summary": "Tổng quan TinoWAF",
    "description": "Trạng thái dịch vụ, thông số hiệu lực, mức dùng và link mở TinoWAF.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-overview"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones": {
   "get": {
    "operationId": "get_service_id_waf_zones",
    "summary": "Danh sách website",
    "description": "Website được TinoWAF bảo vệ. Query: `page`, `per_page`.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-zones"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Page number, from 1."
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Items per page."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_id_waf_zones",
    "summary": "Thêm website",
    "description": "Thêm website, được cả hoặc không gì: body `apex` (tên miền chính), `hostnames` (tên miền con, không bắt buộc), `origins` (máy chủ gốc). Trả về website, tên miền, bản ghi DNS cần trỏ, máy chủ gốc và cảnh báo.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-waf-zones"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "apex": {
          "type": "string",
          "description": "Main domain of the website, e.g. `example.com`."
         },
         "hostnames": {
          "type": "array",
          "description": "Subdomains to protect as well, e.g. `[\"www.example.com\"]`."
         },
         "origins": {
          "type": "array",
          "description": "Origin servers: `[{address, port, tls_mode}]`, `address` an IP or host name; `tls_mode` is `verify` (HTTPS, certificate checked), `no_verify` (HTTPS, self-signed certificate) or `plain` (HTTP), among `tls_modes` of the origin route."
         }
        },
        "required": [
         "apex",
         "origins"
        ]
       },
       "example": {
        "apex": "example.com",
        "hostnames": [
         "www.example.com"
        ],
        "origins": [
         {
          "address": "203.0.113.10",
          "port": 443,
          "tls_mode": "verify"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}": {
   "get": {
    "operationId": "get_service_id_waf_zones_zone",
    "summary": "Chi tiết website",
    "description": "Một website theo ID (UUID).",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-zones-zone"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "delete_service_id_waf_zones_zone",
    "summary": "Xoá website",
    "description": "TinoWAF gỡ website khỏi hệ thống bảo vệ ngay; trả về `{id, deleted: true}`.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-service-id-waf-zones-zone"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/check": {
   "post": {
    "operationId": "post_service_id_waf_zones_zone_check",
    "summary": "Kiểm tra DNS ngay",
    "description": "Xác minh các tên miền đang chờ trỏ DNS, xác minh lại tên miền đã hết hạn; trả về bản ghi DNS, website và kết quả kiểm tra.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-waf-zones-zone-check"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/events": {
   "get": {
    "operationId": "get_service_id_waf_zones_zone_events",
    "summary": "Nhật ký sự kiện của website",
    "description": "Sự kiện mới nhất trước. Query: `action`, `from`, `to` (RFC 3339), `cursor`, `limit`; `meta.next_cursor` cho trang sau.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-zones-zone-events"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     },
     {
      "name": "action",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Only events with this action: `block`, `challenge`, `rate_limited` or `log`."
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Start time, RFC 3339 (e.g. `2026-10-27T00:00:00+07:00`)."
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "End time, RFC 3339."
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`meta.next_cursor` of the previous page."
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Events per page."
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/hostnames": {
   "get": {
    "operationId": "get_service_id_waf_zones_zone_hostnames",
    "summary": "Tên miền của website",
    "description": "Tên miền của website kèm bản ghi DNS cần trỏ và hạn mức số tên miền.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-zones-zone-hostnames"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "post_service_id_waf_zones_zone_hostnames",
    "summary": "Thêm tên miền vào website",
    "description": "Body `name`: tên miền cần thêm. Trả về bản ghi DNS cần trỏ.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/post-service-id-waf-zones-zone-hostnames"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Domain name to add, e.g. `shop.example.com`."
         }
        },
        "required": [
         "name"
        ]
       },
       "example": {
        "name": "shop.example.com"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/hostnames/{hostname}": {
   "delete": {
    "operationId": "delete_service_id_waf_zones_zone_hostnames_hostname",
    "summary": "Gỡ tên miền khỏi website",
    "description": "Gỡ một tên miền theo ID (UUID); trả về bản ghi DNS còn lại.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/delete-service-id-waf-zones-zone-hostnames-hostname"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     },
     {
      "name": "hostname",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) tên miền của website"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/origin": {
   "get": {
    "operationId": "get_service_id_waf_zones_zone_origin",
    "summary": "Máy chủ gốc của website",
    "description": "Danh sách máy chủ gốc, các chế độ TLS dùng được và hạn mức.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-service-id-waf-zones-zone-origin"
    },
    "security": [
     {
      "oauth": [
       "waf:read"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:read",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "put_service_id_waf_zones_zone_origin",
    "summary": "Sửa máy chủ gốc",
    "description": "Thay toàn bộ máy chủ gốc: body `origins`, mỗi mục `{address, port, tls_mode}`. Trả về như khi xem, kèm cảnh báo.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-service-id-waf-zones-zone-origin"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "origins": {
          "type": "array",
          "description": "The full list of origin servers, replacing the current one: `[{address, port, tls_mode}]`, as when adding the website."
         }
        },
        "required": [
         "origins"
        ]
       },
       "example": {
        "origins": [
         {
          "address": "203.0.113.10",
          "port": 443,
          "tls_mode": "verify"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/under-attack": {
   "put": {
    "operationId": "put_service_id_waf_zones_zone_under_attack",
    "summary": "Bật, tắt chống tấn công khẩn cấp",
    "description": "Chế độ chống tấn công khẩn cấp của website: body `enabled` (`true` hoặc `false`).",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-service-id-waf-zones-zone-under-attack"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean",
          "description": "`true` turns the emergency anti-attack mode on, `false` turns it off."
         }
        },
        "required": [
         "enabled"
        ]
       },
       "example": {
        "enabled": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/v1/service/{id}/waf/zones/{zone}/waf-mode": {
   "put": {
    "operationId": "put_service_id_waf_zones_zone_waf_mode",
    "summary": "Đổi mức bảo vệ",
    "description": "Body `mode`: `off`, `audit`, `balanced` hoặc `strict`. Trả về website.",
    "tags": [
     "TinoWAF"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/put-service-id-waf-zones-zone-waf-mode"
    },
    "security": [
     {
      "oauth": [
       "waf:write"
      ]
     },
     {
      "personalToken": []
     }
    ],
    "x-tino-scope": "waf:write",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ"
      }
     },
     {
      "name": "zone",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID (UUID) website trên TinoWAF"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "mode": {
          "type": "string",
          "description": "Protection level: `off`, `audit`, `balanced` or `strict`."
         }
        },
        "required": [
         "mode"
        ]
       },
       "example": {
        "mode": "balanced"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay": {
   "get": {
    "operationId": "tinopay_get_merchant",
    "summary": "Thông tin merchant",
    "description": "Merchant TinoPay của dịch vụ: mã merchant, tên, email, số điện thoại, gói (`package`: hạn mức giao dịch, ngày bắt đầu, ngày kết thúc; `end_at` là `null` khi không hạn), mã thanh toán (`pay_codes`), trạng thái (`status`, `suspended_at`), các tài khoản ngân hàng (kèm `virtual_accounts_count`). Dùng route này để xác nhận một dịch vụ là TinoPay: xem [Bắt đầu với TinoPay](/docs/tinopay-start#tim-dich-vu-tinopay).",
    "tags": [
     "Merchant"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-merchant"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "tino_sub": "700001",
          "account_id": 100001,
          "merchant_id": 8,
          "name": "Công ty TNHH ABC",
          "email": "billing@example.com",
          "phone": "0900000000",
          "status": "active",
          "pay_codes": [
           "DH"
          ],
          "suspended_at": null,
          "created_at": "2026-10-20T15:32:24+07:00",
          "package": {
           "id": 2,
           "name": "Pro 5000",
           "limit_transactions": 5000,
           "start_at": "2026-10-20",
           "end_at": null
          },
          "bank_accounts": [
           {
            "id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
            "bank_code": "BIDV",
            "account_no": "96240000001",
            "account_holder_name": "CONG TY ABC",
            "hint_name": "Quầy chính",
            "is_business": true,
            "first_va_number": "9624",
            "service_id": "AP0012",
            "status": "active",
            "provision_status": "active",
            "provision_note": null,
            "activated_at": "2026-10-20T10:00:00+07:00",
            "virtual_accounts_count": 3,
            "created_at": "2026-10-20T09:55:00+07:00"
           }
          ]
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "patch": {
    "operationId": "tinopay_patch_merchant",
    "summary": "Sửa thông tin merchant",
    "description": "Chỉ gửi trường cần đổi, body JSON (bắt buộc với `PATCH`): `name`, `email`, `phone`, `pay_codes` (cấu trúc mã thanh toán trích từ nội dung chuyển khoản, mảng chuỗi tối đa 20 ký tự; `[]` bỏ hết; mã trích được nằm ở trường `code` của webhook). Trả merchant sau khi sửa. Email đang thuộc khách Tino khác: 409 `EMAIL_TAKEN`; dữ liệu sai: 422 `VALIDATION_FAILED`. Thông tin này không tự đồng bộ với hồ sơ Tino của khách.",
    "tags": [
     "Merchant"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-patch-merchant"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "≤ 255"
         },
         "email": {
          "type": "string",
          "description": "≤ 255"
         },
         "phone": {
          "type": "string",
          "description": "≤ 20"
         },
         "pay_codes": {
          "type": "array",
          "description": "Cấu trúc mã thanh toán trích từ nội dung chuyển khoản, mảng chuỗi ≤ 20 ký tự; [] = bỏ hết"
         }
        },
        "required": []
       },
       "example": {
        "name": "Cửa hàng ABC",
        "pay_codes": [
         "DH"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "tino_sub": "700001",
          "account_id": 100001,
          "merchant_id": 8,
          "name": "Cửa hàng ABC",
          "email": "billing@example.com",
          "phone": "0900000000",
          "status": "active",
          "pay_codes": [
           "DH"
          ],
          "suspended_at": null,
          "created_at": "2026-10-20T15:32:24+07:00",
          "package": {
           "id": 2,
           "name": "Pro 5000",
           "limit_transactions": 5000,
           "start_at": "2026-10-20",
           "end_at": null
          },
          "bank_accounts": [
           {
            "id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
            "bank_code": "BIDV",
            "account_no": "96240000001",
            "account_holder_name": "CONG TY ABC",
            "hint_name": "Quầy chính",
            "is_business": true,
            "first_va_number": "9624",
            "service_id": "AP0012",
            "status": "active",
            "provision_status": "active",
            "provision_note": null,
            "activated_at": "2026-10-20T10:00:00+07:00",
            "virtual_accounts_count": 3,
            "created_at": "2026-10-20T09:55:00+07:00"
           }
          ]
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/pay-codes": {
   "get": {
    "operationId": "tinopay_get_pay_codes",
    "summary": "Cấu trúc mã thanh toán",
    "description": "Mẫu TinoPay dùng để trích `code` từ nội dung chuyển khoản (field `code` của webhook), cũng là tiền tố mã đơn của tích hợp Sapo. Trả `[{prefix, suffix_from, suffix_to, character_type}]`; ví dụ `DH` + 6–8 chữ số: nội dung `DH123456 thanh toan` cho mã `DH123456`.",
    "tags": [
     "Merchant"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-pay-codes"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "prefix": "DH",
           "suffix_from": 6,
           "suffix_to": 8,
           "character_type": "NumberOnly"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "tinopay_put_pay_codes",
    "summary": "Lưu cấu trúc mã thanh toán",
    "description": "Ghi đè cả danh sách: body `{\"pay_codes\": [...]}` gửi đủ các mẫu đang có cùng mẫu mới, `[]` xoá hết; tối đa 20 mẫu. `prefix` 2–5 chữ hoặc số (lưu in hoa, không trùng), `suffix_from` ≤ `suffix_to` trong khoảng 1–30, `character_type` là `NumberOnly` hoặc `NumberAndLetter`. Trả danh sách sau khi lưu. Bỏ tiền tố đang được tích hợp Sapo dùng: 409 `RESOURCE_IN_USE`, `details.prefixes` liệt kê các tiền tố đó.",
    "tags": [
     "Merchant"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-put-pay-codes"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pay_codes": {
          "type": "array"
         }
        },
        "required": [
         "pay_codes"
        ]
       },
       "example": {
        "pay_codes": [
         {
          "prefix": "DH",
          "suffix_from": 6,
          "suffix_to": 8,
          "character_type": "NumberOnly"
         },
         {
          "prefix": "TNG",
          "suffix_from": 1,
          "suffix_to": 12,
          "character_type": "NumberOnly"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "prefix": "DH",
           "suffix_from": 6,
           "suffix_to": 8,
           "character_type": "NumberOnly"
          },
          {
           "prefix": "TNG",
           "suffix_from": 1,
           "suffix_to": 12,
           "character_type": "NumberOnly"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-accounts": {
   "get": {
    "operationId": "tinopay_get_bank_accounts",
    "summary": "Danh sách tài khoản ngân hàng",
    "description": "Các tài khoản ngân hàng đã liên kết của merchant: ngân hàng, số tài khoản, chủ tài khoản, mã đầu VA (`first_va_number`), trạng thái, số tài khoản ảo. Thông tin đăng nhập ngân hàng không bao giờ trả về.",
    "tags": [
     "Tài khoản ngân hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-bank-accounts"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
           "bank_code": "BIDV",
           "account_no": "96240000001",
           "account_holder_name": "CONG TY ABC",
           "hint_name": "Quầy chính",
           "is_business": true,
           "first_va_number": "9624",
           "service_id": "AP0012",
           "status": "active",
           "provision_status": "active",
           "provision_note": null,
           "activated_at": "2026-10-20T10:00:00+07:00",
           "virtual_accounts_count": 3,
           "created_at": "2026-10-20T09:55:00+07:00"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-accounts/{bank}": {
   "get": {
    "operationId": "tinopay_get_bank_accounts_bank",
    "summary": "Chi tiết tài khoản ngân hàng",
    "description": "Một tài khoản ngân hàng đã liên kết của merchant.",
    "tags": [
     "Tài khoản ngân hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-bank-accounts-bank"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tài khoản ngân hàng (`id` ở danh sách tài khoản ngân hàng)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "bank_code": "BIDV",
          "account_no": "96240000001",
          "account_holder_name": "CONG TY ABC",
          "hint_name": "Quầy chính",
          "is_business": true,
          "first_va_number": "9624",
          "service_id": "AP0012",
          "status": "active",
          "provision_status": "active",
          "provision_note": null,
          "activated_at": "2026-10-20T10:00:00+07:00",
          "virtual_accounts_count": 3,
          "created_at": "2026-10-20T09:55:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-links/bidv-business": {
   "post": {
    "operationId": "tinopay_post_bank_links_bidv_business",
    "summary": "Yêu cầu liên kết BIDV doanh nghiệp",
    "description": "BIDV doanh nghiệp không liên kết tự động: route tạo yêu cầu để nhân viên mở dịch vụ với BIDV, xong thì tài khoản hiện ở danh sách tài khoản ngân hàng. Trả 201 `{ticket_id, status, created_at}`.",
    "tags": [
     "Tài khoản ngân hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-bank-links-bidv-business"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Người liên hệ"
         },
         "phone": {
          "type": "string"
         },
         "has_bidv_account": {
          "type": "boolean"
         },
         "note": {
          "type": "string"
         }
        },
        "required": []
       },
       "example": {
        "name": "Nguyễn Văn A",
        "phone": "0900000000",
        "has_bidv_account": true,
        "note": "Liên hệ buổi sáng"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "ticket_id": 41,
          "status": 1,
          "created_at": "2026-10-20T15:40:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-accounts/{bank}/virtual-accounts": {
   "get": {
    "operationId": "tinopay_get_bank_accounts_bank_virtual_accounts",
    "summary": "Danh sách tài khoản ảo (VA)",
    "description": "Tài khoản ảo của một tài khoản ngân hàng, lọc theo `q` (số VA, tên), `status`; phân trang `page`, `per_page` (tối đa 100).",
    "tags": [
     "Tài khoản ảo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-bank-accounts-bank-virtual-accounts"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tài khoản ngân hàng (`id` ở danh sách tài khoản ngân hàng)"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Số VA, tên"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "active | inactive"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "≤ 100"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 51,
           "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
           "account_number": "9624QA01",
           "account_name": "CUA HANG A",
           "status": "active",
           "created_at": "2026-10-20T10:05:00+07:00"
          }
         ],
         "meta": {
          "page": 1,
          "per_page": 20,
          "total": 1,
          "last_page": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "tinopay_post_bank_accounts_bank_virtual_accounts",
    "summary": "Tạo tài khoản ảo",
    "description": "Số VA = `first_va_number` của tài khoản ngân hàng + `va_number` (phần đuôi A–Z, 0–9, tối đa 7 ký tự; chữ thường tự đổi sang hoa). `account_name`: A–Z, 0–9 và khoảng trắng, tối đa 50 ký tự, không dấu. Trùng số: 409 `VA_NUMBER_EXISTS`; tài khoản ngân hàng chưa có mã đầu VA: 422 `VALIDATION_FAILED`.",
    "tags": [
     "Tài khoản ảo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-bank-accounts-bank-virtual-accounts"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tài khoản ngân hàng (`id` ở danh sách tài khoản ngân hàng)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "va_number": {
          "type": "string",
          "description": "Phần đuôi, A–Z 0–9, tối đa 7 ký tự"
         },
         "account_name": {
          "type": "string",
          "description": "A–Z 0–9 và khoảng trắng, tối đa 50 ký tự, không dấu"
         }
        },
        "required": [
         "va_number",
         "account_name"
        ]
       },
       "example": {
        "va_number": "QA01",
        "account_name": "CUA HANG A"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 51,
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "account_number": "9624QA01",
          "account_name": "CUA HANG A",
          "status": "active",
          "created_at": "2026-10-20T10:05:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-accounts/{bank}/virtual-accounts/{va}/activate": {
   "post": {
    "operationId": "tinopay_post_bank_accounts_bank_virtual_accounts_va_activate",
    "summary": "Mở tài khoản ảo",
    "description": "Mở lại tài khoản ảo đã khoá; trả tài khoản ảo sau khi đổi.",
    "tags": [
     "Tài khoản ảo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-bank-accounts-bank-virtual-accounts-va-activate"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tài khoản ngân hàng (`id` ở danh sách tài khoản ngân hàng)"
      }
     },
     {
      "name": "va",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tài khoản ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 51,
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "account_number": "9624QA01",
          "account_name": "CUA HANG A",
          "status": "active",
          "created_at": "2026-10-20T10:05:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-accounts/{bank}/virtual-accounts/{va}/deactivate": {
   "post": {
    "operationId": "tinopay_post_bank_accounts_bank_virtual_accounts_va_deactivate",
    "summary": "Khoá tài khoản ảo",
    "description": "Khoá tài khoản ảo; trả tài khoản ảo sau khi đổi.",
    "tags": [
     "Tài khoản ảo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-bank-accounts-bank-virtual-accounts-va-deactivate"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tài khoản ngân hàng (`id` ở danh sách tài khoản ngân hàng)"
      }
     },
     {
      "name": "va",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tài khoản ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 51,
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "account_number": "9624QA01",
          "account_name": "CUA HANG A",
          "status": "inactive",
          "created_at": "2026-10-20T10:05:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/bank-accounts/{bank}/virtual-accounts/{va}": {
   "delete": {
    "operationId": "tinopay_delete_bank_accounts_bank_virtual_accounts_va",
    "summary": "Xoá tài khoản ảo",
    "description": "Xoá tài khoản ảo; trả `{id, deleted: true}`.",
    "tags": [
     "Tài khoản ảo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-delete-bank-accounts-bank-virtual-accounts-va"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID tài khoản ngân hàng (`id` ở danh sách tài khoản ngân hàng)"
      }
     },
     {
      "name": "va",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tài khoản ảo"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 51,
          "deleted": true
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/webhooks": {
   "get": {
    "operationId": "tinopay_get_webhooks",
    "summary": "Danh sách webhook",
    "description": "Các webhook của merchant, lọc theo `bank_account_id`. Mỗi webhook có `token` gửi kèm khi bắn (xem [Nhận webhook TinoPay](/docs/tinopay-webhook)).",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-webhooks"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank_account_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 12,
           "name": "Đơn hàng website",
           "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
           "url": "https://example.com/tinopay/hook",
           "token": "<token>",
           "event": "in",
           "skip_if_no_code": false,
           "virtual_accounts": [
            "9624QA01"
           ],
           "status": "active",
           "created_at": "2026-10-20T10:10:00+07:00",
           "updated_at": "2026-10-20T10:10:00+07:00"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "tinopay_post_webhooks",
    "summary": "Tạo webhook",
    "description": "Tạo webhook cho một tài khoản ngân hàng: `url` nhận, `event` (`in` tiền vào, `out` tiền ra, `all`), `virtual_accounts` (để trống: mọi VA), `skip_if_no_code` (bỏ giao dịch không trích được mã thanh toán). `token` bỏ trống thì hệ thống tự sinh 50 ký tự.",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-webhooks"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "≤ 250"
         },
         "bank_account_id": {
          "type": "string"
         },
         "url": {
          "type": "string",
          "description": "≤ 250"
         },
         "event": {
          "type": "string",
          "description": "in | out | all"
         },
         "token": {
          "type": "string"
         },
         "skip_if_no_code": {
          "type": "boolean"
         },
         "virtual_accounts": {
          "type": "array"
         },
         "status": {
          "type": "string",
          "description": "active | inactive"
         }
        },
        "required": [
         "name",
         "bank_account_id",
         "url",
         "event"
        ]
       },
       "example": {
        "name": "Đơn hàng website",
        "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
        "url": "https://example.com/tinopay/hook",
        "event": "in",
        "virtual_accounts": [
         "9624QA01"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 12,
          "name": "Đơn hàng website",
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "url": "https://example.com/tinopay/hook",
          "token": "<token>",
          "event": "in",
          "skip_if_no_code": false,
          "virtual_accounts": [
           "9624QA01"
          ],
          "status": "active",
          "created_at": "2026-10-20T10:10:00+07:00",
          "updated_at": "2026-10-20T10:10:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/webhooks/{webhook}": {
   "get": {
    "operationId": "tinopay_get_webhooks_webhook",
    "summary": "Chi tiết webhook",
    "description": "Một webhook của merchant.",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-webhooks-webhook"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "webhook",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID webhook"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 12,
          "name": "Đơn hàng website",
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "url": "https://example.com/tinopay/hook",
          "token": "<token>",
          "event": "in",
          "skip_if_no_code": false,
          "virtual_accounts": [
           "9624QA01"
          ],
          "status": "active",
          "created_at": "2026-10-20T10:10:00+07:00",
          "updated_at": "2026-10-20T10:10:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "patch": {
    "operationId": "tinopay_patch_webhooks_webhook",
    "summary": "Sửa webhook",
    "description": "Chỉ gửi trường cần đổi, body JSON. Đổi sang `bank_account_id` khác thì tài khoản đó cũng phải của merchant.",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-patch-webhooks-webhook"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "webhook",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID webhook"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "bank_account_id": {
          "type": "string"
         },
         "url": {
          "type": "string"
         },
         "event": {
          "type": "string",
          "description": "in | out | all"
         },
         "token": {
          "type": "string"
         },
         "skip_if_no_code": {
          "type": "boolean"
         },
         "virtual_accounts": {
          "type": "array"
         },
         "status": {
          "type": "string",
          "description": "active | inactive"
         }
        },
        "required": []
       },
       "example": {
        "status": "inactive"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 12,
          "name": "Đơn hàng website",
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "url": "https://example.com/tinopay/hook",
          "token": "<token>",
          "event": "in",
          "skip_if_no_code": false,
          "virtual_accounts": [
           "9624QA01"
          ],
          "status": "inactive",
          "created_at": "2026-10-20T10:10:00+07:00",
          "updated_at": "2026-10-20T10:10:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "tinopay_delete_webhooks_webhook",
    "summary": "Xoá webhook",
    "description": "Xoá webhook kèm toàn bộ log của nó.",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-delete-webhooks-webhook"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "webhook",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID webhook"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/webhook-logs": {
   "get": {
    "operationId": "tinopay_get_webhook_logs",
    "summary": "Log webhook",
    "description": "Mỗi lần bắn webhook: request đã gửi, mã HTTP nhận về (`status_code`), `success`, câu trả lời. Lọc theo `webhook_id`, `transaction_id`, `status` (`success`, `failed`); phân trang.",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-webhook-logs"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "webhook_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "transaction_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "success | failed"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 3301,
           "webhook_id": 12,
           "transaction_id": 98213,
           "method": "POST",
           "request_url": "https://example.com/tinopay/hook",
           "request": {
            "transaction_id": "20261020083338000006",
            "transferAmount": 150000,
            "virtualAccount": "9624QA01"
           },
           "status_code": 500,
           "success": false,
           "response": "…",
           "created_at": "2026-10-20T08:33:41+07:00"
          }
         ],
         "meta": {
          "page": 1,
          "per_page": 20,
          "total": 1,
          "last_page": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/webhook-logs/{log}/resend": {
   "post": {
    "operationId": "tinopay_post_webhook_logs_log_resend",
    "summary": "Gửi lại log webhook",
    "description": "Gửi lại đúng request của log đó tới đúng webhook đó. Trả 202 `{log_id, queued}`.",
    "tags": [
     "Webhook"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-webhook-logs-log-resend"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "log",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID log webhook"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "log_id": 3301,
          "queued": true
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/transactions": {
   "get": {
    "operationId": "tinopay_get_transactions",
    "summary": "Lịch sử giao dịch",
    "description": "Giao dịch mới nhất trước, trường đặt tên giống payload webhook (`transactionDate` dạng ISO 8601). Lọc: `bank_account_id`, `virtual_account` (số VA chính xác), `type` (`in`, `out`), `from`, `to` (`Y-m-d`, theo ngày giao dịch), `q` (nội dung, mã giao dịch, số VA, mã tham chiếu), `webhook_status` (`none` chưa bắn, `failed`, `success`); phân trang, `per_page` tối đa 100.",
    "tags": [
     "Giao dịch"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-transactions"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank_account_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "virtual_account",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Số VA chính xác"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "in | out"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Y-m-d"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Y-m-d"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Nội dung, mã giao dịch, số VA, mã tham chiếu"
      }
     },
     {
      "name": "webhook_status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "none | failed | success"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "≤ 100"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 98213,
           "transaction_id": "20261020083338000006",
           "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
           "gateway": "BIDV",
           "accountNumber": "96240000001",
           "virtualAccount": "9624QA01",
           "content": "DH12345 chuyen tien mua hang",
           "transferType": "in",
           "transferAmount": 150000,
           "referenceCode": "0551dTCO-82LiomOss",
           "transactionDate": "2026-10-20T08:33:38+07:00",
           "created_at": "2026-10-20T08:33:40+07:00"
          }
         ],
         "meta": {
          "page": 1,
          "per_page": 20,
          "total": 1,
          "last_page": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/transactions/summary": {
   "get": {
    "operationId": "tinopay_get_transactions_summary",
    "summary": "Tổng hợp giao dịch",
    "description": "Cùng bộ lọc với lịch sử giao dịch, không phân trang: `{count, total_in, total_out}`.",
    "tags": [
     "Giao dịch"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-transactions-summary"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank_account_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "virtual_account",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "in | out"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Y-m-d"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Y-m-d"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "webhook_status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "none | failed | success"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "count": 2,
          "total_in": 100000,
          "total_out": 30000
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/transactions/{transaction}": {
   "get": {
    "operationId": "tinopay_get_transactions_transaction",
    "summary": "Chi tiết giao dịch",
    "description": "Một giao dịch, theo `id` ở lịch sử giao dịch.",
    "tags": [
     "Giao dịch"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-transactions-transaction"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "transaction",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID giao dịch (`id` ở lịch sử giao dịch, không phải `transaction_id` của ngân hàng)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 98213,
          "transaction_id": "20261020083338000006",
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "gateway": "BIDV",
          "accountNumber": "96240000001",
          "virtualAccount": "9624QA01",
          "content": "DH12345 chuyen tien mua hang",
          "transferType": "in",
          "transferAmount": 150000,
          "referenceCode": "0551dTCO-82LiomOss",
          "transactionDate": "2026-10-20T08:33:38+07:00",
          "created_at": "2026-10-20T08:33:40+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/transactions/{transaction}/resend-webhook": {
   "post": {
    "operationId": "tinopay_post_transactions_transaction_resend_webhook",
    "summary": "Bắn lại webhook cho giao dịch",
    "description": "Bắn lại giao dịch tới các webhook đang bật của tài khoản ngân hàng. Trả 202 `{transaction_id, queued}`.",
    "tags": [
     "Giao dịch"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-transactions-transaction-resend-webhook"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "transaction",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID giao dịch (`id` ở lịch sử giao dịch, không phải `transaction_id` của ngân hàng)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "transaction_id": 98213,
          "queued": true
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/notification-apps/bot-info": {
   "post": {
    "operationId": "tinopay_post_notification_apps_bot_info",
    "summary": "Kiểm token bot",
    "description": "Bước 1 khi thêm ứng dụng thông báo dùng bot riêng: `type` (`telegram`, `zalo`) và `bot_token` vừa nhập, hoặc `app_id` để dùng token đang lưu của ứng dụng đó (khi sửa). Trả `{valid, bot_name, error}`: `valid` là `false` thì hiện `error`. Xem [Thông báo Telegram, Zalo, Lark](/docs/tinopay-notifications).",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-notification-apps-bot-info"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "description": "telegram | zalo"
         },
         "bot_token": {
          "type": "string"
         },
         "app_id": {
          "type": "integer"
         }
        },
        "required": []
       },
       "example": {
        "type": "zalo",
        "bot_token": "<bot_token>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "valid": true,
          "bot_name": "Bot Cửa hàng ABC",
          "error": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/notification-apps/find-chats": {
   "post": {
    "operationId": "tinopay_post_notification_apps_find_chats",
    "summary": "Tìm nơi nhận của bot",
    "description": "Bước 2: trả `{chats: [{id, title, type}], error}`; chọn một `id` làm `endpoint`. Telegram: nhóm, người đã nhắn bot trong 24 giờ; `error` khác `null` (bot đang gắn webhook của hệ thống khác) thì nhập ID tay. Zalo không lưu tin cũ: request chờ tới khoảng 20 giây, chỉ bắt tin nhắn bot trong lúc chờ (nhóm: nhắc tên bot); đặt timeout HTTP ít nhất 30 giây, hết giờ chưa có tin thì `chats` rỗng. Không tự thử lại khi lỗi mạng.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-notification-apps-find-chats"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "description": "telegram | zalo"
         },
         "bot_token": {
          "type": "string"
         },
         "app_id": {
          "type": "integer"
         }
        },
        "required": []
       },
       "example": {
        "type": "zalo",
        "bot_token": "<bot_token>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "chats": [
           {
            "id": "zgr-1a2b3c4d5e6f7a8b9c0d",
            "title": "Nhóm kế toán",
            "type": "group"
           }
          ],
          "error": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/notification-apps/test": {
   "post": {
    "operationId": "tinopay_post_notification_apps_test",
    "summary": "Gửi tin thử",
    "description": "Bước 3: gửi một tin nhắn thử thật tới `endpoint` (ID nhóm, chat hoặc URL webhook Lark) trước khi lưu. Trả `{connected, chat_title}` (`chat_title` chỉ Telegram có); chỉ lưu khi `connected` là `true`. Telegram không gửi `bot_token` thì thử bằng bot chung. Không tự thử lại khi lỗi mạng.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-notification-apps-test"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "description": "telegram | zalo | lark"
         },
         "endpoint": {
          "type": "string",
          "description": "ID nhóm/chat, hoặc URL webhook Lark"
         },
         "bot_token": {
          "type": "string"
         },
         "app_id": {
          "type": "integer"
         }
        },
        "required": []
       },
       "example": {
        "type": "telegram",
        "endpoint": "-1001234567890"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "connected": true,
          "chat_title": "Kế toán ABC"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/notification-apps": {
   "get": {
    "operationId": "tinopay_get_notification_apps",
    "summary": "Danh sách ứng dụng thông báo",
    "description": "Ứng dụng gửi thông báo giao dịch vào Telegram, Zalo, Lark; lọc theo `type`, `bank_account_id`. `bot`: `allpay` (bot chung), `own` (bot riêng), `null` với Lark. `bot_token` không bao giờ trả về, chỉ có `bot_token_masked`. `last_error` khác `null`: lần gửi gần nhất lỗi (token bị thu hồi, bot bị đưa khỏi nhóm…), gửi lại thành công thì về `null`.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-notification-apps"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "telegram | zalo | lark"
      }
     },
     {
      "name": "bank_account_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 7,
           "type": "zalo",
           "name": "Nhóm kế toán",
           "endpoint": "zgr-1a2b3c4d5e6f7a8b9c0d",
           "bot": "own",
           "bot_token_masked": "<masked>",
           "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
           "virtual_accounts": [
            "9624QA01"
           ],
           "status": "active",
           "last_error": null,
           "last_error_at": null,
           "created_at": "2026-10-22T09:00:00+07:00",
           "updated_at": "2026-10-22T09:00:00+07:00"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "tinopay_post_notification_apps",
    "summary": "Tạo ứng dụng thông báo",
    "description": "Bước 4. `type` không đổi được sau khi tạo. `bot_token`: Zalo bắt buộc (bot riêng); Telegram có thì dùng bot riêng, bỏ trống thì dùng bot chung @allpay_telebot (`endpoint` là ID nhóm bắt đầu bằng `-`); Lark không gửi (`endpoint` là URL webhook bot Lark). `virtual_accounts`: số VA của tài khoản ngân hàng đó, rỗng là mọi VA. Trả 201.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-notification-apps"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "description": "telegram | zalo | lark (không đổi được sau khi tạo)"
         },
         "name": {
          "type": "string",
          "description": "≤ 250"
         },
         "endpoint": {
          "type": "string"
         },
         "bot_token": {
          "type": "string"
         },
         "bank_account_id": {
          "type": "string"
         },
         "virtual_accounts": {
          "type": "array"
         },
         "status": {
          "type": "string",
          "description": "active | inactive"
         }
        },
        "required": [
         "type",
         "name",
         "endpoint",
         "bank_account_id"
        ]
       },
       "example": {
        "type": "zalo",
        "name": "Nhóm kế toán",
        "endpoint": "zgr-1a2b3c4d5e6f7a8b9c0d",
        "bot_token": "<bot_token>",
        "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
        "virtual_accounts": [
         "9624QA01"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 7,
          "type": "zalo",
          "name": "Nhóm kế toán",
          "endpoint": "zgr-1a2b3c4d5e6f7a8b9c0d",
          "bot": "own",
          "bot_token_masked": "<masked>",
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "virtual_accounts": [
           "9624QA01"
          ],
          "status": "active",
          "last_error": null,
          "last_error_at": null,
          "created_at": "2026-10-22T09:00:00+07:00",
          "updated_at": "2026-10-22T09:00:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/notification-apps/{app}": {
   "get": {
    "operationId": "tinopay_get_notification_apps_app",
    "summary": "Chi tiết ứng dụng thông báo",
    "description": "Một ứng dụng thông báo của merchant; không thuộc merchant thì 404 `RESOURCE_NOT_FOUND`.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-notification-apps-app"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID ứng dụng thông báo (`id` ở danh sách ứng dụng thông báo)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 7,
          "type": "zalo",
          "name": "Nhóm kế toán",
          "endpoint": "zgr-1a2b3c4d5e6f7a8b9c0d",
          "bot": "own",
          "bot_token_masked": "<masked>",
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "virtual_accounts": [
           "9624QA01"
          ],
          "status": "active",
          "last_error": null,
          "last_error_at": null,
          "created_at": "2026-10-22T09:00:00+07:00",
          "updated_at": "2026-10-22T09:00:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "patch": {
    "operationId": "tinopay_patch_notification_apps_app",
    "summary": "Sửa ứng dụng thông báo",
    "description": "Chỉ gửi trường cần đổi, body JSON, không gửi `type`. Không gửi `bot_token`: giữ token cũ; gửi chuỗi mới: đổi token; `bot_token: null`: Telegram về bot chung (khi đó `endpoint` phải là ID nhóm `-…`), Zalo không bỏ được token. Đổi sang `bank_account_id` không thuộc merchant: 404 `BANK_ACCOUNT_NOT_FOUND`.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-patch-notification-apps-app"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID ứng dụng thông báo (`id` ở danh sách ứng dụng thông báo)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "endpoint": {
          "type": "string"
         },
         "bot_token": {
          "type": "string"
         },
         "bank_account_id": {
          "type": "string"
         },
         "virtual_accounts": {
          "type": "array"
         },
         "status": {
          "type": "string",
          "description": "active | inactive"
         }
        },
        "required": []
       },
       "example": {
        "status": "inactive"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "tinopay_delete_notification_apps_app",
    "summary": "Xoá ứng dụng thông báo",
    "description": "Xoá một ứng dụng thông báo của merchant.",
    "tags": [
     "Thông báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-delete-notification-apps-app"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID ứng dụng thông báo (`id` ở danh sách ứng dụng thông báo)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/sapo-integrations/test": {
   "post": {
    "operationId": "tinopay_post_sapo_integrations_test",
    "summary": "Thử kết nối Sapo",
    "description": "Trước khi lưu: body `store_url`, `api_key`, `api_secret` của ứng dụng riêng trên Sapo; khi sửa, gửi `integration_id` thay `api_secret` để dùng secret đã lưu. Trả HTTP 200 `{connected, error}`; `connected: false` thì `error` nêu lý do.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-sapo-integrations-test"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "store_url": {
          "type": "string",
          "description": "<tên-cửa-hàng>.mysapo.net"
         },
         "api_key": {
          "type": "string"
         },
         "api_secret": {
          "type": "string"
         },
         "integration_id": {
          "type": "integer"
         }
        },
        "required": []
       },
       "example": {
        "store_url": "<tên-cửa-hàng>.mysapo.net",
        "api_key": "<api_key>",
        "api_secret": "<api_secret>"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "connected": true,
          "error": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/sapo-integrations": {
   "get": {
    "operationId": "tinopay_get_sapo_integrations",
    "summary": "Danh sách tích hợp Sapo",
    "description": "Tích hợp Sapo của merchant, lọc theo query `bank_account_id`. `api_secret` không bao giờ trả về (chỉ `has_api_secret`); `last_error` khác `null` là lỗi kết nối Sapo; `snippet` là mã nhúng dán vào trang thanh toán của Sapo.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-sapo-integrations"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "bank_account_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 4,
           "name": "Website Sapo",
           "store_url": "<tên-cửa-hàng>.mysapo.net",
           "api_key": "<api_key>",
           "has_api_secret": true,
           "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
           "virtual_account": "9624QA01",
           "order_prefix": "TNG",
           "transaction": {
            "kind": "capture",
            "source_name": null,
            "status": null
           },
           "status": "active",
           "script_url": "<script_url>",
           "snippet": "<snippet>",
           "last_error": null,
           "last_error_at": null,
           "last_paid_at": "2026-10-24T10:00:00+07:00",
           "created_at": "2026-10-24T09:00:00+07:00",
           "updated_at": "2026-10-24T09:00:00+07:00"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "tinopay_post_sapo_integrations",
    "summary": "Tạo tích hợp Sapo",
    "description": "Khách chuyển khoản với nội dung chứa mã đơn (tiền tố + số đơn Sapo, ví dụ `TNG1002` ứng với đơn #1002): đủ hoặc dư tiền thì TinoPay ghi nhận đơn đã thanh toán trên Sapo. Body: `name` (≤ 100 ký tự), `store_url` (tên miền `.mysapo.net` của cửa hàng, không nhận tên miền riêng), `api_key`, `api_secret` (ứng dụng riêng trên Sapo, quyền đọc và ghi đơn hàng, giao dịch), `bank_account_id`, `virtual_account` (bắt buộc với BIDV), `order_prefix` (2–5 chữ hoặc số; chưa có trong cấu trúc mã thanh toán thì TinoPay tự thêm mẫu hậu tố 1–12 chữ số), `transaction` (`kind`, `source_name`, `status`), `status`. TinoPay thử kết nối Sapo trước khi lưu; không được thì 422 `SAPO_CONNECTION_FAILED`, không tạo gì. Dán `snippet` trả về vào Sapo Admin → Cấu hình → Trang thanh toán → Nội dung thông báo thêm.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-sapo-integrations"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "≤ 100"
         },
         "store_url": {
          "type": "string",
          "description": "<tên-cửa-hàng>.mysapo.net (tên miền riêng không nhận)"
         },
         "api_key": {
          "type": "string"
         },
         "api_secret": {
          "type": "string"
         },
         "bank_account_id": {
          "type": "string"
         },
         "virtual_account": {
          "type": "string",
          "description": "Bắt buộc với BIDV"
         },
         "order_prefix": {
          "type": "string",
          "description": "2–5 chữ/số"
         },
         "transaction": {
          "type": "array"
         },
         "status": {
          "type": "string",
          "description": "active | inactive"
         }
        },
        "required": [
         "name",
         "store_url",
         "api_key",
         "api_secret",
         "bank_account_id",
         "order_prefix"
        ]
       },
       "example": {
        "name": "Website Sapo",
        "store_url": "<tên-cửa-hàng>.mysapo.net",
        "api_key": "<api_key>",
        "api_secret": "<api_secret>",
        "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
        "virtual_account": "9624QA01",
        "order_prefix": "TNG"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 4,
          "name": "Website Sapo",
          "store_url": "<tên-cửa-hàng>.mysapo.net",
          "api_key": "<api_key>",
          "has_api_secret": true,
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "virtual_account": "9624QA01",
          "order_prefix": "TNG",
          "transaction": {
           "kind": "capture",
           "source_name": null,
           "status": null
          },
          "status": "active",
          "script_url": "<script_url>",
          "snippet": "<snippet>",
          "last_error": null,
          "last_error_at": null,
          "last_paid_at": "2026-10-24T10:00:00+07:00",
          "created_at": "2026-10-24T09:00:00+07:00",
          "updated_at": "2026-10-24T09:00:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/sapo-integrations/{integration}": {
   "get": {
    "operationId": "tinopay_get_sapo_integrations_integration",
    "summary": "Chi tiết tích hợp Sapo",
    "description": "Một tích hợp Sapo, cùng dạng mục trong danh sách; không trả `api_secret`.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-sapo-integrations-integration"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "integration",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tích hợp Sapo (`id` ở danh sách tích hợp Sapo)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 4,
          "name": "Website Sapo",
          "store_url": "<tên-cửa-hàng>.mysapo.net",
          "api_key": "<api_key>",
          "has_api_secret": true,
          "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
          "virtual_account": "9624QA01",
          "order_prefix": "TNG",
          "transaction": {
           "kind": "capture",
           "source_name": null,
           "status": null
          },
          "status": "active",
          "script_url": "<script_url>",
          "snippet": "<snippet>",
          "last_error": null,
          "last_error_at": null,
          "last_paid_at": "2026-10-24T10:00:00+07:00",
          "created_at": "2026-10-24T09:00:00+07:00",
          "updated_at": "2026-10-24T09:00:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "patch": {
    "operationId": "tinopay_patch_sapo_integrations_integration",
    "summary": "Sửa tích hợp Sapo",
    "description": "Chỉ gửi field đổi. Không gửi `api_secret` là giữ secret cũ; chỉ khi đổi `store_url`, `api_key` hoặc `api_secret` TinoPay mới thử lại kết nối Sapo (lỗi: 422 `SAPO_CONNECTION_FAILED`). `bank_account_id` không thuộc merchant: 404 `BANK_ACCOUNT_NOT_FOUND`.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-patch-sapo-integrations-integration"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "integration",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tích hợp Sapo (`id` ở danh sách tích hợp Sapo)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "store_url": {
          "type": "string"
         },
         "api_key": {
          "type": "string"
         },
         "api_secret": {
          "type": "string"
         },
         "bank_account_id": {
          "type": "string"
         },
         "virtual_account": {
          "type": "string"
         },
         "order_prefix": {
          "type": "string"
         },
         "transaction": {
          "type": "array"
         },
         "status": {
          "type": "string",
          "description": "active | inactive"
         }
        },
        "required": []
       },
       "example": {
        "status": "inactive"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "tinopay_delete_sapo_integrations_integration",
    "summary": "Xoá tích hợp Sapo",
    "description": "Xoá kèm nhật ký đối soát. Gỡ cả mã nhúng đã dán trên Sapo.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-delete-sapo-integrations-integration"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "integration",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID tích hợp Sapo (`id` ở danh sách tích hợp Sapo)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/sapo-order-logs": {
   "get": {
    "operationId": "tinopay_get_sapo_order_logs",
    "summary": "Nhật ký đối soát Sapo",
    "description": "Giao dịch đối chiếu với đơn Sapo. Query: `integration_id`, `transaction_id`, `status`, `page`, `per_page`. `status`: `paid` (đã ghi nhận; `message` ghi số tiền dư nếu có), `underpaid` (chuyển thiếu, chưa ghi nhận), `already_paid` (đơn đã thanh toán trước đó), `not_found` (không thấy đơn theo mã trong nội dung chuyển khoản), `cancelled` (đơn đã huỷ), `error` (Sapo từ chối hoặc không kết nối được, xem `message`). Đối soát lại một giao dịch: [gửi lại webhook của giao dịch](/docs/api/tinopay-post-transactions-transaction-resend-webhook); đơn đã thanh toán không bị ghi nhận trùng.",
    "tags": [
     "Tích hợp Sapo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-sapo-order-logs"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "integration_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "transaction_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 801,
           "integration_id": 4,
           "transaction_id": 98213,
           "sapo_order_id": 1002,
           "order_name": "#1002",
           "amount": 150000,
           "order_total": 150000,
           "status": "paid",
           "message": null,
           "created_at": "2026-10-24T10:00:00+07:00"
          }
         ],
         "meta": {
          "page": 1,
          "per_page": 20,
          "total": 1,
          "last_page": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/api-tokens": {
   "get": {
    "operationId": "tinopay_get_api_tokens",
    "summary": "Danh sách API token",
    "description": "Token để gọi API công khai `GET /api/transactions` của TinoPay (`Authorization: Bearer <token>`). Trả `[{id, name, last_used_at, created_at}]`; chuỗi token không bao giờ trả lại (TinoPay chỉ lưu bản băm).",
    "tags": [
     "API token"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-get-api-tokens"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": 3,
           "name": "Website",
           "last_used_at": "2026-10-22T09:00:00+07:00",
           "created_at": "2026-10-20T10:00:00+07:00"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "tinopay_post_api_tokens",
    "summary": "Tạo API token",
    "description": "Trả 201 `{id, name, last_used_at, created_at, token}`: `token` (64 ký tự) chỉ có trong câu trả lời này, đưa cho khách một lần, không lưu, không ghi log. Không tự thử lại khi lỗi mạng (mỗi lần gọi tạo một token): đọc lại danh sách, thấy token thừa thì thu hồi.",
    "tags": [
     "API token"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-post-api-tokens"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         }
        },
        "required": []
       },
       "example": {
        "name": "Website"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": 3,
          "name": "Website",
          "last_used_at": null,
          "created_at": "2026-10-20T10:00:00+07:00",
          "token": "<token>"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/tinopay/api-tokens/{token}": {
   "delete": {
    "operationId": "tinopay_delete_api_tokens_token",
    "summary": "Thu hồi API token",
    "description": "Thu hồi token, có hiệu lực ngay.",
    "tags": [
     "API token"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/tinopay-delete-api-tokens-token"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPay"
      }
     },
     {
      "name": "token",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID API token (`id` ở danh sách API token, không phải chuỗi token)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime": {
   "get": {
    "operationId": "uptime_get_overview",
    "summary": "Tổng quan gói Tino Uptime",
    "description": "Gói đang dùng (`subscription`: mã gói, tên gói, hạn mức `limits`, nơi đổi gói `manage_hint`), mức dùng (`usage`), số monitor theo trạng thái (`monitor`) và `login_url`: link mở bảng điều khiển Tino Uptime (đăng nhập bằng tài khoản Tino) cho phần chưa có API ở đây (trang trạng thái, máy chủ, WordPress, CVE). Dịch vụ không còn là gói đang dùng của khách trả 404 `service_not_linked`.",
    "tags": [
     "Gói Uptime"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-overview"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "account": {
           "external_id": "12345",
           "name": "Công ty ABC",
           "status": "active",
           "plan_code": "plus",
           "billing_source": "hostbill",
           "external_ref": "100002",
           "created_at": "2026-10-20T15:00:00+07:00"
          },
          "subscription": {
           "plan_code": "plus",
           "plan_name": "Plus",
           "billing_source": "hostbill",
           "status": "active",
           "period_start": "2026-10-20T15:00:00+07:00",
           "period_end": null,
           "limits": {
            "max_monitors": 25,
            "min_interval_s": 60,
            "raw_retention_days": 90,
            "status_pages": 3,
            "status_page_subscribers": 500,
            "agent_hosts": 5,
            "wp_sites": 5,
            "locations": [
             "vn-cmc",
             "vn-vt",
             "intl"
            ],
            "channels": [
             "email",
             "telegram",
             "discord",
             "slack",
             "webhook"
            ],
            "cve_alerts": true,
            "cve": true
           },
           "flags": [],
           "manage_hint": "hostbill"
          },
          "usage": {
           "monitors": 3,
           "status_pages": 1,
           "agent_hosts": 0,
           "wp_sites": 0,
           "monitors_paused_by_plan": 0,
           "limits": {
            "max_monitors": 25,
            "min_interval_s": 60,
            "raw_retention_days": 90,
            "status_pages": 3,
            "status_page_subscribers": 500,
            "agent_hosts": 5,
            "wp_sites": 5,
            "locations": [
             "vn-cmc",
             "vn-vt",
             "intl"
            ],
            "channels": [
             "email",
             "telegram",
             "discord",
             "slack",
             "webhook"
            ],
            "cve_alerts": true,
            "cve": true
           }
          },
          "monitor": {
           "total": 3,
           "up": 2,
           "down": 0,
           "paused": 1
          },
          "login_url": "https://uptime.tino.vn/login/tino?return_to=/"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/usage": {
   "get": {
    "operationId": "uptime_get_usage",
    "summary": "Mức dùng so với hạn mức",
    "description": "Số monitor, trang trạng thái, máy chủ, site WordPress đang dùng so với `limits` của gói; `monitors_paused_by_plan` là số monitor đang dừng vì vượt hạn mức sau khi hạ gói.",
    "tags": [
     "Gói Uptime"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-usage"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "monitors": 3,
          "status_pages": 1,
          "agent_hosts": 0,
          "wp_sites": 0,
          "monitors_paused_by_plan": 0,
          "limits": {
           "max_monitors": 25,
           "min_interval_s": 60,
           "raw_retention_days": 90,
           "status_pages": 3,
           "status_page_subscribers": 500,
           "agent_hosts": 5,
           "wp_sites": 5,
           "locations": [
            "vn-cmc",
            "vn-vt",
            "intl"
           ],
           "channels": [
            "email",
            "telegram",
            "discord",
            "slack",
            "webhook"
           ],
           "cve_alerts": true,
           "cve": true
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors": {
   "get": {
    "operationId": "uptime_get_monitors",
    "summary": "Danh sách monitor",
    "description": "Monitor của tài khoản, lọc theo trạng thái (`state`), loại (`type`), tìm theo tên hoặc đích (`q`); phân trang bằng con trỏ (`next_cursor`). Mỗi monitor có trạng thái gần nhất, lần kiểm gần nhất, độ trễ, sự cố đang mở, uptime 30 ngày.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-monitors"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "state",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Lọc theo trạng thái: `pending`, `up`, `suspect`, `down`, `partial`, `down_international`, `paused`"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Lọc theo loại (`settings.type`)"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Tìm trong tên hoặc đích, không phân biệt hoa thường"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số mục mỗi trang, mặc định 50, tối đa 100"
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`next_cursor` của trang trước; bỏ trống lấy trang đầu"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "data": [
           {
            "id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
            "name": "Website chính",
            "interval_s": 60,
            "locations": [
             "vn-cmc",
             "vn-vt",
             "intl"
            ],
            "enabled": true,
            "paused_until": null,
            "snoozed_until": null,
            "disabled_reason": null,
            "verified": true,
            "created_at": "2026-10-24T08:00:00+07:00",
            "settings": {
             "type": "http",
             "url": "https://example.com/",
             "method": "GET",
             "expected_status": [
              200
             ],
             "follow_redirects": true,
             "header_names": [],
             "basic_auth_set": false,
             "body_set": false
            },
            "international_critical": false,
            "state": "up",
            "state_since": "2026-10-24T09:15:00+07:00",
            "last_check_at": "2026-10-24T10:30:00+07:00",
            "last_latency_ms": 182,
            "last_error_kind": null,
            "current_incident_id": null,
            "ssl_expires_at": "2027-01-15T07:00:00+07:00",
            "domain_expires_at": null,
            "uptime_30d": 99.98
           }
          ],
          "next_cursor": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "uptime_post_monitors",
    "summary": "Tạo monitor",
    "description": "Body JSON: tên, chu kỳ, vị trí dò và `settings` theo [loại monitor](/docs/uptime-start#loai-monitor). Tino Uptime chạy lượt kiểm đầu ngay và chờ tối đa 10 giây: kết quả ở `first_check` (`status: pending` khi quá hạn). Monitor heartbeat có `settings.ping_url` chỉ trong câu trả lời này. HTTP 201. Vượt hạn mức gói (số monitor, chu kỳ, vị trí) trả 403 `entitlement_exceeded`; đích nội bộ hoặc không an toàn trả 422 `validation_failed` (`details.reason: blocked_destination`); đích đang bị kiểm quá dày trả 422 `target_rate_exceeded`.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-monitors"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Tên monitor, 1–200 ký tự"
         },
         "interval_s": {
          "type": "integer",
          "description": "Chu kỳ kiểm (giây), 30–86400, không dưới `limits.min_interval_s` của gói"
         },
         "locations": {
          "type": "array",
          "description": "Vị trí dò, tối đa 10, trong `limits.locations` của gói (`vn-cmc`, `vn-vt`, `intl`)"
         },
         "settings": {
          "type": "object",
          "description": "Loại và đích kiểm: `type` là `http`, `keyword`, `ssl`, `domain`, `ping`, `tcp`, `dns` hoặc `heartbeat`, trường theo loại ở [Bắt đầu với Tino Uptime](/docs/uptime-start#loai-monitor)"
         },
         "international_critical": {
          "type": "boolean",
          "description": "`true`: chỉ điểm dò quốc tế lỗi cũng tính là down; mặc định `false`"
         },
         "idempotency_key": {
          "type": "string",
          "description": "8–128 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng body thì không tạo thêm"
         }
        },
        "required": [
         "name",
         "interval_s",
         "settings"
        ]
       },
       "example": {
        "name": "Website chính",
        "interval_s": 60,
        "locations": [
         "vn-cmc",
         "vn-vt",
         "intl"
        ],
        "settings": {
         "type": "http",
         "url": "https://example.com/",
         "expected_status": [
          200
         ]
        },
        "idempotency_key": "website-chinh-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "name": "Website chính",
          "interval_s": 60,
          "locations": [
           "vn-cmc",
           "vn-vt",
           "intl"
          ],
          "enabled": true,
          "paused_until": null,
          "snoozed_until": null,
          "disabled_reason": null,
          "verified": true,
          "created_at": "2026-10-24T08:00:00+07:00",
          "settings": {
           "type": "http",
           "url": "https://example.com/",
           "method": "GET",
           "expected_status": [
            200
           ],
           "follow_redirects": true,
           "header_names": [],
           "basic_auth_set": false,
           "body_set": false
          },
          "international_critical": false,
          "state": "pending",
          "state_since": null,
          "last_check_at": null,
          "last_latency_ms": null,
          "last_error_kind": null,
          "current_incident_id": null,
          "ssl_expires_at": null,
          "domain_expires_at": null,
          "uptime_30d": null,
          "first_check": {
           "status": "done",
           "outcome": "ok",
           "latency_ms": 182,
           "status_code": 200,
           "error_kind": null,
           "location": "vn-cmc",
           "reason": null
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors/{monitor}": {
   "get": {
    "operationId": "uptime_get_monitors_monitor",
    "summary": "Chi tiết monitor",
    "description": "Cấu hình, trạng thái, lần kiểm gần nhất, sự cố đang mở (`current_incident_id`), hạn SSL, hạn tên miền, uptime 30 ngày. Header, body, mật khẩu Basic auth không bao giờ được trả lại: `settings` chỉ có `header_names`, `body_set`, `basic_auth_set`.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-monitors-monitor"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "name": "Website chính",
          "interval_s": 60,
          "locations": [
           "vn-cmc",
           "vn-vt",
           "intl"
          ],
          "enabled": true,
          "paused_until": null,
          "snoozed_until": null,
          "disabled_reason": null,
          "verified": true,
          "created_at": "2026-10-24T08:00:00+07:00",
          "settings": {
           "type": "http",
           "url": "https://example.com/",
           "method": "GET",
           "expected_status": [
            200
           ],
           "follow_redirects": true,
           "header_names": [],
           "basic_auth_set": false,
           "body_set": false
          },
          "international_critical": false,
          "state": "up",
          "state_since": "2026-10-24T09:15:00+07:00",
          "last_check_at": "2026-10-24T10:30:00+07:00",
          "last_latency_ms": 182,
          "last_error_kind": null,
          "current_incident_id": null,
          "ssl_expires_at": "2027-01-15T07:00:00+07:00",
          "domain_expires_at": null,
          "uptime_30d": 99.98
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "put": {
    "operationId": "uptime_put_monitors_monitor",
    "summary": "Sửa monitor",
    "description": "Chỉ gửi trường cần đổi, body JSON. `settings` gửi đủ trường bắt buộc của loại; với `http`, `keyword`: không gửi `headers`, `body`, `basic_auth` thì giữ nguyên, `headers: {}` hoặc `body: \"\"` để xoá, `clear_basic_auth: true` để xoá Basic auth. `enabled: false` tắt monitor.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-put-monitors-monitor"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Tên monitor, 1–200 ký tự"
         },
         "interval_s": {
          "type": "integer",
          "description": "Chu kỳ kiểm (giây), 30–86400, không dưới `limits.min_interval_s` của gói"
         },
         "locations": {
          "type": "array",
          "description": "Vị trí dò, tối đa 10, trong `limits.locations` của gói (`vn-cmc`, `vn-vt`, `intl`)"
         },
         "enabled": {
          "type": "boolean",
          "description": "`false` tắt monitor (giữ cấu hình), `true` bật lại"
         },
         "settings": {
          "type": "object",
          "description": "Loại và đích kiểm: `type` là `http`, `keyword`, `ssl`, `domain`, `ping`, `tcp`, `dns` hoặc `heartbeat`, trường theo loại ở [Bắt đầu với Tino Uptime](/docs/uptime-start#loai-monitor)"
         },
         "international_critical": {
          "type": "boolean",
          "description": "`true`: chỉ điểm dò quốc tế lỗi cũng tính là down; mặc định `false`"
         }
        },
        "required": []
       },
       "example": {
        "interval_s": 120
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "name": "Website chính",
          "interval_s": 120,
          "locations": [
           "vn-cmc",
           "vn-vt",
           "intl"
          ],
          "enabled": true,
          "paused_until": null,
          "snoozed_until": null,
          "disabled_reason": null,
          "verified": true,
          "created_at": "2026-10-24T08:00:00+07:00",
          "settings": {
           "type": "http",
           "url": "https://example.com/",
           "method": "GET",
           "expected_status": [
            200
           ],
           "follow_redirects": true,
           "header_names": [],
           "basic_auth_set": false,
           "body_set": false
          },
          "international_critical": false,
          "state": "up",
          "state_since": "2026-10-24T09:15:00+07:00",
          "last_check_at": "2026-10-24T10:30:00+07:00",
          "last_latency_ms": 182,
          "last_error_kind": null,
          "current_incident_id": null,
          "ssl_expires_at": "2027-01-15T07:00:00+07:00",
          "domain_expires_at": null,
          "uptime_30d": 99.98
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "uptime_delete_monitors_monitor",
    "summary": "Xoá monitor",
    "description": "Xoá monitor. HTTP 204, không có nội dung.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-delete-monitors-monitor"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors/{monitor}/pause": {
   "post": {
    "operationId": "uptime_post_monitors_monitor_pause",
    "summary": "Tạm dừng monitor",
    "description": "Dừng kiểm và cảnh báo của monitor (`enabled: false`), giữ nguyên cấu hình. Trả monitor.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-monitors-monitor-pause"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "name": "Website chính",
          "interval_s": 60,
          "locations": [
           "vn-cmc",
           "vn-vt",
           "intl"
          ],
          "enabled": false,
          "paused_until": null,
          "snoozed_until": null,
          "disabled_reason": null,
          "verified": true,
          "created_at": "2026-10-24T08:00:00+07:00",
          "settings": {
           "type": "http",
           "url": "https://example.com/",
           "method": "GET",
           "expected_status": [
            200
           ],
           "follow_redirects": true,
           "header_names": [],
           "basic_auth_set": false,
           "body_set": false
          },
          "international_critical": false,
          "state": "paused",
          "state_since": "2026-10-24T10:31:00+07:00",
          "last_check_at": "2026-10-24T10:30:00+07:00",
          "last_latency_ms": 182,
          "last_error_kind": null,
          "current_incident_id": null,
          "ssl_expires_at": "2027-01-15T07:00:00+07:00",
          "domain_expires_at": null,
          "uptime_30d": 99.98
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors/{monitor}/resume": {
   "post": {
    "operationId": "uptime_post_monitors_monitor_resume",
    "summary": "Chạy lại monitor",
    "description": "Bật lại monitor đã tạm dừng. Trả monitor.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-monitors-monitor-resume"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "name": "Website chính",
          "interval_s": 60,
          "locations": [
           "vn-cmc",
           "vn-vt",
           "intl"
          ],
          "enabled": true,
          "paused_until": null,
          "snoozed_until": null,
          "disabled_reason": null,
          "verified": true,
          "created_at": "2026-10-24T08:00:00+07:00",
          "settings": {
           "type": "http",
           "url": "https://example.com/",
           "method": "GET",
           "expected_status": [
            200
           ],
           "follow_redirects": true,
           "header_names": [],
           "basic_auth_set": false,
           "body_set": false
          },
          "international_critical": false,
          "state": "pending",
          "state_since": null,
          "last_check_at": "2026-10-24T10:30:00+07:00",
          "last_latency_ms": 182,
          "last_error_kind": null,
          "current_incident_id": null,
          "ssl_expires_at": "2027-01-15T07:00:00+07:00",
          "domain_expires_at": null,
          "uptime_30d": 99.98
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors/{monitor}/uptime": {
   "get": {
    "operationId": "uptime_get_monitors_monitor_uptime",
    "summary": "Uptime của monitor",
    "description": "Uptime theo cửa sổ `24h`, `7d`, `30d`, `90d` (`uptime_pct`, số lượt, thời gian down, độ trễ trung bình; cửa sổ `7d` có thêm p95) và SLA của một tháng (`month=YYYY-MM`, giờ Việt Nam). Xem được ở mọi gói.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-monitors-monitor-uptime"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     },
     {
      "name": "windows",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Cửa sổ cần tính, cách nhau dấu phẩy: `24h`, `7d`, `30d`, `90d` (mặc định cả bốn)"
      }
     },
     {
      "name": "month",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`YYYY-MM`: thêm SLA của tháng đó (giờ Việt Nam, 13 tháng gần nhất)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "windows": [
           {
            "window": "24h",
            "days": 1,
            "checks": 4320,
            "uptime_pct": 100,
            "avg_latency_ms": 176.4,
            "downtime_s": 0,
            "no_data": false
           },
           {
            "window": "30d",
            "days": 30,
            "checks": 129600,
            "uptime_pct": 99.98,
            "avg_latency_ms": 181.2,
            "downtime_s": 518,
            "no_data": false
           }
          ]
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors/{monitor}/results": {
   "get": {
    "operationId": "uptime_get_monitors_monitor_results",
    "summary": "Kết quả kiểm của monitor",
    "description": "`granularity=raw`: từng lượt kiểm, mới nhất trước, phân trang bằng `cursor` (thời gian DNS, kết nối, TLS, TTFB, mã HTTP, bước lỗi); `1h`, `1d`: điểm gộp theo giờ, ngày ở `points` (p50, p95, trung bình). Gói chỉ xem được `limits.raw_retention_days` ngày gần nhất: phần cũ hơn bị cắt và `retention_limited` là `true`.",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-monitors-monitor-results"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     },
     {
      "name": "granularity",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`raw` (từng lượt, mặc định), `1h` hoặc `1d` (gộp theo giờ, ngày)"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Đầu khoảng (RFC 3339); mặc định 24 giờ (raw), 7 ngày (1h), 90 ngày (1d) trước `to`"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Cuối khoảng (RFC 3339), mặc định là lúc gọi"
      }
     },
     {
      "name": "location",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Chỉ lấy kết quả của một vị trí dò"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số lượt mỗi trang với `raw`, mặc định 100, tối đa 1000"
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`next_cursor` của trang trước; bỏ trống lấy trang đầu"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "granularity": "1h",
          "from": "2026-10-17T11:00:00+07:00",
          "to": "2026-10-24T11:00:00+07:00",
          "retention_limited": false,
          "data": [],
          "points": [
           {
            "t": "2026-10-24T10:00:00+07:00",
            "valid": 180,
            "ok": 180,
            "p50_ms": 171,
            "p95_ms": 238,
            "avg_ms": 178.5,
            "dns_ms": 12,
            "connect_ms": 21,
            "tls_ms": 35,
            "ttfb_ms": 96
           }
          ],
          "next_cursor": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/monitors/{monitor}/incidents": {
   "get": {
    "operationId": "uptime_get_monitors_monitor_incidents",
    "summary": "Sự cố của monitor",
    "description": "Sự cố của một monitor, phân trang bằng con trỏ (`next_cursor`).",
    "tags": [
     "Monitor"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-monitors-monitor-incidents"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "monitor",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID monitor (UUID, `id` ở danh sách monitor)"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số mục mỗi trang, mặc định 50, tối đa 100"
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`next_cursor` của trang trước; bỏ trống lấy trang đầu"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "data": [
           {
            "id": "7a2d9e44-1c3b-4f6a-8e5d-0b9c2a7f4e21",
            "number": 12,
            "subject_kind": "monitor",
            "subject_id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
            "subject_name": "Website chính",
            "state": "resolved",
            "severity": "down",
            "opened_state": "down",
            "tier": "urgent",
            "title": "Website chính không truy cập được",
            "cause_code": null,
            "opened_at": "2026-10-24T09:02:00+07:00",
            "acked_at": null,
            "resolved_at": "2026-10-24T09:15:00+07:00",
            "parent_incident_id": null,
            "children_count": 0,
            "summary": "3/3 vị trí lỗi",
            "evidence": {
             "location": "vn-cmc",
             "captured_at": "2026-10-24T09:02:00+07:00",
             "step": "connect",
             "error": "connection refused",
             "status_line": null,
             "votes": [
              {
               "location": "vn-cmc",
               "region": null,
               "outcome": "fail",
               "error_kind": "connect",
               "cause_code": null,
               "status_code": null,
               "ip": "203.0.113.10",
               "tls_valid": null,
               "at": "2026-10-24T09:02:00+07:00"
              }
             ]
            }
           }
          ],
          "next_cursor": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/incidents": {
   "get": {
    "operationId": "uptime_get_incidents",
    "summary": "Danh sách sự cố",
    "description": "Sự cố của mọi monitor trong tài khoản, lọc theo trạng thái (`state`; `active` là sự cố chưa đóng) và mốc thời gian (`since`). Mỗi sự cố có mức (`tier`), trạng thái, thời điểm mở, xác nhận, đóng, tóm tắt (`summary`) và gợi ý xử lý (`cause`).",
    "tags": [
     "Sự cố"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-incidents"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "state",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`open`, `ack`, `resolved`, hoặc `active` (gồm `open` và `ack`)"
      }
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "RFC 3339: sự cố mở hoặc đóng từ mốc này, hoặc vẫn đang mở"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số mục mỗi trang, mặc định 50, tối đa 100"
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`next_cursor` của trang trước; bỏ trống lấy trang đầu"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "data": [
           {
            "id": "7a2d9e44-1c3b-4f6a-8e5d-0b9c2a7f4e21",
            "number": 12,
            "subject_kind": "monitor",
            "subject_id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
            "subject_name": "Website chính",
            "state": "open",
            "severity": "down",
            "opened_state": "down",
            "tier": "urgent",
            "title": "Website chính không truy cập được",
            "cause_code": null,
            "opened_at": "2026-10-24T09:02:00+07:00",
            "acked_at": null,
            "resolved_at": null,
            "parent_incident_id": null,
            "children_count": 0,
            "summary": "3/3 vị trí lỗi",
            "evidence": {
             "location": "vn-cmc",
             "captured_at": "2026-10-24T09:02:00+07:00",
             "step": "connect",
             "error": "connection refused",
             "status_line": null,
             "votes": [
              {
               "location": "vn-cmc",
               "region": null,
               "outcome": "fail",
               "error_kind": "connect",
               "cause_code": null,
               "status_code": null,
               "ip": "203.0.113.10",
               "tls_valid": null,
               "at": "2026-10-24T09:02:00+07:00"
              }
             ]
            }
           }
          ],
          "next_cursor": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/incidents/{incident}": {
   "get": {
    "operationId": "uptime_get_incidents_incident",
    "summary": "Chi tiết sự cố",
    "description": "Sự cố kèm bằng chứng lúc mở (`evidence`: vị trí, bước lỗi, dòng trạng thái HTTP, kết quả của từng vị trí dò) và gợi ý xử lý tiếng Việt (`cause`).",
    "tags": [
     "Sự cố"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-incidents-incident"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "incident",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID sự cố (UUID, `id` ở danh sách sự cố)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "7a2d9e44-1c3b-4f6a-8e5d-0b9c2a7f4e21",
          "number": 12,
          "subject_kind": "monitor",
          "subject_id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "subject_name": "Website chính",
          "state": "resolved",
          "severity": "down",
          "opened_state": "down",
          "tier": "urgent",
          "title": "Website chính không truy cập được",
          "cause_code": null,
          "opened_at": "2026-10-24T09:02:00+07:00",
          "acked_at": null,
          "resolved_at": "2026-10-24T09:15:00+07:00",
          "parent_incident_id": null,
          "children_count": 0,
          "summary": "3/3 vị trí lỗi",
          "evidence": {
           "location": "vn-cmc",
           "captured_at": "2026-10-24T09:02:00+07:00",
           "step": "connect",
           "error": "connection refused",
           "status_line": null,
           "votes": [
            {
             "location": "vn-cmc",
             "region": null,
             "outcome": "fail",
             "error_kind": "connect",
             "cause_code": null,
             "status_code": null,
             "ip": "203.0.113.10",
             "tls_valid": null,
             "at": "2026-10-24T09:02:00+07:00"
            }
           ]
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/incidents/{incident}/ack": {
   "post": {
    "operationId": "uptime_post_incidents_incident_ack",
    "summary": "Xác nhận sự cố",
    "description": "Đánh dấu đã biết sự cố để dừng nhắc lại cảnh báo: sự cố đang mở chuyển sang `ack`; sự cố đã `ack` hoặc đã đóng giữ nguyên. Trả sự cố.",
    "tags": [
     "Sự cố"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-incidents-incident-ack"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "incident",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID sự cố (UUID, `id` ở danh sách sự cố)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "7a2d9e44-1c3b-4f6a-8e5d-0b9c2a7f4e21",
          "number": 12,
          "subject_kind": "monitor",
          "subject_id": "3f6c2a10-8b1e-4c5d-9a7f-2e4b6c8d0a11",
          "subject_name": "Website chính",
          "state": "ack",
          "severity": "down",
          "opened_state": "down",
          "tier": "urgent",
          "title": "Website chính không truy cập được",
          "cause_code": null,
          "opened_at": "2026-10-24T09:02:00+07:00",
          "acked_at": "2026-10-24T09:05:00+07:00",
          "resolved_at": null,
          "parent_incident_id": null,
          "children_count": 0,
          "summary": "3/3 vị trí lỗi",
          "evidence": {
           "location": "vn-cmc",
           "captured_at": "2026-10-24T09:02:00+07:00",
           "step": "connect",
           "error": "connection refused",
           "status_line": null,
           "votes": [
            {
             "location": "vn-cmc",
             "region": null,
             "outcome": "fail",
             "error_kind": "connect",
             "cause_code": null,
             "status_code": null,
             "ip": "203.0.113.10",
             "tls_valid": null,
             "at": "2026-10-24T09:02:00+07:00"
            }
           ]
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/channels": {
   "get": {
    "operationId": "uptime_get_channels",
    "summary": "Danh sách kênh cảnh báo",
    "description": "Kênh nhận cảnh báo của tài khoản: loại (`kind`), đích đã che (`target`), thời điểm xác minh (`verified_at`), đồng ý nhận tin (`opted_in_at`: kênh chưa có thì không nhận tin), lý do bị tắt (`disabled_reason`).",
    "tags": [
     "Kênh cảnh báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-get-channels"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số mục mỗi trang, mặc định 50, tối đa 100"
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`next_cursor` của trang trước; bỏ trống lấy trang đầu"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "data": [
           {
            "id": "c41e8b20-6d7f-4a1c-9b3e-5f2a8d0c6e17",
            "kind": "email",
            "name": "Email kỹ thuật",
            "target": "o***@example.com",
            "verified_at": "2026-10-24T10:42:00+07:00",
            "opted_in_at": "2026-10-24T10:42:00+07:00",
            "disabled_reason": null,
            "last_sent_at": null,
            "link_pending": false,
            "route_key": null,
            "created_at": "2026-10-24T10:40:00+07:00"
           }
          ],
          "next_cursor": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "uptime_post_channels",
    "summary": "Tạo kênh cảnh báo",
    "description": "Kênh mới chờ xác minh, trừ email tới đúng địa chỉ đã xác minh của chủ tài khoản. `verification.method` cho biết bước tiếp: `email_code` (mã trong thư, hiệu lực 24 giờ), `telegram_link` (mở `telegram_url` trong 10 phút), `test_message` (Discord, Slack, webhook: gọi [xác minh kênh](/docs/api/uptime-post-channels-channel-verify) để gửi tin thử), `zalo_link`, `zalo_otp`. Kênh webhook trả `webhook_secret` (`whsec_…`) chỉ một lần. HTTP 201. Loại kênh ngoài `limits.channels` của gói trả 403 `entitlement_exceeded`.",
    "tags": [
     "Kênh cảnh báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-channels"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "kind": {
          "type": "string",
          "description": "`email`, `telegram`, `discord`, `slack`, `webhook` hoặc `zalo`, trong `limits.channels` của gói"
         },
         "name": {
          "type": "string",
          "description": "Tên kênh, 1–100 ký tự"
         },
         "config": {
          "type": "object",
          "description": "`address` cho email; `url` (https) cho Discord, Slack, webhook; Zalo: `consent: true` và `phone` (số di động, xác minh bằng OTP) hoặc bỏ `phone` để liên kết qua OA; Telegram không cần"
         },
         "idempotency_key": {
          "type": "string",
          "description": "8–128 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng body thì không tạo thêm"
         }
        },
        "required": [
         "kind",
         "name"
        ]
       },
       "example": {
        "kind": "email",
        "name": "Email kỹ thuật",
        "config": {
         "address": "ops@example.com"
        },
        "idempotency_key": "kenh-email-ops-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "c41e8b20-6d7f-4a1c-9b3e-5f2a8d0c6e17",
          "kind": "email",
          "name": "Email kỹ thuật",
          "target": "o***@example.com",
          "verified_at": null,
          "opted_in_at": null,
          "disabled_reason": null,
          "last_sent_at": null,
          "link_pending": false,
          "route_key": null,
          "created_at": "2026-10-24T10:40:00+07:00",
          "verification": {
           "method": "email_code",
           "expires_at": "2026-10-25T10:40:00+07:00"
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/channels/{channel}/verify": {
   "post": {
    "operationId": "uptime_post_channels_channel_verify",
    "summary": "Xác minh kênh cảnh báo",
    "description": "Email: gửi `code` trong thư để xác minh, bỏ trống để gửi lại mã (tối đa 5 thư mỗi giờ mỗi tài khoản, 3 thư mỗi ngày mỗi địa chỉ; vượt trả 429 `rate_limited`); mã sai trả 422 `token_invalid`. Telegram: cấp deep link mới. Discord, Slack, webhook: gửi tin thử, gửi được thì kênh được xác minh. Kênh đã xác minh trả nguyên trạng.",
    "tags": [
     "Kênh cảnh báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-channels-channel-verify"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "channel",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID kênh cảnh báo (UUID, `id` ở danh sách kênh)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "description": "Kênh email: mã trong thư (4–64 ký tự); bỏ trống để gửi lại mã"
         }
        },
        "required": []
       },
       "example": {
        "code": "482913"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "c41e8b20-6d7f-4a1c-9b3e-5f2a8d0c6e17",
          "kind": "email",
          "name": "Email kỹ thuật",
          "target": "o***@example.com",
          "verified_at": "2026-10-24T10:42:00+07:00",
          "opted_in_at": "2026-10-24T10:42:00+07:00",
          "disabled_reason": null,
          "last_sent_at": null,
          "link_pending": false,
          "route_key": null,
          "created_at": "2026-10-24T10:40:00+07:00"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/channels/{channel}/test": {
   "post": {
    "operationId": "uptime_post_channels_channel_test",
    "summary": "Gửi tin thử",
    "description": "Xếp một tin thử vào hàng gửi của kênh đã xác minh: HTTP 202, không có nội dung. Kênh chưa xác minh hoặc đang tắt trả 409 `conflict`.",
    "tags": [
     "Kênh cảnh báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-post-channels-channel-test"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "channel",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID kênh cảnh báo (UUID, `id` ở danh sách kênh)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/uptime/channels/{channel}": {
   "delete": {
    "operationId": "uptime_delete_channels_channel",
    "summary": "Xoá kênh cảnh báo",
    "description": "Xoá kênh. HTTP 204, không có nội dung.",
    "tags": [
     "Kênh cảnh báo"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/uptime-delete-channels-channel"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ Tino Uptime"
      }
     },
     {
      "name": "channel",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID kênh cảnh báo (UUID, `id` ở danh sách kênh)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {}
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/overview": {
   "get": {
    "operationId": "builder_get_overview",
    "summary": "Tổng quan tài khoản TinoPage Builder",
    "description": "Trạng thái tài khoản (`status`: `active`, `suspended`, `terminated`), hạn mức đang áp theo dịch vụ đã mua (`config.effective`: số website của tài khoản; số trang, mặt hàng, tên miền riêng, lượt AI mỗi ngày của mỗi website; `-1` là không giới hạn), số website đang dùng (`usage`: chưa xoá kể cả nháp, tạm ngưng, đã đăng) và `login_url` mở TinoPage Builder bằng tài khoản Tino. Tài khoản đã gắn với dịch vụ khác trả 404 `SERVICE_NOT_LINKED`.",
    "tags": [
     "Tài khoản Builder"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-get-overview"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "sub": "12345",
          "account_id": 100003,
          "name": "Công ty ABC",
          "email": "lienhe@example.com",
          "phone": "0900000000",
          "status": "active",
          "config": {
           "effective": {
            "sites": 3,
            "pages_per_site": 10,
            "items_per_site": 100,
            "domains_per_site": 2,
            "ai_generations_daily": 20,
            "ai_chat_daily": 100,
            "ai_images_daily": 10
           },
           "overrides": {
            "sites": 3,
            "pages_per_site": 10
           }
          },
          "usage": {
           "sites": 2,
           "sites_paused": 0,
           "sites_published": 1
          },
          "login_url": "https://builder.tino.vn/dang-nhap/tino?return_to=%2Fme",
          "created_at": "2026-10-25T03:00:00Z"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/login": {
   "post": {
    "operationId": "builder_post_login",
    "summary": "Vé đăng nhập một lần",
    "description": "Trả 201 `{url, expires_at}`: link đăng nhập dùng một lần, hiệu lực 120 giây, vào trang quản lý (`target: me`) hoặc trình sửa của một website (`target: editor`, `site_id`). Mở link ngay cho chính chủ dịch vụ, không lưu, không gửi qua kênh khác. Dịch vụ đang tạm ngưng vẫn cấp vé (vào chỉ xem); dịch vụ đã chấm dứt trả 403 `ACCOUNT_TERMINATED`.",
    "tags": [
     "Tài khoản Builder"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-post-login"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "target": {
          "type": "string",
          "description": "`me` (trang quản lý, mặc định) hoặc `editor` (trình sửa website)"
         },
         "site_id": {
          "type": "string",
          "description": "ID website (UUID) cần mở; bỏ trống: website cũ nhất của tài khoản"
         },
         "idempotency_key": {
          "type": "string",
          "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
         }
        },
        "required": []
       },
       "example": {
        "target": "editor",
        "site_id": "5b1e2c3d-4f5a-4b6c-8d7e-9f0a1b2c3d4e"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "url": "https://builder.tino.vn/dang-nhap/ve/<ve>",
          "expires_at": "2026-10-26T03:32:00Z"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites": {
   "get": {
    "operationId": "builder_get_sites",
    "summary": "Danh sách website",
    "description": "Website của tài khoản, cũ nhất trước, kèm `meta` (`page`, `per_page`, `total`, `last_page`). Mỗi website có trạng thái (`status`: `draft` chưa đăng, `published` đã đăng), `paused` (hệ thống tạm ngưng, `paused_reason: over_limit` khi vượt số website), tên miền đang chạy (`host`), link xem thử (`preview_url`) và mức dùng trang, mặt hàng, tên miền so với hạn mức của website.",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-get-sites"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Trang, mặc định 1"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số website mỗi trang (hiện mọi website nằm trong một trang: `meta.last_page` là 1)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": "5b1e2c3d-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
           "name": "Tiệm bánh Hoa Mai",
           "slug": "tiem-banh-hoa-mai",
           "status": "published",
           "paused": false,
           "paused_reason": null,
           "host": "example.vn",
           "preview_url": "https://builder.tino.vn/tiem-banh-hoa-mai",
           "pages": {
            "used": 3,
            "limit": 10
           },
           "items": {
            "used": 12,
            "limit": 100
           },
           "domains": {
            "used": 1,
            "limit": 2
           },
           "created_at": "2026-10-26T02:10:00Z",
           "updated_at": "2026-10-26T03:20:00Z"
          }
         ],
         "meta": {
          "page": 1,
          "per_page": 1,
          "total": 1,
          "last_page": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "builder_post_sites",
    "summary": "Tạo website bằng AI",
    "description": "Body JSON `{intake}`: AI chọn mẫu và viết nội dung theo thông tin cơ sở kinh doanh. HTTP 202: lượt tạo chạy nền 1–5 phút; hỏi [Tiến độ tạo website](/docs/api/builder-get-site-creation) tới khi `state` là `done` (`site_id` là website mới) hoặc `failed`. Mỗi tài khoản một lượt tại một thời điểm: 409 `CREATION_IN_PROGRESS`; hết số website: 409 `LIMIT_EXCEEDED` (`details.key: sites`); thiếu, sai ô: 422 `VALIDATION_FAILED` theo `intake.<ô>`; AI tạm dừng: 503 `AI_UNAVAILABLE`.",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-post-sites"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "intake": {
          "type": "object",
          "description": "Thông tin cơ sở kinh doanh để AI chọn mẫu và viết nội dung: `business_name`, `industry`, `phone` bắt buộc; `address`, `city`, `services`, `hours`, `zalo`, `email` tuỳ chọn; độ dài tối đa ở [Bắt đầu với TinoPage Builder](/docs/builder-start#tao-website-bang-ai)"
         },
         "idempotency_key": {
          "type": "string",
          "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
         }
        },
        "required": [
         "intake"
        ]
       },
       "example": {
        "intake": {
         "business_name": "Tiệm bánh Hoa Mai",
         "industry": "tiệm bánh",
         "phone": "0900000000",
         "city": "Thành phố Hồ Chí Minh",
         "services": "bánh sinh nhật, bánh mì"
        },
        "idempotency_key": "tao-website-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "state": "running",
          "site_id": null,
          "message": null,
          "started_at": "2026-10-26T02:00:00Z",
          "finished_at": null
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}": {
   "get": {
    "operationId": "builder_get_sites_site",
    "summary": "Chi tiết website",
    "description": "Một website như ở danh sách, thêm `todo`: số liên hệ chưa gọi lại (`leads_new`) và đơn hàng chưa xác nhận (`orders_new`). Website không thuộc tài khoản trả 404 `RESOURCE_NOT_FOUND`.",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-get-sites-site"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "5b1e2c3d-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
          "name": "Tiệm bánh Hoa Mai",
          "slug": "tiem-banh-hoa-mai",
          "status": "published",
          "paused": false,
          "paused_reason": null,
          "host": "example.vn",
          "preview_url": "https://builder.tino.vn/tiem-banh-hoa-mai",
          "pages": {
           "used": 3,
           "limit": 10
          },
          "items": {
           "used": 12,
           "limit": 100
          },
          "domains": {
           "used": 1,
           "limit": 2
          },
          "created_at": "2026-10-26T02:10:00Z",
          "updated_at": "2026-10-26T03:20:00Z",
          "todo": {
           "leads_new": 2,
           "orders_new": 1
          }
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "delete": {
    "operationId": "builder_delete_sites_site",
    "summary": "Xoá website",
    "description": "Xoá website (vào thùng rác: Tino khôi phục được theo yêu cầu qua hỗ trợ), gỡ tên miền riêng của website và trả lại một chỗ trong số website. Trả `{\"deleted\": true}`. Gửi `idempotency_key` ở query.",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-delete-sites-site"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     },
     {
      "name": "idempotency_key",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "deleted": true
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/site-creation": {
   "get": {
    "operationId": "builder_get_site_creation",
    "summary": "Tiến độ tạo website",
    "description": "Lượt tạo website gần nhất của tài khoản: `state` là `idle` (chưa có lượt nào, hoặc kết quả đã quá 1 giờ), `running`, `done` (`site_id` là website vừa tạo) hoặc `failed` (`message` là lý do tiếng Việt); `started_at`, `finished_at`. Có thể có thêm `step` (bước đang chạy) và `mode`. Website đã tạo vẫn có ở danh sách khi lượt tạo về `idle`.",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-get-site-creation"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "state": "done",
          "site_id": "5b1e2c3d-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
          "message": null,
          "started_at": "2026-10-26T02:00:00Z",
          "finished_at": "2026-10-26T02:02:40Z"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}/publish": {
   "post": {
    "operationId": "builder_post_sites_site_publish",
    "summary": "Đăng website",
    "description": "Đăng bản mới nhất của website, cũng là mở lại website đã tạm ngưng. Trả website. Website bị hệ thống tạm ngưng vì tài khoản vượt số website trả 409 `SITE_PAUSED`: xoá bớt website khác hoặc nâng số website của dịch vụ.",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-post-sites-site-publish"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "idempotency_key": {
          "type": "string",
          "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
         }
        },
        "required": []
       },
       "example": {
        "idempotency_key": "dang-website-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "5b1e2c3d-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
          "name": "Tiệm bánh Hoa Mai",
          "slug": "tiem-banh-hoa-mai",
          "status": "published",
          "paused": false,
          "paused_reason": null,
          "host": "example.vn",
          "preview_url": "https://builder.tino.vn/tiem-banh-hoa-mai",
          "pages": {
           "used": 3,
           "limit": 10
          },
          "items": {
           "used": 12,
           "limit": 100
          },
          "domains": {
           "used": 1,
           "limit": 2
          },
          "created_at": "2026-10-26T02:10:00Z",
          "updated_at": "2026-10-26T03:20:00Z"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}/unpublish": {
   "post": {
    "operationId": "builder_post_sites_site_unpublish",
    "summary": "Tạm ngưng website",
    "description": "Gỡ website khỏi mạng, nội dung giữ nguyên (`status` về `draft`). Trả website. Đăng lại bằng [Đăng website](/docs/api/builder-post-sites-site-publish).",
    "tags": [
     "Website"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-post-sites-site-unpublish"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "idempotency_key": {
          "type": "string",
          "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
         }
        },
        "required": []
       },
       "example": {
        "idempotency_key": "tam-ngung-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "id": "5b1e2c3d-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
          "name": "Tiệm bánh Hoa Mai",
          "slug": "tiem-banh-hoa-mai",
          "status": "draft",
          "paused": false,
          "paused_reason": null,
          "host": "example.vn",
          "preview_url": "https://builder.tino.vn/tiem-banh-hoa-mai",
          "pages": {
           "used": 3,
           "limit": 10
          },
          "items": {
           "used": 12,
           "limit": 100
          },
          "domains": {
           "used": 1,
           "limit": 2
          },
          "created_at": "2026-10-26T02:10:00Z",
          "updated_at": "2026-10-26T03:20:00Z"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}/domains": {
   "get": {
    "operationId": "builder_get_sites_site_domains",
    "summary": "Tên miền riêng của website",
    "description": "`items`: tên miền đã gắn, mỗi tên miền có trạng thái (`status`: `pending` chờ trỏ, `active`), chứng chỉ HTTPS (`ssl_status`: `pending`, `active`, `error`), bản ghi cần đặt (`dns`: CNAME về `dns_target`, TXT `_tino-verify` chứng minh sở hữu), kết quả lần kiểm gần nhất (`cname_ok`, `txt_ok`, `error`, `checked_at`); `limit` (tên miền tối đa mỗi website, `-1` là không giới hạn) và `used`.",
    "tags": [
     "Tên miền riêng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-get-sites-site-domains"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "items": [
           {
            "hostname": "example.vn",
            "status": "active",
            "ssl_status": "active",
            "txt_ok": true,
            "cname_ok": true,
            "dns": [
             {
              "type": "CNAME",
              "name": "@",
              "value": "dns.tino.page"
             },
             {
              "type": "CNAME",
              "name": "www",
              "value": "dns.tino.page"
             },
             {
              "type": "TXT",
              "name": "_tino-verify",
              "value": "tino-site-verify=8f3a2c1d9e7b4a6c0d5e1f2a3b4c5d6e"
             }
            ],
            "error": "",
            "checked_at": "2026-10-26T03:00:00Z",
            "url": "https://example.vn",
            "owner_verified": false,
            "check_count": 0
           },
           {
            "hostname": "banhang.example.vn",
            "status": "pending",
            "ssl_status": "pending",
            "txt_ok": false,
            "cname_ok": false,
            "dns": [
             {
              "type": "CNAME",
              "name": "banhang",
              "value": "dns.tino.page"
             },
             {
              "type": "TXT",
              "name": "_tino-verify.banhang",
              "value": "tino-site-verify=4b6d0e2a7c914f3e8a5b1c2d9e0f7a6b"
             }
            ],
            "error": "thiếu bản ghi TXT _tino-verify; CNAME chưa trỏ về dns.tino.page",
            "checked_at": "2026-10-26T03:30:00Z",
            "url": "https://banhang.example.vn",
            "owner_verified": false,
            "check_count": 1,
            "next_check_at": "2026-10-26T03:35:00Z"
           }
          ],
          "dns_target": "dns.tino.page",
          "limit": 2,
          "used": 2
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   },
   "post": {
    "operationId": "builder_post_sites_site_domains",
    "summary": "Gắn tên miền riêng",
    "description": "Gắn một tên miền vào website: HTTP 201, tên miền ở trạng thái `pending` kèm bản ghi DNS khách cần đặt (`dns`). Với tên miền gốc, `dns` có thêm CNAME cho `www`. Website chưa đăng trả 409 `SITE_NOT_PUBLISHED`; hết số tên miền: 409 `LIMIT_EXCEEDED` (`details.key: domains_per_site`); tên miền đang gắn website khác: 409 `DOMAIN_TAKEN`; không phải tên miền: 422 `VALIDATION_FAILED`.",
    "tags": [
     "Tên miền riêng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-post-sites-site-domains"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "hostname": {
          "type": "string",
          "description": "Tên miền cần gắn (1–253 ký tự), vd `example.vn` hoặc `banhang.example.vn`; TinoPage Builder tự bỏ `https://`, đường dẫn, chữ hoa"
         },
         "idempotency_key": {
          "type": "string",
          "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
         }
        },
        "required": [
         "hostname"
        ]
       },
       "example": {
        "hostname": "banhang.example.vn",
        "idempotency_key": "them-ten-mien-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "hostname": "banhang.example.vn",
          "status": "pending",
          "ssl_status": "pending",
          "txt_ok": false,
          "cname_ok": false,
          "dns": [
           {
            "type": "CNAME",
            "name": "banhang",
            "value": "dns.tino.page"
           },
           {
            "type": "TXT",
            "name": "_tino-verify.banhang",
            "value": "tino-site-verify=4b6d0e2a7c914f3e8a5b1c2d9e0f7a6b"
           }
          ],
          "error": "",
          "checked_at": "0001-01-01T00:00:00Z",
          "url": "https://banhang.example.vn",
          "owner_verified": false,
          "check_count": 0
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}/domains/{hostname}/verify": {
   "post": {
    "operationId": "builder_post_sites_site_domains_hostname_verify",
    "summary": "Kiểm tra lại DNS",
    "description": "Kiểm bản ghi DNS của tên miền ngay (tối đa khoảng 12 giây) và trả tên miền sau khi kiểm. Đủ CNAME và TXT thì `status` chuyển `active` và HTTPS được cấp tự động; chưa đủ thì `error` nói thiếu gì. Tên miền `pending` cũng được TinoPage Builder tự kiểm lại theo lịch (`next_check_at`).",
    "tags": [
     "Tên miền riêng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-post-sites-site-domains-hostname-verify"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     },
     {
      "name": "hostname",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Tên miền riêng, chữ thường (`hostname` ở danh sách tên miền)"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "idempotency_key": {
          "type": "string",
          "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
         }
        },
        "required": []
       },
       "example": {
        "idempotency_key": "kiem-dns-0001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "hostname": "banhang.example.vn",
          "status": "pending",
          "ssl_status": "pending",
          "txt_ok": false,
          "cname_ok": false,
          "dns": [
           {
            "type": "CNAME",
            "name": "banhang",
            "value": "dns.tino.page"
           },
           {
            "type": "TXT",
            "name": "_tino-verify.banhang",
            "value": "tino-site-verify=4b6d0e2a7c914f3e8a5b1c2d9e0f7a6b"
           }
          ],
          "error": "thiếu bản ghi TXT _tino-verify; CNAME chưa trỏ về dns.tino.page",
          "checked_at": "2026-10-26T03:30:00Z",
          "url": "https://banhang.example.vn",
          "owner_verified": false,
          "check_count": 1,
          "next_check_at": "2026-10-26T03:35:00Z"
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}/domains/{hostname}": {
   "delete": {
    "operationId": "builder_delete_sites_site_domains_hostname",
    "summary": "Gỡ tên miền riêng",
    "description": "Gỡ tên miền khỏi website. Trả `{\"removed\": true}`. Gửi `idempotency_key` ở query.",
    "tags": [
     "Tên miền riêng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-delete-sites-site-domains-hostname"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     },
     {
      "name": "hostname",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Tên miền riêng, chữ thường (`hostname` ở danh sách tên miền)"
      }
     },
     {
      "name": "idempotency_key",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "8–64 ký tự `A-Za-z0-9._:-`: gửi lại cùng khoá và cùng nội dung thì nhận lại kết quả lần trước, không làm lại"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": {
          "removed": true
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/service/{id}/builder/sites/{site}/leads": {
   "get": {
    "operationId": "builder_get_sites_site_leads",
    "summary": "Liên hệ và đơn hàng",
    "description": "Chỉ xem: liên hệ (`kind=lead`) hoặc đơn hàng (`kind=order`) khách để lại trên website, mới trước, lọc theo `status`, phân trang bằng `page`, `per_page` (tối đa 50) kèm `meta`. Liên hệ có `name`, `phone`, nội dung biểu mẫu (`payload`, khoá tuỳ mẫu website), `source_page`; đơn hàng có mã đơn, mặt hàng, phí giao, tổng tiền (`null` khi website không ghi giá), cách trả tiền, trạng thái. Xử lý liên hệ, đơn hàng làm trong TinoPage Builder ([vé đăng nhập](/docs/api/builder-post-login)).",
    "tags": [
     "Liên hệ & đơn hàng"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/builder-get-sites-site-leads"
    },
    "security": [
     {
      "session": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "description": "ID dịch vụ TinoPage Builder"
      }
     },
     {
      "name": "site",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "ID website (UUID, `id` ở danh sách website)"
      }
     },
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "`lead` (liên hệ, mặc định) hoặc `order` (đơn hàng)"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Lọc theo trạng thái: `moi`, `da_lien_he`, `xac_nhan`, `dang_giao`, `hoan_tat`, `huy`; bỏ trống lấy tất cả"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Trang, mặc định 1"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Số mục mỗi trang, mặc định 20, tối đa 50"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "data": [
          {
           "id": "9c4d2e10-7b3a-4f8e-a1d6-2e5f8c0b7a34",
           "code": "DH0012",
           "name": "Nguyễn Văn A",
           "phone": "0900000000",
           "address": "12 Lê Lợi, phường Bến Thành",
           "note": "Giao trước 17 giờ",
           "items": [
            {
             "name": "Bánh kem dâu",
             "option": "20 cm",
             "qty": 1,
             "subtotal": 350000
            }
           ],
           "shipping": 30000,
           "total": 380000,
           "payment": "COD",
           "status": "xac_nhan",
           "status_label": "Đã xác nhận",
           "created_at": "2026-10-26T01:45:00Z",
           "sheet_error": ""
          }
         ],
         "meta": {
          "page": 1,
          "per_page": 20,
          "total": 1,
          "last_page": 1
         }
        }
       }
      }
     },
     "401": {
      "description": "invalid_token"
     },
     "403": {
      "description": "insufficient_scope, ip_not_allowed (token cá nhân), ipnotallowed"
     }
    }
   }
  },
  "/whois/{domain}": {
   "get": {
    "operationId": "get_whois_domain",
    "summary": "Tra whois tên miền",
    "description": "Tra whois một tên miền, không cần token (gọi thẳng `https://api.tino.vn`, không qua gateway `/v1`). Luôn trả HTTP 200 với `success: true`; đọc kết quả theo thứ tự:\n\n- Có `error` (vd `incorrect_tld`: đuôi không hợp lệ hoặc không tra được): bỏ qua `available`, câu trả lời vẫn ghi `available: true`.\n- `raw` là `Rate limit exceeded`: tra quá nhanh; `available: false` lúc này không có nghĩa tên miền đã có chủ. Chờ rồi tra lại.\n- `domain` là một đuôi Tino đang bán (vd `vn`): chỉ có `success`, `domain`, `available: false`.\n- `available: true`, `status: ok`, `whois: []`: không thấy dữ liệu whois của tên miền (`raw` là văn bản gốc hoặc `Domain not found`).\n- `available: false`, `whois` là object: tên miền đã có chủ. Trường có mặt khi registry trả: `domain`, `registrar`, `createDate`, `expiredDate`, `updatedDate`, `registrantName`, `registrantOrg`, `nameservers`, `Dnssec`, `status`, `WhoisServer`, `DomainReserved`. Ngày giữ nguyên dạng registry trả (vd `+07:00` với `.vn`, `Z` với `.com`).\n\n`raw` là văn bản whois gốc: xuống dòng bằng `<br />`, ký tự đặc biệt đã mã hoá HTML.",
    "tags": [
     "Tên miền"
    ],
    "externalDocs": {
     "url": "https://developers.tino.vn/docs/api/get-whois-domain"
    },
    "security": [],
    "parameters": [
     {
      "name": "domain",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Tên miền cần tra (vd `tino.vn`), hoặc một đuôi (vd `vn`)"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Câu trả lời của route (lỗi nghiệp vụ thường cũng HTTP 200, kèm `error`)",
      "content": {
       "application/json": {
        "example": {
         "success": true,
         "domain": "tino.vn",
         "available": false,
         "status": "",
         "whois": {
          "domain": "tino.vn",
          "registrar": "Công ty Cổ phần Tập đoàn Tino",
          "createDate": "2022-02-02T16:32:35+07:00",
          "expiredDate": "2035-02-02T16:32:35+07:00",
          "registrantName": "CÔNG TY CỔ PHẦN TẬP ĐOÀN TINO",
          "nameservers": [
           "ns1.tino.vn",
           "ns2.tino.vn"
          ],
          "Dnssec": "unsigned",
          "status": [
           "clientDeleteProhibited",
           "clientTransferProhibited",
           "serverUpdateProhibited",
           "serverDeleteProhibited",
           "serverTransferProhibited"
          ]
         },
         "raw": "Dnssec: unsigned<br />Domain Name: tino.vn<br />Registry Expiry Date: 2035-02-02T16:32:35+07:00<br />…"
        }
       }
      }
     }
    }
   }
  }
 }
}