forked from pagopa/io-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_cgn_operator_search.yaml
190 lines (184 loc) · 7.41 KB
/
api_cgn_operator_search.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
swagger: "2.0"
info:
version: 1.0.0
title: Carta Giovani Nazionale Operator Search API
host: localhost
basePath: /api/v1/cgn/operator-search
schemes:
- https
security:
- Bearer: []
paths:
"/published-product-categories":
get:
operationId: getPublishedProductCategories
summary: List of published product categories
description: |
List of categories that have at least a published discount
parameters:
- $ref: '#/parameters/CountNewDiscounts'
responses:
"200":
description: List of categories that have at least a published discount
schema:
$ref: "#/definitions/PublishedProductCategoriesResult"
"401":
description: Login expired.
"500":
description: Service unavailable.
schema:
$ref: "#/definitions/ProblemJson"
"/online-merchants":
post:
operationId: getOnlineMerchants
summary: List of online merchants
description: |
List of online merchants alphabetically ordered
parameters:
- in: body
name: body
required: false
schema:
$ref: '#/definitions/OnlineMerchantSearchRequest'
responses:
"200":
description: List of online merchants for the given query parameters
schema:
$ref: "#/definitions/OnlineMerchants"
"401":
description: Login expired.
"500":
description: Service unavailable.
schema:
$ref: "#/definitions/ProblemJson"
"/offline-merchants":
post:
operationId: getOfflineMerchants
summary: List of merchants with a physical address
description: |
List of merchants with physical address, ordered by distance from the user by default
parameters:
- in: body
name: body
required: false
schema:
$ref: '#/definitions/OfflineMerchantSearchRequest'
responses:
"200":
description: List of physical merchants for the given query parameters
schema:
$ref: "#/definitions/OfflineMerchants"
"401":
description: Login expired.
"500":
description: Service unavailable.
schema:
$ref: "#/definitions/ProblemJson"
"/merchants/{merchantId}":
parameters:
- name: merchantId
in: path
type: string
minLength: 1
required: true
description: Merchant Identifier
get:
operationId: getMerchant
summary: Retrieve merchant details
description: |
Retrieve merchant details together with published discounts
responses:
"200":
description: Found
schema:
$ref: "#/definitions/Merchant"
"401":
description: Login expired.
"404":
description: Operator Not Found
"500":
description: Service unavailable.
schema:
$ref: "#/definitions/ProblemJson"
"/discount-bucket-code/{discountId}":
parameters:
- name: discountId
in: path
type: string
minLength: 1
required: true
description: Discount Identifier
get:
operationId: getDiscountBucketCode
summary: Retrieve a discount bucket code
description: |
Retrieve a discount bucket code and burns it
responses:
"200":
description: Found
schema:
$ref: "#/definitions/DiscountBucketCode"
"401":
description: Login expired.
"404":
description: Bucket code Not Found
"403":
description: Access data provided are invalid or CGN not valid
"410":
description: Endpoint no longer available
"500":
description: Service unavailable.
schema:
$ref: "#/definitions/ProblemJson"
parameters:
CountNewDiscounts:
type: boolean
name: count_new_discounts
in: query
description: Indicates whether categories should be enriched with new discounts count.
definitions:
ProblemJson:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-commons/v21.0.1/openapi/definitions.yaml#/ProblemJson"
Merchant:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/Merchant"
SupportType:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/SupportType"
DiscountCodeType:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/DiscountCodeType"
OfflineMerchants:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/OfflineMerchants"
OfflineMerchant:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/OfflineMerchant"
OfflineMerchantSearchRequest:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/OfflineMerchantSearchRequest"
OnlineMerchants:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/OnlineMerchants"
OnlineMerchant:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/OnlineMerchant"
OnlineMerchantSearchRequest:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/OnlineMerchantSearchRequest"
Discount:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/Discount"
ProductCategory:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/ProductCategory"
Address:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/Address"
Coordinates:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/Coordinates"
BoundingBox:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/BoundingBox"
DiscountBucketCode:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/DiscountBucketCode"
PublishedProductCategories:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/PublishedProductCategories"
PublishedProductCategoriesWithNewDiscountsCount:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/PublishedProductCategoriesWithNewDiscountsCount"
PublishedProductCategoriesResult:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/PublishedProductCategoriesResult"
ProductCategoryWithNewDiscountsCount:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-cgn-operator-search/v3.1.0/openapi/index.yaml#/definitions/ProductCategoryWithNewDiscountsCount"
securityDefinitions:
Bearer:
type: apiKey
name: Authorization
in: header