-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathopenapi.yaml
464 lines (459 loc) · 15 KB
/
openapi.yaml
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
openapi: 3.0.0
info:
version: 1.0.0
title: Lumin Sign Api Reference
description: |
The Lumin Sign API Reference supplies a wide range of eSignature tools for your application.
Some useful links:
- [The document repository](https://github.com/luminpdf/luminsign-docs)
- [The source API definition for the Lumin Sign API](https://github.com/luminpdf/luminsign-docs/blob/main/openapi.yaml)
- [Authentication for using API](/docs/api/authentication/)
contact:
name: API Support
email: integration@luminpdf.com
url: https://help.luminpdf.com
servers:
- url: https://api.luminpdf.com/v1
description: Production server
- url: https://api-sandbox.luminpdf.com/v1
description: Sandbox server
tags:
- name: Signature Request
description: Everything about Signature Request
- name: User
description: Everything about User
paths:
/signature_request/{signature_request_id}:
get:
summary: Get Signature Request
description: Get Signature Request by id.
security:
- ApiKey: []
tags:
- Signature Request
parameters:
- in: path
name: signature_request_id
schema:
type: string
required: true
description: ID of the Signature Request to get
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
type: object
required:
- signature_request
properties:
signature_request:
description: Contains information about a Signature Request.
$ref: '#/components/schemas/SignatureRequest'
'4xx':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/signature_request/send:
post:
summary: Send Signature Request
description: Creates and sends a new Signature Request with the submitted documents.
security:
- ApiKey: []
tags:
- Signature Request
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SignatureRequestDTO'
responses:
'201':
description: Expected response to a valid request
content:
application/json:
schema:
type: object
required:
- signature_request
properties:
signature_request:
description: Contains information about a Signature Request.
required:
- signature_request_id
- created_at
- status
properties:
signature_request_id:
type: string
description: The unique identifier for the Signature Request.
created_at:
type: string
description: The time the Signature Request was created.
status:
type: string
description: The status of the Signature Request.
enum:
- WAITING_FOR_PROCESSING
- FAILED
'4xx':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/signature_request/cancel/{signature_request_id}:
put:
summary: Cancel Signature Request
description: Cancel Signature Request by id.
security:
- ApiKey: []
tags:
- Signature Request
parameters:
- in: path
name: signature_request_id
schema:
type: string
required: true
description: ID of the Signature Request to cancel
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
type: object
properties:
signature_request_id:
type: string
description: The unique identifier for the Signature Request.
status:
type: string
description: The status of the Signature Request.
enum:
- CANCELLED
'4xx':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/signature_request/files_as_file_url/{signature_request_id}:
get:
summary: Download File as File URL
description: Obtain the file of the Signature Request by id as a file URL. Returns a JSON object with a url to the file
security:
- ApiKey: []
tags:
- Signature Request
parameters:
- in: path
name: signature_request_id
schema:
type: string
required: true
description: ID of the Signature Request to get
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
type: object
properties:
file_url:
type: string
description: The url of the file, which will be downloaded and signed.
expires_at:
type: integer
format: unix-epoch
description: When the file url will expire. This is a unix epoch timestamp (miliseconds).
'4xx':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/signature_request/files/{signature_request_id}:
get:
summary: Download File
description: Obtain the file of the Signature Request by id. Returns a PDF file.
security:
- ApiKey: []
tags:
- Signature Request
parameters:
- in: path
name: signature_request_id
schema:
type: string
required: true
description: ID of the Signature Request to get
responses:
'200':
description: Expected response to a valid request
content:
application/pdf:
schema:
type: string
format: binary
'4xx':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/info:
get:
summary: Get User Information
description: Get information of current user by API Key
security:
- ApiKey: []
tags:
- User
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
type: object
required:
- user
properties:
user:
description: Contains information about a User.
$ref: '#/components/schemas/User'
'4xx':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
securitySchemes:
ApiKey:
type: apiKey
name: X-API-KEY
in: header
schemas:
Signer:
type: object
required:
- email_address
- name
properties:
email_address:
type: string
name:
type: string
group:
type: number
description: The signing order of signer for the Signature Request with `signing_type` is `ORDER`.
Viewer:
type: object
required:
- email_address
- name
properties:
email_address:
type: string
name:
type: string
SignatureRequest:
type: object
required:
- signature_request_id
- title
- created_at
- expires_at
- details_url
- status
- signers
- signing_type
properties:
signature_request_id:
type: string
description: The unique identifier for the Signature Request.
title:
type: string
description: The title of the Signature Request.
created_at:
type: string
description: The time the Signature Request was created.
updated_at:
type: string
description: The time the Signature Request was last updated.
expires_at:
type: string
description: The time the Signature Request will expire.
details_url:
type: string
description: The url to view the Signature Request in the browser.
status:
type: string
description: The status of the Signature Request.
enum:
- NEED_TO_SIGN
- WAITING_FOR_OTHERS
- APPROVED
- REJECTED
- WAITING_FOR_PROCESSING
- FAILED
- CANCELLED
reason:
type: string
description: The reason for the status FAILED or REJECTED of the Signature Request.
signing_type:
type: string
description: The type of signing for the Signature Request.
enum:
- SAME_TIME
- ORDER
signers:
type: array
items:
required:
- email_address
- name
- is_approved
- status
allOf:
- $ref: '#/components/schemas/Signer'
- properties:
is_approved:
type: boolean
description: Whether the Signer has approved the Signature Request.
status:
type: string
description: The status of the Signer.
enum:
- NEED_TO_SIGN
- APPROVED
- REJECTED
- WAITING_FOR_OTHERS
description: The Signers of the Signature Request.
User:
type: object
required:
- email
- id
- name
properties:
id:
type: string
email:
type: string
name:
type: string
SignatureRequestDTO:
type: object
required:
- signers
- title
- expires_at
properties:
file_url:
type: string
description: The URL of a single file to be downloaded and signed. This field is mutually exclusive with `file`, `files`, and `file_urls`. Only one of these fields should be provided in the request.
file:
type: string
format: binary
description: A single uploaded file to be sent for signature. This field is mutually exclusive with `file_url`, `files`, and `file_urls`. Only one of these fields should be provided in the request.
file_urls:
type: array
description: An array of URLs of files to be downloaded and signed. This field is mutually exclusive with `file`, `files`, and `file_url`. Only one of these fields should be provided in the request.
items:
type: string
files:
type: array
description: An array of uploaded files to be sent for signature. This field is mutually exclusive with `file`, `file_url`, and `file_urls`. Only one of these fields should be provided in the request.
items:
type: binary
signers:
type: array
items:
allOf:
- $ref: '#/components/schemas/Signer'
- properties:
group:
type: number
description: |
The signing order of signer for the Signature Request with `signing_type` is `ORDER`. Required if `signing_type` is `ORDER`.
Only signers in `1st Signers` group will receive email/notification, signers in subsequent groups will receive email/notification when all signers in previous group has signed.
Group starts incrementing at 1.
The default value for group always is 1 if `signing_type` is `SAME_TIME.`
description: Add Signers to your Signature Request.
viewers:
type: array
items:
$ref: '#/components/schemas/Viewer'
description: Add Viewers to your Signature Request.
title:
type: string
minLength: 1
maxLength: 255
description: The title you want to give the Signature Request.
expires_at:
type: integer
format: unix-epoch
description: When the Signature Request will expire. This is a unix epoch timestamp (miliseconds). Should be later than today.
use_text_tags:
type: boolean
description: Set to `true` to enable Text Tag parsing in your document. Your Text Tags will be converted into UI components for the user to interact with. Defaults to `false`.
signing_type:
type: string
description: The signing order for the Signature Request. Defaults to `SAME_TIME`.
enum:
- SAME_TIME
- ORDER
custom_email:
type: object
description: Custom email content for the email sent to signers.
properties:
sender_email:
type: string
description: The email address of the sender.
subject_name:
type: string
description: The subject of the email.
title:
type: string
description: The title of the email.
example:
file_url: https://lumin-assets-production.s3.us-east-1.amazonaws.com/api-demo/Direct+Debit+form.pdf
signers:
- email_address: nhuttm@luminpdf.com
name: Nhut Tran
group: 1
- email_address: tuyen_ptt@luminpdf.com
name: Tuyen Phan
group: 1
- email_address: son_lt@luminpdf.com
name: Thi Son
group: 2
viewers:
- email_address: hau_le@luminpdf.com
name: Hau Le
- email_address: giang_pl@luminpdf.com
name: Giang Phan
- email_address: phap_hl@luminpdf.com
name: Phap Hello
title: My first request signing document
expires_at: 1727510980694
use_text_tags: false
signing_type: ORDER
Error:
type: object
required:
- error_code
- error_message
properties:
error_code:
type: string
error_message:
type: string