> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Scan Vietnamese National ID Card

POST https://api.staple.io/v1/documents/scan/vid
Content-Type: multipart/form-data

Scan a document using the Vietnamese National ID Card model in Staple to receive the structured data extracted. The documents would be left in the queue specified for any further manipulation.

Reference: https://docs.staple.ai/api-reference/v1/documents/scan-vietnamese-national-id-card

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/documents/scan/vid:
    post:
      operationId: scanVietnameseNationalIdCard
      summary: Scan Vietnamese National ID Card
      description: >-
        Scan a document using the Vietnamese National ID Card model in Staple to
        receive the structured data extracted. The documents would be left in
        the queue specified for any further manipulation.
      tags:
        - documents
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Documents_scanVietnameseNationalIdCard_Response_200
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: string
                  format: binary
                  description: File to upload
                qid:
                  type: string
                handwritten:
                  type: string
              required:
                - files
                - qid
                - handwritten
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Documents_scanVietnameseNationalIdCard_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Documents_scanVietnameseNationalIdCard_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples

### Scan Vietnamese National ID Card



**Request**

```json
{}
```

**Response**

```json
{
  "scanDocuments": {
    "data": {
      "BigBoxes": [
        {
          "box": [
            585,
            210,
            401,
            401,
            493,
            305.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            410,
            42,
            1070,
            337,
            740,
            189.5,
            "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM\nĐộc lập-Tự do-Hạnh phúc\nGIẤY CHỨNG MINH NHÂN DÂN\nSO\n225918410\nHọ tên:\nNGUYỄN THỊ MỸ LINH\n"
          ],
          "page": 0
        },
        {
          "box": [
            386,
            398,
            1105,
            708,
            745.5,
            553,
            "Sinh ngày.\n05-04-1972...\nNguyên quán:\n..\nCa Nha Trang , Khánh Hòa\nNơi ĐKK thường trú :\n35 Tân Hòa ,\nVĩnh Tường , Nha Trang , Khánh Hòa\n"
          ],
          "page": 0
        },
        {
          "box": [
            617,
            1216,
            551,
            1421,
            584,
            1318.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            127,
            814,
            259,
            857,
            193,
            835.5,
            "Dân tộc:.\n"
          ],
          "page": 0
        },
        {
          "box": [
            403,
            805,
            487,
            847,
            445,
            826,
            "Kinh\n"
          ],
          "page": 0
        },
        {
          "box": [
            622,
            798,
            1062,
            936,
            842,
            867,
            "Không\nTôn giáo:.\nDẤU VẾT RIÊNG VÀ DỊ HÌNH\n"
          ],
          "page": 0
        },
        {
          "box": [
            561,
            955,
            1111,
            998,
            836,
            976.5,
            "Sẹo chấm cách 2cm5 dưới sau\n"
          ],
          "page": 0
        },
        {
          "box": [
            510,
            915,
            479,
            1108,
            494.5,
            1011.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            570,
            1020,
            718,
            1062,
            644,
            1041,
            "mép trái\n"
          ],
          "page": 0
        },
        {
          "box": [
            547,
            1111,
            1126,
            1203,
            836.5,
            1157,
            "01 năm 2016.\n26 tháng\nNgày\nT.KHÁNH HÒA\nGIÁM DOL SA\n"
          ],
          "page": 0
        },
        {
          "box": [
            557,
            1166,
            767,
            1233,
            662,
            1199.5,
            "GIÁM DOL SA\n"
          ],
          "page": 0
        },
        {
          "box": [
            510,
            1203,
            476,
            1404,
            493,
            1303.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            615,
            1214,
            1087,
            1446,
            851,
            1330,
            "al\nthi chọc cuối\n"
          ],
          "page": 0
        }
      ],
      "DOB": {
        "UICategory": "Personal Information",
        "UIName": "Date of Birth",
        "matches": [
          {
            "keyword": [
              409,
              401,
              563,
              447,
              486,
              424,
              "Sinh ngày."
            ],
            "match": "05-04-1972",
            "matchmulti": null,
            "page": 0,
            "value": [
              708,
              410,
              945,
              447,
              826.5,
              428.5,
              "05-04-1972..."
            ]
          }
        ]
      },
      "DetectedText": "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM Độc lập-Tự do-Hạnh phúc GIẤY CHỨNG MINH NHÂN DÂN SO 225918410 Họ tên: NGUYỄN THỊ MỸ LINH Sinh ngày. 05-04-1972... Nguyên quán: .. Ca Nha Trang , Khánh Hòa Nơi ĐKK thường trú : 35 Tân Hòa , Vĩnh Tường , Nha Trang , Khánh Hòa Dân tộc:. Kinh Tôn giáo:. Không DẤU VẾT RIÊNG VÀ DỊ HÌNH Sẹo chấm cách 2cm5 dưới sau mép trái Ngày 26 tháng 01 năm 2016. T.KHÁNH HÒA GIÁM DOL SA al thi chọc cuối ",
      "DocSize": [
        [
          1473,
          1200,
          3
        ]
      ],
      "Domicile": {
        "UICategory": "Personal Information",
        "UIName": "Current Address",
        "matches": [
          {
            "keyword": [
              398,
              466,
              632,
              505,
              515,
              485.5,
              "Nguyên quán:"
            ],
            "match": "Ca Nha Trang , Khánh Hòa",
            "matchmulti": null,
            "page": 0,
            "value": [
              546,
              466,
              644,
              504,
              595,
              485,
              "..\nCa Nha Trang , Khánh Hòa"
            ]
          }
        ]
      },
      "ExpiryDate": {
        "UICategory": "Card Information",
        "UIName": "Expiry Date",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "page": null,
            "value": null
          }
        ]
      },
      "Gender": {
        "UICategory": "Personal Information",
        "UIName": "Gender",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "page": null,
            "value": null
          }
        ]
      },
      "IdNumber": {
        "UICategory": "Card Information",
        "UIName": "ID Number",
        "matches": [
          {
            "keyword": null,
            "match": "225918410",
            "matchmulti": null,
            "page": 0,
            "value": [
              607,
              201,
              875,
              257,
              741,
              229,
              "225918410"
            ]
          }
        ]
      },
      "IssueDate": {
        "UICategory": "Card Information",
        "UIName": "Issue Date",
        "matches": [
          {
            "keyword": null,
            "match": "26",
            "page": null,
            "value": null
          }
        ]
      },
      "IssueMonth": {
        "UICategory": "Card Information",
        "UIName": "Issue Month",
        "matches": [
          {
            "keyword": null,
            "match": "01",
            "page": null,
            "value": null
          }
        ]
      },
      "IssueYear": {
        "UICategory": "Card Information",
        "UIName": "Issue Year",
        "matches": [
          {
            "keyword": null,
            "match": "2016",
            "page": null,
            "value": null
          }
        ]
      },
      "Name": {
        "UICategory": "Personal Information",
        "UIName": "Full Name",
        "matches": [
          {
            "keyword": [
              407,
              259,
              506,
              329,
              456.5,
              294,
              "Họ tên:"
            ],
            "match": "SO   NGUYỄN THỊ MỸ LINH",
            "matchmulti": null,
            "page": 0,
            "value": [
              407,
              199,
              506,
              248,
              456.5,
              223.5,
              "SO\n225918410\nHọ tên:\nNGUYỄN THỊ MỸ LINH"
            ]
          }
        ]
      },
      "Nationality": {
        "UICategory": "Personal Information",
        "UIName": "Nationality",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "page": null,
            "value": null
          }
        ]
      },
      "PermanentAddress": {
        "UICategory": "Personal Information",
        "UIName": "Permanent Address",
        "matches": [
          {
            "keyword": [
              398,
              590,
              738,
              634,
              568,
              612,
              "Nơi ĐKK thường trú :"
            ],
            "match": "35 Tân Hòa , Vĩnh Tường , Nha Trang , Khánh Hòa",
            "matchmulti": null,
            "page": 0,
            "value": [
              385,
              593,
              1028,
              637,
              706.5,
              615,
              "35 Tân Hòa ,\nVĩnh Tường , Nha Trang , Khánh Hòa"
            ]
          }
        ]
      },
      "SmallBoxes": [
        {
          "box": [
            435,
            45,
            1073,
            88,
            754,
            66.5,
            "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM"
          ],
          "page": 0
        },
        {
          "box": [
            562,
            88,
            957,
            124,
            759.5,
            106,
            "Độc lập-Tự do-Hạnh phúc"
          ],
          "page": 0
        },
        {
          "box": [
            456,
            132,
            1063,
            180,
            759.5,
            156,
            "GIẤY CHỨNG MINH NHÂN DÂN"
          ],
          "page": 0
        },
        {
          "box": [
            518,
            199,
            560,
            248,
            539,
            223.5,
            "SO"
          ],
          "page": 0
        },
        {
          "box": [
            607,
            201,
            875,
            257,
            741,
            229,
            "225918410"
          ],
          "page": 0
        },
        {
          "box": [
            407,
            259,
            506,
            329,
            456.5,
            294,
            "Họ tên:"
          ],
          "page": 0
        },
        {
          "box": [
            531,
            260,
            1058,
            334,
            794.5,
            297,
            "NGUYỄN THỊ MỸ LINH"
          ],
          "page": 0
        },
        {
          "box": [
            409,
            401,
            563,
            447,
            486,
            424,
            "Sinh ngày."
          ],
          "page": 0
        },
        {
          "box": [
            708,
            410,
            945,
            447,
            826.5,
            428.5,
            "05-04-1972..."
          ],
          "page": 0
        },
        {
          "box": [
            398,
            466,
            632,
            505,
            515,
            485.5,
            "Nguyên quán:"
          ],
          "page": 0
        },
        {
          "box": [
            634,
            466,
            644,
            504,
            639,
            485,
            ".."
          ],
          "page": 0
        },
        {
          "box": [
            546,
            530,
            1053,
            585,
            799.5,
            557.5,
            "Ca Nha Trang , Khánh Hòa"
          ],
          "page": 0
        },
        {
          "box": [
            398,
            590,
            738,
            634,
            568,
            612,
            "Nơi ĐKK thường trú :"
          ],
          "page": 0
        },
        {
          "box": [
            800,
            593,
            1028,
            637,
            914,
            615,
            "35 Tân Hòa ,"
          ],
          "page": 0
        },
        {
          "box": [
            385,
            651,
            1105,
            705,
            745,
            678,
            "Vĩnh Tường , Nha Trang , Khánh Hòa"
          ],
          "page": 0
        },
        {
          "box": [
            127,
            814,
            259,
            857,
            193,
            835.5,
            "Dân tộc:."
          ],
          "page": 0
        },
        {
          "box": [
            403,
            805,
            487,
            847,
            445,
            826,
            "Kinh"
          ],
          "page": 0
        },
        {
          "box": [
            622,
            820,
            772,
            866,
            697,
            843,
            "Tôn giáo:."
          ],
          "page": 0
        },
        {
          "box": [
            903,
            809,
            1016,
            853,
            959.5,
            831,
            "Không"
          ],
          "page": 0
        },
        {
          "box": [
            640,
            883,
            1062,
            928,
            851,
            905.5,
            "DẤU VẾT RIÊNG VÀ DỊ HÌNH"
          ],
          "page": 0
        },
        {
          "box": [
            561,
            955,
            1111,
            998,
            836,
            976.5,
            "Sẹo chấm cách 2cm5 dưới sau"
          ],
          "page": 0
        },
        {
          "box": [
            570,
            1016,
            718,
            1066,
            644,
            1041,
            "mép trái"
          ],
          "page": 0
        },
        {
          "box": [
            547,
            1112,
            633,
            1157,
            590,
            1134.5,
            "Ngày"
          ],
          "page": 0
        },
        {
          "box": [
            673,
            1109,
            824,
            1155,
            748.5,
            1132,
            "26 tháng"
          ],
          "page": 0
        },
        {
          "box": [
            865,
            1104,
            1119,
            1153,
            992,
            1128.5,
            "01 năm 2016."
          ],
          "page": 0
        },
        {
          "box": [
            808,
            1155,
            1127,
            1206,
            967.5,
            1180.5,
            "T.KHÁNH HÒA"
          ],
          "page": 0
        },
        {
          "box": [
            557,
            1166,
            767,
            1233,
            662,
            1199.5,
            "GIÁM DOL SA"
          ],
          "page": 0
        },
        {
          "box": [
            802,
            1214,
            924,
            1325,
            863,
            1269.5,
            "al"
          ],
          "page": 0
        },
        {
          "box": [
            615,
            1357,
            1087,
            1446,
            851,
            1401.5,
            "thi chọc cuối"
          ],
          "page": 0
        }
      ],
      "num_pages": 1
    },
    "docId": 8729,
    "status": "COMPLETED"
  }
}
```

