Background supergraphic

Singapore Family Pass

Singapore Family Pass is a relocation visa issued to selected family members of Employment Pass, S Pass holders, EntrePass holders or Personalised Employment Pass (PEP) holders.

Singapore Family Pass 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
    read
    Type
    object
    Description

    Contains the reading for each Singapore Family Pass fields. Each field contains:

    • confidence_text (number): Text recognition confidence in percentage (except photo field)
    • confidence (number): Overall confidence score in percentage
    • polygon (array): Array of coordinate pairs [x, y] representing the bounding box of the field
    • value_original (string): The original text as read from the document (except photo field)
    • value (string): The processed/extracted value
    • page_index (number): Page number where the field was found (0-indexed)
    • Name
      photo
      Type
      object
      Description

      Face in base64 format.

    • Name
      address
      Type
      object
      Description

      Address.

    • Name
      card_number
      Type
      object
      Description

      Card Number.

    • Name
      card_type
      Type
      object
      Description

      Card type.

    • Name
      date_of_birth
      Type
      object
      Description

      Date of birth.

    • Name
      expiry_date
      Type
      object
      Description

      Expiry date.

    • Name
      fin
      Type
      object
      Description

      Foreign identification number.

    • Name
      issue_date
      Type
      object
      Description

      Issue date.

    • Name
      name
      Type
      object
      Description

      Name.

    • Name
      nationality
      Type
      object
      Description

      Nationality.

    • Name
      pass_status
      Type
      object
      Description

      Pass status.

    • Name
      sex
      Type
      object
      Description

      Sex.


POST/ocr/v1/singapore-family-pass

Read Singapore Family Pass

Detects a valid Singapore Family Pass image and returns the information as text.

Required parameter

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

    The image file for the Singapore Family Pass.

Sample Request

POST
/ocr/v1/singapore-family-pass
1
2
3
4
5
import ApiClient from '@glair/vision'; const vision = new Vision({ apiKey: 'api-key', username: 'username', password: 'password' }); await vision.ocr.singaporeFamilyPass({ image: '/path/to/image/FamilyPass.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{ "status": "SUCCESS", "reason": "File Successfully Read", "read": { "photo": { "value": "iVB..", "confidence": 0.9589, "polygon": [ [20,75], [115,75], [115,201], [20,201] ], "page_index": 0 }, "name": { "value": "(ZENG XIAO AN)", "value_original": "(ZENG XIAO AN)", "confidence": 0.6884, "confidence_text": 0.9992, "polygon": [ [135,152], [135,124], [294,124], [294,152] ], "page_index": 0 }, "fin": { "value": "F456A", "value_original": "F****456A", "confidence": 0.7852, "confidence_text": 0.9545, "polygon": [ [137,190], [240,190], [240,216], [137,216] ], "page_index": 0 }, "date_of_birth": { "value": "12-05-1980", "value_original": "12 MAY 1980", "confidence": 0.929, "confidence_text": 0.9985, "polygon": [ [134,256], [258,256], [258,283], [134,283] ], "page_index": 0 }, "sex": { "value": "FEMALE", "value_original": "FEMALE", "confidence": 0.9813, "confidence_text": 0.9998, "polygon": [ [137,322], [213,322], [213,348], [137,348] ], "page_index": 0 }, "issue_date": { "value": "18-11-2019", "value_original": "18 NOV 2019", "confidence": 0.5805, "confidence_text": 0.9971, "polygon": [ [133,482], [133,453], [256,453], [256,482] ], "page_index": 0 }, "expiry_date": { "value": "29-06-2028", "value_original": "29 JUN 2028", "confidence": 0.7692, "confidence_text": 0.9998, "polygon": [ [136,586], [262,586], [262,613], [136,613] ], "page_index": 0 }, "nationality": { "value": "", "value_original": "", "confidence": 0.0, "confidence_text": 0.0, "polygon": [], "page_index": 0 }, "address": { "value": "", "value_original": "", "confidence": 0.0, "confidence_text": 0.0, "polygon": [], "page_index": 0 }, "card_number": { "value": "", "value_original": "", "confidence": 0.0, "confidence_text": 0.0, "polygon": [], "page_index": 0 }, "card_type": { "value": "", "value_original": "", "confidence": 0.0, "confidence_text": 0.0, "polygon": [], "page_index": 0 }, "pass_status": { "value": "", "value_original": "", "confidence": 0.0, "confidence_text": 0.0, "polygon": [], "page_index": 0 } } }

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 Singapore Family Pass image

Response

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

400 - Bad Request

Request without form-data image

Response

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

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. Some fields are invalid.", //..., }