Background supergraphic

KITAS/KITAP beta

KITAS (Kartu Izin Tinggal Terbatas) and KITAP (Kartu Izin Tinggal Tetap) are residence permits issued in Indonesia for foreign nationals.

KITAS/KITAP Object

  • Name
    status
    Type
    string
    Description

    Enum code indicating the status of the reading result.

    1. SUCCESS
    2. NO_FILE
    3. FILE_INVALID_FORMAT
    4. FAILED
  • Name
    reason
    Type
    string
    Description

    A human-readable message providing more details about the reading result.

  • Name
    images
    Type
    object
    Description

    Contains the cropped image (in base64 format) of KITAS/KITAP photo.

    • Name
      photo
      Type
      string
      Description

      Photo in base64 format.

    • Name
      sign
      Type
      string
      Description

      Signature in base64 format (if available).

  • Name
    read
    Type
    object
    Description

    Contains the reading for each KITAS/KITAP fields. Each field has confidence (in percentage) and value (the reading).

    • Name
      address
      Type
      object
      Description

      Address of residence in Indonesia.

    • Name
      date_of_birth
      Type
      object
      Description

      Date of birth in dd-mm-yyyy format.

    • Name
      document_type
      Type
      object
      Description

      Type of document (KITAS or KITAP).

    • Name
      full_name
      Type
      object
      Description

      Full name of the holder.

    • Name
      gender
      Type
      object
      Description

      Gender (M for Male, F for Female).

    • Name
      guarantor_name
      Type
      object
      Description

      Name of the guarantor (if applicable).

    • Name
      issued_date
      Type
      object
      Description

      Date when the permit was issued in dd-mm-yyyy format.

    • Name
      nationality
      Type
      object
      Description

      Nationality of the holder.

    • Name
      niora
      Type
      object
      Description

      NIORA (Nomor Induk Orang Asing) - Foreigner Identification Number.

    • Name
      occupation
      Type
      object
      Description

      Occupation or job title.

    • Name
      office_address
      Type
      object
      Description

      Address of the immigration office that issued the permit.

    • Name
      office_name
      Type
      object
      Description

      Name of the immigration office that issued the permit.

    • Name
      office_region
      Type
      object
      Description

      Region of the immigration office.

    • Name
      passport_expiry
      Type
      object
      Description

      Passport expiry date in dd-mm-yyyy format.

    • Name
      passport_number
      Type
      object
      Description

      Passport number.

    • Name
      permit_number
      Type
      object
      Description

      KITAS/KITAP permit number.

    • Name
      place_of_birth
      Type
      object
      Description

      Place of birth.

    • Name
      status
      Type
      object
      Description

      Status of the permit (e.g., FAMILY UNION, WORK PERMIT, etc.).

    • Name
      stay_entries_permit_expiry
      Type
      object
      Description

      Single entry permit expiry date in dd-mm-yyyy format (if applicable).

    • Name
      stay_multiple_entries_permit_expiry
      Type
      object
      Description

      Multiple entry permit expiry date in dd-mm-yyyy format (if applicable).

    • Name
      stay_permit_index
      Type
      object
      Description

      Stay permit index number (if applicable).


POST/ocr/v1/kitas-kitap

Read KITAS/KITAP

Detects a valid KITAS/KITAP image and returns the information extracted from the document.

Required parameter

  • Name
    image
    Type
    file (.png, .jpg, .jpeg, .pdf)
    Description

    The image file for the KITAS/KITAP document.

Sample Request

POST
/ocr/v1/kitas-kitap
1
2
3
4
curl -v -L -X POST 'https://api.vision.glair.ai/ocr/v1/kitas-kitap' \ -H "Authorization: Basic $(printf "%s" "USERNAME:PASSWORD" | base64)" \ -H 'x-api-key: API_KEY' \ -F 'image=@"/path/to/image/KITAS-KITAP.jpg"'

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ "status": "SUCCESS", "reason": "File successfully read.", "images": { "photo": "iVBORw0KGgoAAAANSUhEUgAAAJsAAADICAIAAABwGQSCAACDjElEQVR4...", "sign": "iVBORw0KGgoAAAANSUhEUgAAAJsAAADICAIAAABwGQSCAACDjElEQVR4..." }, "read": { "address": { "confidence": 49, "value": "DS SESETAN KEC DENPASAR SELATAN KOTA DENPASAR BALI" }, "date_of_birth": { "confidence": 99, "value": "07-07-1965" }, "document_type": { "confidence": 99, "value": "IZIN TINGGAL TETAP ELEKTRONIK 5171010707650007" }, "full_name": { "confidence": 99, "value": "MICHAEL REED LONG" }, "gender": { "confidence": 99, "value": "M" }, "guarantor_name": { "confidence": 0, "value": "" }, "issued_date": { "confidence": 0, "value": "" }, "nationality": { "confidence": 99, "value": "AMERIKA SERIKAT" }, "niora": { "confidence": 99, "value": "AFJAA04348" }, "occupation": { "confidence": 99, "value": "FAMILY UNION" }, "office_address": { "confidence": 99, "value": "JL. D.I. PANJAITAN NO. 3, NITI MANDALA RENON DENPASAR" }, "office_name": { "confidence": 98, "value": "KANIM KELAS I TPI DENPASAR" }, "office_region": { "confidence": 97, "value": "KANTOR WILAYAH BALI" }, "passport_expiry": { "confidence": 99, "value": "22-10-2024" }, "passport_number": { "confidence": 99, "value": "505889522" }, "permit_number": { "confidence": 98, "value": "2D41EB0112-W 09-06-2027" }, "place_of_birth": { "confidence": 99, "value": "IOWA, U.S.A" }, "status": { "confidence": 96, "value": "FAMILY UNION" }, "stay_entries_permit_expiry": { "confidence": 0, "value": "" }, "stay_multiple_entries_permit_expiry": { "confidence": 99, "value": "11-05-2024" }, "stay_permit_index": { "confidence": 0, "value": "" } } }

Request ID

An associated request identifier is generated for every request made to this endpoint. This value can be found in the response headers under Request-Id


Responses

Various responses for this endpoint, in addition to general responses specified in Errors.

200 - OK

Request with readable KITAS/KITAP image

Response

1
2
3
4
5
{ "status": "SUCCESS", "reason": "File successfully read.", //..., }

200 - OK

Request with non KITAS/KITAP image

Response

1
2
3
4
5
{ "status": "SUCCESS", "reason": "File successfully read. Some fields are invalid.", //..., }

400 - Bad Request

Request without form-data image

Response

1
2
3
4
5
{ "status": "NO_FILE", "reason": "No file in request body", //..., }

415 - Unsupported Media Type

Request with non-image file format

Response

1
2
3
4
5
{ "status": "FILE_INVALID_FORMAT", "reason": "Failed to process invalid file format. Please upload the correct file format", //..., }