**SDK Code**

```python Scan Vietnamese National ID Card
import requests

url = "https://api.staple.io/v1/documents/scan/vid"

payload = "-----011000010111000001101001--\r\n"
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript Scan Vietnamese National ID Card
const url = 'https://api.staple.io/v1/documents/scan/vid';
const form = new FormData();

const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Scan Vietnamese National ID Card
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v1/documents/scan/vid"

	payload := strings.NewReader("-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Scan Vietnamese National ID Card
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/documents/scan/vid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request.body = "-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java Scan Vietnamese National ID Card
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/documents/scan/vid")
  .header("x-api-key", "<apiKey>")
  .body("-----011000010111000001101001--\r\n")
  .asString();
```

```php Scan Vietnamese National ID Card
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/documents/scan/vid', [
  'headers' => [
    'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Scan Vietnamese National ID Card
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/documents/scan/vid");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("undefined", "-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Scan Vietnamese National ID Card
import Foundation

let headers = ["x-api-key": "<apiKey>"]
let parameters = []

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/documents/scan/vid")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Documents_scanVietnameseNationalIdCard_example



**Request**

```json
{
  "files": "<file: string>",
  "handwritten": "[true]",
  "qid": "1"
}
```

**Response**

```json
{
  "scanDocuments": {
    "data": {
      "BigBoxes": [
        {
          "box": [
            585,
            210,
            401,
            401,
            493,
            305.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            410,
            42,
            1070,
            337,
            740,
            189.5,
            "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM\nĐộc lập-Tự do-Hạnh phúc\nGIẤY CHỨNG MINH NHÂN DÂN\nSO\n225918410\nHọ tên:\nNGUYỄN THỊ MỸ LINH\n"
          ],
          "page": 0
        },
        {
          "box": [
            386,
            398,
            1105,
            708,
            745.5,
            553,
            "Sinh ngày.\n05-04-1972...\nNguyên quán:\n..\nCa Nha Trang , Khánh Hòa\nNơi ĐKK thường trú :\n35 Tân Hòa ,\nVĩnh Tường , Nha Trang , Khánh Hòa\n"
          ],
          "page": 0
        },
        {
          "box": [
            617,
            1216,
            551,
            1421,
            584,
            1318.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            127,
            814,
            259,
            857,
            193,
            835.5,
            "Dân tộc:.\n"
          ],
          "page": 0
        },
        {
          "box": [
            403,
            805,
            487,
            847,
            445,
            826,
            "Kinh\n"
          ],
          "page": 0
        },
        {
          "box": [
            622,
            798,
            1062,
            936,
            842,
            867,
            "Không\nTôn giáo:.\nDẤU VẾT RIÊNG VÀ DỊ HÌNH\n"
          ],
          "page": 0
        },
        {
          "box": [
            561,
            955,
            1111,
            998,
            836,
            976.5,
            "Sẹo chấm cách 2cm5 dưới sau\n"
          ],
          "page": 0
        },
        {
          "box": [
            510,
            915,
            479,
            1108,
            494.5,
            1011.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            570,
            1020,
            718,
            1062,
            644,
            1041,
            "mép trái\n"
          ],
          "page": 0
        },
        {
          "box": [
            547,
            1111,
            1126,
            1203,
            836.5,
            1157,
            "01 năm 2016.\n26 tháng\nNgày\nT.KHÁNH HÒA\nGIÁM DOL SA\n"
          ],
          "page": 0
        },
        {
          "box": [
            557,
            1166,
            767,
            1233,
            662,
            1199.5,
            "GIÁM DOL SA\n"
          ],
          "page": 0
        },
        {
          "box": [
            510,
            1203,
            476,
            1404,
            493,
            1303.5,
            ""
          ],
          "page": 0
        },
        {
          "box": [
            615,
            1214,
            1087,
            1446,
            851,
            1330,
            "al\nthi chọc cuối\n"
          ],
          "page": 0
        }
      ],
      "DOB": {
        "UICategory": "Personal Information",
        "UIName": "Date of Birth",
        "matches": [
          {
            "keyword": [
              409,
              401,
              563,
              447,
              486,
              424,
              "Sinh ngày."
            ],
            "match": "05-04-1972",
            "matchmulti": null,
            "page": 0,
            "value": [
              708,
              410,
              945,
              447,
              826.5,
              428.5,
              "05-04-1972..."
            ]
          }
        ]
      },
      "DetectedText": "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM Độc lập-Tự do-Hạnh phúc GIẤY CHỨNG MINH NHÂN DÂN SO 225918410 Họ tên: NGUYỄN THỊ MỸ LINH Sinh ngày. 05-04-1972... Nguyên quán: .. Ca Nha Trang , Khánh Hòa Nơi ĐKK thường trú : 35 Tân Hòa , Vĩnh Tường , Nha Trang , Khánh Hòa Dân tộc:. Kinh Tôn giáo:. Không DẤU VẾT RIÊNG VÀ DỊ HÌNH Sẹo chấm cách 2cm5 dưới sau mép trái Ngày 26 tháng 01 năm 2016. T.KHÁNH HÒA GIÁM DOL SA al thi chọc cuối ",
      "DocSize": [
        [
          1473,
          1200,
          3
        ]
      ],
      "Domicile": {
        "UICategory": "Personal Information",
        "UIName": "Current Address",
        "matches": [
          {
            "keyword": [
              398,
              466,
              632,
              505,
              515,
              485.5,
              "Nguyên quán:"
            ],
            "match": "Ca Nha Trang , Khánh Hòa",
            "matchmulti": null,
            "page": 0,
            "value": [
              546,
              466,
              644,
              504,
              595,
              485,
              "..\nCa Nha Trang , Khánh Hòa"
            ]
          }
        ]
      },
      "ExpiryDate": {
        "UICategory": "Card Information",
        "UIName": "Expiry Date",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "page": null,
            "value": null
          }
        ]
      },
      "Gender": {
        "UICategory": "Personal Information",
        "UIName": "Gender",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "page": null,
            "value": null
          }
        ]
      },
      "IdNumber": {
        "UICategory": "Card Information",
        "UIName": "ID Number",
        "matches": [
          {
            "keyword": null,
            "match": "225918410",
            "matchmulti": null,
            "page": 0,
            "value": [
              607,
              201,
              875,
              257,
              741,
              229,
              "225918410"
            ]
          }
        ]
      },
      "IssueDate": {
        "UICategory": "Card Information",
        "UIName": "Issue Date",
        "matches": [
          {
            "keyword": null,
            "match": "26",
            "page": null,
            "value": null
          }
        ]
      },
      "IssueMonth": {
        "UICategory": "Card Information",
        "UIName": "Issue Month",
        "matches": [
          {
            "keyword": null,
            "match": "01",
            "page": null,
            "value": null
          }
        ]
      },
      "IssueYear": {
        "UICategory": "Card Information",
        "UIName": "Issue Year",
        "matches": [
          {
            "keyword": null,
            "match": "2016",
            "page": null,
            "value": null
          }
        ]
      },
      "Name": {
        "UICategory": "Personal Information",
        "UIName": "Full Name",
        "matches": [
          {
            "keyword": [
              407,
              259,
              506,
              329,
              456.5,
              294,
              "Họ tên:"
            ],
            "match": "SO   NGUYỄN THỊ MỸ LINH",
            "matchmulti": null,
            "page": 0,
            "value": [
              407,
              199,
              506,
              248,
              456.5,
              223.5,
              "SO\n225918410\nHọ tên:\nNGUYỄN THỊ MỸ LINH"
            ]
          }
        ]
      },
      "Nationality": {
        "UICategory": "Personal Information",
        "UIName": "Nationality",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "page": null,
            "value": null
          }
        ]
      },
      "PermanentAddress": {
        "UICategory": "Personal Information",
        "UIName": "Permanent Address",
        "matches": [
          {
            "keyword": [
              398,
              590,
              738,
              634,
              568,
              612,
              "Nơi ĐKK thường trú :"
            ],
            "match": "35 Tân Hòa , Vĩnh Tường , Nha Trang , Khánh Hòa",
            "matchmulti": null,
            "page": 0,
            "value": [
              385,
              593,
              1028,
              637,
              706.5,
              615,
              "35 Tân Hòa ,\nVĩnh Tường , Nha Trang , Khánh Hòa"
            ]
          }
        ]
      },
      "SmallBoxes": [
        {
          "box": [
            435,
            45,
            1073,
            88,
            754,
            66.5,
            "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM"
          ],
          "page": 0
        },
        {
          "box": [
            562,
            88,
            957,
            124,
            759.5,
            106,
            "Độc lập-Tự do-Hạnh phúc"
          ],
          "page": 0
        },
        {
          "box": [
            456,
            132,
            1063,
            180,
            759.5,
            156,
            "GIẤY CHỨNG MINH NHÂN DÂN"
          ],
          "page": 0
        },
        {
          "box": [
            518,
            199,
            560,
            248,
            539,
            223.5,
            "SO"
          ],
          "page": 0
        },
        {
          "box": [
            607,
            201,
            875,
            257,
            741,
            229,
            "225918410"
          ],
          "page": 0
        },
        {
          "box": [
            407,
            259,
            506,
            329,
            456.5,
            294,
            "Họ tên:"
          ],
          "page": 0
        },
        {
          "box": [
            531,
            260,
            1058,
            334,
            794.5,
            297,
            "NGUYỄN THỊ MỸ LINH"
          ],
          "page": 0
        },
        {
          "box": [
            409,
            401,
            563,
            447,
            486,
            424,
            "Sinh ngày."
          ],
          "page": 0
        },
        {
          "box": [
            708,
            410,
            945,
            447,
            826.5,
            428.5,
            "05-04-1972..."
          ],
          "page": 0
        },
        {
          "box": [
            398,
            466,
            632,
            505,
            515,
            485.5,
            "Nguyên quán:"
          ],
          "page": 0
        },
        {
          "box": [
            634,
            466,
            644,
            504,
            639,
            485,
            ".."
          ],
          "page": 0
        },
        {
          "box": [
            546,
            530,
            1053,
            585,
            799.5,
            557.5,
            "Ca Nha Trang , Khánh Hòa"
          ],
          "page": 0
        },
        {
          "box": [
            398,
            590,
            738,
            634,
            568,
            612,
            "Nơi ĐKK thường trú :"
          ],
          "page": 0
        },
        {
          "box": [
            800,
            593,
            1028,
            637,
            914,
            615,
            "35 Tân Hòa ,"
          ],
          "page": 0
        },
        {
          "box": [
            385,
            651,
            1105,
            705,
            745,
            678,
            "Vĩnh Tường , Nha Trang , Khánh Hòa"
          ],
          "page": 0
        },
        {
          "box": [
            127,
            814,
            259,
            857,
            193,
            835.5,
            "Dân tộc:."
          ],
          "page": 0
        },
        {
          "box": [
            403,
            805,
            487,
            847,
            445,
            826,
            "Kinh"
          ],
          "page": 0
        },
        {
          "box": [
            622,
            820,
            772,
            866,
            697,
            843,
            "Tôn giáo:."
          ],
          "page": 0
        },
        {
          "box": [
            903,
            809,
            1016,
            853,
            959.5,
            831,
            "Không"
          ],
          "page": 0
        },
        {
          "box": [
            640,
            883,
            1062,
            928,
            851,
            905.5,
            "DẤU VẾT RIÊNG VÀ DỊ HÌNH"
          ],
          "page": 0
        },
        {
          "box": [
            561,
            955,
            1111,
            998,
            836,
            976.5,
            "Sẹo chấm cách 2cm5 dưới sau"
          ],
          "page": 0
        },
        {
          "box": [
            570,
            1016,
            718,
            1066,
            644,
            1041,
            "mép trái"
          ],
          "page": 0
        },
        {
          "box": [
            547,
            1112,
            633,
            1157,
            590,
            1134.5,
            "Ngày"
          ],
          "page": 0
        },
        {
          "box": [
            673,
            1109,
            824,
            1155,
            748.5,
            1132,
            "26 tháng"
          ],
          "page": 0
        },
        {
          "box": [
            865,
            1104,
            1119,
            1153,
            992,
            1128.5,
            "01 năm 2016."
          ],
          "page": 0
        },
        {
          "box": [
            808,
            1155,
            1127,
            1206,
            967.5,
            1180.5,
            "T.KHÁNH HÒA"
          ],
          "page": 0
        },
        {
          "box": [
            557,
            1166,
            767,
            1233,
            662,
            1199.5,
            "GIÁM DOL SA"
          ],
          "page": 0
        },
        {
          "box": [
            802,
            1214,
            924,
            1325,
            863,
            1269.5,
            "al"
          ],
          "page": 0
        },
        {
          "box": [
            615,
            1357,
            1087,
            1446,
            851,
            1401.5,
            "thi chọc cuối"
          ],
          "page": 0
        }
      ],
      "num_pages": 1
    },
    "docId": 8729,
    "status": "COMPLETED"
  }
}
```

**SDK Code**

```python Documents_scanVietnameseNationalIdCard_example
import requests

