forked from Capstone-Tim-02/sustain-tour-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
2462 lines (2341 loc) · 91.6 KB
/
index.html
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
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Destimate Sustain Tour Apps API Documentation</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<style>
body {
padding: 20px;
font-family: Arial, sans-serif;
}
.card {
border: none;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
}
.card-body {
padding: 20px;
}
pre {
background-color: #e9ecef;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
}
#navbar {
position: fixed;
width: 250px;
height: 100%;
overflow-y: scroll;
padding-right: 15px;
padding-left: 15px;
}
#content {
margin-left: 300px;
}
.nav-link {
color: #2F4F4F !important;
}
.nav-link:hover {
color: #FF6347 !important;
}
#endpoint a {
color: #2F4F4F;
}
#endpoint a:hover {
color: #FF6347;
}
.anchor:before {
content: "";
display: block;
height: 70px; /* sesuaikan dengan tinggi navbar Anda */
margin: -70px 0 0; /* nilainya harus negatif dan sama dengan height */
}
</style>
</head>
<body data-spy="scroll" data-target="#navbar" data-offset="50">
<div class="container-fluid">
<div class="row">
<nav id="navbar" class="bd-sidebar">
<h1 class="my-4">List API</h1>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#endpoint">Endpoint</a></li>
<li class="nav-item"><a class="nav-link" href="#loginAdmin">Login Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#register">Register</a></li>
<li class="nav-item"><a class="nav-link" href="#registerWithGoogleAccount">Register/Login With Google Account</a></li>
<li class="nav-item"><a class="nav-link" href="#login">Login</a></li>
<li class="nav-item"><a class="nav-link" href="#addedWisataByAdmin">Added Wisata By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#createPromoVoucherByAdmin">Create Voucher By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#editVoucherByAdmin">Update Voucher By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#deletePromoVoucherByAdmin">Delete Voucher By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#createCategoryByAdmin">Create Category By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#updateCategoryByAdmin">Update Category By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#deleteCategoryByAdmin">Delete Category By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#createtncByAdmin">Create Terms & Condition By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#gettnc">Get Terms & Condition</a></li>
<li class="nav-item"><a class="nav-link" href="#gettncById">Get Terms & Condition By Id</a></li>
<li class="nav-item"><a class="nav-link" href="#updatetncByAdmin">Update Terms & Condition Category By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#deletetncByAdmin">Delete Terms & Condition Category By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllUserDataByAdmin">Get All User Data By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllAdminDataByAdmin">Get All Admin Data By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#editlUserDataByAdmin">Edit User Data By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllTicketByAdmin">Get All Ticket By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#deleteTicketByAdmin">Delete Ticket By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#getBookingDataByInvoice">Get Booking Data by Invoice Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalCarbonFootprintFromAllTransaction">Get Total CarbonFootprint From All Transaction</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalWisata">Get Total Wisata in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalUser">Get Total User Terdaftar in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalVisitor">Get Total Pengunjung tempat wisata Terdaftar in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalTransaction">Get Total Transaction in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getTopWisata">Get Top 3 Wisata in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getTopUserCarbon">Get Top 3 User By Carbon Footprint in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalRevenuePerMonth">Get Total Revenue in Platform - Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#getDashboard">Get Dashboard CMS</a></li>
<li class="nav-item"><a class="nav-link" href="#editWisataDataByAdmin">Edit Wisata Data By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#paidUpdate">Paid Status Update By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#deleteWisataByAdmin">Delete Wisata Data By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#deleteUserByAdmin">Delete User Data By Admin</a></li>
<li class="nav-item"><a class="nav-link" href="#getUserDataById">Get User Data By ID</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllWisata">Get All Wisata Data</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllWisataMobile">Get All Wisata Mobile Data</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllKota">Get All Kota Data</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllWisataWithUserPreference">Get All Wisata Data With User Preference</a></li>
<li class="nav-item"><a class="nav-link" href="#getWisataById">Get Wisata Data By ID</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalCarbonFootprintByWisataId">Get Total Carbon Footprint berdasarkan Wisata ID</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllPromo">Get All Promo</a></li>
<li class="nav-item"><a class="nav-link" href="#getPromoWithId">Get Promo With Id</a></li>
<li class="nav-item"><a class="nav-link" href="#getAllCategories">Get All Categories</a></li>
<li class="nav-item"><a class="nav-link" href="#getTotalCarbonFootprint">Get Total Carbon Footprint User</a></li>
<li class="nav-item"><a class="nav-link" href="#bookingWisata">Booking Wisata by User</a></li>
<li class="nav-item"><a class="nav-link" href="#cekHarga">Cek Harga, mengeluarkan detail total diskon, total harga</a></li>
<li class="nav-item"><a class="nav-link" href="#getUserWisata">Get User Booking Wisata History</a></li>
<li class="nav-item"><a class="nav-link" href="#getUserNotification">Get User Notification ketika sukses melakukan pembayaran dan promo</a></li>
<li class="nav-item"><a class="nav-link" href="#getUserNotificationMarkRead">Mark As Read User Notification ketika sukses melakukan pembayaran dan promo</a></li>
<li class="nav-item"><a class="nav-link" href="#getUserWisataWithInvoiceNumber">Get User Booking Wisata History with Invoice Number</a></li>
<li class="nav-item"><a class="nav-link" href="#getPointUser">Cek User Point</a></li>
<li class="nav-item"><a class="nav-link" href="#getPointUserHistory">Cek User Point History</a></li>
<li class="nav-item"><a class="nav-link" href="#changePasswordUser">Change Password User</a></li>
<li class="nav-item"><a class="nav-link" href="#updateLocationUser">Update Location User</a></li>
<li class="nav-item"><a class="nav-link" href="#editUserData">Edit User Data</a></li>
<li class="nav-item"><a class="nav-link" href="#deleteProfilPicture">Menghapus Profil Picture User</a></li>
<li class="nav-item"><a class="nav-link" href="#cancelBooking">Pembatalan pemesanan tiket</a></li>
<li class="nav-item"><a class="nav-link" href="#chatbot">Chatbot Access for User Platform</a></li>
<li class="nav-item"><a class="nav-link" href="#chatbotCMS">Chatbot Access for CMS Platform</a></li>
<li class="nav-item"><a class="nav-link" href="#CMSPesanKerjaSama">CMS Pengunjung dapat mengirim Pesan Kerja Sama / pertanyaan</a></li>
<li class="nav-item"><a class="nav-link" href="#getCMSPesanKerjaSama">Mendapatkan Data pesan pengunjung CMS - Admin</a></li>
<li class="nav-item"><a class="nav-link" href=""></a></li>
<li class="nav-item"><a class="nav-link" href=""></a></li>
<li class="nav-item"><a class="nav-link" href=""></a></li>
</ul>
</nav>
<div id="content" class="col">
<h1 class="my-4">Destimate Sustain Tour Apps API Documentation</h1>
<div id="endpoint" class="anchor">
<h2 class="my-4">Endpoint</h2>
<p><a href="https://destimate.uc.r.appspot.com/">https://destimate.uc.r.appspot.com/</a></p>
</div>
<div id="register" class="card mb-4">
<div class="card-body">
<h2>Register</h2>
<p><strong>URL</strong></p>
<p><code>/signup</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Request Body - Raw Json</strong></p>
<pre>
{
"name" : "string",
"username" : "string",
"password" : "string",
"confirm_password" : "string",
"email" : "string",
"phone_number" : "string"
}
</pre>
<p><strong>Response</strong></p>
<pre>
{
"code" : 200
"id": int,
"message": "User created successfully",
"token": "user token"
}
</pre>
</div>
</div>
<div id="registerWithGoogleAccount" class="card mb-4">
<div class="card-body">
<h2>Register with google account</h2>
<p><strong>URL</strong></p>
<p><code>/auth/google/initiate</code></p>
<p><strong>Method</strong></p>
<p><code>GET langsung pada halaman browser - https://destimate.uc.r.appspot.com/auth/google/initiate</code></p>
<p><strong>Response</strong></p>
<pre>
{
"id": int,
"message": "User signup/login with Google successful",
"token": "string"
}
</pre>
</div>
</div>
<div id="login" class="card mb-4 anchor">
<div class="card-body">
<h2>Login</h2>
<p><strong>URL</strong></p>
<p><code>/signin</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Request Body - Raw Json</strong></p>
<pre>
{
"username" : "string",
"password" : "string"
}
</pre>
<p><strong>Response</strong></p>
<pre>
{
"code" : 200,
"error" : false,
"id": int,
"message": "Login successful",
"token": "user token"
}
</pre>
</div>
</div>
<div id="loginAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Login Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/signin</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Request Body - Raw Json</strong></p>
<pre>
{
"username" : "string",
"password" : "string"
}
</pre>
<p><strong>Response</strong></p>
<pre>
{
"code" : 200,
"error" : false
"id": 13,
"message": "Login successful",
"token": string
}
</pre>
</div>
</div>
<div id="addedWisataByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Added Wisata Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/wisata/create</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Body - Form Data</strong></p>
<pre>
{
"title": "string",
"location": "string",
"kota":"string",
"description": "string",
"price": int,
"available_tickets": int,
"lat": float,
"long" : float,
"image1": file,
"image2": file,
"image3": file,
"category_name": string
"maps_link": string,
"is_open": bool,
"description_is_open": string,
"fasilitas": string (gunakan , jika fasilitas lebih dari 1 nanti otomatis akan di konversi menjadi array untuk memudahkan FE),
"video_link" : string -> (opsional boleh diisi, boleh dikosongkan karena hanya nilai tambah untuk backend),
"kode" : string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Wisata berhasil dibuat",
"wisataData": {
"id": int,
"title": string,
"location": string,
"description": string,
"price": int,
"lat": float,
"long": float,
"user_id": int,
"available_tickets": int,
"photo_wisata1": string,
"photo_wisata2": string,
"photo_wisata3": string,
"category_id": int,
"category": {
"id": int,
"category_name": string,
"created_at": date
},
"maps_link": string,
"is_open": true,
"description_is_open": string,
"description_is_open": bool,
"fasilitas": array,
"video_link" : string,
"kode" : string,
"created_at": date,
"UpdatedAt": date
}
}
</pre>
</div>
</div>
<div id="createPromoVoucherByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Create Promo Voucher By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/createpromo</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Form Data</strong></p>
<pre>
{
"title": "string",
"nama_promo": "string",
"kode_voucher": "string",
"jumlah_potongan_persen": int,
"status_aktif": bool,
"tanggal_kadaluarsa": date, (year-month-day),
"image_voucher" : file,
"deskripsi": string,
"peraturan": string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Promo created successfully",
"promo_data": {
"id": int,
"title": string,
"nama_promo": string,
"kode_voucher": string,
"jumlah_potongan_persen": int,
"status_aktif": bool,
"tanggal_kadaluarsa": time,
"image_voucher": string,
"deskripsi": string,
"peraturan": string
}
}
</pre>
</div>
</div>
<div id="editVoucherByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Edit Voucher Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/promo/:id</code></p>
<p><strong>Method</strong></p>
<p><code>PUT - Admin dapat mengubah voucher promo yang tersedia</code></p>
<p><strong>form data</strong></p>
<pre>
}
"title": "string",
"nama_promo": "string",
"kode_voucher": "string",
"jumlah_potongan_persen": int,
"status_aktif": bool,
"tanggal_kadaluarsa": date, (year-month-day),
"image_voucher" : file,
"deskripsi": string,
"peraturan": string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Promo updated successfully",
"promo_data": {
"id": int,
"title": string,
"nama_promo": string,
"kode_voucher": string,
"jumlah_potongan_persen": int,
"status_aktif": bool,
"tanggal_kadaluarsa": time,
"image_voucher": string
"deskripsi": string,
"peraturan": string
}
}
</pre>
</div>
</div>
<div id="deletePromoVoucherByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Delete Promo Voucher By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/promo/:id</code></p>
<p><strong>Method</strong></p>
<p><code>DELETE</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Promo deleted successfully"
}
</pre>
</div>
</div>
<div id="createCategoryByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Create Category By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/createcategory</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Request Body - Raw Json</strong></p>
<pre>
{
"category_name" : string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"category": {
"id": int,
"category_name": string,
"created_at": time
},
"code": 201,
"error": false
}
</pre>
</div>
</div>
<div id="updateCategoryByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Update Category Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/categories/:id</code></p>
<p><strong>Method</strong></p>
<p><code>PUT - Admin dapat mengubah category yang tersedia, misal ada typo</code></p>
<p><strong>raw json</strong></p>
<pre>
{
"category_name" : "wisata lifestyle"
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"category": {
"id": int,
"category_name": string,
"created_at": time
},
"code": 200,
"error": false
}
</pre>
</div>
</div>
<div id="deleteCategoryByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Delete Category By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/categories/:id</code></p>
<p><strong>Method</strong></p>
<p><code>DELETE</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Category deleted successfully"
}
</pre>
</div>
</div>
<div id="createtncByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Create Terms and Condition By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/tnc</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Request Body - Raw Json</strong></p>
<pre>
}
"tnc_name": string,
"description" : string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 201,
"error": false,
"term_condition": {
"id": 3,
"tnc_name": "Perjanjian Pengguna 3",
"description": "ini perjanjian untuk pengguna 3",
"created_at": "2023-11-09T14:56:30.307+07:00",
"updated_at": "2023-11-09T14:56:30.307+07:00"
}
}
</pre>
</div>
</div>
<div id="updatetncByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Update Terms and Condition By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/tnc/:id</code></p>
<p><strong>Method</strong></p>
<p><code>POST</code></p>
<p><strong>Request Body - Raw Json</strong></p>
<pre>
}
"tnc_name": string,
"description" : string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Term and condition updated successfully"
}
</pre>
</div>
</div>
<div id="deletetncByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Delete Terms and Condition By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/tnc/:id</code></p>
<p><strong>Method</strong></p>
<p><code>DELETE</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Term and condition deleted successfully"
}
</pre>
</div>
</div>
<div id="getAllUserDataByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Get All User Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/user</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Request Body</strong></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers, , Jika ingin gunakan searching berdasarkan nama tambhkan params (name) dengan value isiannya. Paggination tambahkan query param (page) dengan value isian dan (per_page) dengan value isian </code></p>
<p><strong>Response</strong></p>
<pre>
{
"code" : 200
"error": false,
"users": [
{
"id": int,
"name": "string,
"username": string,
"email": string,
"phone_number": string,
"photo_profil": string,
"points": int,
"is_verified": bool,
"category_kesukaan": string,
"category_id": int,
"created_at": time
},
{
"id": int,
"name": "string,
"username": string,
"email": string,
"phone_number": string,
"photo_profil": string,
"points": int,
"is_verified": bool,
"category_kesukaan": string,
"category_id": int,
"created_at": time
},
]
}
</pre>
</div>
</div>
<div id="getAllAdminDataByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Get All Admin Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Request Body</strong></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers, , Jika ingin gunakan searching berdasarkan nama tambhkan params (name) dengan value isiannya. Paggination tambahkan query param (page) dengan value isian dan (per_page) dengan value isian </code></p>
<p><strong>Response</strong></p>
<pre>
{
"code" : 200
"error": false,
"users": [
{
"id": int,
"name": "string,
"username": string,
"email": string,
"phone_number": string,
"photo_profil": string,
"points": int,
"is_verified": bool,
"category_kesukaan": string,
"category_id": int,
"created_at": time
},
{
"id": int,
"name": "string,
"username": string,
"email": string,
"phone_number": string,
"photo_profil": string,
"points": int,
"is_verified": bool,
"category_kesukaan": string,
"category_id": int,
"created_at": time
},
]
}
</pre>
</div>
</div>
<div id="editlUserDataByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Edit User Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/user/:id</code></p>
<p><strong>Method</strong></p>
<p><code>PUT - Admin dapat mengubah data user yang tersedia,(name,username,email,phone_number)</code></p>
<p><strong>raw json</strong></p>
<pre>
{
"name" : string,
"username" : string,
"email" : string,
"phone_number" : string
}
</pre>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "User updated successfully"
}
</pre>
</div>
</div>
<div id="getAllTicketByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Get All Booking Data By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/ticket</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers, , Jika ingin gunakan searching berdasarkan name dan invoice number gunakan queryparams (searching)</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"tickets": [
{
"id": int,
"wisata_id": int,
"user_id": int,
"name" : string,
"wisata_title" : string,
"photo_profil" : string,
"kode_voucher": string,
"used_points": int,
"use_all_points": bool,
"points_earned": int,
"total_cost": int,
"invoice_number": string number,
"quantity": int,
"checkin_booking": date,
"created_at": date,
"UpdatedAt": date,
"carbon_footprint": float,
"paid_status": bool,
"status_order" : string,
"tenggat_pembayaran" : time,
},
{
"id": int,
"wisata_id": int,
"user_id": int,
"name" : string,
"wisata_title" : string,
"photo_profil" : string,
"kode_voucher": string,
"used_points": int,
"use_all_points": bool,
"points_earned": int,
"total_cost": int,
"invoice_number": string number,
"quantity": int,
"checkin_booking": date,
"created_at": date,
"UpdatedAt": date,
"carbon_footprint": float,
"paid_status": bool,
"status_order" : string,
"tenggat_pembayaran" : time,
},
}
</pre>
</div>
</div>
<div id="deleteTicketByAdmin" class="card mb-4 anchor">
<div class="card-body">
<h2>Delete Ticket By Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/ticket/:invoice_number</code></p>
<p><strong>Method</strong></p>
<p><code>DELETE</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Ticket deleted successfully"
}
</pre>
</div>
</div>
<div id="getBookingDataByInvoice" class="card mb-4 anchor">
<div class="card-body">
<h2>Get User Wisata Booking Data By Invoice - Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/ticket/:invoiceNumber</code></p>
<p>Example /admin/ticket/1699276681-632</p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"message": "Ticket details retrieved successfully",
"ticket_data": {
"ticket_id": int,
"user_id": int,
"name": string,
"photo_profil": string,
"wisata_id": int,
"wisata_title": string,
"total_cost": int,
"invoice_number": string,
"check_in_booking": time,
"created_at": time,
"kode_voucher": string,
"paid_status": bool,
"status_order": string,
"tenggat_pembayaran": time -> null jika sudah melakukan pembayaran
}
}
</pre>
</div>
</div>
<div id="getTotalCarbonFootprintFromAllTransaction" class="card mb-4 anchor">
<div class="card-body">
<h2>Get total carbon footprint - Admin</h2>
<p><strong>URL</strong></p>
<p><code>/admin/carbonfootprint</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"total_carbon_footprint": 5398.426832228703
}
</pre>
</div>
</div>
<div id="getTopUserCarbon" class="card mb-4 anchor">
<div class="card-body">
<h2>Get Top 4 User By Carbon Footprint in Platform - Admin</h2>
<p><strong>URL</strong></p>
<p><code>/top/emition</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
}
"code": 200,
"data": [
{
"user_name": string,
"user_profile": string,
"purchassed": int,
"total_emition": float
},
{
"user_name": string,
"user_profile": string,
"purchassed": int,
"total_emition": float
},
{
"user_name": string,
"user_profile": string,
"purchassed": int,
"total_emition": float
}
],
"error": false
}
</pre>
</div>
</div>
<div id="getTotalWisata" class="card mb-4 anchor">
<div class="card-body">
<h2>Get total wisata in platform Dashboard - Admin</h2>
<p><strong>URL</strong></p>
<p><code>/totalwisata</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"totalWisataCount": int
}
</pre>
</div>
</div>
<div id="getTopWisata" class="card mb-4 anchor">
<div class="card-body">
<h2>Get Top 3 Wisata in Platform - Admin</h2>
<p><strong>URL</strong></p>
<p><code>/top/wisata</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"data": [
{
"destination_title": string,
"total_ticket": int,
"kota" : string,
"photo_wisata1" : string,
"photo_wisata2" : string,
"photo_wisata3" : string
},
{
"destination_title": string,
"total_ticket": int,
"kota" : string,
"photo_wisata1" : string,
"photo_wisata2" : string,
"photo_wisata3" : string
},
{
"destination_title": string,
"total_ticket": int,
"kota" : string,
"photo_wisata1" : string,
"photo_wisata2" : string,
"photo_wisata3" : string
}
],
"error": false
}
</pre>
</div>
</div>
<div id="getTotalUser" class="card mb-4 anchor">
<div class="card-body">
<h2>Get total User in platform Dashbaord - Admin</h2>
<p><strong>URL</strong></p>
<p><code>/totaluser</code></p>
<p><strong>Method</strong></p>
<p><code>GET</code></p>
<p><strong>Note</strong></p>
<p><code>Include authorization token in headers.</code></p>
<p><strong>Response</strong></p>
<pre>
{
"code": 200,
"error": false,
"totalUserCount": int
}