This repository was archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstores-api.yaml
More file actions
562 lines (562 loc) · 15.9 KB
/
stores-api.yaml
File metadata and controls
562 lines (562 loc) · 15.9 KB
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
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
openapi: 3.0.1
info:
title: Stores API
description: API to find a store nearby.
version: "1.0"
servers:
- url: https://dds-wvv-backend.herokuapp.com/
- url: https://dev-dds-wvv-backend.herokuapp.com/
tags:
- name: Products API
description: Products Controller
- name: Stores API
description: Stores Controller
paths:
/products/:
get:
tags:
- Products API
summary: get all products for one specific store
operationId: getProductsByStoreIdUsingGET
parameters:
- name: storeId
in: query
description: storeId
required: true
allowEmptyValue: false
schema:
type: string
example: ddf24dc6-1a2d-4391-8f34-c5c322b21c1e
responses:
200:
description: ok
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Product'
500:
description: An unexpected error occurred
content: {}
deprecated: false
/products/{id}:
get:
tags:
- Products API
summary: get one specific product by ID
operationId: getProductByIdUsingGET
parameters:
- name: id
in: path
description: id
required: true
schema:
type: string
example: 885dfe52-c401-42fd-bf8d-80d6b7c80dd2
responses:
200:
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
500:
description: An unexpected error occurred
content: {}
deprecated: false
/stores/:
get:
tags:
- Stores API
summary: get stores / or filter by query
operationId: getStoresByQueryUsingGET
parameters:
- name: neighborhood
in: query
description: id
allowEmptyValue: false
schema:
type: string
example: Neukölln
responses:
200:
description: ok
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Store'
500:
description: An unexpected error occurred
content: {}
deprecated: false
post:
tags:
- Stores API
summary: Create store
description: |
Creates a new store.
The store will is created with `published=false` and must be published manually.
GeoLocation is filled automatically from `Address` if not present.
security:
- basicAuth: []
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
storeData:
$ref: '#/components/schemas/StoreDraft'
shopOwnerImage:
type: string
format: binary
profileImageURL:
type: string
format: binary
encoding:
shopOwnerImage:
contentType: image/png, image/jpeg
profileImage:
contentType: image/png, image/jpeg
responses:
200:
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Store'
500:
description: An unexpected error occurred
content: {}
deprecated: false
/stores/{id}:
get:
tags:
- Stores API
summary: get a specific store by ID
operationId: getStoreByIdUsingGET
parameters:
- name: id
in: path
description: id
required: true
schema:
type: string
example: ddf24dc6-1a2d-4391-8f34-c5c322b21c1e
responses:
200:
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Store'
500:
description: An unexpected error occurred
content: {}
deprecated: false
/stores/{id}/products:
post:
tags:
- Stores API
- Products API
summary: Create a new product for the store
security:
- basicAuth: []
parameters:
- name: id
in: path
description: id
required: true
schema:
type: string
example: ddf24dc6-1a2d-4391-8f34-c5c322b21c1e
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
productData:
$ref: '#/components/schemas/ProductDraft'
productImage:
type: string
format: binary
encoding:
productImage:
contentType: image/png, image/jpeg
responses:
200:
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
500:
description: An unexpected error occurred
content: {}
components:
schemas:
Address:
title: Address
type: object
properties:
city:
type: string
country:
type: string
description: Alpha-2
id:
type: string
postalCode:
type: string
region:
type: string
state:
type: string
streetName:
type: string
streetNumber:
type: string
Attribute:
title: Attribute
type: object
properties:
name:
type: string
GeoJSON:
title: GeoJSON
type: object
properties:
type:
type: string
enum:
- Point
coordinates:
type: array
description: Array containing longitudea and latitude
items:
type: number
minItems: 2
maxItems: 2
example:
type: Point
coordinates:
- 13.408134
- 52.489908
Image:
title: Image
type: object
properties:
dimensions:
$ref: '#/components/schemas/ImageDimensions'
label:
type: string
url:
type: string
ImageDimensions:
title: ImageDimensions
type: object
description: Dimensions of the original image. This can be used by your application for example to determine whether the image is large enough to display a zoom view.
properties:
h:
type: integer
format: int32
w:
type: integer
format: int32
Price:
title: Price
type: object
properties:
currencyCode:
type: string
value:
type: number
Product:
title: Product
type: object
properties:
description:
$ref: '#/components/schemas/LocalizedString'
id:
type: string
masterVariant:
$ref: '#/components/schemas/ProductVariant'
name:
$ref: '#/components/schemas/LocalizedString'
price:
$ref: '#/components/schemas/Price'
slug:
$ref: '#/components/schemas/LocalizedString'
example:
id: 6a19bf78-dce2-4830-845f-b029ada5472e
name:
de_DE: 2x kleine Hamamtücher 50x90cm
description:
de_DE: |-
Du bekommst 2x kleine Hamamtücher 50x90cm aus 100% Baumwolle perfekt im Bad oder Küche
Voraussichtliche Lieferung: ab sofort
slug:
en_US: 2-hamam-50-90cm-rot-weiss
de_DE: 2x-kleine-hamamtuecher-50x90cm
price:
value: 25
currencyCode: EUR
masterVariant:
assets: []
attributes: []
id: 1
images:
- url: https://7cbf5172f31e91cb7a5d-d8e96be60ea1fd7ad98fb07a482142ee.ssl.cf3.rackcdn.com/2-hamam-50-90cm-rot--q9KcG8UT.jpg
dimensions:
w: 566
h: 566
label: 2 Hamamtücher 50 x 90cm
key: 2-hamam-50-90cm-rot-weiss
sku: 2-hamam-50-90cm-rot-weiss
ProductDraft:
title: ProductDraft
type: object
properties:
description:
$ref: '#/components/schemas/LocalizedString'
name:
$ref: '#/components/schemas/LocalizedString'
price:
$ref: '#/components/schemas/Price'
slug:
$ref: '#/components/schemas/LocalizedString'
example:
name:
de_DE: 2x kleine Hamamtücher 50x90cm
description:
de_DE: |-
Du bekommst 2x kleine Hamamtücher 50x90cm aus 100% Baumwolle perfekt im Bad oder Küche
Voraussichtliche Lieferung: ab sofort
slug:
en_US: 2-hamam-50-90cm-rot-weiss
de_DE: 2x-kleine-hamamtuecher-50x90cm
price:
value: 25
currencyCode: EUR
ProductVariant:
title: ProductVariant
type: object
properties:
attributes:
type: array
items:
$ref: '#/components/schemas/Attribute'
id:
type: integer
format: int32
images:
type: array
items:
$ref: '#/components/schemas/Image'
sku:
type: string
LocalizedString:
title: LocalizedString
description: |
A localized string is a JSON object where the keys are of IETF language tag,
and the values the corresponding strings used for that language.
For SBH, currently only `de-DE` is used.
type: object
example:
de-DE: Deutscher Text
en-US: American English text
Store:
title: Store
type: object
properties:
address:
$ref: '#/components/schemas/Address'
contact:
type: string
deprecated: true
description:
$ref: '#/components/schemas/LocalizedString'
email:
type: string
deprecated: true
description: Use contactEmail instead
geoLocation:
$ref: '#/components/schemas/GeoJSON'
homepage:
type: string
deprecated: true
description: Use contactHomepage instead
name:
$ref: '#/components/schemas/LocalizedString'
neighborhood:
type: array
items:
type: string
deprecated: true
shopCategory:
type: string
phone:
type: string
deprecated: true
description: Use contactPhone instead
contactEmail:
type: string
contactPhone:
type: string
contactHomepage:
type: string
contactWhatsapp:
type: string
contactInstagram:
type: string
contactFacebook:
type: string
contactFacetime:
type: string
contactSkype:
type: string
contactTwitter:
type: string
profileImage:
type: string
profileVideoURL:
type: string
hasDelivery:
type: boolean
hasPickup:
type: boolean
hasShipping:
type: boolean
shopOwnerImage:
type: string
shopOwnerName:
type: string
deprecated: true
description: Use shopOwnerFirstName/shopOwnerLastName instead
shopOwnerFirstName:
type: string
shopOwnerLastName:
type: string
id:
type: string
published:
type: boolean
example:
id: c3d6517f-b285-4a9e-b650-345c850bb01c
name:
de_DE: Agas Own 2
description:
de_DE: "\"Agas Own 2\" in Berlin Kreuzberg am Südstern. Erlebe einen Traum\
\ von Vielfalt aus dem Raum Asien im Bereich: Wohnaccessoires, ein Raum\
\ der Begegnung. \n\nHallo liebe Leute, Ihr seid auf mein bereits bestehendes\
\ Projekt/Ladengeschäft aufmerksam geworden. Ich betreibe seit über einem\
\ Jahr in Berlin-Kreuzberg am Südstern ein Ladengeschäft für Wohnaccessoires\
\ aus der Türkei, Thailand, Indonesien, Indien. Ich wohne selber seit\
\ einigen Jahren in der Körtestraße. Deshalb liegen mir als gebürtigem\
\ Berliner und Kreuzberger der Zusammenhalt im Kiez, der Austausch von\
\ Anliegen und die Mitmenschen, die ich in meinem Geschäft täglich antreffe,\
\ am Herzen."
address:
country: DE
streetName: Körtestraße
streetNumber: "34"
postalCode: "10967"
city: Berlin
state: ""
geoLocation:
type: Point
coordinates:
- 13.408134
- 52.489908
profileVideoURL: https://youtu.be/PBkb2mzbqKE
shopOwnerImage: https://drive.google.com/file/d/1Ls5Yjc760oEfnibC9Xv29OtALtmV_Ss4/view?usp=sharing
shopOwnerFirstName: Oskar
shopOwnerLastName: Fleer
contactPhone: 030 98388469
contactHomepage: https://www.startnext.com/agas-own-2
StoreDraft:
title: StoreDraft
type: object
properties:
address:
$ref: '#/components/schemas/Address'
description:
$ref: '#/components/schemas/LocalizedString'
name:
$ref: '#/components/schemas/LocalizedString'
shopCategory:
type: string
contactEmail:
type: string
contactHomepage:
type: string
contactPhone:
type: string
contactWhatsapp:
type: string
contactInstagram:
type: string
contactFacebook:
type: string
contactFacetime:
type: string
contactSkype:
type: string
contactTwitter:
type: string
profileVideoURL:
type: string
hasDelivery:
type: boolean
hasPickup:
type: boolean
hasShipping:
type: boolean
shopOwnerFirstName:
type: string
shopOwnerLastName:
type: string
shopOwnerPhone:
type: string
description: Only used internally and MUST not be used in the frontend
shopOwnerEmail:
type: string
description: Only used internally and MUST not be used in the frontend
numberOfEmployees:
type: number
format: int32
description: Only used internally and MUST not be used in the frontend
example:
name:
de_DE: Agas Own 2
description:
de_DE: "\"Agas Own 2\" in Berlin Kreuzberg am Südstern. Erlebe einen Traum\
\ von Vielfalt aus dem Raum Asien im Bereich: Wohnaccessoires, ein Raum\
\ der Begegnung. \n\nHallo liebe Leute, Ihr seid auf mein bereits bestehendes\
\ Projekt/Ladengeschäft aufmerksam geworden. Ich betreibe seit über einem\
\ Jahr in Berlin-Kreuzberg am Südstern ein Ladengeschäft für Wohnaccessoires\
\ aus der Türkei, Thailand, Indonesien, Indien. Ich wohne selber seit\
\ einigen Jahren in der Körtestraße. Deshalb liegen mir als gebürtigem\
\ Berliner und Kreuzberger der Zusammenhalt im Kiez, der Austausch von\
\ Anliegen und die Mitmenschen, die ich in meinem Geschäft täglich antreffe,\
\ am Herzen."
address:
country: DE
streetName: Körtestraße
streetNumber: "34"
postalCode: "10967"
city: Berlin
state: ""
profileVideoURL: https://youtu.be/PBkb2mzbqKE
shopOwnerFirstName: Oskar
shopOwnerLastName: Fleer
contactPhone: 030 98388469
contactHomepage: https://www.startnext.com/agas-own-2
securitySchemes:
basicAuth: # <-- arbitrary name for the security scheme
type: http
scheme: basic