-
Notifications
You must be signed in to change notification settings - Fork 0
/
original_open_api_spec.yml
171 lines (171 loc) · 4.27 KB
/
original_open_api_spec.yml
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
openapi: 3.0.0
info:
title: Ocarina API
version: 1.0.0
description: OptiCAl Recognition of IdeNtity pApers
servers:
- url: https://api-hyrule.cashbee.io
description: Production server
security:
- bearerAuth: []
paths:
/documents:
post:
description: Ask for a document identification
operationId: documentIdentification
tags: ['Documents']
requestBody:
description: Document metadata
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentsIdentificationRequest'
responses:
200:
description: Success asking for document identification
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentIdentificationResponse'
/documents/direct_upload:
post:
description: Request upload link
operationId: documentsDirectUpload
tags: ['Documents']
requestBody:
description: Size in bytes and checksum of the document
content:
application/json:
schema:
$ref: '#/components/schemas/DirectUploadRequest'
responses:
200:
description: Url and uuid of document
content:
application/json:
schema:
$ref: '#/components/schemas/DirectUploadResponse'
/documents/{uuid}:
get:
description: Get document identification information
operationId: documentIdentificationInfo
tags: ['Documents']
parameters:
- name: uuid
in: path
required: true
schema:
type: string
format: uuid
responses:
200:
description: The identification information of the document
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentIdentificationInfo'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: uuid
schemas:
DirectUploadRequest:
type: object
properties:
size:
type: integer
format: int64
content_md5:
type: string
DocumentsIdentificationRequest:
type: object
properties:
uuid:
description: UUID from direct upload request (optional)
type: string
format: uuid
filename:
type: string
content_type:
type: string
DocumentIdentificationResponse:
type: object
properties:
id:
type: integer
format: int64
uuid:
type: string
format: uuid
filename:
type: string
content_type:
type: string
result:
type: string
DirectUploadResponse:
type: object
properties:
url:
type: string
format: uri
uuid:
type: string
format: uuid
DocumentIdentificationInfo:
type: object
properties:
uuid:
type: string
format: uuid
status:
type: string
enum:
- pending
- processing
- validated
- rejected
- failed
score:
type: number
format: double
metadata:
type: object
properties:
id_type:
type: string
enum:
- passport
- id_card
first_name:
type: string
middle_names:
type: string
last_name:
type: string
birth_date:
type: string
format: date
birth_place:
type: string
height:
type: integer
serial_number:
type: string
gender:
type: string
eyes_color:
description: Optional if id_type is not a passport
type: string
address:
type: string
delivered_by:
type: string
delivered_date:
type: string
format: date
valid_until:
type: string
format: date