forked from akamai/UrbanCrawl-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
991 lines (986 loc) · 36.2 KB
/
api.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
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
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
swagger: '2.0'
info:
version: 2.0.0
title: '@akamai/urbancrawl-api'
basePath: /api/v2
paths:
/account:
put:
summary: Creates a new user account
tags:
- account
operationId: account.register
parameters:
- in: body
name: items
required: false
description: 'Required fields for registration are email, full name and password of the user, sent in the body of the PUT request'
schema:
$ref: '#/definitions/registerAccountRequest'
responses:
'200':
description: |-
Account registration was successful. The API responds with the authToken, and a time to live (ttl, in seconds) value, which denotes how long this token is valid for.
Once the token expires, you'll have to ask the user to log in again
If the provided email id has already been used, the HTTP 200 response says "error" instead of ok, in status
schema:
type: object
properties:
token:
$ref: '#/definitions/tokenResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
post:
summary: Logs a user in
tags:
- account
operationId: account.login
parameters:
- in: body
name: items
required: false
description: 'Send the email id and password of the registered users to log them in, and receive auth tokens'
schema:
$ref: '#/definitions/loginRequest'
responses:
'200':
description: Request was successful
schema:
type: object
properties:
token:
$ref: '#/definitions/tokenResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
get:
summary: 'Get details of the authorized user, used to display the profile information in ''My Account'' area'
tags:
- account
operationId: account.getProfile
parameters:
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
security:
- AuthHeader: []
responses:
'200':
description: Successfully retrieved the details of the authorized user
schema:
type: object
properties:
result:
$ref: '#/definitions/profileResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, incorrect Authorization etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/account/update:
post:
summary: Updates the authorized user's details
tags:
- account
operationId: account.updateProfile
parameters:
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
- in: body
name: items
required: false
description: 'Whatever fields you send here, will be updated for the user whose auth Token is being sent in the header. You can send just one of the field to update only that, or all of them'
schema:
$ref: '#/definitions/registerAccountRequest'
security:
- AuthHeader: []
responses:
'200':
description: Returns the updated details of the authorized user once done
schema:
type: object
properties:
result:
$ref: '#/definitions/profileResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, incorrect Authorization etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/cart:
post:
summary: 'Adds a single city to the cart of the authorized user, expects you to send the authToken of the user in the header.'
tags:
- cart
operationId: cart.addToCart
consumes:
- application/json
parameters:
- in: body
name: itemBody
description: |-
Details of the city and it's quanity to add. The user for which this city needs to be added, will be deduced from the authToken that you send in the header. Check the required header values for this API.
Also used to update the existing items (mainly quantity) in the cart. If you send a cityId which already exists, it's quantity, and thus it's total price will be updated.
To delete an item, send the quantity as 0
schema:
$ref: '#/definitions/cartRequest'
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
security:
- AuthHeader: []
responses:
'200':
description: 'If the city is successfully added to the authorized user''s cart, all the items of the user''s cart are returned'
schema:
type: object
properties:
items:
type: array
items:
$ref: '#/definitions/cartResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, Authorization being unsuccessful etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
get:
summary: Returns all the items present in the authorized user's cart. Returns an empty array if there are no items present
tags:
- cart
operationId: cart.getCart
parameters:
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
security:
- AuthHeader: []
responses:
'200':
description: Returns all the items present in the currently authorized user's cart. Returns an empty 'items' array if the cart is empty
schema:
type: object
properties:
items:
type: array
items:
$ref: '#/definitions/cartResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, Authorization being unsuccessful etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/cart/checkout:
put:
summary: 'Initiates checkout process for the authorized user. During this process, an order is created, all the items in the cart of the authorized users are added to this order, and these items are deleted from the user''s cart. The response is the order details.'
tags:
- cart
operationId: cart.checkout
parameters:
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
security:
- AuthHeader: []
responses:
'200':
description: 'Returns the items in the order, when the request was successful'
schema:
type: object
properties:
items:
type: array
items:
$ref: '#/definitions/orderResponse'
'206':
description: |-
The code of HTTP 206 indicates that an error has occured during the operation which prevented from the whole operation from going through.
Typical examples are, the order went through but the cart couldn't be cleared. Or, the order was taken, but the correct response couldn't be sent. You should read the error response object, defined later for this endpoint, to understand the cause
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, Authorization being unsuccessful etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/cities:
get:
summary: Returns all the cities available in the database
tags:
- city
operationId: city.getAllCities
parameters: []
responses:
'200':
description: 'Returns a JSON array of all the available cities, mainly to use in listing all the Cities'
schema:
type: array
items:
$ref: '#/definitions/cityList'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/cities/{cityId}':
get:
summary: 'Returns details of the city, and all the places that belong to the city, whose ID is supplied'
tags:
- city
operationId: city.getCityDetails
parameters:
- name: cityId
in: path
required: true
type: number
format: double
responses:
'200':
description: Returns a JSON object containing details and places of a city whose ID is supplied
schema:
$ref: '#/definitions/city'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/cities/{cityId}/media/{type}':
get:
summary: 'Returns all the media that belongs to this cityid, including media of Places'
tags:
- city
operationId: city.getMediaOfCity
parameters:
- name: cityId
in: path
required: true
type: number
format: double
description: ID of the city whose media is requested
- name: type
in: path
required: true
type: string
description: 'accepted values are either ''image'' or ''video'', denoting the media type that you want'
responses:
'200':
description: 'Request was successful, the response is a list of all the media that belongs to this city'
schema:
description: 'Returns a JSON array of all the available places, belonging to the city whose id is supplied'
type: array
items:
$ref: '#/definitions/mediaResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/cities/{cityId}/places/{placeId}/media/{type}':
get:
summary: Returns all the media of the place that belongs to the placeId provided.
tags:
- city
operationId: city.getMediaOfPlace
parameters:
- name: cityId
in: path
required: true
type: number
format: double
description: ID of the city whose Place's media is requested
- name: placeId
in: path
required: true
type: number
format: double
description: ID of the place whose media is requested
- name: type
in: path
required: true
type: string
description: 'accepted values are either ''image'' or ''video'', denoting the media type that you want'
responses:
'200':
description: 'The request was successful, the response is a list of all the media that belongs to this city'
schema:
description: 'Returns a JSON array of all the available places, belonging to the city whose id is supplied'
type: array
items:
$ref: '#/definitions/mediaResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/cities/{cityId}/places':
get:
summary: Returns all the places that belong to the city whose ID is supplied
tags:
- city
operationId: city.getPlacesOfCity
parameters:
- name: cityId
description: the city's id whose places are required
in: path
required: true
type: number
format: double
responses:
'200':
description: Returns a JSON array containing all the places of a city whose ID is supplied
schema:
type: array
items:
$ref: '#/definitions/placeListResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/cities/{cityId}/places/{placeId}':
get:
summary: Returns the place details of the Place whose ID is supplied
tags:
- city
operationId: city.getPlaceDetails
parameters:
- name: cityId
description: the city's id to which the required place belongs
in: path
required: true
type: number
format: double
- name: placeId
description: the place id whose details are required
in: path
required: true
type: number
format: double
responses:
'200':
description: Returns a JSON object containing all the places of a city whose ID is supplied
schema:
$ref: '#/definitions/placeResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/cities/search:
get:
summary: Returns search results after searching for the given keyword in Cities and Places
tags:
- city
operationId: city.search
parameters:
- name: query
in: query
required: true
type: string
description: Search keyword
- name: page
in: query
required: false
type: number
format: double
description: Optional. Default is 1
responses:
'200':
description: |-
Returns a JSON array of all the available Cities and Places that match the supplied keyword, along with meta information about pagination.
If no cities match the keyword, returns all the matching places.
Also returns the count of elements in the current result, the current page number (currPage), and the next page number (nextPage).
If there are no further pages available, nextPage is null.
If you search for a pageNumber which doesn't fetch any data, you get an empty JSON array in results section
schema:
type: array
items:
$ref: '#/definitions/searchResults'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/cities/current:
get:
summary: 'Accepts the `x-akamai-edgescape` header, and returns the city closest to the one contained in the header'
tags:
- city
operationId: city.current
parameters:
- in: header
name: x-akamai-edgescape
description: The header with the data from which city name is extracted
type: string
required: true
responses:
'200':
description: 'Returns the City that was found, based on the value which was sent in the header. Returns ''null'' if the given city was not found.'
schema:
type: array
items:
$ref: '#/definitions/city'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
/orders:
get:
summary: Lists all the orders made by the authorized user (The user whose access token is supplied)
tags:
- order
operationId: order.getAllOrders
parameters:
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
security:
- AuthHeader: []
responses:
'200':
description: Lists all the orders of the user whose auth token was supplied. Returns an empty
schema:
type: object
properties:
items:
type: array
items:
$ref: '#/definitions/orderResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, Authorization being unsuccessful etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/orders/{orderId}':
delete:
summary: 'Deletes the order whose id is provided, from the order history of the authorized user'
tags:
- order
operationId: order.deleteOrderByID
parameters:
- in: path
name: orderId
required: true
type: string
description: The order ID to be deleted.
- in: header
name: Authorization
description: 'Send an "Authorization [accessToken]" with this request, using which the web service will find out the authorized user, and take action on this user''s account and cart. Obtain this token by either registering or logging in'
type: string
required: true
security:
- AuthHeader: []
responses:
'200':
description: 'If the given order id was deleted successfully, returns a list of all the orders by the authorized user'
schema:
type: object
properties:
items:
$ref: '#/definitions/orderResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, Authorization being unsuccessful etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
'/test':
get:
summary: 'Greets you with Hello'
tags:
- test
operationId: test.printHello
responses:
'200':
description: 'Greets with Hello, World! if everything went successfully'
schema:
type: object
$ref: '#/definitions/testResponse'
'400':
description: 'The code of HTTP 400 range indicates that an error has occured, related to resources (e.g. Resource not being found, Authorization being unsuccessful etc.). You should read the error response object, defined later for this endpoint, to understand the cause'
'500':
description: The code of HTTP 500 range indicates that some server error has occurred. Read the error response object to understand the cause.
schema:
type: object
properties:
error:
$ref: '#/definitions/errorResponse'
deprecated: false
definitions:
registerAccountRequest:
properties:
email:
type: string
example: [email protected]
password:
type: string
example: foobar
full_name:
type: string
example: Foo Bar
additionalProperties: false
loginRequest:
properties:
email:
type: string
example: [email protected]
password:
type: string
example: foobar
additionalProperties: false
profileResponse:
properties:
userid:
type: string
example: 3ebc3000-8a74-11e8-9dfc6d8d560a
email:
type: string
example: [email protected]
full_name:
type: string
example: Foo Bar
additionalProperties: false
tokenResponse:
properties:
status:
type: string
example: ok
token:
type: string
example: 9d7ce24c4dab044ecf8b40c114fb71b1718f8a19af12252afb7a
expires_in_seconds:
type: number
format: integer
example: 604800
additionalProperties: false
cartRequest:
properties:
cityid:
type: number
format: double
example: 44
qty:
type: number
format: double
example: 2
additionalProperties: false
cartResponse:
properties:
cityid:
type: number
format: double
example: 44
thumburl:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/Boston-Skyline-iStock-469769544.jpg'
quantity:
type: number
format: double
example: 2
totalprice:
type: number
format: double
example: 50
cityname:
type: string
example: Boston
description:
type: string
example: Boston is one of the oldest cities in the United States..
additionalProperties: false
cityList:
properties:
name:
type: string
example: Boston
countryname:
type: string
example: USA
lat:
type: number
format: double
example: 42.3144
lng:
type: number
format: double
example: -70.9703
thumburl:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/Boston-Skyline-iStock-469769544.jpg'
description:
type: string
example: 'Boston is one of the oldest cities in the United States, founded on the Shawmut Peninsula in 1630 by Puritan settlers from England.\nIt was the scene of several key events of the American Revolution, such as the Boston Massacre, the Boston Tea Party, the Battle of Bunker Hill, and the Siege of Boston'
heroimage:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/Harvard/Harvard-iStock-182874107.jpg'
tour_price:
type: number
format: double
example: 25
id:
type: number
format: integer
example: 44
additionalProperties: false
city:
properties:
name:
type: string
countryname:
type: string
lat:
type: number
format: double
lng:
type: number
format: double
thumburl:
type: string
description:
type: string
heroimage:
type: string
budget:
type: string
besttime:
type: string
language:
type: string
population:
type: string
traveladvice:
type: string
currency:
type: string
tour_price:
type: number
format: double
id:
type: number
format: double
places:
type: array
items:
$ref: '#/definitions/place'
additionalProperties: false
searchResults:
properties:
currPage:
type: number
format: integer
example: 1
nextPage:
type: number
format: integer
example: null
count:
type: number
format: integer
example: 5
results:
type: array
items:
properties:
name:
type: string
example: Boston
countryname:
type: string
example: USA
lat:
type: number
format: double
example: 42.3144
lng:
type: number
format: double
example: -70.9703
thumburl:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/Boston-Skyline-iStock-469769544.jpg'
description:
type: string
example: Boston is one of the oldest cities in the United States...
heroimage:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/Harvard/Harvard-iStock-182874107.jpg'
tour_price:
type: number
format: double
example: 25
id:
type: number
format: integer
example: 44
type:
type: string
example: city | place
additionalProperties: false
mediaResponse:
properties:
id:
type: number
format: integer
example: 81
url:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/AcornStreet/Acorn-Street-iStock-497250190.jpg'
type:
type: string
example: image
cityid:
type: number
format: integer
example: 44
placeid:
type: number
format: integer
example: 34
caption:
type: string
example: null
additionalProperties: false
place:
properties:
name:
type: string
heroimage:
type: string
herovideo:
type: string
thumburl:
type: string
description:
type: string
numimages:
type: number
format: integer
timings:
type: string
tour_price:
type: number
format: double
id:
type: number
format: double
example: 34
cityId:
type: number
format: double
example: 44
additionalProperties: false
placeListResponse:
properties:
name:
type: string
example: Acorn Street
heroimage:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/AcornStreet/Acorn-Street-iStock-497250190.jpg'
herovideo:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/AcornStreet/Acorn-Street-iStock-497250190.jpg'
description:
type: string
example: 'Nearby Louisburg Square, \"the most prestigious address\" in Beacon Hill, is Acorn Street, often mentioned as the \"most frequently photographed street in the United States.'
numimages:
type: number
format: integer
example: 3
timings:
type: string
example: Mon-Fri
id:
type: number
format: double
example: 34
cityId:
type: number
format: double
example: 44
additionalProperties: false
placeResponse:
properties:
name:
type: string
example: Acorn Street
heroimage:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/AcornStreet/Acorn-Street-iStock-497250190.jpg'
herovideo:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/AcornStreet/Acorn-Street-iStock-497250190.jpg'
description:
type: string
example: 'Nearby Louisburg Square, \"the most prestigious address\" in Beacon Hill, is Acorn Street, often mentioned as the \"most frequently photographed street in the United States.'
numimages:
type: number
format: integer
example: 3
timings:
type: string
example: Mon-Fri
id:
type: number
format: double
example: 34
cityId:
type: number
format: double
example: 44
additionalProperties: false
orderResponse:
properties:
cityid:
type: number
format: double
example: 44
thumburl:
type: string
example: 'http://static.urbancrawlapp.com/img/Boston/Boston-Skyline-iStock-469769544.jpg'
quantity:
type: number
format: double
example: 2
totalprice:
type: number
format: double
example: 50
orderid:
type: string
example: '1534783640582'
createdate:
type: string
example: '2018-08-20T00:00:00.000Z'
cityname:
type: string
example: Boston
additionalProperties: false
errorResponse:
properties:
statusCode:
type: number
format: integer
example: 401
name:
type: string
example: Error
message:
type: string
example: Authorization Required
errorCode:
type: string
example: AUTH_REQUIRED
additionalProperties: false
testResponse:
properties:
result:
type: string
example: 'Hello, World!'
additionalProperties: false
securityDefinitions:
AuthHeader:
type: apiKey
in: header
name: Authorization