url = "https://api.staple.io/v1/documents/scan/vid"

files = { "files": "open('string', 'rb')" }
payload = {
    "handwritten": "[true]",
    "qid": "1"
}
headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json())
```

```javascript Documents_scanVietnameseNationalIdCard_example
const url = 'https://api.staple.io/v1/documents/scan/vid';
const form = new FormData();
form.append('files', 'string');
form.append('handwritten', '[true]');
form.append('qid', '1');

const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Documents_scanVietnameseNationalIdCard_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v1/documents/scan/vid"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"handwritten\"\r\n\r\n[true]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qid\"\r\n\r\n1\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Documents_scanVietnameseNationalIdCard_example
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/documents/scan/vid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"handwritten\"\r\n\r\n[true]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qid\"\r\n\r\n1\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java Documents_scanVietnameseNationalIdCard_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/documents/scan/vid")
  .header("x-api-key", "<apiKey>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"handwritten\"\r\n\r\n[true]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qid\"\r\n\r\n1\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php Documents_scanVietnameseNationalIdCard_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/documents/scan/vid', [
  'multipart' => [
    [
        'name' => 'files',
        'filename' => 'string',
        'contents' => null
    ],
    [
        'name' => 'handwritten',
        'contents' => '[true]'
    ],
    [
        'name' => 'qid',
        'contents' => '1'
    ]
  ]
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Documents_scanVietnameseNationalIdCard_example
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/documents/scan/vid");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"handwritten\"\r\n\r\n[true]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qid\"\r\n\r\n1\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Documents_scanVietnameseNationalIdCard_example
import Foundation

let headers = ["x-api-key": "<apiKey>"]
let parameters = [
  [
    "name": "files",
    "fileName": "string"
  ],
  [
    "name": "handwritten",
    "value": "[true]"
  ],
  [
    "name": "qid",
    "value": "1"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/documents/scan/vid")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```