forked from pagopa/io-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_eucovidcert.yaml
81 lines (79 loc) · 3.07 KB
/
api_eucovidcert.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
swagger: "2.0"
info:
version: 0.0.1
title: EU Covid Certificate service for IO App
basePath: /api/v1/eucovidcert
schemes:
- https
security:
- Bearer: []
paths:
/certificate:
post:
operationId: getCertificate
summary: Retrieve a certificate for a given Citizen
description: |-
Given a Citizen's fiscal code and an OTP (the auth code previously sent via IO Message), a Certificate is returned with ID, encoded QR-code, expiration date and a markdown text with all meaningful information to be shown to Citizens.
parameters:
- name: accessData
in: body
schema:
$ref: "#/definitions/GetCertificateParams"
responses:
'200':
description: |-
A Certificate exists and it's found for the given access data. It is retrieved regardless of it's expired or its current status
schema:
$ref: "#/definitions/Certificate"
'400':
description: Payload has bad format
schema:
$ref: "#/definitions/ProblemJson"
'401':
description: Bearer token null or expired
'403':
description: Access data provided are invalid or no Certificate has been emitted for the given Citizen
'410':
description: Endpoint no longer available
'500':
description: Generic server error
schema:
$ref: "#/definitions/ProblemJson"
'504':
description: Gateway Timeout
definitions:
GetCertificateParams:
type: object
properties:
auth_code:
type: string
description: OTP previously sent to the Citizen
preferred_languages:
$ref: '#/definitions/PreferredLanguages'
required:
- auth_code
Certificate:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/Certificate"
ValidCertificate:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/ValidCertificate"
RevokedCertificate:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/RevokedCertificate"
ExpiredCertificate:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/ExpiredCertificate"
HeaderInfo:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/HeaderInfo"
QRCode:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/QRCode"
PreferredLanguages:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-eucovidcerts/v1.22.0/openapi/index.yaml#/definitions/PreferredLanguages"
ProblemJson:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-commons/v20.5.3/openapi/definitions.yaml#/ProblemJson"
consumes:
- application/json
produces:
- application/json
securityDefinitions:
Bearer:
type: apiKey
name: Authorization
in: header