Skip to content

Commit

Permalink
chore(qes): add documents endpoint (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscocastanho-onfido authored Jul 9, 2024
1 parent c72f1bf commit aa11368
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ paths:
$ref: paths/id_photos.yaml#/id_photo
/id_photos/{id_photo_id}/download:
$ref: paths/id_photos.yaml#/download
# Qualified Electronic Signature
/qualified_electronic_signature/documents:
$ref: paths/qualified_electronic_signature.yaml#/documents
# Timeline Files
/workflow_runs/{workflow_run_id}/timeline_file:
$ref: paths/timeline_files.yaml#/timeline_files
Expand Down
40 changes: 40 additions & 0 deletions paths/qualified_electronic_signature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
documents:
post:
summary: Retrieves the signed document or application form
operationId: download_qes_document
description: >
Retrieves the signed document or application form depending on the file_id provided.
parameters:
- name: workflow_run_id
in: query
required: true
description: The unique identifier of the Workflow Run for which you want to retrieve the signed document.
schema:
type: string
format: uuid
- name: file_id
in: query
required: true
description: The unique identifier of the file which you want to retrieve.
schema:
type: string
format: uuid

responses:
"302":
description: Found
headers:
Location:
description: Pre-signed URL to download the file.
schema:
type: string
format: uri
"200":
description: The signed document PDF binary data.
content:
application/pdf:
schema:
type: string
format: binary
default:
$ref: ../responses/default_error.yaml
1 change: 1 addition & 0 deletions shell/patch-openapi-definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Section:
'motion_captures': 'Motion captures',
'watchlist_monitors': 'Monitors',
'id_photos': 'ID Photos',
'qualified_electronic_signature': 'Qualified Electronic Signature',
'timeline_file': 'Timeline Files'
}),
Section('Other Endpoints',
Expand Down

0 comments on commit aa11368

Please sign in to comment.