
Surat Pesanan Kendaraan (SPK)
Surat Pesanan Kendaraan (SPK) is a vehicle order document that records the details of a vehicle purchase order between a dealer and a buyer.
SPK Object
- Name
status
- Type
- string
- Description
Enum code indicating the status of the reading result.
SUCCESS
NO_FILE
FILE_INVALID_FORMAT
FAILED
- Name
read
- Type
- object
- Description
Contains the reading for the SPK document. Each field has
confidence
(in percentage) andvalue
(the reading).- Name
dealer_name
- Type
- object
- Description
Name of the dealer or company handling the vehicle order.
- Name
spk_dealer_number
- Type
- object
- Description
Dealer's SPK (Surat Pesanan Kendaraan) number.
- Name
spk_date
- Type
- object
- Description
Date when the SPK was issued (YYYY-MM-DD format).
- Name
automotive_brand
- Type
- object
- Description
Brand/manufacturer of the ordered vehicle.
- Name
automotive_model
- Type
- object
- Description
Model of the ordered vehicle.
- Name
automotive_unit_count
- Type
- object
- Description
Number of vehicle units ordered.
- Name
on_the_road_price_per_unit
- Type
- object
- Description
Total price per unit including all costs (on-the-road price).
- Name
discount_per_unit
- Type
- object
- Description
Discount amount per unit.
- Name
net_price_per_unit
- Type
- object
- Description
Final price per unit after discount.
- Name
buyer_name
- Type
- object
- Description
Name of the buyer/customer.
- Name
buyer_address
- Type
- object
- Description
Address of the buyer/customer.
- Name
buyer_phone_number
- Type
- object
- Description
Phone number of the buyer/customer.
- Name
buyer_email
- Type
- object
- Description
Email address of the buyer/customer.
- Name
sales_name
- Type
- object
- Description
Name of the sales representative handling the order.
- Name
sales_phone_number
- Type
- object
- Description
Phone number of the sales representative.
Read SPK
Detects a valid SPK image and returns the information as text.
Required parameter
- Name
image
- Type
- file (.png, .jpg, .jpeg, .tiff, .pdf)
- Description
The image file for the SPK document.
Sample Request
1
2
3
4
5
import { Vision } from '@glair/vision';
const vision = new Vision({ apiKey: 'api-key', username: 'username', password: 'password' });
await vision.ocr.spk({ image: '/path/to/image/SPK.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
{
"status": "SUCCESS",
"read": {
"dealer_name": {
"value": "HYUNDAI SUN MEGA MOTOR",
"confidence": 0.9
},
"spk_dealer_number": {
"value": "24000018",
"confidence": 1
},
"spk_date": {
"value": "2024-12-19",
"confidence": 1
},
"automotive_brand": {
"value": "HYUNDAI",
"confidence": 1
},
"automotive_model": {
"value": "STARGAZER",
"confidence": 1
},
"automotive_unit_count": {
"value": 1,
"confidence": 1
},
"on_the_road_price_per_unit": {
"value": 1000000000,
"confidence": 1
},
"discount_per_unit": {
"value": 100000000,
"confidence": 1
},
"net_price_per_unit": {
"value": 900000000,
"confidence": 1
},
"buyer_name": {
"value": "Ronald Budiyanto",
"confidence": 1
},
"buyer_address": {
"value": "Jl. Raya Kediri No. 123",
"confidence": 1
},
"buyer_phone_number": {
"value": "081234567890",
"confidence": 1
},
"buyer_email": {
"value": "ronald@gmail.com",
"confidence": 1
},
"sales_name": {
"value": "John Doe",
"confidence": 1
},
"sales_phone_number": {
"value": "081234567890",
"confidence": 1
}
}
}