-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_main.http
More file actions
55 lines (44 loc) · 1.25 KB
/
test_main.http
File metadata and controls
55 lines (44 loc) · 1.25 KB
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
### Healthcheck
GET {{ endpoint }}
Content-Type: application/json
### ** Add a card for access **
POST {{ endpoint }}/card/add
Content-Type: application/json
X-Environment: {{ environment }}
#Authorization: Bearer {{ token }}
{
"number": "test00000101180610",
"name": "test_card",
"devices": [
"etoehotel-101"
],
"start_at": "2025-04-14T12:35:00+09:00",
"ttl": 360,
"persist": false,
"owner_client_id": "anonymous"
}
### Get Cards by owner_client_id
GET {{ endpoint }}/owner/anonymous
Content-Type: text/plain
### ** Identify: API for Vguang M350 **
### etoehotel's code scanner actually uses this endpoint
### The card number is transmitted to the server as a flat text. If the code=0000 is returned, the relay will be notified to open the door lock.
POST {{ endpoint }}/identify/vguang-m350/etoehotel-101
Content-Type: text/plain
36380F351437B3
### Identify: successfully used JSON
POST {{ endpoint }}/identify/json
Content-Type: application/json
X-Environment: {{ environment }}
X-Device-SN: test_card_reader
{
"number": "TEST1234567890kkk"
}
### Identify: failure used JSON
POST {{ endpoint }}/identify/json
Content-Type: application/json
X-Environment: {{ environment }}
X-Device-SN: test_card_reader
{
"card_number": "WRONG_CARD1234567890"
}