Ijazah (Diploma)
Ijazah (Diploma).
This endpoint is currently in beta. It is not yet available in our production URL. Please contact us if you want to use this endpoint. Contact us via hi[at]glair.ai or via our representative for your company.
Diploma Object
- Name
status
- Type
- string
- Description
Enum code indicating the status of the reading result.
SUCCESS
NO_FILE
FILE_INVALID_FORMAT
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 Diploma fields. Each fields has
value
(the reading).- Name
student_name
- Type
- string
- Description
The name field refers to the full name of the individual who has obtained the academic degree or qualification that the record represents.
- Name
student_number
- Type
- string
- Description
The student number field refers to a unique identification number that is assigned to the individual by the educational institution they attend.
- Name
student_birth_place_date
- Type
- string
- Description
The student birth field refers to the place and/or date of birth of the individual.
- Name
ijazah_number
- Type
- string
- Description
The ijazah number field refers to a unique identification number that is typically assigned to the academic degree, certification, or qualification obtained by the individual. This number is usually used for verification purposes and is typically issued by the institution that granted the degree.
- Name
institutions
- Type
- string
- Description
The institution field refers to the educational institution that the individual attended and received the academic degree, certification, or qualification from. This could be a university, college, or any other type of educational institution that offers accredited programs.
- Name
study_program
- Type
- string
- Description
The subject field refers to the academic program or course of study that the individual pursued in order to obtain the academic degree, certification, or qualification. This could be a specific major or area of focus within a broader field of study, such as a Bachelor of Science in Computer Science or a Master of Business Administration.
- Name
graduate_date
- Type
- string
- Description
The graduate date field refers to the date on which the individual completed their academic degree.
- Name
educational_level
- Type
- string
- Description
The degree level field refers to the level of education that the individual has completed or is currently pursuing. This could include primary, secondary, or tertiary education, as well as vocational education. The educational level could also refer to the specific degree, such as a Bachelor's degree.
- Name
educational_degree
- Type
- string
- Description
The title given to the student from the graduate certificate.
Read Diploma
Detects a valid Diploma image and returns the information as text.
Required parameter
- Name
image
- Type
- file (.png, .jpg, .jpeg, .pdf)
- Description
The image file for the Diploma.
Sample Request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Minimum Node 18. Save the code as 'index.mjs' and run it by executing 'node index.mjs'
import {readFileSync} from "fs";
const url = 'https://api.vision.glair.ai/ocr/v1/diploma';
const basicAuth = 'Basic ' + Buffer.from('USERNAME' + ':' + 'PASSWORD').toString('base64');
const apiKey = 'API_KEY';
const formData = new FormData();
formData.append('image', new Blob([readFileSync('/path/to/image/Diploma.jpeg')]));
const config = {
method: 'POST',
headers: {
Authorization: basicAuth,
'x-api-key': apiKey,
},
body: formData,
};
const response = await fetch(url, config);
console.log(await response.json());
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
{
"status": "SUCCESS",
"reason": "File Successfully Read",
"read": {
"student_name": {
"value": "UNPR Ir. Thedy Yogasara, ST., M.Eng.Sc."
},
"student_number": {
"value": "3275120408000004"
},
"student_birth_place_date": {
"value": "Jakarta, 4 Agustus 2000"
},
"ijazah_number": {
"value": "2022/06/01/207"
},
"institutions": {
"value": "UNIVERSITAS KATOLIK PARAHYANGAN"
},
"study_program": {
"value": "Teknik Industri"
},
"graduate_date": {
"value": "9 September 2022"
},
"educational_level": {
"value": "Sarjana"
},
"educational_degree": {
"value": "S.T."
}
}
}
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 Diploma image
Response
1
2
3
4
5
{
"status": "SUCCESS",
"reason": "File Successfully Read",
//...,
}
// TODO: no "Request with non Diploma File"?
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",
//...,
}