· 6 years ago · Feb 27, 2020, 12:48 PM
1{
2 "openapi": "3.0.1",
3 "info": {
4 "title": "OMS API(Firebase Functions)",
5 "description": "",
6 "version": "1.0.0"
7 },
8 "servers": [
9 {
10 "url": "https://us-central1-kfcjv-development.cloudfunctions.net/"
11 }
12 ],
13 "tags": [
14 {
15 "name": "App",
16 "description": "API Endpoints used by App"
17 },
18 {
19 "name": "MTH",
20 "description": "API Endpoints used by MTH"
21 },
22 {
23 "name": "BackOffice",
24 "description": "API Endpoints used by BackOffice"
25 }
26 ],
27 "components": {
28 "responses": {
29 "UnauthorizedErrorBoth": {
30 "description": "Access token is missing or invalid",
31 "content": {
32 "application/json": {
33 "schema": {
34 "type": "object",
35 "properties": {
36 "code": {
37 "type": "string"
38 },
39 "message": {
40 "type": "string"
41 },
42 "data": {
43 "type": "array",
44 "items": {
45 "type": "string"
46 }
47 }
48 }
49 },
50 "examples": {
51 "ACCESS_TOKEN_INVALID": {
52 "value": {
53 "error": [
54 {
55 "message": "Unauthenticated",
56 "status": "UNAUTHENTICATED"
57 }
58 ]
59 }
60 },
61 "ACCESS_TOKEN_MISSING": {
62 "value": {
63 "code": "401",
64 "message": "error",
65 "data": [
66 "Unauthorized"
67 ]
68 }
69 }
70 }
71 }
72 }
73 },
74 "UnauthorizedError": {
75 "description": "Access token is missing or invalid",
76 "content": {
77 "application/json": {
78 "schema": {
79 "type": "object",
80 "properties": {
81 "code": {
82 "type": "string"
83 },
84 "message": {
85 "type": "string"
86 },
87 "data": {
88 "type": "array",
89 "items": {
90 "type": "string"
91 }
92 }
93 }
94 },
95 "examples": {
96 "UNAUTHORIZED": {
97 "value": {
98 "code": "401",
99 "message": "error",
100 "data": [
101 "Unauthorized"
102 ]
103 }
104 }
105 }
106 }
107 }
108 }
109 },
110 "securitySchemes": {
111 "App": {
112 "type": "http",
113 "scheme": "bearer",
114 "bearerFormat": "JWT"
115 },
116 "BackOffice": {
117 "type": "http",
118 "scheme": "bearer",
119 "bearerFormat": "JWT"
120 },
121 "SecurityRules-Token": {
122 "type": "apiKey",
123 "in": "header",
124 "name": "Authorization"
125 },
126 "SecurityRules-Client-IP": {
127 "type": "apiKey",
128 "in": "header",
129 "name": "Client-IP"
130 }
131 }
132 },
133 "paths": {
134 "/register": {
135 "post": {
136 "summary": "Endpoint for Register User",
137 "tags": [
138 "App"
139 ],
140 "operationId": "register",
141 "requestBody": {
142 "content": {
143 "application/json": {
144 "schema": {
145 "required": [
146 "FirstLogin",
147 "Password",
148 "Phone"
149 ],
150 "type": "object",
151 "properties": {
152 "FirstLogin": {
153 "type": "string",
154 "example": "Android"
155 },
156 "Phone": {
157 "type": "string",
158 "example": "+62814123456789"
159 },
160 "Password": {
161 "type": "string",
162 "example": "TopSecret"
163 },
164 "DeviceId": {
165 "type": "string",
166 "example": "androidID-bbf3f8836c9986f"
167 },
168 "LoyaltyInfo": {
169 "type": "object",
170 "properties": {
171 "ReferralCodeUsed": {
172 "type": "string",
173 "example": ""
174 }
175 }
176 },
177 "Profile": {
178 "type": "object",
179 "properties": {
180 "Email": {
181 "type": "string",
182 "example": "user89@example.com"
183 },
184 "FullName": {
185 "type": "string",
186 "example": "John Snow"
187 },
188 "Gender": {
189 "type": "string",
190 "example": "M"
191 },
192 "PhotoURL": {
193 "type": "string",
194 "example": ""
195 },
196 "BirthDate": {
197 "type": "number",
198 "example": 946665000
199 }
200 }
201 }
202 }
203 }
204 }
205 },
206 "required": true
207 },
208 "responses": {
209 "200": {
210 "description": "",
211 "content": {
212 "application/json": {
213 "schema": {
214 "type": "object",
215 "properties": {
216 "code": {
217 "type": "string",
218 "example": "200"
219 },
220 "data": {
221 "type": "object",
222 "properties": {
223 "CustomToken": {
224 "type": "string",
225 "example": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImlhdCI6MTU1Mzg1MDQ2NSwiZXhwIjoxNTUzODU0MDY1LCJpc3MiOiJmaXJlYmFzZS1hZG1pbnNkay16b2oxOEBrZmNqdi1kZXZlbG9wbWVudC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLXpvajE4QGtmY2p2LWRldmVsb3BtZW50LmlhbS5nc2VydmljZWFjY291bnQuY29tIiwidWlkIjoiWjhuUlc2d1hqS1hJb2hiVDdaZkF2UFdpb25MMiIsImNsYWltcyI6eyJyb2xlIjoiQ3VzdG9tZXIifX0.e1xWiA7Y5mhWwkjKRulsH2jdOrBIOLzuCZ2PipExr_cAOK9pdnH0OqmkylFeVU6SAerIq23-jPOSH_B86Twq5P2phwttyLLbxnpwTY31K35oHtl7MHGb1zXTVwYOIlPSPNqi69rhfyDOSkMmKeFd-K0Q4VqKiVTM-T-xwYOQ5g8Q0iKccNp8SAi4KTyOP6r2IAcoKjGXjkz3gR7YI1IPYxdlxRJJOo7eOrA7jXw3XdJFjqIn_aIQ5fG3smxygYN74DoDX0um5SDsZzLtkHD3FvOYHVIk1p2aPgvdW-QoZ9NGT2G0_RH3lqUXDQTCU_tLK4sHjGQjFayOCkdtUy8u4Q"
226 },
227 "UserMerchantID": {
228 "type": "string",
229 "example": "71b2360862f14aa7a0af3e32f2ec4062"
230 },
231 "DanaPublicID": {
232 "type": "string",
233 "example": ""
234 }
235 }
236 },
237 "message": {
238 "type": "string",
239 "example": "User created"
240 }
241 }
242 },
243 "examples": {
244 "SUCCESS": {
245 "value": {
246 "code": "200",
247 "data": {
248 "CustomToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImlhdCI6MTU1Mzg1MDQ2NSwiZXhwIjoxNTUzODU0MDY1LCJpc3MiOiJmaXJlYmFzZS1hZG1pbnNkay16b2oxOEBrZmNqdi1kZXZlbG9wbWVudC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLXpvajE4QGtmY2p2LWRldmVsb3BtZW50LmlhbS5nc2VydmljZWFjY291bnQuY29tIiwidWlkIjoiWjhuUlc2d1hqS1hJb2hiVDdaZkF2UFdpb25MMiIsImNsYWltcyI6eyJyb2xlIjoiQ3VzdG9tZXIifX0.e1xWiA7Y5mhWwkjKRulsH2jdOrBIOLzuCZ2PipExr_cAOK9pdnH0OqmkylFeVU6SAerIq23-jPOSH_B86Twq5P2phwttyLLbxnpwTY31K35oHtl7MHGb1zXTVwYOIlPSPNqi69rhfyDOSkMmKeFd-K0Q4VqKiVTM-T-xwYOQ5g8Q0iKccNp8SAi4KTyOP6r2IAcoKjGXjkz3gR7YI1IPYxdlxRJJOo7eOrA7jXw3XdJFjqIn_aIQ5fG3smxygYN74DoDX0um5SDsZzLtkHD3FvOYHVIk1p2aPgvdW-QoZ9NGT2G0_RH3lqUXDQTCU_tLK4sHjGQjFayOCkdtUy8u4Q",
249 "UserMerchantID": "71b2360862f14aa7a0af3e32f2ec4062",
250 "DanaPublicID": ""
251 },
252 "message": "User created"
253 }
254 }
255 }
256 }
257 }
258 },
259 "400": {
260 "description": "Bad Request",
261 "content": {
262 "application/json": {
263 "schema": {
264 "type": "object",
265 "properties": {
266 "code": {
267 "type": "string"
268 },
269 "message": {
270 "type": "string"
271 },
272 "data": {
273 "type": "array",
274 "items": {
275 "type": "string"
276 }
277 }
278 }
279 },
280 "examples": {
281 "USER_EXISTS": {
282 "value": {
283 "code": "1000",
284 "message": "error",
285 "data": [
286 "User already exists with the given phone number"
287 ]
288 }
289 },
290 "VALIDATION_ERROR": {
291 "value": {
292 "code": "400",
293 "message": "error",
294 "data": [
295 "Password is not allowed to be empty",
296 "Password length must be at least 6 characters long"
297 ]
298 }
299 }
300 }
301 }
302 }
303 },
304 "401": {
305 "$ref": "#/components/responses/UnauthorizedError"
306 }
307 },
308 "security": [
309 {
310 "SecurityRules-Token": [],
311 "SecurityRules-Client-IP": []
312 }
313 ]
314 }
315 },
316 "/getVouchers": {
317 "post": {
318 "summary": "Endpoint for Get list of available vouchers",
319 "tags": [
320 "App"
321 ],
322 "operationId": "getVouchers",
323 "requestBody": {
324 "content": {
325 "application/json": {
326 "schema": {
327 "required": [
328 "data"
329 ],
330 "type": "object",
331 "properties": {
332 "data": {
333 "type": "object",
334 "properties": {
335 "size": {
336 "type": "number",
337 "example": 4
338 },
339 "page": {
340 "type": "number",
341 "example": 1
342 }
343 }
344 }
345 }
346 }
347 }
348 },
349 "required": true
350 },
351 "responses": {
352 "200": {
353 "description": "",
354 "content": {
355 "application/json": {
356 "schema": {
357 "type": "object",
358 "properties": {
359 "result": {
360 "type": "object",
361 "properties": {
362 "code": {
363 "type": "string",
364 "example": "200"
365 },
366 "data": {
367 "type": "array",
368 "items": {
369 "type": "object",
370 "properties": {
371 "image": {
372 "type": "string",
373 "example": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/Vouchers%2FVoucherImage.png?alt=media&token=8753dfcd-a1a1-4ace-94c7-0e5a2ed34776"
374 },
375 "voucher_price": {
376 "type": "number",
377 "example": 100
378 },
379 "discount_price": {
380 "type": "number",
381 "example": 150
382 },
383 "name": {
384 "type": "string",
385 "example": "KFC voucher"
386 },
387 "description": {
388 "type": "string",
389 "example": "test voucher"
390 },
391 "id": {
392 "type": "number",
393 "example": 1
394 },
395 "merchant_id": {
396 "type": "number",
397 "example": 1
398 }
399 }
400 }
401 },
402 "message": {
403 "type": "string",
404 "example": "SUCCESS"
405 }
406 }
407 }
408 }
409 }
410 }
411 }
412 },
413 "401": {
414 "$ref": "#/components/responses/UnauthorizedErrorBoth"
415 }
416 },
417 "security": [
418 {
419 "App": []
420 }
421 ]
422 }
423 },
424 "/getVoucher": {
425 "post": {
426 "summary": "Endpoint for Get particular voucher",
427 "tags": [
428 "App"
429 ],
430 "operationId": "getVoucher",
431 "requestBody": {
432 "content": {
433 "application/json": {
434 "schema": {
435 "required": [
436 "data"
437 ],
438 "type": "object",
439 "properties": {
440 "data": {
441 "required": [
442 "voucher_id"
443 ],
444 "type": "object",
445 "properties": {
446 "voucher_id": {
447 "type": "number",
448 "example": 2
449 }
450 }
451 }
452 }
453 }
454 }
455 },
456 "required": true
457 },
458 "responses": {
459 "200": {
460 "description": "",
461 "content": {
462 "application/json": {
463 "schema": {
464 "type": "object",
465 "properties": {
466 "result": {
467 "type": "object",
468 "properties": {
469 "code": {
470 "type": "string",
471 "example": "200"
472 },
473 "data": {
474 "type": "object",
475 "properties": {
476 "image": {
477 "type": "string",
478 "example": "https://3gwtod2hg0th1ikege3y0nok-wpengine.netdna-ssl.com/wp-content/uploads/2017/05/KFC-Buckets-620x349.jpg"
479 },
480 "discount_price": {
481 "type": "number",
482 "example": 0
483 },
484 "voucher_price": {
485 "type": "number",
486 "example": 10
487 },
488 "biz_type": {
489 "type": "string",
490 "example": "type"
491 },
492 "description": {
493 "type": "string",
494 "example": "Buy 1 get 1 free"
495 },
496 "merchant_id": {
497 "type": "string",
498 "example": "kfc"
499 },
500 "env_info": {
501 "type": "string",
502 "example": "info"
503 },
504 "extend_info": {
505 "type": "string",
506 "example": "info"
507 },
508 "version": {
509 "type": "string",
510 "example": "1"
511 },
512 "client_id": {
513 "type": "string",
514 "example": "client"
515 },
516 "platform": {
517 "type": "string",
518 "example": "platform"
519 },
520 "access_token": {
521 "type": "string",
522 "example": "access"
523 },
524 "function": {
525 "type": "string",
526 "example": "function"
527 },
528 "activity_id": {
529 "type": "string",
530 "example": "activity"
531 },
532 "name": {
533 "type": "string",
534 "example": "Buy 1 get 1 free"
535 },
536 "reserve": {
537 "type": "string",
538 "example": "reserve"
539 },
540 "client_secret": {
541 "type": "string",
542 "example": "client"
543 },
544 "id": {
545 "type": "number",
546 "example": 2
547 },
548 "biz_extend_properties": {
549 "type": "string",
550 "example": "property"
551 }
552 }
553 },
554 "message": {
555 "type": "string",
556 "example": "SUCCESS"
557 }
558 }
559 }
560 }
561 },
562 "examples": {
563 "SUCCESS": {
564 "value": {
565 "result": {
566 "code": "200",
567 "message": "SUCCESS",
568 "data": {
569 "image": "https://3gwtod2hg0th1ikege3y0nok-wpengine.netdna-ssl.com/wp-content/uploads/2017/05/KFC-Buckets-620x349.jpg",
570 "discount_price": 0,
571 "voucher_price": 10,
572 "biz_type": "type",
573 "description": "Buy 1 get 1 free",
574 "merchant_id": "kfc",
575 "env_info": "info",
576 "extend_info": "info",
577 "version": "1",
578 "client_id": "client",
579 "platform": "platform",
580 "access_token": "access",
581 "function": "function",
582 "activity_id": "activity",
583 "name": "Buy 1 get 1 free",
584 "reserve": "reserve",
585 "client_secret": "client",
586 "id": 2,
587 "biz_extend_properties": "property"
588 }
589 }
590 }
591 },
592 "VALIDATION_ERROR": {
593 "value": {
594 "result": {
595 "code": "400",
596 "message": "error",
597 "data": [
598 "voucher_id is required"
599 ]
600 }
601 }
602 }
603 }
604 }
605 }
606 },
607 "401": {
608 "$ref": "#/components/responses/UnauthorizedErrorBoth"
609 }
610 },
611 "security": [
612 {
613 "App": []
614 }
615 ]
616 }
617 },
618 "/buyVoucher": {
619 "post": {
620 "summary": "Endpoint for Buy voucher",
621 "tags": [
622 "App"
623 ],
624 "operationId": "buyVoucher",
625 "requestBody": {
626 "content": {
627 "application/json": {
628 "schema": {
629 "required": [
630 "data"
631 ],
632 "type": "object",
633 "properties": {
634 "data": {
635 "required": [
636 "dana_data",
637 "quantity",
638 "requestId",
639 "voucher_id"
640 ],
641 "type": "object",
642 "properties": {
643 "quantity": {
644 "type": "number",
645 "example": 1
646 },
647 "dana_data": {
648 "required": [
649 "app_version",
650 "client_ip",
651 "token_id"
652 ],
653 "type": "object",
654 "properties": {
655 "app_version": {
656 "type": "string",
657 "example": "1.0"
658 },
659 "token_id": {
660 "type": "string",
661 "example": "DSF2lRRumvHVtSinOKZgFrT6N6LQCSYiKs6HDuk6aIQOjFerawEAAA=="
662 },
663 "client_ip": {
664 "type": "string",
665 "example": "192.168.1.116"
666 }
667 }
668 },
669 "requestId": {
670 "type": "string",
671 "example": "20190705-1441482b799040-8696-46e5-8554-2c7a61a36cfc16"
672 },
673 "voucher_id": {
674 "type": "number",
675 "example": 2
676 }
677 }
678 }
679 }
680 }
681 }
682 },
683 "required": true
684 },
685 "responses": {
686 "200": {
687 "description": "",
688 "content": {
689 "application/json": {
690 "schema": {
691 "type": "object",
692 "properties": {
693 "result": {
694 "type": "object",
695 "properties": {
696 "code": {
697 "type": "string",
698 "example": "200"
699 },
700 "message": {
701 "type": "string",
702 "example": "SUCCESS"
703 },
704 "data": {
705 "type": "object",
706 "properties": {
707 "points_deducted": {
708 "type": "number",
709 "example": 10
710 },
711 "quantity": {
712 "type": "number",
713 "example": 1
714 },
715 "balance": {
716 "type": "number",
717 "example": 40
718 },
719 "row_version": {
720 "type": "number",
721 "example": 2
722 }
723 }
724 }
725 }
726 }
727 }
728 },
729 "examples": {
730 "SUCCESS": {
731 "value": {
732 "result": {
733 "code": "200",
734 "message": "SUCCESS",
735 "data": {
736 "points_deducted": 10,
737 "quantity": 1,
738 "balance": 40,
739 "row_version": 2
740 }
741 }
742 }
743 },
744 "VALIDATION_ERROR": {
745 "value": {
746 "result": {
747 "code": "400",
748 "message": "error",
749 "data": [
750 "voucher_id must be larger than or equal to 1"
751 ]
752 }
753 }
754 },
755 "FAILED": {
756 "value": {
757 "result": {
758 "code": "1001",
759 "message": "error",
760 "data": [
761 "Buy voucher failed"
762 ]
763 }
764 }
765 }
766 }
767 }
768 }
769 },
770 "401": {
771 "$ref": "#/components/responses/UnauthorizedErrorBoth"
772 }
773 },
774 "security": [
775 {
776 "App": []
777 }
778 ]
779 }
780 },
781 "/getBalance": {
782 "post": {
783 "summary": "Endpoint for Get user's KFC points balance",
784 "tags": [
785 "App"
786 ],
787 "operationId": "getBalance",
788 "requestBody": {
789 "content": {
790 "application/json": {
791 "schema": {
792 "type": "object",
793 "properties": {
794 "data": {
795 "type": "object",
796 "properties": {}
797 }
798 }
799 }
800 }
801 },
802 "required": false
803 },
804 "responses": {
805 "200": {
806 "description": "",
807 "content": {
808 "application/json": {
809 "schema": {
810 "type": "object",
811 "properties": {
812 "result": {
813 "type": "object",
814 "properties": {
815 "code": {
816 "type": "string",
817 "example": "200"
818 },
819 "data": {
820 "type": "object",
821 "properties": {
822 "total_balance": {
823 "type": "number",
824 "example": 169288
825 },
826 "daily_issue_limit": {
827 "type": "number",
828 "example": 150
829 },
830 "daily_issued_points": {
831 "type": "number",
832 "example": 130
833 },
834 "monthly_issue_limit": {
835 "type": "number",
836 "example": 400
837 },
838 "monthly_issued_points": {
839 "type": "number",
840 "example": 320
841 },
842 "points_will_expire": {
843 "type": "object",
844 "properties": {
845 "total_will_expired": {
846 "type": "number",
847 "example": 169288
848 },
849 "expiration_date": {
850 "type": "number",
851 "example": 1577811599
852 }
853 }
854 },
855 "row_version": {
856 "type": "number",
857 "example": 105
858 }
859 }
860 },
861 "message": {
862 "type": "string",
863 "example": "SUCCESS"
864 }
865 }
866 }
867 }
868 }
869 }
870 }
871 },
872 "401": {
873 "$ref": "#/components/responses/UnauthorizedErrorBoth"
874 }
875 },
876 "security": [
877 {
878 "App": []
879 }
880 ]
881 }
882 },
883 "/getStore": {
884 "post": {
885 "summary": "Endpoint for Get store data",
886 "tags": [
887 "App"
888 ],
889 "operationId": "getStore",
890 "requestBody": {
891 "content": {
892 "application/json": {
893 "schema": {
894 "required": [
895 "data"
896 ],
897 "type": "object",
898 "properties": {
899 "data": {
900 "required": [
901 "orderType",
902 "outletCode"
903 ],
904 "type": "object",
905 "properties": {
906 "orderType": {
907 "type": "string",
908 "example": "HMD"
909 },
910 "outletCode": {
911 "type": "string",
912 "example": "0208"
913 }
914 }
915 }
916 }
917 }
918 }
919 },
920 "required": true
921 },
922 "responses": {
923 "200": {
924 "description": "",
925 "content": {
926 "application/json": {
927 "schema": {
928 "type": "object",
929 "properties": {
930 "result": {
931 "type": "object",
932 "properties": {
933 "code": {
934 "type": "string",
935 "example": "200"
936 },
937 "message": {
938 "type": "string",
939 "example": "SUCCESS"
940 },
941 "data": {
942 "type": "object",
943 "properties": {
944 "zipCode": {
945 "type": "string",
946 "example": "12820"
947 },
948 "menuGroups": {
949 "type": "array",
950 "items": {
951 "type": "object",
952 "properties": {
953 "menuGroupCode": {
954 "type": "string",
955 "example": "G42"
956 },
957 "description": {
958 "type": "string",
959 "example": "Spesial"
960 }
961 }
962 }
963 },
964 "address": {
965 "type": "string",
966 "example": "Jl. MT. Haryono, Kav 7 Lt. 2 Gd Gelael, Jakarta"
967 },
968 "cityName": {
969 "type": "string",
970 "example": "Jakarta"
971 },
972 "areaName": {
973 "type": "string",
974 "example": "Jakarta"
975 },
976 "stateName": {
977 "type": "string",
978 "example": "Jakarta"
979 },
980 "taxPercentage": {
981 "type": "number",
982 "example": 10
983 },
984 "name": {
985 "type": "string",
986 "example": "MTH"
987 },
988 "deliveryCharge": {
989 "type": "number",
990 "example": 10909
991 },
992 "countryName": {
993 "type": "string",
994 "example": "Indonesia"
995 },
996 "outletCode": {
997 "type": "string",
998 "example": "0208"
999 }
1000 }
1001 }
1002 }
1003 }
1004 }
1005 },
1006 "examples": {
1007 "SUCCESS": {
1008 "value": {
1009 "result": {
1010 "code": "200",
1011 "message": "SUCCESS",
1012 "data": {
1013 "address": "Jl. MT. Haryono, Kav 7 Lt. 2 Gd Gelael, Jakarta ",
1014 "areaName": "Jakarta",
1015 "cityName": "Jakarta",
1016 "stateName": "Jakarta",
1017 "countryName": "Indonesia",
1018 "zipCode": "12820",
1019 "deliveryCharge": 10909,
1020 "menuGroups": [
1021 {
1022 "description": "Sides",
1023 "menuGroupCode": "G45"
1024 },
1025 {
1026 "description": "Drinks",
1027 "menuGroupCode": "G46"
1028 },
1029 {
1030 "description": "Kids Meal",
1031 "menuGroupCode": "G47"
1032 },
1033 {
1034 "description": "Breakfast",
1035 "menuGroupCode": "G48"
1036 },
1037 {
1038 "description": "Spesial",
1039 "menuGroupCode": "G42"
1040 },
1041 {
1042 "description": "Combo",
1043 "menuGroupCode": "G43"
1044 },
1045 {
1046 "description": "Praktis",
1047 "menuGroupCode": "G44"
1048 }
1049 ],
1050 "name": "MTH",
1051 "outletCode": "0208",
1052 "taxPercentage": 10
1053 }
1054 }
1055 }
1056 },
1057 "VALIDATION_ERROR": {
1058 "value": {
1059 "result": {
1060 "code": "500",
1061 "message": "error",
1062 "data": [
1063 "[\"outletCode is required\"]"
1064 ]
1065 }
1066 }
1067 }
1068 }
1069 }
1070 }
1071 },
1072 "401": {
1073 "$ref": "#/components/responses/UnauthorizedErrorBoth"
1074 }
1075 },
1076 "security": [
1077 {
1078 "App": []
1079 }
1080 ]
1081 }
1082 },
1083 "/getMenu": {
1084 "post": {
1085 "summary": "Endpoint for Get menu of paricular store",
1086 "tags": [
1087 "App"
1088 ],
1089 "operationId": "getMenu",
1090 "requestBody": {
1091 "content": {
1092 "application/json": {
1093 "schema": {
1094 "required": [
1095 "data"
1096 ],
1097 "type": "object",
1098 "properties": {
1099 "data": {
1100 "required": [
1101 "outletCode"
1102 ],
1103 "type": "object",
1104 "properties": {
1105 "orderType": {
1106 "type": "string",
1107 "example": "HMD"
1108 },
1109 "menuGroupCode": {
1110 "type": "string",
1111 "example": "G42"
1112 },
1113 "outletCode": {
1114 "type": "string",
1115 "example": "0208"
1116 },
1117 "page": {
1118 "type": "number",
1119 "example": 1
1120 },
1121 "size": {
1122 "type": "number",
1123 "example": 99
1124 }
1125 }
1126 }
1127 }
1128 }
1129 }
1130 },
1131 "required": true
1132 },
1133 "responses": {
1134 "200": {
1135 "description": "OK",
1136 "content": {
1137 "application/json": {
1138 "schema": {
1139 "type": "object",
1140 "properties": {
1141 "result": {
1142 "type": "object",
1143 "properties": {
1144 "code": {
1145 "type": "string",
1146 "example": "200"
1147 },
1148 "message": {
1149 "type": "string",
1150 "example": "SUCCESS"
1151 },
1152 "data": {
1153 "type": "array",
1154 "items": {
1155 "type": "object",
1156 "properties": {
1157 "menusetitems": {
1158 "type": "array",
1159 "items": {
1160 "type": "object",
1161 "properties": {
1162 "modifierGroupCode": {
1163 "type": "string",
1164 "example": "M5J"
1165 },
1166 "quantity": {
1167 "type": "number",
1168 "example": 5
1169 },
1170 "price": {
1171 "type": "number",
1172 "example": 0
1173 },
1174 "name": {
1175 "type": "string",
1176 "example": "Potongan Ayam"
1177 },
1178 "description": {
1179 "type": "string",
1180 "example": "Potongan Ayam"
1181 },
1182 "isCd": {
1183 "type": "boolean",
1184 "example": false
1185 },
1186 "menuSetItemCode": {
1187 "type": "string",
1188 "example": "X923"
1189 }
1190 }
1191 }
1192 },
1193 "price": {
1194 "type": "number",
1195 "example": 110454
1196 },
1197 "imageURL": {
1198 "type": "string",
1199 "example": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/MenuImages%2F4841.png?alt=media"
1200 },
1201 "name": {
1202 "type": "string",
1203 "example": "Super family"
1204 },
1205 "description": {
1206 "type": "string",
1207 "example": "Super family"
1208 },
1209 "isTaxable": {
1210 "type": "boolean",
1211 "example": true
1212 },
1213 "isCd": {
1214 "type": "boolean",
1215 "example": false
1216 },
1217 "menuItemCode": {
1218 "type": "string",
1219 "example": "4841"
1220 },
1221 "hasCD": {
1222 "type": "boolean",
1223 "example": false
1224 },
1225 "isMenuSet": {
1226 "type": "boolean",
1227 "example": true
1228 }
1229 }
1230 }
1231 }
1232 }
1233 }
1234 }
1235 },
1236 "examples": {
1237 "SUCCESS": {
1238 "value": {
1239 "result": {
1240 "code": "200",
1241 "message": "SUCCESS",
1242 "data": [
1243 {
1244 "description": "Super family",
1245 "hasCD": false,
1246 "imageURL": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/MenuImages%2F4841.png?alt=media",
1247 "isCd": false,
1248 "isMenuSet": true,
1249 "isTaxable": true,
1250 "menuItemCode": "4841",
1251 "menusetitems": [
1252 {
1253 "description": "Potongan Ayam",
1254 "isCd": false,
1255 "menuSetItemCode": "X923",
1256 "modifierGroupCode": "M5J",
1257 "name": "Potongan Ayam",
1258 "price": 0,
1259 "quantity": 5
1260 },
1261 {
1262 "description": "Rice",
1263 "isCd": false,
1264 "menuSetItemCode": "X64",
1265 "modifierGroupCode": "M5K",
1266 "name": "Rice",
1267 "price": 0,
1268 "quantity": 3
1269 },
1270 {
1271 "description": "Pepsi Medium",
1272 "isCd": false,
1273 "menuSetItemCode": "X86",
1274 "modifierGroupCode": "M6S",
1275 "name": "Pepsi Medium",
1276 "price": 0,
1277 "quantity": 3
1278 }
1279 ],
1280 "name": "Super family",
1281 "price": 110454
1282 },
1283 {
1284 "description": "9 Potong Ayam",
1285 "hasCD": false,
1286 "imageURL": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/MenuImages%2F4842.png?alt=media",
1287 "isCd": false,
1288 "isMenuSet": true,
1289 "isTaxable": true,
1290 "menuItemCode": "4842",
1291 "menusetitems": [
1292 {
1293 "description": "Potongan Ayam",
1294 "isCd": false,
1295 "menuSetItemCode": "X923",
1296 "modifierGroupCode": "M5J",
1297 "name": "Potongan Ayam",
1298 "price": 0,
1299 "quantity": 9
1300 }
1301 ],
1302 "name": "9 pcs Bucket",
1303 "price": 129545
1304 },
1305 {
1306 "description": "Winger Bucket",
1307 "hasCD": false,
1308 "imageURL": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/MenuImages%2F4843.png?alt=media",
1309 "isCd": false,
1310 "isMenuSet": true,
1311 "isTaxable": true,
1312 "menuItemCode": "4843",
1313 "menusetitems": [
1314 {
1315 "description": "1/2Pc Winger HC",
1316 "isCd": false,
1317 "menuSetItemCode": "X530",
1318 "modifierGroupCode": "M5M",
1319 "name": "1/2Pc Winger Hot Crispy",
1320 "price": 0,
1321 "quantity": 7
1322 }
1323 ],
1324 "name": "Winger Bucket",
1325 "price": 85454
1326 }
1327 ]
1328 }
1329 }
1330 },
1331 "VALIDATION_ERROR": {
1332 "value": {
1333 "result": {
1334 "code": "1106",
1335 "message": "error",
1336 "data": [
1337 "Outlet code is required"
1338 ]
1339 }
1340 }
1341 }
1342 }
1343 }
1344 }
1345 },
1346 "401": {
1347 "$ref": "#/components/responses/UnauthorizedErrorBoth"
1348 }
1349 },
1350 "security": [
1351 {
1352 "App": []
1353 }
1354 ]
1355 }
1356 },
1357 "/getMenuSetItems": {
1358 "post": {
1359 "summary": "Endpoint for Get menuset items",
1360 "tags": [
1361 "App"
1362 ],
1363 "operationId": "getMenuSetItems",
1364 "requestBody": {
1365 "content": {
1366 "application/json": {
1367 "schema": {
1368 "required": [
1369 "data"
1370 ],
1371 "type": "object",
1372 "properties": {
1373 "data": {
1374 "required": [
1375 "outletCode"
1376 ],
1377 "type": "object",
1378 "properties": {
1379 "orderType": {
1380 "type": "string",
1381 "example": "HMD"
1382 },
1383 "menuItemCode": {
1384 "type": "string",
1385 "example": "4841"
1386 },
1387 "outletCode": {
1388 "type": "string",
1389 "example": "0208"
1390 }
1391 }
1392 }
1393 }
1394 }
1395 }
1396 },
1397 "required": true
1398 },
1399 "responses": {
1400 "200": {
1401 "description": "OK",
1402 "content": {
1403 "application/json": {
1404 "schema": {
1405 "type": "object",
1406 "properties": {
1407 "result": {
1408 "type": "object",
1409 "properties": {
1410 "code": {
1411 "type": "string",
1412 "example": "200"
1413 },
1414 "message": {
1415 "type": "string",
1416 "example": "SUCCESS"
1417 },
1418 "data": {
1419 "type": "array",
1420 "items": {
1421 "type": "object",
1422 "properties": {
1423 "sequence": {
1424 "type": "number",
1425 "example": 1
1426 },
1427 "modifierGroupCode": {
1428 "type": "string",
1429 "example": "M5J"
1430 },
1431 "quantity": {
1432 "type": "number",
1433 "example": 5
1434 },
1435 "name": {
1436 "type": "string",
1437 "example": "Potongan Ayam"
1438 },
1439 "description": {
1440 "type": "string",
1441 "example": "Potongan Ayam"
1442 },
1443 "modifiers": {
1444 "type": "array",
1445 "items": {
1446 "type": "object",
1447 "properties": {
1448 "sequence": {
1449 "type": "number",
1450 "example": 1
1451 },
1452 "price": {
1453 "type": "number",
1454 "example": 0
1455 },
1456 "name": {
1457 "type": "string",
1458 "example": "Paha Atas Original"
1459 },
1460 "description": {
1461 "type": "string",
1462 "example": "Paha Atas OR"
1463 },
1464 "isTaxable": {
1465 "type": "boolean",
1466 "example": true
1467 },
1468 "isCd": {
1469 "type": "boolean",
1470 "example": false
1471 },
1472 "modifierItemCode": {
1473 "type": "string",
1474 "example": "X01"
1475 }
1476 }
1477 }
1478 },
1479 "menuSetItemCode": {
1480 "type": "string",
1481 "example": "X923"
1482 }
1483 }
1484 }
1485 }
1486 }
1487 }
1488 }
1489 },
1490 "examples": {
1491 "SUCCESS": {
1492 "value": {
1493 "result": {
1494 "code": "200",
1495 "message": "SUCCESS",
1496 "data": [
1497 {
1498 "sequence": 1,
1499 "modifierGroupCode": "M5J",
1500 "quantity": 5,
1501 "name": "Potongan Ayam",
1502 "description": "Potongan Ayam",
1503 "modifiers": [
1504 {
1505 "sequence": 1,
1506 "price": 0,
1507 "name": "Paha Atas Original",
1508 "description": "Paha Atas OR",
1509 "isTaxable": true,
1510 "isCd": false,
1511 "modifierItemCode": "X01"
1512 }
1513 ],
1514 "menuSetItemCode": "X923"
1515 }
1516 ]
1517 }
1518 }
1519 },
1520 "VALIDATION_ERROR": {
1521 "value": {
1522 "result": {
1523 "code": "1106",
1524 "message": "error",
1525 "data": [
1526 "Outlet code is required"
1527 ]
1528 }
1529 }
1530 }
1531 }
1532 }
1533 }
1534 },
1535 "401": {
1536 "$ref": "#/components/responses/UnauthorizedErrorBoth"
1537 }
1538 },
1539 "security": [
1540 {
1541 "App": []
1542 }
1543 ]
1544 }
1545 },
1546 "/getNearbyStore": {
1547 "post": {
1548 "summary": "Endpoint for Get Near by KFC store from user's current location",
1549 "tags": [
1550 "App"
1551 ],
1552 "operationId": "getNearbyStore Copy",
1553 "requestBody": {
1554 "content": {
1555 "application/json": {
1556 "schema": {
1557 "required": [
1558 "data"
1559 ],
1560 "type": "object",
1561 "properties": {
1562 "data": {
1563 "required": [
1564 "lat",
1565 "lng",
1566 "requestId"
1567 ],
1568 "type": "object",
1569 "properties": {
1570 "requestId": {
1571 "type": "string",
1572 "example": "20190524-1055091bc6e22-a2d5-42c5-899b-c3366a72123"
1573 },
1574 "lat": {
1575 "type": "number",
1576 "example": -6.230651740757088
1577 },
1578 "lng": {
1579 "type": "number",
1580 "example": 106.92760507373748
1581 }
1582 }
1583 }
1584 }
1585 }
1586 }
1587 },
1588 "required": true
1589 },
1590 "responses": {
1591 "200": {
1592 "description": "",
1593 "content": {
1594 "application/json": {
1595 "schema": {
1596 "type": "object",
1597 "properties": {
1598 "result": {
1599 "type": "object",
1600 "properties": {
1601 "code": {
1602 "type": "string",
1603 "example": "200"
1604 },
1605 "data": {
1606 "type": "object",
1607 "properties": {
1608 "zipCode": {
1609 "type": "string",
1610 "example": "12820"
1611 },
1612 "menuGroups": {
1613 "type": "array",
1614 "items": {
1615 "type": "object",
1616 "properties": {
1617 "menuGroupCode": {
1618 "type": "string",
1619 "example": "G42"
1620 },
1621 "description": {
1622 "type": "string",
1623 "example": "Spesial"
1624 }
1625 }
1626 }
1627 },
1628 "address": {
1629 "type": "string",
1630 "example": "Jl. MT. Haryono, Kav 7 Lt. 2 Gd Gelael, Jakarta"
1631 },
1632 "cityName": {
1633 "type": "string",
1634 "example": "Jakarta"
1635 },
1636 "areaName": {
1637 "type": "string",
1638 "example": "Jakarta"
1639 },
1640 "stateName": {
1641 "type": "string",
1642 "example": "Jakarta"
1643 },
1644 "taxPercentage": {
1645 "type": "number",
1646 "example": 10
1647 },
1648 "name": {
1649 "type": "string",
1650 "example": "MTH"
1651 },
1652 "deliveryCharge": {
1653 "type": "number",
1654 "example": 10909
1655 },
1656 "countryName": {
1657 "type": "string",
1658 "example": "Indonesia"
1659 },
1660 "outletCode": {
1661 "type": "string",
1662 "example": "0208"
1663 }
1664 }
1665 },
1666 "message": {
1667 "type": "string",
1668 "example": "SUCCESS"
1669 }
1670 }
1671 }
1672 }
1673 },
1674 "examples": {
1675 "SUCCESS": {
1676 "value": {
1677 "result": {
1678 "code": "200",
1679 "message": "SUCCESS",
1680 "data": {
1681 "address": "Jl. MT. Haryono, Kav 7 Lt. 2 Gd Gelael, Jakarta ",
1682 "areaName": "Jakarta",
1683 "cityName": "Jakarta",
1684 "stateName": "Jakarta",
1685 "countryName": "Indonesia",
1686 "zipCode": "12820",
1687 "deliveryCharge": 10909,
1688 "menuGroups": [
1689 {
1690 "description": "Sides",
1691 "menuGroupCode": "G45"
1692 },
1693 {
1694 "description": "Drinks",
1695 "menuGroupCode": "G46"
1696 },
1697 {
1698 "description": "Kids Meal",
1699 "menuGroupCode": "G47"
1700 },
1701 {
1702 "description": "Breakfast",
1703 "menuGroupCode": "G48"
1704 },
1705 {
1706 "description": "Spesial",
1707 "menuGroupCode": "G42"
1708 },
1709 {
1710 "description": "Combo",
1711 "menuGroupCode": "G43"
1712 },
1713 {
1714 "description": "Praktis",
1715 "menuGroupCode": "G44"
1716 }
1717 ],
1718 "name": "MTH",
1719 "outletCode": "0208",
1720 "taxPercentage": 10
1721 }
1722 }
1723 }
1724 },
1725 "VALIDATION_ERROR": {
1726 "value": {
1727 "result": {
1728 "code": "400",
1729 "message": "error",
1730 "data": [
1731 "lat is required"
1732 ]
1733 }
1734 }
1735 },
1736 "STORE_NOT_AVAILABLE": {
1737 "value": {
1738 "result": {
1739 "code": "1157",
1740 "message": "error",
1741 "data": [
1742 "All stores are not available in the user range."
1743 ]
1744 }
1745 }
1746 }
1747 }
1748 }
1749 }
1750 },
1751 "401": {
1752 "$ref": "#/components/responses/UnauthorizedErrorBoth"
1753 }
1754 },
1755 "security": [
1756 {
1757 "App": []
1758 }
1759 ]
1760 }
1761 },
1762 "/calculateOrderPricing": {
1763 "post": {
1764 "summary": "Endpoint for Calculate order's pricing",
1765 "tags": [
1766 "App"
1767 ],
1768 "operationId": "calculateOrderPricing",
1769 "requestBody": {
1770 "content": {
1771 "application/json": {
1772 "schema": {
1773 "required": [
1774 "data"
1775 ],
1776 "type": "object",
1777 "properties": {
1778 "data": {
1779 "required": [
1780 "destinationStore",
1781 "orderLines",
1782 "orderSource",
1783 "orderType",
1784 "requestId",
1785 "user"
1786 ],
1787 "type": "object",
1788 "properties": {
1789 "orderType": {
1790 "type": "string",
1791 "example": "PNP"
1792 },
1793 "orderSource": {
1794 "type": "string",
1795 "example": "ANDROID"
1796 },
1797 "notes": {
1798 "type": "string",
1799 "example": ""
1800 },
1801 "destinationStore": {
1802 "required": [
1803 "outletCode"
1804 ],
1805 "type": "object",
1806 "properties": {
1807 "outletCode": {
1808 "type": "string",
1809 "example": "0208"
1810 }
1811 }
1812 },
1813 "orderLines": {
1814 "type": "array",
1815 "items": {
1816 "required": [
1817 "menuGroupCode",
1818 "menuItemCode",
1819 "quantity",
1820 "setItems"
1821 ],
1822 "type": "object",
1823 "properties": {
1824 "quantity": {
1825 "type": "number",
1826 "example": 1
1827 },
1828 "menuGroupCode": {
1829 "type": "string",
1830 "example": "G42"
1831 },
1832 "setItems": {
1833 "type": "array",
1834 "items": {
1835 "required": [
1836 "menuItemCode",
1837 "modifierGroupCode",
1838 "originalItemCode",
1839 "quantity"
1840 ],
1841 "type": "object",
1842 "properties": {
1843 "modifierGroupCode": {
1844 "type": "string",
1845 "example": ""
1846 },
1847 "quantity": {
1848 "type": "number",
1849 "example": 1
1850 },
1851 "menuItemCode": {
1852 "type": "string",
1853 "example": "4841"
1854 },
1855 "originalItemCode": {
1856 "type": "string",
1857 "example": ""
1858 }
1859 }
1860 }
1861 },
1862 "menuItemCode": {
1863 "type": "string",
1864 "example": "4841"
1865 }
1866 }
1867 }
1868 },
1869 "deliveryAddress": {
1870 "required": [
1871 "address",
1872 "areaName",
1873 "cityName",
1874 "countryName",
1875 "geolocation",
1876 "stateName",
1877 "zipCode"
1878 ],
1879 "type": "object",
1880 "properties": {
1881 "zipCode": {
1882 "type": "string",
1883 "example": "12810"
1884 },
1885 "address": {
1886 "type": "string",
1887 "example": ""
1888 },
1889 "notes": {
1890 "type": "string",
1891 "example": "DINE_IN"
1892 },
1893 "cityName": {
1894 "type": "string",
1895 "example": "Jakarta"
1896 },
1897 "areaName": {
1898 "type": "string",
1899 "example": "Jakarta"
1900 },
1901 "stateName": {
1902 "type": "string",
1903 "example": "Jakarta"
1904 },
1905 "countryName": {
1906 "type": "string",
1907 "example": "Indonesia"
1908 },
1909 "geolocation": {
1910 "required": [
1911 "latitude",
1912 "longitude"
1913 ],
1914 "type": "object",
1915 "properties": {
1916 "latitude": {
1917 "type": "number",
1918 "example": 0
1919 },
1920 "longitude": {
1921 "type": "number",
1922 "example": 0
1923 }
1924 }
1925 }
1926 }
1927 },
1928 "requestId": {
1929 "type": "string",
1930 "example": "20190516-164359d3fcab89-7473-42d0-adef-8a4d1e7c25001091"
1931 },
1932 "envInfo": {
1933 "required": [
1934 "appVersion"
1935 ],
1936 "type": "object",
1937 "properties": {
1938 "appVersion": {
1939 "type": "string",
1940 "example": "1.0"
1941 },
1942 "tokenId": {
1943 "type": "string",
1944 "example": "hKy5FiloeWts2n0YuZ2klap+MPODvT/52E+vL338EdkIT3e/agEAAA=="
1945 },
1946 "websiteLanguage": {
1947 "type": "string",
1948 "example": "en_US"
1949 },
1950 "sessionId": {
1951 "type": "string",
1952 "example": ""
1953 },
1954 "extendInfo": {
1955 "type": "string",
1956 "example": "{}"
1957 },
1958 "orderOsType": {
1959 "type": "string",
1960 "example": "ANDROID"
1961 },
1962 "merchantAppVersion": {
1963 "type": "string",
1964 "example": "1.0"
1965 },
1966 "orderTerminalType": {
1967 "type": "string",
1968 "example": "APP"
1969 },
1970 "clientKey": {
1971 "type": "string",
1972 "example": "e5806b64-598d-414f-b7f7-83f9576eb6fb"
1973 },
1974 "clientIp": {
1975 "type": "string",
1976 "example": "192.168.2.108"
1977 },
1978 "osType": {
1979 "type": "string",
1980 "example": "ANDROID"
1981 },
1982 "sourcePlatform": {
1983 "type": "string",
1984 "example": "IPG"
1985 },
1986 "sdkVersion": {
1987 "type": "string",
1988 "example": ""
1989 }
1990 }
1991 },
1992 "payment": {
1993 "type": "array",
1994 "items": {
1995 "required": [
1996 "paymentAmount",
1997 "paymentMethodCode",
1998 "paymentUsed",
1999 "reffNo"
2000 ],
2001 "type": "object",
2002 "properties": {
2003 "paymentMethodCode": {
2004 "type": "string",
2005 "example": "DNA"
2006 },
2007 "paymentUsed": {
2008 "type": "number",
2009 "example": 32000
2010 },
2011 "reffNo": {
2012 "type": "string",
2013 "example": ""
2014 },
2015 "paymentAmount": {
2016 "type": "number",
2017 "example": 32000
2018 }
2019 }
2020 }
2021 },
2022 "user": {
2023 "required": [
2024 "id",
2025 "name",
2026 "phoneNo"
2027 ],
2028 "type": "object",
2029 "properties": {
2030 "name": {
2031 "type": "string",
2032 "example": "User0818123313"
2033 },
2034 "id": {
2035 "type": "string",
2036 "example": "tlL81I4Wowg0B4YxYigW4cfofWH2"
2037 },
2038 "phoneNo": {
2039 "type": "string",
2040 "example": "+62818123313"
2041 }
2042 }
2043 }
2044 }
2045 }
2046 }
2047 }
2048 }
2049 },
2050 "required": true
2051 },
2052 "responses": {
2053 "200": {
2054 "description": "",
2055 "content": {
2056 "application/json": {
2057 "schema": {
2058 "type": "object",
2059 "properties": {
2060 "result": {
2061 "type": "object",
2062 "properties": {
2063 "code": {
2064 "type": "string",
2065 "example": "200"
2066 },
2067 "data": {
2068 "type": "object",
2069 "properties": {
2070 "orderCalculations": {
2071 "type": "array",
2072 "items": {
2073 "type": "object",
2074 "properties": {
2075 "value": {
2076 "type": "number",
2077 "example": 220908
2078 },
2079 "key": {
2080 "type": "string",
2081 "example": "totalAmount"
2082 }
2083 }
2084 }
2085 },
2086 "orderLines": {
2087 "type": "array",
2088 "items": {
2089 "type": "object",
2090 "properties": {
2091 "quantity": {
2092 "type": "number",
2093 "example": 2
2094 },
2095 "isCustomized": {
2096 "type": "boolean",
2097 "example": false
2098 },
2099 "menuGroupCode": {
2100 "type": "string",
2101 "example": "G42"
2102 },
2103 "price": {
2104 "type": "number",
2105 "example": 220908
2106 },
2107 "imageURL": {
2108 "type": "string",
2109 "example": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/MenuImages%2F4841.png?alt=media"
2110 },
2111 "setItems": {
2112 "type": "array",
2113 "items": {
2114 "type": "object",
2115 "properties": {
2116 "modifierGroupCode": {
2117 "type": "string",
2118 "example": ""
2119 },
2120 "quantity": {
2121 "type": "number",
2122 "example": 0
2123 },
2124 "price": {
2125 "type": "number",
2126 "example": 0
2127 },
2128 "name": {
2129 "type": "string",
2130 "example": "Super family"
2131 },
2132 "isTaxable": {
2133 "type": "boolean",
2134 "example": false
2135 },
2136 "isCd": {
2137 "type": "boolean",
2138 "example": false
2139 },
2140 "menuItemCode": {
2141 "type": "string",
2142 "example": "4841"
2143 },
2144 "tax": {
2145 "type": "number",
2146 "example": 0
2147 },
2148 "originalItemCode": {
2149 "type": "string",
2150 "example": ""
2151 }
2152 }
2153 }
2154 },
2155 "name": {
2156 "type": "string",
2157 "example": "Super family"
2158 },
2159 "isTaxable": {
2160 "type": "boolean",
2161 "example": true
2162 },
2163 "menuItemCode": {
2164 "type": "string",
2165 "example": "4841"
2166 },
2167 "tax": {
2168 "type": "number",
2169 "example": 22090.8
2170 },
2171 "isMenuSet": {
2172 "type": "boolean",
2173 "example": true
2174 }
2175 }
2176 }
2177 }
2178 }
2179 },
2180 "message": {
2181 "type": "string",
2182 "example": "SUCCESS"
2183 }
2184 }
2185 }
2186 }
2187 },
2188 "examples": {
2189 "SUCCESS": {
2190 "value": {
2191 "result": {
2192 "code": "200",
2193 "message": "SUCCESS",
2194 "data": {
2195 "orderCalculations": [
2196 {
2197 "key": "totalAmount",
2198 "value": 110454
2199 },
2200 {
2201 "key": "totalFnB",
2202 "value": 110454
2203 },
2204 {
2205 "key": "totalRestaurantTax",
2206 "value": 11045
2207 },
2208 {
2209 "key": "total",
2210 "value": 121499
2211 },
2212 {
2213 "key": "totalRounding",
2214 "value": 1
2215 },
2216 {
2217 "key": "totalSales",
2218 "value": 121500
2219 },
2220 {
2221 "key": "totalPayment",
2222 "value": 121500
2223 },
2224 {
2225 "key": "storePercentage",
2226 "value": 10
2227 }
2228 ],
2229 "orderLines": [
2230 {
2231 "imageURL": "https://firebasestorage.googleapis.com/v0/b/kfcjv-development.appspot.com/o/MenuImages%2F4841.png?alt=media",
2232 "isCustomized": false,
2233 "isMenuSet": true,
2234 "isTaxable": true,
2235 "menuGroupCode": "G42",
2236 "menuItemCode": "4841",
2237 "name": "Super family",
2238 "price": 110454,
2239 "quantity": 1,
2240 "setItems": [
2241 {
2242 "isCd": false,
2243 "isTaxable": false,
2244 "menuItemCode": "4841",
2245 "modifierGroupCode": "",
2246 "name": "Super family",
2247 "originalItemCode": "",
2248 "price": 0,
2249 "quantity": 1,
2250 "tax": 0
2251 }
2252 ],
2253 "tax": 11045.4
2254 }
2255 ]
2256 }
2257 }
2258 }
2259 },
2260 "MENU_NOT_AVAILABLE": {
2261 "value": {
2262 "result": {
2263 "code": "2103",
2264 "message": "SUCCESS",
2265 "data": []
2266 }
2267 }
2268 }
2269 }
2270 }
2271 }
2272 },
2273 "401": {
2274 "$ref": "#/components/responses/UnauthorizedErrorBoth"
2275 }
2276 },
2277 "security": [
2278 {
2279 "App": []
2280 }
2281 ]
2282 }
2283 },
2284 "/consultAndSaveOrder": {
2285 "post": {
2286 "summary": "Endpoint for Create order",
2287 "tags": [
2288 "App"
2289 ],
2290 "operationId": "consultAndSaveOrder",
2291 "requestBody": {
2292 "content": {
2293 "application/json": {
2294 "schema": {
2295 "required": [
2296 "data"
2297 ],
2298 "type": "object",
2299 "properties": {
2300 "data": {
2301 "required": [
2302 "deliveryAddress",
2303 "destinationStore",
2304 "envInfo",
2305 "orderLines",
2306 "orderSource",
2307 "orderType",
2308 "payment",
2309 "requestId",
2310 "user"
2311 ],
2312 "type": "object",
2313 "properties": {
2314 "orderType": {
2315 "type": "string",
2316 "example": "PNP"
2317 },
2318 "orderSource": {
2319 "type": "string",
2320 "example": "ANDROID"
2321 },
2322 "notes": {
2323 "type": "string",
2324 "example": ""
2325 },
2326 "destinationStore": {
2327 "required": [
2328 "outletCode"
2329 ],
2330 "type": "object",
2331 "properties": {
2332 "outletCode": {
2333 "type": "string",
2334 "example": "0208"
2335 }
2336 }
2337 },
2338 "orderLines": {
2339 "type": "array",
2340 "items": {
2341 "required": [
2342 "menuGroupCode",
2343 "menuItemCode",
2344 "quantity",
2345 "setItems"
2346 ],
2347 "type": "object",
2348 "properties": {
2349 "quantity": {
2350 "type": "number",
2351 "example": 1
2352 },
2353 "menuGroupCode": {
2354 "type": "string",
2355 "example": "G42"
2356 },
2357 "setItems": {
2358 "type": "array",
2359 "items": {
2360 "required": [
2361 "menuItemCode",
2362 "quantity"
2363 ],
2364 "type": "object",
2365 "properties": {
2366 "modifierGroupCode": {
2367 "type": "string",
2368 "example": ""
2369 },
2370 "quantity": {
2371 "type": "number",
2372 "example": 1
2373 },
2374 "menuItemCode": {
2375 "type": "string",
2376 "example": "4842"
2377 },
2378 "originalItemCode": {
2379 "type": "string",
2380 "example": ""
2381 }
2382 }
2383 }
2384 },
2385 "menuItemCode": {
2386 "type": "string",
2387 "example": "4842"
2388 }
2389 }
2390 }
2391 },
2392 "deliveryAddress": {
2393 "required": [
2394 "address",
2395 "areaName",
2396 "cityName",
2397 "countryName",
2398 "geolocation",
2399 "stateName",
2400 "zipCode"
2401 ],
2402 "type": "object",
2403 "properties": {
2404 "zipCode": {
2405 "type": "string",
2406 "example": "12710"
2407 },
2408 "address": {
2409 "type": "string",
2410 "example": ""
2411 },
2412 "notes": {
2413 "type": "string",
2414 "example": "DINE_IN"
2415 },
2416 "cityName": {
2417 "type": "string",
2418 "example": "Jakarta"
2419 },
2420 "areaName": {
2421 "type": "string",
2422 "example": "Jakarta"
2423 },
2424 "stateName": {
2425 "type": "string",
2426 "example": "Jakarta"
2427 },
2428 "countryName": {
2429 "type": "string",
2430 "example": "Indonesia"
2431 },
2432 "geolocation": {
2433 "required": [
2434 "latitude",
2435 "longitude"
2436 ],
2437 "type": "object",
2438 "properties": {
2439 "latitude": {
2440 "type": "number",
2441 "example": 0
2442 },
2443 "longitude": {
2444 "type": "number",
2445 "example": 0
2446 }
2447 }
2448 }
2449 }
2450 },
2451 "requestId": {
2452 "type": "string",
2453 "example": "20190516-164359d3fcab89-7473-42d0-adef-8a4d1e7c25001051"
2454 },
2455 "envInfo": {
2456 "required": [
2457 "appVersion"
2458 ],
2459 "type": "object",
2460 "properties": {
2461 "appVersion": {
2462 "type": "string",
2463 "example": "1.0"
2464 },
2465 "tokenId": {
2466 "type": "string",
2467 "example": "hKy5FiloeWts2n0YuZ2klap+MPODvT/52E+vL338EdkIT3e/agEAAA=="
2468 },
2469 "websiteLanguage": {
2470 "type": "string",
2471 "example": "en_US"
2472 },
2473 "sessionId": {
2474 "type": "string",
2475 "example": ""
2476 },
2477 "extendInfo": {
2478 "type": "string",
2479 "example": "{}"
2480 },
2481 "orderOsType": {
2482 "type": "string",
2483 "example": "ANDROID"
2484 },
2485 "merchantAppVersion": {
2486 "type": "string",
2487 "example": "1.0"
2488 },
2489 "orderTerminalType": {
2490 "type": "string",
2491 "example": "APP"
2492 },
2493 "clientKey": {
2494 "type": "string",
2495 "example": "e5806b64-598d-414f-b7f7-83f9576eb6fb"
2496 },
2497 "clientIp": {
2498 "type": "string",
2499 "example": "192.168.2.108"
2500 },
2501 "osType": {
2502 "type": "string",
2503 "example": "ANDROID"
2504 },
2505 "sourcePlatform": {
2506 "type": "string",
2507 "example": "IPG"
2508 },
2509 "sdkVersion": {
2510 "type": "string",
2511 "example": ""
2512 }
2513 }
2514 },
2515 "payment": {
2516 "type": "array",
2517 "items": {
2518 "required": [
2519 "paymentAmount",
2520 "paymentMethodCode",
2521 "paymentUsed"
2522 ],
2523 "type": "object",
2524 "properties": {
2525 "paymentMethodCode": {
2526 "type": "string",
2527 "example": "DNA"
2528 },
2529 "paymentUsed": {
2530 "type": "number",
2531 "example": 32000
2532 },
2533 "reffNo": {
2534 "type": "string",
2535 "example": ""
2536 },
2537 "paymentAmount": {
2538 "type": "number",
2539 "example": 32000
2540 }
2541 }
2542 }
2543 },
2544 "user": {
2545 "required": [
2546 "id",
2547 "name",
2548 "phoneNo"
2549 ],
2550 "type": "object",
2551 "properties": {
2552 "name": {
2553 "type": "string",
2554 "example": "User087876018791"
2555 },
2556 "id": {
2557 "type": "string",
2558 "example": "1AYcAaJzMGRZ8Xxed11Q2O3cSB32"
2559 },
2560 "phoneNo": {
2561 "type": "string",
2562 "example": "+6287876018791"
2563 }
2564 }
2565 }
2566 }
2567 }
2568 }
2569 }
2570 }
2571 },
2572 "required": true
2573 },
2574 "responses": {
2575 "200": {
2576 "description": "",
2577 "content": {
2578 "application/json": {
2579 "schema": {
2580 "type": "object",
2581 "properties": {
2582 "result": {
2583 "type": "object",
2584 "properties": {
2585 "code": {
2586 "type": "string",
2587 "example": "200"
2588 },
2589 "data": {
2590 "type": "object",
2591 "properties": {
2592 "checkoutUrl": {
2593 "type": "string",
2594 "example": "https://aphome-test1-dana.alipaydev.com/m/portal/cashier/checkout?bizNo=20190823111212800110166202300245364×tamp=1566562985906&originSourcePlatform=IPG&mid=216620000000599913807&sign=cS8MifcgnINwXNEBdMyAokUEKWVCQBkmh3EFqFa%2BjQ2%2F57qr88acWbwrT0W3PkriuYaBHFE3t65tLJWJh3p3P4FWWqOQxTpV1Czle2N45V%2BnNnj%2BBIu5R4w6u%2FckBJiAueBvsIWn63bRMT%2BwEw1kekOcz8mdMV1%2Bljz7lvY2qfiTsN5kb7V9Wu9tG3oiROVg9%2BxrGXj%2BmNtK%2FmlBnFq%2FPBJBjDQ09ji8M%2BIODPGobnL8oCOOI57S3exxGi73hHR8%2Fh0iAtVEzKe4u0YwSvMV%2FgmdqN0N4DuJ0snC9qLkLppnisoc%2FnElaSiwWAkAQSyrhexeSYbbBO25Zy339TkV6Q%3D%3D"
2595 }
2596 }
2597 },
2598 "message": {
2599 "type": "string",
2600 "example": "SUCCESS"
2601 }
2602 }
2603 }
2604 }
2605 },
2606 "examples": {
2607 "SUCCESS": {
2608 "value": {
2609 "result": {
2610 "code": "200",
2611 "message": "SUCCESS",
2612 "data": {
2613 "checkoutUrl": "https://aphome-test1-dana.alipaydev.com/m/portal/cashier/checkout?bizNo=20190829111212800110166558200248883×tamp=1567055323137&originSourcePlatform=IPG&mid=216620000000599913807&sign=Ca7V4La0IzqwKTNSqe87Cwlp60YvIg18uEnDjoW85dmXFULY4VmfoHVmUA78%2BP2r6uf8iE3KSuWC1eGOGBIBDjYZoapw9NrFT%2FmnCXcsKWrvlLbsMRwOD0NJlqLTOhctocGgXFmQTokxivL%2B0t9j%2BcVTQ2OyzHUx%2BksZ6HDtDnqw38Hvgb%2FjDZmlTusDFxRyuLj0gj5LGyptMVPMEr0AZxOnL25GqdJRJXiOT5zOev6vDnWKVJF3Rq8zLeOiH%2Fjf7KiluLvuakUUteZJBr9Yke5TWzs%2BcVRSK3FoO12TRirpnZlOEiBlLRlggr8VpDySRYlettT7cxF0FyD%2FUCNzyg%3D%3D"
2614 }
2615 }
2616 }
2617 },
2618 "ORDER_ALREADY_EXISTS": {
2619 "value": {
2620 "result": {
2621 "code": "1148",
2622 "message": "error",
2623 "data": [
2624 "Order already exist with request_id."
2625 ]
2626 }
2627 }
2628 },
2629 "MENU_NOT_AVAILABLE": {
2630 "value": {
2631 "result": {
2632 "code": "2103",
2633 "message": "SUCCESS",
2634 "data": {
2635 "4839": "Super Besar 1"
2636 }
2637 }
2638 }
2639 },
2640 "VALIDATION_ERROR": {
2641 "value": {
2642 "result": {
2643 "code": "400",
2644 "message": "error",
2645 "data": [
2646 "orderType is required",
2647 "deliveryAddress.address is not allowed to be empty"
2648 ]
2649 }
2650 }
2651 }
2652 }
2653 }
2654 }
2655 },
2656 "401": {
2657 "$ref": "#/components/responses/UnauthorizedErrorBoth"
2658 }
2659 },
2660 "security": [
2661 {
2662 "App": []
2663 }
2664 ]
2665 }
2666 },
2667 "/getOrderHistory": {
2668 "post": {
2669 "summary": "Endpoint for Get user's order history",
2670 "tags": [
2671 "App"
2672 ],
2673 "operationId": "getOrderHistory",
2674 "requestBody": {
2675 "content": {
2676 "application/json": {
2677 "schema": {
2678 "required": [
2679 "data"
2680 ],
2681 "type": "object",
2682 "properties": {
2683 "data": {
2684 "required": [
2685 "orderStatus",
2686 "requestId"
2687 ],
2688 "type": "object",
2689 "properties": {
2690 "requestId": {
2691 "type": "string",
2692 "example": "20190425-1751381c7bd2e4-7c97-49da-ba9f-266d7ba2cd9a"
2693 },
2694 "orderStatus": {
2695 "type": "string",
2696 "example": "INPROGRESS"
2697 },
2698 "page": {
2699 "type": "string",
2700 "example": "1"
2701 },
2702 "size": {
2703 "type": "string",
2704 "example": "10"
2705 }
2706 }
2707 }
2708 }
2709 }
2710 }
2711 },
2712 "required": true
2713 },
2714 "responses": {
2715 "200": {
2716 "description": "",
2717 "content": {
2718 "application/json": {
2719 "schema": {
2720 "type": "object",
2721 "properties": {
2722 "result": {
2723 "type": "object",
2724 "properties": {
2725 "code": {
2726 "type": "string",
2727 "example": "200"
2728 },
2729 "data": {
2730 "type": "object",
2731 "properties": {
2732 "data": {
2733 "type": "array",
2734 "items": {
2735 "type": "object",
2736 "properties": {
2737 "orderType": {
2738 "type": "string",
2739 "example": "HMD"
2740 },
2741 "createdDate": {
2742 "type": "number",
2743 "example": 1566369957
2744 },
2745 "orderId": {
2746 "type": "string",
2747 "example": "20190821S900047"
2748 },
2749 "orderStatus": {
2750 "type": "string",
2751 "example": "TRANSFERRED"
2752 },
2753 "paymentMethod": {
2754 "type": "string",
2755 "example": "DNA"
2756 },
2757 "checkoutUrl": {
2758 "type": "string",
2759 "example": "https://aphome-test1-dana.alipaydev.com/m/portal/cashier/checkout?bizNo=20190821111212800110166644300227819×tamp=1566369713728&originSourcePlatform=IPG&mid=216620000000599913807&sign=V%2FEvh14FLRUKVniTreyhaOK0q15e1Ou4N0PqwZvKMOoiAMMk%2FswSaqbEfmqgmILNUrooSV%2BhCW4isZwSF8Bb8tnzfrUDbb442kTcGCLbz%2BaYp74Vwvts149uENzKVgs3qaN%2FwbpqUkTPfeHFCkXyIfx%2FQ%2FuXtiD8GCvuqx22PoyGYJd9YQ9%2BkHTVZf88HneDX4bOBOCf5Fy%2FUzsIhikdu2%2BjngfnBN24lw3tUOH%2Fi6zmNDc%2FyDPm6W95Flj3LfPW1%2FRU47TdTrut3xRkxKzCQzdbcfU1IVLG3UdBE45Sv5tAiA2usjaUVHx%2BQQ%2FGKAAdJqryEQUsx2iAae4njRINDw%3D%3D"
2760 }
2761 }
2762 }
2763 },
2764 "count": {
2765 "type": "number",
2766 "example": 4
2767 }
2768 }
2769 },
2770 "message": {
2771 "type": "string",
2772 "example": "SUCCESS"
2773 }
2774 }
2775 }
2776 }
2777 },
2778 "examples": {
2779 "SUCCESS": {
2780 "value": {
2781 "result": {
2782 "code": "200",
2783 "message": "SUCCESS",
2784 "data": {
2785 "count": 17,
2786 "data": [
2787 {
2788 "checkoutUrl": "",
2789 "createdDate": 1565333658,
2790 "orderId": "20190809M800004",
2791 "orderStatus": "TRANSFERRED",
2792 "orderType": "HMD",
2793 "paymentMethod": "CSH"
2794 },
2795 {
2796 "checkoutUrl": "",
2797 "createdDate": 1565333158,
2798 "orderId": "20190809M800003",
2799 "orderStatus": "TRANSFERRED",
2800 "orderType": "HMD",
2801 "paymentMethod": "CSH"
2802 },
2803 {
2804 "checkoutUrl": "https://aphome-test1-dana.alipaydev.com/m/portal/cashier/checkout?bizNo=20190731111212800110166239800185619×tamp=1564564249357&originSourcePlatform=IPG&mid=216620000000599913807&sign=jeEpcn3v%2BPmFs2wcF7WptsZbF0o7VeXt3jtygquedjzK96Y0Cht9YAtFcBDBPvzluSgAQTYC84BdiWA0foKje%2BNB4D%2B%2BPlhZ7jw3087BtD8ejSAkQr04EKODlqPyGx0Qnrh8%2Bpuya8hX5L8lOB%2F0AZt1RS5lRl%2F78SxEqjimuc3Y69aHEwgRCaBiy67vUDyc54xvHyO6L8mZgUryVBvieb2btt6vw07DOFdJklzV%2Bq%2FGpq0pIU60LS%2BIruUkM12DeZOmMN%2Be%2BB1ESO2iY9Hwt5N9efrQ07lu9UmAn9LECCM1YQFvxs4xaouV9GTwfyHyqPdHAj7Adm6DFjol1Tdjtg%3D%3D",
2805 "createdDate": 1564564248,
2806 "orderId": "20190731S800010",
2807 "orderStatus": "TRANSFERRED",
2808 "orderType": "HMD",
2809 "paymentMethod": "DNA"
2810 }
2811 ]
2812 }
2813 }
2814 }
2815 },
2816 "VALIDATION_ERROR": {
2817 "value": {
2818 "result": {
2819 "code": "500",
2820 "message": "error",
2821 "data": [
2822 "orderStatus is required"
2823 ]
2824 }
2825 }
2826 }
2827 }
2828 }
2829 }
2830 },
2831 "401": {
2832 "$ref": "#/components/responses/UnauthorizedErrorBoth"
2833 }
2834 },
2835 "security": [
2836 {
2837 "App": []
2838 }
2839 ]
2840 }
2841 },
2842 "/getOrderDetail": {
2843 "post": {
2844 "summary": "Endpoint for Get details of particular order",
2845 "tags": [
2846 "App"
2847 ],
2848 "operationId": "getOrderDetail",
2849 "requestBody": {
2850 "content": {
2851 "application/json": {
2852 "schema": {
2853 "required": [
2854 "data"
2855 ],
2856 "type": "object",
2857 "properties": {
2858 "data": {
2859 "required": [
2860 "order_id"
2861 ],
2862 "type": "object",
2863 "properties": {
2864 "order_id": {
2865 "type": "string",
2866 "example": "20190829N800007"
2867 }
2868 }
2869 }
2870 }
2871 }
2872 }
2873 },
2874 "required": true
2875 },
2876 "responses": {
2877 "200": {
2878 "description": "",
2879 "content": {
2880 "application/json": {
2881 "schema": {
2882 "type": "object",
2883 "properties": {
2884 "result": {
2885 "type": "object",
2886 "properties": {
2887 "code": {
2888 "type": "string",
2889 "example": "200"
2890 },
2891 "message": {
2892 "type": "string",
2893 "example": "SUCCESS"
2894 },
2895 "data": {
2896 "type": "object",
2897 "properties": {
2898 "orderType": {
2899 "type": "string",
2900 "example": "PNP"
2901 },
2902 "orderSource": {
2903 "type": "string",
2904 "example": "ANDROID"
2905 },
2906 "acquirementId": {
2907 "type": "string",
2908 "example": "2.01908201112128E34"
2909 },
2910 "destinationStore": {
2911 "type": "object",
2912 "properties": {
2913 "storeCityName": {
2914 "type": "string",
2915 "example": "JKT"
2916 },
2917 "taxPercentage": {
2918 "type": "number",
2919 "example": 10
2920 },
2921 "posIPAddress": {
2922 "type": "string",
2923 "example": "172.16.9.35"
2924 },
2925 "deliveryCharge": {
2926 "type": "number",
2927 "example": 0
2928 },
2929 "storeCityCode": {
2930 "type": "string",
2931 "example": "JKT"
2932 },
2933 "regionalName": {
2934 "type": "string",
2935 "example": "JKT"
2936 },
2937 "regionCode": {
2938 "type": "string",
2939 "example": "6"
2940 },
2941 "port": {
2942 "type": "string",
2943 "example": "8181"
2944 },
2945 "storeAddress": {
2946 "type": "string",
2947 "example": "Jl. MT. Haryono, Kav 7 Lt. 2 Gd Gelael, Jakarta"
2948 },
2949 "deliveryChargeTax": {
2950 "type": "number",
2951 "example": 0
2952 },
2953 "faxNumber": {
2954 "type": "string",
2955 "example": "021-83796557"
2956 },
2957 "storeName": {
2958 "type": "string",
2959 "example": "MT HARYONO JAKARTA"
2960 },
2961 "outletCode": {
2962 "type": "string",
2963 "example": "0208"
2964 }
2965 }
2966 },
2967 "notes": {
2968 "type": "string",
2969 "example": ""
2970 },
2971 "orderCalculation": {
2972 "type": "array",
2973 "items": {
2974 "type": "object",
2975 "properties": {
2976 "value": {
2977 "type": "number",
2978 "example": 5000
2979 },
2980 "key": {
2981 "type": "string",
2982 "example": "totalAmount"
2983 }
2984 }
2985 }
2986 },
2987 "transferStatus": {
2988 "type": "string",
2989 "example": "INIT"
2990 },
2991 "orderId": {
2992 "type": "string",
2993 "example": "20190820N900025"
2994 },
2995 "cancelStatus": {
2996 "type": "string",
2997 "example": "SUCCESS"
2998 },
2999 "orderStatus": {
3000 "type": "string",
3001 "example": "CANCELLED"
3002 },
3003 "loyaltyPoints": {
3004 "type": "string",
3005 "example": null
3006 },
3007 "checkoutUrl": {
3008 "type": "string",
3009 "example": "https://aphome-test1-dana.alipaydev.com/m/portal/cashier/checkout?bizNo=20190820111212800110166242500206987×tamp=1566279977468&originSourcePlatform=IPG&mid=216620000000599913807&sign=EjqcBdSIqpw3WqzPyblhOmNqTPOQlzqCOUGjLftvKoOWfORHJYxIgOTLIXUfVV0voElCUhOXjCDSfhsq2jXLi%2BolwlnGe6DubvYGbIndvfpGV55uYE245oLV%2B7AJbmYU%2FIh5zVqKJObErH1VL3GMfy6PsQWOQ0om6PGdt5I5i12BP6OSXxaZraxmgSAFYn2vQxjHX5H92bgwpzwZ%2BeNFx6797QBPj4pGsEEE4objc0vW%2Fk%2BxYli0YkdWq%2BNwSnC8AQs2XLTe3NLw1wpPEcW3uagCYoZXIUTE8aeH9yE0i%2BcNh8H8%2FkqHCwTHwEHV4DdDE%2FhAMuc0DmiUlYpo2aXV8w%3D%3D"
3010 },
3011 "orderStatusHistory": {
3012 "type": "array",
3013 "items": {
3014 "type": "object",
3015 "properties": {
3016 "Status": {
3017 "type": "string",
3018 "example": "INIT"
3019 },
3020 "createdAt": {
3021 "type": "number",
3022 "example": 1566280220
3023 },
3024 "id": {
3025 "type": "number",
3026 "example": 837
3027 },
3028 "OrderID": {
3029 "type": "string",
3030 "example": "20190820N900025"
3031 },
3032 "updatedAt": {
3033 "type": "string",
3034 "example": "2019-08-20T05:50:20.000Z"
3035 }
3036 }
3037 }
3038 },
3039 "createdDate": {
3040 "type": "number",
3041 "example": 1566280220000
3042 },
3043 "orderLines": {
3044 "type": "array",
3045 "items": {
3046 "type": "object",
3047 "properties": {
3048 "quantity": {
3049 "type": "number",
3050 "example": 1
3051 },
3052 "isCustomized": {
3053 "type": "boolean",
3054 "example": false
3055 },
3056 "menuGroupCode": {
3057 "type": "string",
3058 "example": "G46"
3059 },
3060 "price": {
3061 "type": "number",
3062 "example": 5000
3063 },
3064 "setItems": {
3065 "type": "array",
3066 "items": {
3067 "type": "object",
3068 "properties": {
3069 "modifierGroupCode": {
3070 "type": "string",
3071 "example": "M5R"
3072 },
3073 "quantity": {
3074 "type": "number",
3075 "example": 1
3076 },
3077 "price": {
3078 "type": "number",
3079 "example": 0
3080 },
3081 "name": {
3082 "type": "string",
3083 "example": "7up"
3084 },
3085 "isTaxable": {
3086 "type": "boolean",
3087 "example": true
3088 },
3089 "isCd": {
3090 "type": "boolean",
3091 "example": false
3092 },
3093 "menuItemCode": {
3094 "type": "string",
3095 "example": "X931"
3096 },
3097 "tax": {
3098 "type": "number",
3099 "example": 0
3100 },
3101 "originalItemCode": {
3102 "type": "string",
3103 "example": ""
3104 }
3105 }
3106 }
3107 },
3108 "name": {
3109 "type": "string",
3110 "example": "7-Up"
3111 },
3112 "isTaxable": {
3113 "type": "boolean",
3114 "example": true
3115 },
3116 "menuItemCode": {
3117 "type": "string",
3118 "example": "4882"
3119 },
3120 "tax": {
3121 "type": "number",
3122 "example": 500
3123 }
3124 }
3125 }
3126 },
3127 "cancelTime": {
3128 "type": "string",
3129 "example": "2019-08-20T05:47:42.000Z"
3130 },
3131 "deliveryAddress": {
3132 "type": "object",
3133 "properties": {
3134 "zipCode": {
3135 "type": "string",
3136 "example": "12810"
3137 },
3138 "address": {
3139 "type": "string",
3140 "example": ""
3141 },
3142 "notes": {
3143 "type": "string",
3144 "example": "DINE_IN 0025"
3145 },
3146 "cityName": {
3147 "type": "string",
3148 "example": "JKT"
3149 },
3150 "areaName": {
3151 "type": "string",
3152 "example": "Jakarta"
3153 },
3154 "stateName": {
3155 "type": "string",
3156 "example": "JKT"
3157 },
3158 "countryName": {
3159 "type": "string",
3160 "example": "Indonesia"
3161 },
3162 "geolocation": {
3163 "type": "object",
3164 "properties": {
3165 "latitude": {
3166 "type": "number",
3167 "example": 0
3168 },
3169 "longitude": {
3170 "type": "number",
3171 "example": 0
3172 }
3173 }
3174 }
3175 }
3176 },
3177 "requestId": {
3178 "type": "string",
3179 "example": "20190820-12461245395d1f-1993-40f8-afe1-c5be55d4ab94"
3180 },
3181 "payment": {
3182 "type": "array",
3183 "items": {
3184 "type": "object",
3185 "properties": {
3186 "paymentMethodCode": {
3187 "type": "string",
3188 "example": "DNA"
3189 },
3190 "paymentUsed": {
3191 "type": "number",
3192 "example": 5500
3193 },
3194 "reffno": {
3195 "type": "string",
3196 "example": ""
3197 },
3198 "paymentAmount": {
3199 "type": "number",
3200 "example": 5500
3201 }
3202 }
3203 }
3204 },
3205 "cancelReason": {
3206 "type": "string",
3207 "example": "Cancelled due to FAIL_FAX"
3208 },
3209 "user": {
3210 "type": "object",
3211 "properties": {
3212 "lastOrderId": {
3213 "type": "string",
3214 "example": "20190820N900025"
3215 },
3216 "name": {
3217 "type": "string",
3218 "example": "Putri Wen"
3219 },
3220 "id": {
3221 "type": "string",
3222 "example": "PzKujWuR55R29o6mrOULYjfCWLf2"
3223 },
3224 "lastOrderStatus": {
3225 "type": "string",
3226 "example": "INIT"
3227 },
3228 "phoneNo": {
3229 "type": "string",
3230 "example": "628579696960"
3231 }
3232 }
3233 }
3234 }
3235 }
3236 }
3237 }
3238 }
3239 },
3240 "examples": {
3241 "SUCCESS": {
3242 "value": {
3243 "result": {
3244 "code": "200",
3245 "message": "SUCCESS",
3246 "data": {
3247 "acquirementId": "20190829111212800110166569800225905",
3248 "checkoutUrl": "https://aphome-test1-dana.alipaydev.com/m/portal/cashier/checkout?bizNo=20190829111212800110166569800225905×tamp=1567052680436&originSourcePlatform=IPG&mid=216620000000599913807&sign=eJ7w1E%2F2HG9ZtSncN2BwXeQL3cWRozFWY%2BrEay9P1XiPgP0mvEUt1xBgxGC3jZDqh%2BgNow3OAydwfZWlnWHfOlmDNGsynROpakBu5ke5tgcThMBlrDMSey2PrYM0Pg2D2KDJ20uKlrp43ZW4NrKOkt4vkb6UyEOVomxzcWxp5OmcPOmmu%2BT4FfR2GJbBjgqYqL2jfSewMnrE5XT0PLVGZmEpcsMFJAalilRxBoSCbBfMs4tSOUN1jM16RpOjdPaywQ9tt54u%2B1hXBVbOwb48Qu6QVH9K79f1Ktsa5ypY9AGQUjv221ky6ihJ2LxF9nkdvCtgQkjqaAcw6XJ0qtpOcg%3D%3D",
3249 "createdDate": 1567052679000,
3250 "deliveryAddress": {
3251 "address": "",
3252 "areaName": "Jakarta",
3253 "cityName": "Jakarta",
3254 "countryName": "Indonesia",
3255 "geolocation": {
3256 "latitude": 0,
3257 "longitude": 0
3258 },
3259 "notes": "DINE_IN N7",
3260 "stateName": "Jakarta",
3261 "zipCode": "12810"
3262 },
3263 "destinationStore": {
3264 "deliveryCharge": 0,
3265 "deliveryChargeTax": 0,
3266 "faxNumber": "+622183796557",
3267 "outletCode": "0208",
3268 "port": "8181",
3269 "posIPAddress": "172.16.9.44",
3270 "regionCode": "0006",
3271 "regionalName": "",
3272 "storeAddress": "Jl. MT. Haryono, Kav 7 Lt. 2 Gd Gelael, Jakarta ",
3273 "storeCityCode": "JKT",
3274 "storeCityName": "",
3275 "storeName": "MT HARYONO JAKARTA",
3276 "taxPercentage": 10
3277 },
3278 "notes": "",
3279 "orderCalculation": [
3280 {
3281 "key": "totalAmount",
3282 "value": 16363
3283 },
3284 {
3285 "key": "totalFnB",
3286 "value": 16363
3287 },
3288 {
3289 "key": "totalRestaurantTax",
3290 "value": 1636
3291 },
3292 {
3293 "key": "total",
3294 "value": 17999
3295 },
3296 {
3297 "key": "totalRounding",
3298 "value": 1
3299 },
3300 {
3301 "key": "voucherAmount",
3302 "value": 24
3303 },
3304 {
3305 "key": "totalSales",
3306 "value": 17976
3307 },
3308 {
3309 "key": "totalPayment",
3310 "value": 18000
3311 },
3312 {
3313 "key": "storePercentage",
3314 "value": 10
3315 }
3316 ],
3317 "orderId": "20190829N800007",
3318 "orderLines": [
3319 {
3320 "isCustomized": false,
3321 "isTaxable": true,
3322 "menuGroupCode": "G45",
3323 "menuItemCode": "4867",
3324 "name": "Wingers",
3325 "price": 16363,
3326 "quantity": 1,
3327 "setItems": null,
3328 "tax": 1636.3
3329 }
3330 ],
3331 "orderSource": "ANDROID",
3332 "orderStatus": "TRANSFERRED",
3333 "orderStatusHistory": [
3334 {
3335 "id": 671,
3336 "createdAt": 1567052679,
3337 "updatedAt": "2019-08-29T11:24:39+07:00",
3338 "OrderID": "20190829N800007",
3339 "Status": "INIT"
3340 },
3341 {
3342 "id": 672,
3343 "createdAt": 1567052717,
3344 "updatedAt": "2019-08-29T11:25:17+07:00",
3345 "OrderID": "20190829N800007",
3346 "Status": "PAYMENT_SUCCESS"
3347 },
3348 {
3349 "id": 673,
3350 "createdAt": 1567052717,
3351 "updatedAt": "2019-08-29T11:25:17+07:00",
3352 "OrderID": "20190829N800007",
3353 "Status": "TRANSFERRED"
3354 }
3355 ],
3356 "orderType": "PNP",
3357 "payment": [
3358 {
3359 "paymentAmount": 18000,
3360 "paymentMethodCode": "DNA",
3361 "paymentUsed": 18000,
3362 "reffno": ""
3363 }
3364 ],
3365 "requestId": "20190829-112435ba893bdb-00b0-4d85-8b28-54dd7ae98150",
3366 "transferStatus": "INIT",
3367 "user": {
3368 "id": "6B5A9GzL1mgavz4GMJoJ1HKyPXK2",
3369 "lastOrderId": "20190829N800007",
3370 "lastOrderStatus": "INIT",
3371 "name": "tegas yudanianto",
3372 "phoneNo": "+6285659171919"
3373 },
3374 "loyaltyPoints": null
3375 }
3376 }
3377 }
3378 },
3379 "ORDER_NOT_EXISTS": {
3380 "value": {
3381 "result": {
3382 "code": "1154",
3383 "message": "error",
3384 "data": [
3385 "Order not exist."
3386 ]
3387 }
3388 }
3389 },
3390 "VALIDATION_ERROR": {
3391 "value": {
3392 "result": {
3393 "code": "400",
3394 "message": "error",
3395 "data": [
3396 "order_id is required"
3397 ]
3398 }
3399 }
3400 }
3401 }
3402 }
3403 }
3404 },
3405 "401": {
3406 "$ref": "#/components/responses/UnauthorizedErrorBoth"
3407 }
3408 },
3409 "security": [
3410 {
3411 "App": []
3412 }
3413 ]
3414 }
3415 },
3416 "/getPlaceId": {
3417 "post": {
3418 "summary": "Endpoint for Get placeId.",
3419 "tags": [
3420 "App"
3421 ],
3422 "operationId": "getPlaceId",
3423 "requestBody": {
3424 "content": {
3425 "application/json": {
3426 "schema": {
3427 "required": [
3428 "data"
3429 ],
3430 "type": "object",
3431 "properties": {
3432 "data": {
3433 "required": [
3434 "lat",
3435 "lng"
3436 ],
3437 "type": "object",
3438 "properties": {
3439 "lat": {
3440 "type": "number",
3441 "example": -6.904274878477518
3442 },
3443 "lng": {
3444 "type": "number",
3445 "example": 107.61881042271854
3446 }
3447 }
3448 }
3449 }
3450 }
3451 }
3452 },
3453 "required": true
3454 },
3455 "responses": {
3456 "200": {
3457 "description": "",
3458 "content": {
3459 "application/json": {
3460 "schema": {
3461 "type": "object",
3462 "properties": {
3463 "result": {
3464 "type": "object",
3465 "properties": {
3466 "code": {
3467 "type": "string"
3468 },
3469 "message": {
3470 "type": "string"
3471 },
3472 "data": {
3473 "type": "object",
3474 "properties": {
3475 "formatted_address": {
3476 "type": "string"
3477 },
3478 "latlng": {
3479 "type": "object",
3480 "properties": {
3481 "lat": {
3482 "type": "number"
3483 },
3484 "lng": {
3485 "type": "number"
3486 }
3487 }
3488 },
3489 "place_id": {
3490 "type": "string"
3491 },
3492 "long_name": {
3493 "type": "string"
3494 },
3495 "short_name": {
3496 "type": "string"
3497 }
3498 }
3499 }
3500 }
3501 }
3502 }
3503 },
3504 "examples": {
3505 "SUCCESS": {
3506 "value": {
3507 "result": {
3508 "code": "200",
3509 "message": "SUCCESS",
3510 "data": {
3511 "formatted_address": "Jl. Progo No.16, Citarum, Kec. Bandung Wetan, Kota Bandung, Jawa Barat 40115, Indonesia",
3512 "latlng": {
3513 "lat": -6.9043334,
3514 "lng": 107.6188565
3515 },
3516 "place_id": "ChIJ2_sbq0vmaC4R6hsRKZSrRF4",
3517 "long_name": "Jalan Progo",
3518 "short_name": "Jl. Progo"
3519 }
3520 }
3521 }
3522 },
3523 "VALIDATION_ERROR": {
3524 "value": {
3525 "result": {
3526 "code": "400",
3527 "message": "error",
3528 "data": [
3529 "lat must be less than or equal to 90"
3530 ]
3531 }
3532 }
3533 }
3534 }
3535 }
3536 }
3537 },
3538 "401": {
3539 "$ref": "#/components/responses/UnauthorizedErrorBoth"
3540 }
3541 },
3542 "security": [
3543 {
3544 "App": []
3545 }
3546 ]
3547 }
3548 },
3549 "/getPointsHistory": {
3550 "post": {
3551 "summary": "Endpoint for get user KFC Points History",
3552 "tags": [
3553 "App"
3554 ],
3555 "operationId": "getPointsHistory",
3556 "requestBody": {
3557 "content": {
3558 "application/json": {
3559 "schema": {
3560 "required": [
3561 "data"
3562 ],
3563 "type": "object",
3564 "properties": {
3565 "data": {
3566 "type": "object",
3567 "properties": {
3568 "size": {
3569 "type": "number",
3570 "example": 4
3571 },
3572 "page": {
3573 "type": "number",
3574 "example": 1
3575 }
3576 }
3577 }
3578 }
3579 }
3580 }
3581 },
3582 "required": true
3583 },
3584 "responses": {
3585 "200": {
3586 "description": "",
3587 "content": {
3588 "application/json": {
3589 "schema": {
3590 "type": "object",
3591 "properties": {
3592 "result": {
3593 "type": "object",
3594 "properties": {
3595 "code": {
3596 "type": "string"
3597 },
3598 "message": {
3599 "type": "string"
3600 },
3601 "data": {
3602 "type": "object",
3603 "properties": {
3604 "total_rows": {
3605 "type": "string"
3606 },
3607 "transactions": {
3608 "type": "array",
3609 "items": {
3610 "type": "object",
3611 "properties": {
3612 "activity": {
3613 "type": "string"
3614 },
3615 "date": {
3616 "type": "string"
3617 },
3618 "id": {
3619 "type": "number"
3620 },
3621 "points": {
3622 "type": "number"
3623 }
3624 }
3625 }
3626 }
3627 }
3628 }
3629 }
3630 }
3631 }
3632 },
3633 "examples": {
3634 "SUCCESS": {
3635 "value": {
3636 "result": {
3637 "code": "200",
3638 "message": "SUCCESS",
3639 "data": {
3640 "total_rows": 0,
3641 "transactions": [
3642 {
3643 "activity": "Pesanan di Kasir",
3644 "date": "2019-11-20T12:33:44+07:00",
3645 "id": 3042,
3646 "points": 25
3647 }
3648 ]
3649 }
3650 }
3651 }
3652 },
3653 "BAD_REQUEST": {
3654 "value": {
3655 "result": {
3656 "code": "500",
3657 "message": "error",
3658 "data": [
3659 "req.size must be a number"
3660 ]
3661 }
3662 }
3663 }
3664 }
3665 }
3666 }
3667 },
3668 "401": {
3669 "$ref": "#/components/responses/UnauthorizedErrorBoth"
3670 }
3671 },
3672 "security": [
3673 {
3674 "App": []
3675 }
3676 ]
3677 }
3678 },
3679 "/updateOrderStatus": {
3680 "post": {
3681 "summary": "Endpoint for Update order status",
3682 "tags": [
3683 "MTH"
3684 ],
3685 "operationId": "updateOrderStatus",
3686 "requestBody": {
3687 "content": {
3688 "application/json": {
3689 "schema": {
3690 "required": [
3691 "orderId",
3692 "status"
3693 ],
3694 "type": "object",
3695 "properties": {
3696 "orderId": {
3697 "type": "string",
3698 "example": "20190813N900010"
3699 },
3700 "status": {
3701 "type": "string",
3702 "example": "COMPLETED"
3703 }
3704 }
3705 }
3706 }
3707 },
3708 "required": true
3709 },
3710 "responses": {
3711 "200": {
3712 "description": "",
3713 "content": {
3714 "application/json": {
3715 "schema": {
3716 "type": "object",
3717 "properties": {
3718 "code": {
3719 "type": "string",
3720 "example": "200"
3721 },
3722 "message": {
3723 "type": "string",
3724 "example": "SUCCESS"
3725 },
3726 "data": {
3727 "type": "array",
3728 "items": {
3729 "type": "object",
3730 "example": "TRANSFERRED"
3731 }
3732 }
3733 }
3734 },
3735 "examples": {
3736 "SUCCESS": {
3737 "value": {
3738 "code": "200",
3739 "message": "SUCCESS",
3740 "data": {
3741 "orderId": "CGiEPySrUnOLtMuoxFQ8",
3742 "points": {
3743 "points_will_expire": {
3744 "expiration_date": 1561913999,
3745 "total_will_expired": 0
3746 },
3747 "row_version": 1,
3748 "total_balance": 50
3749 }
3750 }
3751 }
3752 },
3753 "ORDER_COMPLETED": {
3754 "value": {
3755 "code": "200",
3756 "message": "SUCCESS",
3757 "data": {
3758 "points": {
3759 "phone_number": "+62818125586",
3760 "points_issued": 6075,
3761 "row_version": 66,
3762 "total_points": 52860
3763 }
3764 }
3765 }
3766 },
3767 "ORDER_NOT_FOUND": {
3768 "value": {
3769 "code": "204",
3770 "message": "Not Found",
3771 "data": [
3772 "Order Not Found."
3773 ]
3774 }
3775 }
3776 }
3777 }
3778 }
3779 },
3780 "401": {
3781 "$ref": "#/components/responses/UnauthorizedError"
3782 }
3783 },
3784 "security": [
3785 {
3786 "SecurityRules-Token": [],
3787 "SecurityRules-Client-IP": []
3788 }
3789 ]
3790 }
3791 },
3792 "/updateTransferStatus": {
3793 "post": {
3794 "summary": "Endpoint for Update order transfer status",
3795 "tags": [
3796 "MTH"
3797 ],
3798 "operationId": "updateTransferStatus",
3799 "requestBody": {
3800 "content": {
3801 "application/json": {
3802 "schema": {
3803 "required": [
3804 "orderId",
3805 "status"
3806 ],
3807 "type": "object",
3808 "properties": {
3809 "orderId": {
3810 "type": "string",
3811 "example": "20190813N900010"
3812 },
3813 "status": {
3814 "type": "string",
3815 "example": "SEND_FAX"
3816 }
3817 }
3818 }
3819 }
3820 },
3821 "required": true
3822 },
3823 "responses": {
3824 "200": {
3825 "description": "",
3826 "content": {
3827 "application/json": {
3828 "schema": {
3829 "type": "object",
3830 "properties": {
3831 "code": {
3832 "type": "string",
3833 "example": "200"
3834 },
3835 "message": {
3836 "type": "string",
3837 "example": "SUCCESS"
3838 },
3839 "data": {
3840 "type": "array",
3841 "items": {
3842 "type": "object",
3843 "example": "SEND_FAX"
3844 }
3845 }
3846 }
3847 },
3848 "examples": {
3849 "SUCCESS": {
3850 "value": {
3851 "code": "200",
3852 "message": "SUCCESS",
3853 "data": [
3854 "SEND_FAX"
3855 ]
3856 }
3857 },
3858 "ORDER_NOT_FOUND": {
3859 "value": {
3860 "code": "200",
3861 "message": "Not Found",
3862 "data": [
3863 "Order Not Found."
3864 ]
3865 }
3866 }
3867 }
3868 }
3869 }
3870 },
3871 "401": {
3872 "$ref": "#/components/responses/UnauthorizedError"
3873 }
3874 },
3875 "security": [
3876 {
3877 "SecurityRules-Token": [],
3878 "SecurityRules-Client-IP": []
3879 }
3880 ]
3881 }
3882 },
3883 "/saveLoyaltyPointOrder": {
3884 "post": {
3885 "summary": "Endpoint for Save Loyalty point order(offline order)",
3886 "tags": [
3887 "MTH"
3888 ],
3889 "operationId": "saveLoyaltyPointOrder",
3890 "requestBody": {
3891 "content": {
3892 "application/json": {
3893 "schema": {
3894 "required": [
3895 "MerchantOrderID",
3896 "TransactionDate",
3897 "orderAmount",
3898 "outletCode",
3899 "paymentMethod",
3900 "requestId",
3901 "storeCityCode",
3902 "storeCityName",
3903 "transactionId",
3904 "userId"
3905 ],
3906 "type": "object",
3907 "properties": {
3908 "orderAmount": {
3909 "type": "number",
3910 "example": 100000
3911 },
3912 "requestId": {
3913 "type": "string",
3914 "example": "{{requestId}}"
3915 },
3916 "paymentMethod": {
3917 "type": "string",
3918 "example": "DANA"
3919 },
3920 "transactionId": {
3921 "type": "string",
3922 "example": "123456789001"
3923 },
3924 "MerchantOrderID": {
3925 "type": "string",
3926 "example": "201904043895263564859"
3927 },
3928 "TransactionDate": {
3929 "type": "string",
3930 "example": "2019-01-01T00:00:00.000Z"
3931 },
3932 "userId": {
3933 "type": "string",
3934 "example": "PzKujWuR55R29o6mrOULYjfCWLf2"
3935 },
3936 "outletCode": {
3937 "type": "string",
3938 "example": "159"
3939 },
3940 "storeCityCode": {
3941 "type": "string",
3942 "example": "JKT"
3943 },
3944 "storeCityName": {
3945 "type": "string",
3946 "example": "Jakarta"
3947 }
3948 }
3949 }
3950 }
3951 },
3952 "required": true
3953 },
3954 "responses": {
3955 "200": {
3956 "description": "",
3957 "content": {
3958 "application/json": {
3959 "schema": {
3960 "type": "object",
3961 "properties": {
3962 "code": {
3963 "type": "string",
3964 "example": "200"
3965 },
3966 "message": {
3967 "type": "string",
3968 "example": "SUCCESS"
3969 },
3970 "data": {
3971 "type": "object",
3972 "properties": {
3973 "orderId": {
3974 "type": "string",
3975 "example": "1Wo6QbC4fJKQqQ1MMuz8"
3976 },
3977 "points": {
3978 "type": "object",
3979 "properties": {
3980 "points_will_expire": {
3981 "type": "object",
3982 "properties": {
3983 "expiration_date": {
3984 "type": "number",
3985 "example": 1561913999
3986 },
3987 "total_will_expired": {
3988 "type": "number",
3989 "example": 1561913999
3990 }
3991 }
3992 }
3993 }
3994 },
3995 "row_version": {
3996 "type": "number",
3997 "example": 67
3998 },
3999 "total_points": {
4000 "type": "number",
4001 "example": 62860
4002 }
4003 }
4004 }
4005 }
4006 },
4007 "examples": {
4008 "SUCCESS": {
4009 "value": {
4010 "code": "200",
4011 "message": "SUCCESS",
4012 "data": {
4013 "orderId": "CGiEPySrUnOLtMuoxFQ8",
4014 "points": {
4015 "points_will_expire": {
4016 "expiration_date": 1561913999,
4017 "total_will_expired": 0
4018 },
4019 "row_version": 1,
4020 "total_balance": 50
4021 }
4022 }
4023 }
4024 },
4025 "ORDER_ALREADY_EXISTS": {
4026 "value": {
4027 "code": "500",
4028 "message": "error",
4029 "data": [
4030 "Loyalty Point Order already exists"
4031 ]
4032 }
4033 },
4034 "VALIDATION_ERROR": {
4035 "value": {
4036 "code": "400",
4037 "message": "error",
4038 "data": [
4039 "transactionId is required"
4040 ]
4041 }
4042 }
4043 }
4044 }
4045 }
4046 },
4047 "401": {
4048 "$ref": "#/components/responses/UnauthorizedError"
4049 }
4050 },
4051 "security": [
4052 {
4053 "SecurityRules-Token": [],
4054 "SecurityRules-Client-IP": []
4055 }
4056 ]
4057 }
4058 },
4059 "/cancelOrder": {
4060 "post": {
4061 "summary": "Endpoint for cancel DANA order",
4062 "tags": [
4063 "MTH"
4064 ],
4065 "operationId": "cancelOrder",
4066 "requestBody": {
4067 "content": {
4068 "application/json": {
4069 "schema": {
4070 "required": [
4071 "acquirementId",
4072 "orderId",
4073 "reason",
4074 "status"
4075 ],
4076 "type": "object",
4077 "properties": {
4078 "acquirementId": {
4079 "type": "string",
4080 "example": "20190723111212800110166390500162648"
4081 },
4082 "orderId": {
4083 "type": "string",
4084 "example": "20190723S900054"
4085 },
4086 "status": {
4087 "type": "string",
4088 "example": "CANCELLED"
4089 },
4090 "reason": {
4091 "type": "string",
4092 "example": "some reason from KFC side"
4093 }
4094 }
4095 }
4096 }
4097 },
4098 "required": true
4099 },
4100 "responses": {
4101 "200": {
4102 "description": "OK",
4103 "content": {
4104 "application/json": {
4105 "schema": {
4106 "type": "object",
4107 "properties": {
4108 "code": {
4109 "type": "string",
4110 "example": "200"
4111 },
4112 "message": {
4113 "type": "string",
4114 "example": "SUCCESS"
4115 },
4116 "data": {
4117 "type": "object",
4118 "properties": {
4119 "cancelTime": {
4120 "type": "string",
4121 "example": "2019-08-26T19:20:44+08:00"
4122 },
4123 "status": {
4124 "type": "string",
4125 "example": "SUCCESS"
4126 }
4127 }
4128 }
4129 }
4130 },
4131 "examples": {
4132 "SUCCESS": {
4133 "value": {
4134 "code": "200",
4135 "message": "SUCCESS",
4136 "data": {
4137 "cancelTime": "2019-08-26T19:20:44+08:00",
4138 "status": "SUCCESS"
4139 }
4140 }
4141 },
4142 "CANCEL_FAIL": {
4143 "value": {
4144 "code": "400",
4145 "message": "ERROR_ON_CANCEL_ORDER",
4146 "data": {
4147 "cancelTime": "",
4148 "status": "ORDER_NOT_EXISTS"
4149 }
4150 }
4151 },
4152 "VALIDATION_ERROR": {
4153 "value": {
4154 "code": "400",
4155 "message": "error",
4156 "data": [
4157 "orderId is required"
4158 ]
4159 }
4160 }
4161 }
4162 }
4163 }
4164 },
4165 "401": {
4166 "$ref": "#/components/responses/UnauthorizedError"
4167 }
4168 },
4169 "security": [
4170 {
4171 "SecurityRules-Token": [],
4172 "SecurityRules-Client-IP": []
4173 }
4174 ]
4175 }
4176 },
4177 "/updateGoFoodMenu": {
4178 "post": {
4179 "summary": "Endpoint for Update GOFOOD Menu",
4180 "tags": [
4181 "MTH"
4182 ],
4183 "operationId": "updateGoFoodMenu",
4184 "requestBody": {
4185 "content": {
4186 "application/json": {
4187 "schema": {
4188 "required": [
4189 "menus",
4190 "requestId",
4191 "outletId"
4192 ],
4193 "type": "object",
4194 "properties": {
4195 "menus": {
4196 "type": "array",
4197 "items": {
4198 "type": "object",
4199 "properties": {
4200 "name": {
4201 "type": "string",
4202 "example": "Mains"
4203 },
4204 "menu_items": {
4205 "type": "array",
4206 "items": {
4207 "type": "object",
4208 "properties": {
4209 "name": {
4210 "type": "string",
4211 "example": "Zinger Meal"
4212 },
4213 "description": {
4214 "type": "string",
4215 "example": "Burger with Fries and Coke"
4216 },
4217 "price": {
4218 "type": "number",
4219 "example": 13200
4220 },
4221 "external_id": {
4222 "type": "string",
4223 "example": "1623"
4224 },
4225 "image": {
4226 "type": "string",
4227 "example": "https://image.com/img1.png"
4228 },
4229 "in_stock": {
4230 "type": "boolean",
4231 "example": true
4232 },
4233 "operational_hours": {
4234 "type": "object",
4235 "properties": {
4236 "monday": {
4237 "type": "array",
4238 "items": {
4239 "type": "object",
4240 "properties": {
4241 "start": {
4242 "type": "string",
4243 "example": "11:00"
4244 },
4245 "end": {
4246 "type": "string",
4247 "example": "23:59"
4248 }
4249 }
4250 }
4251 },
4252 "tuesday": {
4253 "type": "array",
4254 "items": {
4255 "type": "object",
4256 "properties": {
4257 "start": {
4258 "type": "string",
4259 "example": "11:00"
4260 },
4261 "end": {
4262 "type": "string",
4263 "example": "23:59"
4264 }
4265 }
4266 }
4267 },
4268 "wednesday": {
4269 "type": "array",
4270 "items": {
4271 "type": "object",
4272 "properties": {
4273 "start": {
4274 "type": "string",
4275 "example": "11:00"
4276 },
4277 "end": {
4278 "type": "string",
4279 "example": "23:59"
4280 }
4281 }
4282 }
4283 },
4284 "thursday": {
4285 "type": "array",
4286 "items": {
4287 "type": "object",
4288 "properties": {
4289 "start": {
4290 "type": "string",
4291 "example": "11:00"
4292 },
4293 "end": {
4294 "type": "string",
4295 "example": "23:59"
4296 }
4297 }
4298 }
4299 },
4300 "friday": {
4301 "type": "array",
4302 "items": {
4303 "type": "object",
4304 "properties": {
4305 "start": {
4306 "type": "string",
4307 "example": "11:00"
4308 },
4309 "end": {
4310 "type": "string",
4311 "example": "23:59"
4312 }
4313 }
4314 }
4315 },
4316 "saturday": {
4317 "type": "array",
4318 "items": {
4319 "type": "object",
4320 "properties": {
4321 "start": {
4322 "type": "string",
4323 "example": "11:00"
4324 },
4325 "end": {
4326 "type": "string",
4327 "example": "23:59"
4328 }
4329 }
4330 }
4331 },
4332 "sunday": {
4333 "type": "array",
4334 "items": {
4335 "type": "object",
4336 "properties": {
4337 "start": {
4338 "type": "string",
4339 "example": "11:00"
4340 },
4341 "end": {
4342 "type": "string",
4343 "example": "23:59"
4344 }
4345 }
4346 }
4347 }
4348 }
4349 }
4350 }
4351 }
4352 }
4353 }
4354 }
4355 },
4356 "requestId": {
4357 "type": "string",
4358 "example": "{58B7FBD4-74BE-4D2C-9477-2E91CD697612}"
4359 },
4360 "outletId": {
4361 "type": "string",
4362 "example": "G813100998"
4363 }
4364 }
4365 }
4366 }
4367 },
4368 "required": true
4369 },
4370 "responses": {
4371 "200": {
4372 "description": "OK",
4373 "content": {
4374 "application/json": {
4375 "schema": {
4376 "type": "object",
4377 "properties": {
4378 "code": {
4379 "type": "string",
4380 "example": "200"
4381 },
4382 "message": {
4383 "type": "string",
4384 "example": "SUCCESS"
4385 },
4386 "data": {
4387 "type": "object",
4388 "properties": {
4389 "success": {
4390 "type": "boolean",
4391 "example": true
4392 },
4393 "data": {
4394 "type": "object",
4395 "properties": {
4396 "request_id": {
4397 "type": "string",
4398 "example": "{58B7FBD4-74BE-4D2C-9477-2E91CD697612}"
4399 }
4400 }
4401 }
4402 }
4403 }
4404 }
4405 },
4406 "examples": {
4407 "SUCCESS": {
4408 "value": {
4409 "code": "200",
4410 "message": "SUCCESS",
4411 "data": {
4412 "success": true,
4413 "data": {
4414 "request_id": "{58B7FBD4-74BE-4D2C-9477-2E91CD697612}"
4415 }
4416 }
4417 }
4418 },
4419 "UNPROCESSABLE_ENTITY": {
4420 "value": {
4421 "code": "422",
4422 "message": "Unprocessable Entity",
4423 "data": [
4424 {
4425 "success": false,
4426 "errors": [
4427 {
4428 "message_title": "An error occurred",
4429 "message": "{\"errors\":\"validation error\",\"validation_errors\":{\"menus[0].menu_items[0].sunday\":{\"message\":\"invalid time format: ;invalid time format: \"}}}\n"
4430 }
4431 ]
4432 }
4433 ]
4434 }
4435 },
4436 "RESOURCE_NOT_FOUND": {
4437 "value": {
4438 "code": "404",
4439 "message": "Resource Not Found",
4440 "data": [
4441 {
4442 "success": false,
4443 "errors": [
4444 {
4445 "message_title": "Requested resource not found!",
4446 "message": "Not registered as enterprise outlet!"
4447 }
4448 ]
4449 }
4450 ]
4451 }
4452 },
4453 "VALIDATION_ERROR": {
4454 "value": {
4455 "code": "400",
4456 "message": "error",
4457 "data": [
4458 "outletId is required"
4459 ]
4460 }
4461 }
4462 }
4463 }
4464 }
4465 },
4466 "401": {
4467 "$ref": "#/components/responses/UnauthorizedError"
4468 }
4469 },
4470 "security": [
4471 {
4472 "SecurityRules-Token": [],
4473 "SecurityRules-Client-IP": []
4474 }
4475 ]
4476 }
4477 },
4478 "/createAuthUser": {
4479 "post": {
4480 "summary": "Endpoint for create BO user",
4481 "tags": [
4482 "BackOffice"
4483 ],
4484 "operationId": "createAuthUser",
4485 "requestBody": {
4486 "content": {
4487 "application/json": {
4488 "schema": {
4489 "required": [
4490 "data"
4491 ],
4492 "type": "object",
4493 "properties": {
4494 "data": {
4495 "required": [
4496 "email",
4497 "loginId",
4498 "password",
4499 "type"
4500 ],
4501 "type": "object",
4502 "properties": {
4503 "password": {
4504 "type": "string",
4505 "example": "456456"
4506 },
4507 "loginId": {
4508 "type": "string",
4509 "example": "test_user1"
4510 },
4511 "type": {
4512 "type": "string",
4513 "example": "Operation"
4514 },
4515 "email": {
4516 "type": "string",
4517 "example": "test@testtest1.com"
4518 },
4519 "username": {
4520 "type": "string",
4521 "example": "test1"
4522 }
4523 }
4524 }
4525 }
4526 }
4527 }
4528 },
4529 "required": true
4530 },
4531 "responses": {
4532 "200": {
4533 "description": "",
4534 "content": {
4535 "application/json": {
4536 "schema": {
4537 "type": "object",
4538 "properties": {
4539 "result": {
4540 "type": "object",
4541 "properties": {
4542 "code": {
4543 "type": "string",
4544 "example": "200"
4545 },
4546 "data": {
4547 "type": "array",
4548 "items": {
4549 "type": "object",
4550 "properties": {}
4551 }
4552 },
4553 "message": {
4554 "type": "string",
4555 "example": "Successfully created user"
4556 }
4557 }
4558 }
4559 }
4560 },
4561 "examples": {
4562 "SUCCESS": {
4563 "value": {
4564 "result": {
4565 "code": "200",
4566 "data": [
4567 {}
4568 ],
4569 "message": "Successfully created user"
4570 }
4571 }
4572 },
4573 "VALIDATION_ERROR": {
4574 "value": {
4575 "result": {
4576 "code": "400",
4577 "message": "error",
4578 "data": [
4579 "email is required"
4580 ]
4581 }
4582 }
4583 },
4584 "USER_ALREADY_EXISTS": {
4585 "value": {
4586 "result": {
4587 "code": "400",
4588 "message": "error",
4589 "data": [
4590 "User login id is already exists."
4591 ]
4592 }
4593 }
4594 }
4595 }
4596 }
4597 }
4598 },
4599 "401": {
4600 "$ref": "#/components/responses/UnauthorizedErrorBoth"
4601 }
4602 },
4603 "security": [
4604 {
4605 "BackOffice": []
4606 }
4607 ]
4608 }
4609 },
4610 "/updateAuthUser": {
4611 "post": {
4612 "summary": "Endpoint for update BO user",
4613 "tags": [
4614 "BackOffice"
4615 ],
4616 "operationId": "updateAuthUser",
4617 "requestBody": {
4618 "content": {
4619 "application/json": {
4620 "schema": {
4621 "required": [
4622 "data"
4623 ],
4624 "type": "object",
4625 "properties": {
4626 "data": {
4627 "required": [
4628 "loginId",
4629 "type"
4630 ],
4631 "type": "object",
4632 "properties": {
4633 "password": {
4634 "type": "string",
4635 "example": "456789"
4636 },
4637 "loginId": {
4638 "type": "string",
4639 "example": "test_user1"
4640 },
4641 "username": {
4642 "type": "string",
4643 "example": "test2"
4644 },
4645 "type": {
4646 "type": "string",
4647 "example": "Management"
4648 }
4649 }
4650 }
4651 }
4652 }
4653 }
4654 },
4655 "required": true
4656 },
4657 "responses": {
4658 "200": {
4659 "description": "",
4660 "content": {
4661 "application/json": {
4662 "schema": {
4663 "type": "object",
4664 "properties": {
4665 "result": {
4666 "type": "object",
4667 "properties": {
4668 "code": {
4669 "type": "string",
4670 "example": "200"
4671 },
4672 "data": {
4673 "type": "array",
4674 "items": {
4675 "type": "object",
4676 "properties": {
4677 "_writeTime": {
4678 "type": "object",
4679 "properties": {
4680 "_nanoseconds": {
4681 "type": "number",
4682 "example": 525814000
4683 },
4684 "_seconds": {
4685 "type": "number",
4686 "example": 1566797665
4687 }
4688 }
4689 }
4690 }
4691 }
4692 },
4693 "message": {
4694 "type": "string",
4695 "example": "Successfully updated user"
4696 }
4697 }
4698 }
4699 }
4700 },
4701 "examples": {
4702 "SUCCESS": {
4703 "value": {
4704 "result": {
4705 "code": "200",
4706 "data": [
4707 {
4708 "_writeTime": {
4709 "_nanoseconds": 525814000,
4710 "_seconds": 1566797665
4711 }
4712 }
4713 ],
4714 "message": "Successfully updated user"
4715 }
4716 }
4717 },
4718 "USER_NOT_EXISTS": {
4719 "value": {
4720 "result": {
4721 "code": "400",
4722 "message": "error",
4723 "data": [
4724 "User doesn't exists."
4725 ]
4726 }
4727 }
4728 },
4729 "VALIDATION_ERROR": {
4730 "value": {
4731 "result": {
4732 "code": "400",
4733 "message": "error",
4734 "data": [
4735 "loginId is required"
4736 ]
4737 }
4738 }
4739 }
4740 }
4741 }
4742 }
4743 },
4744 "401": {
4745 "$ref": "#/components/responses/UnauthorizedErrorBoth"
4746 }
4747 },
4748 "security": [
4749 {
4750 "BackOffice": []
4751 }
4752 ]
4753 }
4754 },
4755 "/deleteAuthUser": {
4756 "post": {
4757 "summary": "Endpoint for delete BO user",
4758 "tags": [
4759 "BackOffice"
4760 ],
4761 "operationId": "deleteAuthUser",
4762 "requestBody": {
4763 "content": {
4764 "application/json": {
4765 "schema": {
4766 "required": [
4767 "data"
4768 ],
4769 "type": "object",
4770 "properties": {
4771 "data": {
4772 "required": [
4773 "loginId"
4774 ],
4775 "type": "object",
4776 "properties": {
4777 "loginId": {
4778 "type": "string",
4779 "example": "test_user1"
4780 }
4781 }
4782 }
4783 }
4784 }
4785 }
4786 },
4787 "required": true
4788 },
4789 "responses": {
4790 "200": {
4791 "description": "",
4792 "content": {
4793 "application/json": {
4794 "schema": {
4795 "type": "object",
4796 "properties": {
4797 "result": {
4798 "type": "object",
4799 "properties": {
4800 "code": {
4801 "type": "string",
4802 "example": "200"
4803 },
4804 "data": {
4805 "type": "array",
4806 "items": {
4807 "type": "string"
4808 }
4809 },
4810 "message": {
4811 "type": "string",
4812 "example": "Successfully deleted user"
4813 }
4814 }
4815 }
4816 }
4817 },
4818 "examples": {
4819 "SUCCESS": {
4820 "value": {
4821 "result": {
4822 "code": "200",
4823 "data": [],
4824 "message": "Successfully deleted user"
4825 }
4826 }
4827 }
4828 }
4829 }
4830 }
4831 },
4832 "401": {
4833 "$ref": "#/components/responses/UnauthorizedErrorBoth"
4834 }
4835 },
4836 "security": [
4837 {
4838 "BackOffice": []
4839 }
4840 ]
4841 }
4842 },
4843 "/refreshAuthUser": {
4844 "post": {
4845 "summary": "Endpoint for Refresh Authentication User(BO user)",
4846 "tags": [
4847 "BackOffice"
4848 ],
4849 "operationId": "refreshAuthUser",
4850 "requestBody": {
4851 "content": {
4852 "application/json": {
4853 "schema": {
4854 "required": [
4855 "data"
4856 ],
4857 "type": "object",
4858 "properties": {
4859 "data": {
4860 "required": [
4861 "loginId"
4862 ],
4863 "type": "object",
4864 "properties": {
4865 "loginId": {
4866 "type": "string",
4867 "example": "test_user1"
4868 }
4869 }
4870 }
4871 }
4872 }
4873 }
4874 },
4875 "required": true
4876 },
4877 "responses": {
4878 "200": {
4879 "description": "",
4880 "content": {
4881 "application/json": {
4882 "schema": {
4883 "type": "object",
4884 "properties": {
4885 "result": {
4886 "type": "object",
4887 "properties": {
4888 "code": {
4889 "type": "string",
4890 "example": "200"
4891 },
4892 "data": {
4893 "type": "array",
4894 "items": {
4895 "type": "string"
4896 }
4897 },
4898 "message": {
4899 "type": "string"
4900 }
4901 }
4902 }
4903 }
4904 },
4905 "examples": {
4906 "SUCCESS": {
4907 "value": {
4908 "result": {
4909 "code": "200",
4910 "message": "Successfully refresh user",
4911 "data": {
4912 "Type": "Admin",
4913 "UserName": "testUserBO",
4914 "UID": "sampleUID",
4915 "Email": "testbouser1@example.com",
4916 "UpdatedAt": 1553218684,
4917 "CreatedAt": 1553218684
4918 }
4919 }
4920 }
4921 },
4922 "USER_NOT_FOUND": {
4923 "value": {
4924 "result": {
4925 "code": "400",
4926 "message": "error",
4927 "data": [
4928 "User doesn't exists."
4929 ]
4930 }
4931 }
4932 },
4933 "SELF_REFRESH": {
4934 "value": {
4935 "result": {
4936 "code": "400",
4937 "message": "error",
4938 "data": [
4939 "User can refresh the data belong to himself only."
4940 ]
4941 }
4942 }
4943 },
4944 "VALIDATION_ERROR": {
4945 "value": {
4946 "result": {
4947 "code": "400",
4948 "message": "error",
4949 "data": [
4950 "loginId is required"
4951 ]
4952 }
4953 }
4954 }
4955 }
4956 }
4957 }
4958 },
4959 "401": {
4960 "$ref": "#/components/responses/UnauthorizedErrorBoth"
4961 }
4962 },
4963 "security": [
4964 {
4965 "BackOffice": []
4966 }
4967 ]
4968 }
4969 },
4970 "/postLoyaltyTransactions": {
4971 "post": {
4972 "summary": "Endpoint for get Loyalty points(Rewards) transcations",
4973 "tags": [
4974 "BackOffice"
4975 ],
4976 "operationId": "postLoyaltyTransactions",
4977 "requestBody": {
4978 "content": {
4979 "application/json": {
4980 "schema": {
4981 "required": [
4982 "data"
4983 ],
4984 "type": "object",
4985 "properties": {
4986 "data": {
4987 "required": [
4988 "activity_id",
4989 "page",
4990 "size"
4991 ],
4992 "type": "object",
4993 "properties": {
4994 "filter": {
4995 "type": "string",
4996 "example": "QR"
4997 },
4998 "user_phone_number": {
4999 "type": "number",
5000 "example": "+628211721324"
5001 },
5002 "from_date": {
5003 "type": "string",
5004 "example": "2019-07-31T18:30:00.000Z"
5005 },
5006 "to_date": {
5007 "type": "string",
5008 "example": "2019-08-17T18:29:59.000Z"
5009 },
5010 "activity_id": {
5011 "type": "number",
5012 "example": -1
5013 },
5014 "order_by": {
5015 "type": "string",
5016 "example": "activity"
5017 },
5018 "order": {
5019 "type": "string",
5020 "example": "asc"
5021 },
5022 "page": {
5023 "type": "number",
5024 "example": 1
5025 },
5026 "size": {
5027 "type": "number",
5028 "example": 20
5029 }
5030 }
5031 }
5032 }
5033 }
5034 }
5035 },
5036 "required": true
5037 },
5038 "responses": {
5039 "200": {
5040 "description": "",
5041 "content": {
5042 "application/json": {
5043 "schema": {
5044 "type": "object",
5045 "properties": {
5046 "result": {
5047 "type": "object",
5048 "properties": {
5049 "code": {
5050 "type": "string",
5051 "example": "200"
5052 },
5053 "message": {
5054 "type": "string",
5055 "example": "SUCCESS"
5056 },
5057 "data": {
5058 "type": "object",
5059 "properties": {
5060 "total_rows": {
5061 "type": "number",
5062 "example": 1188
5063 },
5064 "transactions": {
5065 "type": "array",
5066 "items": {
5067 "type": "object",
5068 "properties": {
5069 "date": {
5070 "type": "string",
5071 "example": "2019-03-26T15:10:57+07:00"
5072 },
5073 "activity": {
5074 "type": "string",
5075 "example": "HOMEDELIVERY"
5076 },
5077 "voucher_name": {
5078 "type": "string",
5079 "example": ""
5080 },
5081 "phone_number": {
5082 "type": "string",
5083 "example": "+628211721324"
5084 },
5085 "id": {
5086 "type": "number",
5087 "example": 835
5088 },
5089 "points": {
5090 "type": "string",
5091 "example": "1"
5092 }
5093 }
5094 }
5095 }
5096 }
5097 }
5098 }
5099 }
5100 }
5101 },
5102 "examples": {
5103 "SUCCESS": {
5104 "value": {
5105 "result": {
5106 "code": "200",
5107 "message": "SUCCESS",
5108 "data": {
5109 "total_rows": 1188,
5110 "transactions": [
5111 {
5112 "date": "2019-03-26T15:10:57+07:00",
5113 "activity": "HOMEDELIVERY",
5114 "voucher_name": "",
5115 "phone_number": "+628211721324",
5116 "id": 835,
5117 "points": "1"
5118 }
5119 ]
5120 }
5121 }
5122 }
5123 },
5124 "VALIDATION_ERROR": {
5125 "value": {
5126 "result": {
5127 "code": "400",
5128 "message": "error",
5129 "data": [
5130 "size is required"
5131 ]
5132 }
5133 }
5134 }
5135 }
5136 }
5137 }
5138 },
5139 "401": {
5140 "$ref": "#/components/responses/UnauthorizedErrorBoth"
5141 }
5142 },
5143 "security": [
5144 {
5145 "BackOffice": []
5146 }
5147 ]
5148 }
5149 },
5150 "/getMerchantSetting": {
5151 "post": {
5152 "summary": "Endpoint for get merchant settings",
5153 "tags": [
5154 "BackOffice"
5155 ],
5156 "operationId": "getMerchantSetting",
5157 "requestBody": {
5158 "content": {
5159 "application/json": {
5160 "schema": {
5161 "type": "object",
5162 "properties": {
5163 "data": {
5164 "type": "string",
5165 "example": ""
5166 }
5167 }
5168 }
5169 }
5170 },
5171 "required": true
5172 },
5173 "responses": {
5174 "200": {
5175 "description": "",
5176 "content": {
5177 "application/json": {
5178 "schema": {
5179 "type": "object",
5180 "properties": {
5181 "result": {
5182 "type": "object",
5183 "properties": {
5184 "code": {
5185 "type": "string",
5186 "example": "200"
5187 },
5188 "data": {
5189 "type": "object",
5190 "properties": {
5191 "usage_limit": {
5192 "type": "number",
5193 "example": -1
5194 },
5195 "validity_days": {
5196 "type": "number",
5197 "example": 30
5198 },
5199 "id": {
5200 "type": "string",
5201 "example": "216620000000599913807"
5202 },
5203 "referrer_points": {
5204 "type": "number",
5205 "example": 50
5206 },
5207 "referred_points": {
5208 "type": "number",
5209 "example": 10
5210 }
5211 }
5212 },
5213 "message": {
5214 "type": "string",
5215 "example": "SUCCESS"
5216 }
5217 }
5218 }
5219 }
5220 }
5221 }
5222 }
5223 },
5224 "401": {
5225 "$ref": "#/components/responses/UnauthorizedErrorBoth"
5226 }
5227 },
5228 "security": [
5229 {
5230 "BackOffice": []
5231 }
5232 ]
5233 }
5234 },
5235 "/updateMerchantSetting": {
5236 "post": {
5237 "summary": "Endpoint for update merchant settings",
5238 "tags": [
5239 "BackOffice"
5240 ],
5241 "operationId": "updateMerchantSetting",
5242 "requestBody": {
5243 "content": {
5244 "application/json": {
5245 "schema": {
5246 "required": [
5247 "data"
5248 ],
5249 "type": "object",
5250 "properties": {
5251 "data": {
5252 "required": [
5253 "referrer_points"
5254 ],
5255 "type": "object",
5256 "properties": {
5257 "referrer_points": {
5258 "type": "number",
5259 "example": 50
5260 }
5261 }
5262 }
5263 }
5264 }
5265 }
5266 },
5267 "required": true
5268 },
5269 "responses": {
5270 "200": {
5271 "description": "",
5272 "content": {
5273 "application/json": {
5274 "schema": {
5275 "type": "object",
5276 "properties": {
5277 "result": {
5278 "type": "object",
5279 "properties": {
5280 "code": {
5281 "type": "string",
5282 "example": "200"
5283 },
5284 "message": {
5285 "type": "string",
5286 "example": "SUCCESS"
5287 },
5288 "data": {
5289 "type": "array",
5290 "items": {
5291 "type": "string"
5292 }
5293 }
5294 }
5295 }
5296 }
5297 },
5298 "examples": {
5299 "SUCCESS": {
5300 "value": {
5301 "result": {
5302 "code": "200",
5303 "message": "SUCCESS",
5304 "data": []
5305 }
5306 }
5307 },
5308 "VALIDATION_ERROR": {
5309 "value": {
5310 "result": {
5311 "code": "400",
5312 "message": "error",
5313 "data": [
5314 "referrer_points is required"
5315 ]
5316 }
5317 }
5318 }
5319 }
5320 }
5321 }
5322 },
5323 "401": {
5324 "$ref": "#/components/responses/UnauthorizedErrorBoth"
5325 }
5326 },
5327 "security": [
5328 {
5329 "BackOffice": []
5330 }
5331 ]
5332 }
5333 },
5334 "/retryAPI": {
5335 "post": {
5336 "summary": "Endpoint for retry failed api call",
5337 "tags": [
5338 "BackOffice"
5339 ],
5340 "operationId": "retryAPI",
5341 "requestBody": {
5342 "content": {
5343 "application/json": {
5344 "schema": {
5345 "required": [
5346 "data"
5347 ],
5348 "type": "object",
5349 "properties": {
5350 "data": {
5351 "required": [
5352 "callType",
5353 "logType",
5354 "requestParams"
5355 ],
5356 "type": "object",
5357 "properties": {
5358 "logType": {
5359 "type": "string",
5360 "example": "Loyalty Engine"
5361 },
5362 "requestParams": {
5363 "required": [
5364 "data",
5365 "req",
5366 "userToken"
5367 ],
5368 "type": "object",
5369 "properties": {
5370 "userToken": {
5371 "type": "string",
5372 "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ3MDQ4NjU5OTEsInVzZXJEYXRhIjp7IklEIjo0NjR9fQ.foksPF3lzh_bOG8iTVeGmaCK5Qn0XpcIqqcFsEWslXU"
5373 },
5374 "data": {
5375 "type": "object",
5376 "properties": {
5377 "voucher_id": {
5378 "type": "number",
5379 "example": 1
5380 }
5381 }
5382 },
5383 "req": {
5384 "type": "object",
5385 "properties": {
5386 "request_id": {
5387 "type": "string",
5388 "example": "{C67F45EC-425C-44E3-BFF4-BC63AB81F64C}"
5389 }
5390 }
5391 }
5392 }
5393 },
5394 "callType": {
5395 "type": "string",
5396 "example": "callLEApiGetVoucher"
5397 }
5398 }
5399 }
5400 }
5401 }
5402 }
5403 },
5404 "required": true
5405 },
5406 "responses": {
5407 "200": {
5408 "description": "",
5409 "content": {
5410 "application/json": {
5411 "schema": {
5412 "type": "object",
5413 "properties": {
5414 "result": {
5415 "type": "object",
5416 "properties": {
5417 "code": {
5418 "type": "string",
5419 "example": "200"
5420 },
5421 "data": {
5422 "type": "object",
5423 "properties": {
5424 "image": {
5425 "type": "string",
5426 "example": "https://3gwtod2hg0th1ikege3y0nok-wpengine.netdna-ssl.com/wp-content/uploads/2017/05/KFC-Buckets-620x349.jpg"
5427 },
5428 "discount_price": {
5429 "type": "number",
5430 "example": 0
5431 },
5432 "voucher_price": {
5433 "type": "number",
5434 "example": 10
5435 },
5436 "biz_type": {
5437 "type": "string",
5438 "example": "type"
5439 },
5440 "description": {
5441 "type": "string",
5442 "example": "Buy 1 get 1 free"
5443 },
5444 "merchant_id": {
5445 "type": "string",
5446 "example": "kfc"
5447 },
5448 "env_info": {
5449 "type": "string",
5450 "example": "info"
5451 },
5452 "extend_info": {
5453 "type": "string",
5454 "example": "info"
5455 },
5456 "version": {
5457 "type": "string",
5458 "example": "1"
5459 },
5460 "client_id": {
5461 "type": "string",
5462 "example": "client"
5463 },
5464 "platform": {
5465 "type": "string",
5466 "example": "platform"
5467 },
5468 "access_token": {
5469 "type": "string",
5470 "example": "access"
5471 },
5472 "function": {
5473 "type": "string",
5474 "example": "function"
5475 },
5476 "activity_id": {
5477 "type": "string",
5478 "example": "activity"
5479 },
5480 "name": {
5481 "type": "string",
5482 "example": "Buy 1 get 1 free"
5483 },
5484 "reserve": {
5485 "type": "string",
5486 "example": "reserve"
5487 },
5488 "client_secret": {
5489 "type": "string",
5490 "example": "client"
5491 },
5492 "id": {
5493 "type": "number",
5494 "example": 2
5495 },
5496 "biz_extend_properties": {
5497 "type": "string",
5498 "example": "property"
5499 }
5500 }
5501 },
5502 "message": {
5503 "type": "string",
5504 "example": "SUCCESS"
5505 }
5506 }
5507 }
5508 }
5509 }
5510 }
5511 }
5512 },
5513 "401": {
5514 "$ref": "#/components/responses/UnauthorizedErrorBoth"
5515 }
5516 },
5517 "security": [
5518 {
5519 "BackOffice": []
5520 }
5521 ]
5522 }
5523 },
5524 "/getUserCounts": {
5525 "post": {
5526 "summary": "Endpoint for get user counts",
5527 "tags": [
5528 "BackOffice"
5529 ],
5530 "operationId": "getUserCounts",
5531 "requestBody": {
5532 "content": {
5533 "application/json": {
5534 "schema": {
5535 "type": "object",
5536 "properties": {
5537 "data": {
5538 "type": "object",
5539 "properties": {
5540 "isActive": {
5541 "type": "boolean",
5542 "example": true
5543 },
5544 "firstLogin": {
5545 "type": "string",
5546 "example": "Android"
5547 },
5548 "startRegistrationDate": {
5549 "type": "number",
5550 "example": 1554281849
5551 },
5552 "endRegistrationDate": {
5553 "type": "number",
5554 "example": 1554281850
5555 }
5556 }
5557 }
5558 }
5559 }
5560 }
5561 },
5562 "required": true
5563 },
5564 "responses": {
5565 "200": {
5566 "description": "",
5567 "content": {
5568 "application/json": {
5569 "schema": {
5570 "type": "object",
5571 "properties": {
5572 "result": {
5573 "type": "object",
5574 "properties": {
5575 "code": {
5576 "type": "string",
5577 "example": "200"
5578 },
5579 "message": {
5580 "type": "string",
5581 "example": "SUCCESS"
5582 },
5583 "data": {
5584 "type": "object",
5585 "properties": {
5586 "androidCounts": {
5587 "type": "number",
5588 "example": 121
5589 },
5590 "iOSCounts": {
5591 "type": "number",
5592 "example": 136
5593 },
5594 "totalCounts": {
5595 "type": "number",
5596 "example": 257
5597 }
5598 }
5599 }
5600 }
5601 }
5602 }
5603 },
5604 "examples": {
5605 "SUCCESS": {
5606 "value": {
5607 "result": {
5608 "code": "200",
5609 "message": "SUCCESS",
5610 "data": {
5611 "androidCounts": 121,
5612 "iOSCounts": 136,
5613 "totalCounts": 257
5614 }
5615 }
5616 }
5617 },
5618 "VALIDATION_ERROR": {
5619 "value": {
5620 "result": {
5621 "code": "400",
5622 "message": "error",
5623 "data": [
5624 "firstLogin must be one of [Android, IOS]"
5625 ]
5626 }
5627 }
5628 }
5629 }
5630 }
5631 }
5632 },
5633 "401": {
5634 "$ref": "#/components/responses/UnauthorizedErrorBoth"
5635 }
5636 },
5637 "security": [
5638 {
5639 "BackOffice": []
5640 }
5641 ]
5642 }
5643 },
5644 "/exportUsers": {
5645 "post": {
5646 "summary": "Endpoint for export users",
5647 "tags": [
5648 "BackOffice"
5649 ],
5650 "operationId": "exportUsers",
5651 "requestBody": {
5652 "content": {
5653 "application/json": {
5654 "schema": {
5655 "type": "object",
5656 "properties": {
5657 "data": {
5658 "type": "object",
5659 "properties": {
5660 "isActive": {
5661 "type": "boolean",
5662 "example": true
5663 },
5664 "firstLogin": {
5665 "type": "string",
5666 "example": "Android"
5667 },
5668 "startRegistrationDate": {
5669 "type": "number",
5670 "example": 1554281849
5671 },
5672 "endRegistrationDate": {
5673 "type": "number",
5674 "example": 1554281850
5675 }
5676 }
5677 }
5678 }
5679 }
5680 }
5681 },
5682 "required": true
5683 },
5684 "responses": {
5685 "200": {
5686 "description": "",
5687 "content": {
5688 "application/json": {
5689 "schema": {
5690 "type": "object",
5691 "properties": {
5692 "result": {
5693 "type": "object",
5694 "properties": {
5695 "code": {
5696 "type": "string",
5697 "example": "200"
5698 },
5699 "message": {
5700 "type": "string",
5701 "example": "Successfully exported users CSV."
5702 },
5703 "data": {
5704 "type": "object",
5705 "properties": {
5706 "csvUrl": {
5707 "type": "string",
5708 "example": "https://storage.googleapis.com/kfcjv-development.appspot.com/UserDataFiles/Users_2019-11-01-18-44-00.csv?GoogleAccessId=firebase-adminsdk-zoj18%40kfcjv-development.iam.gserviceaccount.com&Expires=16730323200&Signature=WCO56NLKjjt0EW%2B%2BX8I0xg%2FH%2BAFUPDNrvh%2BHsJjMXO7FYfllbZjOEX6eMr78W0cVmNoxOTG6qFS%2BSkGHaKmNSoIF4PUOqBB8qCG4KLpw9g7rG6CvYsEh%2BhMdU3qYd64YKfxSQYG55uzY6%2B187hAPw73Ii8XAOS5ldmY0j%2BTCNiqduUAN8Bxol2V5CaMfLx8V9x5YQvXfwATwSkjJdIjlHXFIz0agOKG7maLZrnhcI8PLcFx4EO7FtqrEptY1HO5eTWQBjd%2FfopBHH5sFkC6gyxIvHP9rc0Upb2gSHMt4ey7yZwJdWnHgUDsknQMS9IA%2F%2BVL3H6ib7ysAuvfkZQ5cOQ%3D%3D"
5709 }
5710 }
5711 }
5712 }
5713 }
5714 }
5715 },
5716 "examples": {
5717 "SUCCESS": {
5718 "value": {
5719 "result": {
5720 "code": "200",
5721 "message": "Successfully exported users CSV.",
5722 "data": {
5723 "csvUrl": "https://storage.googleapis.com/kfcjv-development.appspot.com/UserDataFiles/Users_2019-11-01-18-44-00.csv?GoogleAccessId=firebase-adminsdk-zoj18%40kfcjv-development.iam.gserviceaccount.com&Expires=16730323200&Signature=WCO56NLKjjt0EW%2B%2BX8I0xg%2FH%2BAFUPDNrvh%2BHsJjMXO7FYfllbZjOEX6eMr78W0cVmNoxOTG6qFS%2BSkGHaKmNSoIF4PUOqBB8qCG4KLpw9g7rG6CvYsEh%2BhMdU3qYd64YKfxSQYG55uzY6%2B187hAPw73Ii8XAOS5ldmY0j%2BTCNiqduUAN8Bxol2V5CaMfLx8V9x5YQvXfwATwSkjJdIjlHXFIz0agOKG7maLZrnhcI8PLcFx4EO7FtqrEptY1HO5eTWQBjd%2FfopBHH5sFkC6gyxIvHP9rc0Upb2gSHMt4ey7yZwJdWnHgUDsknQMS9IA%2F%2BVL3H6ib7ysAuvfkZQ5cOQ%3D%3D"
5724 }
5725 }
5726 }
5727 },
5728 "VALIDATION_ERROR": {
5729 "value": {
5730 "result": {
5731 "code": "400",
5732 "message": "error",
5733 "data": [
5734 "firstLogin must be one of [Android, IOS]"
5735 ]
5736 }
5737 }
5738 }
5739 }
5740 }
5741 }
5742 },
5743 "401": {
5744 "$ref": "#/components/responses/UnauthorizedErrorBoth"
5745 }
5746 },
5747 "security": [
5748 {
5749 "BackOffice": []
5750 }
5751 ]
5752 }
5753 },
5754 "/getDashboardReport": {
5755 "post": {
5756 "summary": "Endpoint for get dashboard reports.",
5757 "tags": [
5758 "BackOffice"
5759 ],
5760 "operationId": "getDashboardReport",
5761 "requestBody": {
5762 "content": {
5763 "application/json": {
5764 "schema": {
5765 "type": "object",
5766 "properties": {
5767 "data": {
5768 "type": "object",
5769 "properties": {
5770 "startDate": {
5771 "type": "number",
5772 "example": 1546646400
5773 },
5774 "endDate": {
5775 "type": "number",
5776 "example": 1573923600
5777 }
5778 }
5779 }
5780 }
5781 }
5782 }
5783 },
5784 "required": true
5785 },
5786 "responses": {
5787 "200": {
5788 "description": "",
5789 "content": {
5790 "application/json": {
5791 "schema": {
5792 "type": "object",
5793 "properties": {
5794 "result": {
5795 "type": "object",
5796 "properties": {
5797 "code": {
5798 "type": "string",
5799 "example": "200"
5800 },
5801 "message": {
5802 "type": "string",
5803 "example": "SUCCESS"
5804 },
5805 "data": {
5806 "type": "object",
5807 "properties": {
5808 "overview": {
5809 "type": "object",
5810 "properties": {
5811 "type": {
5812 "type": "string"
5813 },
5814 "date": {
5815 "type": "object",
5816 "properties": {
5817 "online": {
5818 "type": "number"
5819 },
5820 "offline": {
5821 "type": "number"
5822 },
5823 "total": {
5824 "type": "number"
5825 },
5826 "unique": {
5827 "type": "number"
5828 }
5829 }
5830 }
5831 }
5832 },
5833 "total": {
5834 "type": "object",
5835 "properties": {
5836 "online": {
5837 "type": "number"
5838 },
5839 "offline": {
5840 "type": "number"
5841 },
5842 "total": {
5843 "type": "number"
5844 },
5845 "unique": {
5846 "type": "number"
5847 }
5848 }
5849 },
5850 "payment_method": {
5851 "type": "object",
5852 "properties": {
5853 "offline": {
5854 "type": "object",
5855 "properties": {
5856 "dana": {
5857 "type": "number"
5858 },
5859 "other": {
5860 "type": "number"
5861 }
5862 }
5863 },
5864 "online": {
5865 "type": "object",
5866 "properties": {
5867 "dana": {
5868 "type": "number"
5869 },
5870 "cash": {
5871 "type": "number"
5872 }
5873 }
5874 }
5875 }
5876 },
5877 "order_statuses": {
5878 "type": "object",
5879 "properties": {
5880 "HMD": {
5881 "type": "object",
5882 "properties": {
5883 "Init": {
5884 "type": "number"
5885 },
5886 "Confirmed": {
5887 "type": "number"
5888 },
5889 "Prepared": {
5890 "type": "number"
5891 },
5892 "OnDelivery": {
5893 "type": "number"
5894 },
5895 "Delivered": {
5896 "type": "number"
5897 },
5898 "Cancelled": {
5899 "type": "number"
5900 },
5901 "Bad": {
5902 "type": "number"
5903 },
5904 "Completed": {
5905 "type": "number"
5906 },
5907 "Expired": {
5908 "type": "number"
5909 },
5910 "FailCreateOrde": {
5911 "type": "number"
5912 }
5913 }
5914 },
5915 "PNP": {
5916 "type": "object",
5917 "properties": {
5918 "Init": {
5919 "type": "number"
5920 },
5921 "Prepared": {
5922 "type": "number"
5923 },
5924 "Completed": {
5925 "type": "number"
5926 },
5927 "Cancelled": {
5928 "type": "number"
5929 },
5930 "Bad": {
5931 "type": "number"
5932 },
5933 "Expired": {
5934 "type": "number"
5935 },
5936 "FailCreateOrder": {
5937 "type": "number"
5938 }
5939 }
5940 }
5941 }
5942 },
5943 "users": {
5944 "properties": {
5945 "type": {
5946 "type": "string"
5947 },
5948 "15466464001548954000": {
5949 "type": "number"
5950 }
5951 }
5952 }
5953 }
5954 }
5955 }
5956 }
5957 }
5958 },
5959 "examples": {
5960 "SUCCESS": {
5961 "value": {
5962 "result": {
5963 "code": "200",
5964 "message": "SUCCESS",
5965 "data": {
5966 "overview": {
5967 "type": "monthly",
5968 "1546646400_1548953999": {
5969 "online": 0,
5970 "offline": 0,
5971 "total": 0,
5972 "unique": 0
5973 },
5974 "1548954000_1551373199": {
5975 "online": 12,
5976 "offline": 0,
5977 "total": 12,
5978 "unique": 9
5979 },
5980 "1551373200_1554051599": {
5981 "online": 50,
5982 "offline": 0,
5983 "total": 50,
5984 "unique": 10
5985 },
5986 "1554051600_1556643599": {
5987 "online": 0,
5988 "offline": 0,
5989 "total": 0,
5990 "unique": 0
5991 },
5992 "1556643600_1559321999": {
5993 "online": 0,
5994 "offline": 0,
5995 "total": 0,
5996 "unique": 0
5997 },
5998 "1559322000_1561913999": {
5999 "online": 106,
6000 "offline": 0,
6001 "total": 106,
6002 "unique": 44
6003 },
6004 "1561914000_1564592399": {
6005 "online": 135,
6006 "offline": 25,
6007 "total": 160,
6008 "unique": 60
6009 },
6010 "1564592400_1567270799": {
6011 "online": 8,
6012 "offline": 0,
6013 "total": 8,
6014 "unique": 7
6015 },
6016 "1567270800_1569862799": {
6017 "online": 3,
6018 "offline": 0,
6019 "total": 3,
6020 "unique": 1
6021 },
6022 "1569862800_1572541199": {
6023 "online": 1,
6024 "offline": 0,
6025 "total": 1,
6026 "unique": 1
6027 },
6028 "1572541200_1573923600": {
6029 "online": 1,
6030 "offline": 0,
6031 "total": 1,
6032 "unique": 1
6033 }
6034 },
6035 "total": {
6036 "online": 316,
6037 "offline": 25,
6038 "total": 341,
6039 "unique": 133
6040 },
6041 "payment_method": {
6042 "offline": {
6043 "dana": 13,
6044 "other": 17
6045 },
6046 "online": {
6047 "dana": 9,
6048 "cash": 10
6049 }
6050 },
6051 "order_statuses": {
6052 "HMD": {
6053 "Init": 21,
6054 "Confirmed": 0,
6055 "Prepared": 7,
6056 "OnDelivery": 0,
6057 "Delivered": 0,
6058 "Cancelled": 28,
6059 "Bad": 1,
6060 "Completed": 14,
6061 "Expired": 61,
6062 "FailCreateOrder": 42
6063 },
6064 "PNP": {
6065 "Init": 39,
6066 "Prepared": 17,
6067 "Completed": 15,
6068 "Cancelled": 31,
6069 "Bad": 17,
6070 "Expired": 29,
6071 "FailCreateOrder": 21
6072 }
6073 },
6074 "users": {
6075 "type": "monthly,",
6076 "1546646400_1548954000": 0,
6077 "1548954000_1551372000": 0,
6078 "1551373200_1554051000": 10,
6079 "1554051600_1556644000": 79,
6080 "1556643600_1559323000": 40,
6081 "1559322000_1561913000": 11,
6082 "1561914000_1564592000": 70,
6083 "1564592400_1567270000": 24,
6084 "1567270800_1569864000": 16,
6085 "1569862800_1572540000": 6,
6086 "1572541200_1573923000": 7
6087 }
6088 }
6089 }
6090 }
6091 },
6092 "VALIDATION_ERROR": {
6093 "value": {
6094 "result": {
6095 "code": "400",
6096 "message": "error",
6097 "data": [
6098 "startDate must be a number"
6099 ]
6100 }
6101 }
6102 }
6103 }
6104 }
6105 }
6106 },
6107 "401": {
6108 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6109 }
6110 },
6111 "security": [
6112 {
6113 "BackOffice": []
6114 }
6115 ]
6116 }
6117 },
6118 "/backoffice": {
6119 "post": {
6120 "summary": "Backoffice Proxy for MTH",
6121 "tags": [
6122 "BackOffice"
6123 ],
6124 "operationId": "backoffice",
6125 "requestBody": {
6126 "content": {
6127 "application/json": {
6128 "schema": {
6129 "required": [
6130 "data"
6131 ],
6132 "type": "object",
6133 "properties": {
6134 "data": {
6135 "type": "object",
6136 "required": [
6137 "path",
6138 "method",
6139 "payload"
6140 ],
6141 "properties": {
6142 "path": {
6143 "type": "string",
6144 "example": "menuGroup"
6145 },
6146 "method": {
6147 "type": "string",
6148 "example": "GET"
6149 },
6150 "options": {
6151 "type": "object"
6152 },
6153 "payload": {
6154 "type": "object",
6155 "properties": {
6156 "page": {
6157 "type": "number",
6158 "example": 1
6159 },
6160 "size": {
6161 "type": "number",
6162 "example": 20
6163 }
6164 }
6165 }
6166 }
6167 }
6168 }
6169 }
6170 }
6171 },
6172 "required": true
6173 },
6174 "responses": {
6175 "200": {
6176 "description": "",
6177 "content": {
6178 "application/json": {
6179 "schema": {
6180 "type": "object",
6181 "properties": {
6182 "result": {
6183 "type": "object",
6184 "properties": {
6185 "code": {
6186 "type": "string",
6187 "example": "200"
6188 },
6189 "message": {
6190 "type": "string",
6191 "example": "SUCCESS"
6192 },
6193 "data": {
6194 "type": "object",
6195 "properties": {
6196 "headers": {
6197 "type": "object"
6198 },
6199 "body": {
6200 "type": "object"
6201 }
6202 }
6203 }
6204 }
6205 }
6206 }
6207 },
6208 "examples": {
6209 "SUCCESS": {
6210 "value": {
6211 "result": {
6212 "code": "200",
6213 "message": "SUCCESS",
6214 "data": {
6215 "headers": {
6216 "content-type": "application/json; charset=utf-8",
6217 "data-length": "7",
6218 "date": "Tue, 31 Dec 2019 05:51:29 GMT",
6219 "content-length": "1119",
6220 "connection": "close"
6221 },
6222 "body": [
6223 {
6224 "id": 42,
6225 "createdAt": "0001-01-01T00:00:00Z",
6226 "updatedAt": "2019-08-29T14:45:38+07:00",
6227 "deletedAt": null,
6228 "outletCode": "0208",
6229 "menuGroupCode": "G42",
6230 "sequence": 1
6231 }
6232 ]
6233 }
6234 }
6235 }
6236 },
6237 "NOT_FOUND": {
6238 "value": {
6239 "result": {
6240 "code": "200",
6241 "message": "SUCCESS",
6242 "data": "404 page not found"
6243 }
6244 }
6245 },
6246 "MTH_DOWN": {
6247 "value": {
6248 "result": {
6249 "code": "503",
6250 "message": "Failed to contact master data server",
6251 "data": []
6252 }
6253 }
6254 }
6255 }
6256 }
6257 }
6258 },
6259 "401": {
6260 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6261 }
6262 },
6263 "security": [
6264 {
6265 "BackOffice": []
6266 }
6267 ]
6268 }
6269 },
6270 "/loyaltyEngine": {
6271 "post": {
6272 "summary": "Backoffice Proxy for LE",
6273 "tags": [
6274 "BackOffice"
6275 ],
6276 "operationId": "loyaltyEngine",
6277 "requestBody": {
6278 "content": {
6279 "application/json": {
6280 "schema": {
6281 "required": [
6282 "data"
6283 ],
6284 "type": "object",
6285 "properties": {
6286 "data": {
6287 "type": "object",
6288 "required": [
6289 "path",
6290 "method",
6291 "payload"
6292 ],
6293 "properties": {
6294 "path": {
6295 "type": "string",
6296 "example": "vouchers"
6297 },
6298 "method": {
6299 "type": "string",
6300 "example": "GET"
6301 },
6302 "payload": {
6303 "type": "object",
6304 "properties": {
6305 "request_id": {
6306 "type": "string",
6307 "example": "{964226F2-3BF0-4E79-8BDF-15C5B348AA1D}"
6308 }
6309 }
6310 },
6311 "options": {
6312 "type": "object"
6313 }
6314 }
6315 }
6316 }
6317 }
6318 }
6319 },
6320 "required": true
6321 },
6322 "responses": {
6323 "200": {
6324 "description": "",
6325 "content": {
6326 "application/json": {
6327 "schema": {
6328 "type": "object",
6329 "properties": {
6330 "result": {
6331 "type": "object",
6332 "properties": {
6333 "code": {
6334 "type": "string",
6335 "example": "200"
6336 },
6337 "message": {
6338 "type": "string",
6339 "example": "SUCCESS"
6340 },
6341 "data": {
6342 "type": "object",
6343 "properties": {
6344 "headers": {
6345 "type": "object"
6346 },
6347 "body": {
6348 "type": "object"
6349 }
6350 }
6351 }
6352 }
6353 }
6354 }
6355 },
6356 "examples": {
6357 "SUCCESS": {
6358 "value": {
6359 "result": {
6360 "code": "200",
6361 "message": "SUCCESS",
6362 "data": {
6363 "headers": {
6364 "server": "nginx/1.12.1",
6365 "date": "Mon, 30 Dec 2019 10:50:52 GMT",
6366 "content-type": "application/json",
6367 "content-length": "1672",
6368 "connection": "close",
6369 "access-control-allow-credentials": "true",
6370 "access-control-allow-headers": "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, X-Max",
6371 "access-control-allow-methods": "POST, GET, PUT, DELETE, UPDATE",
6372 "access-control-allow-origin": "*",
6373 "access-control-max-age": "86400"
6374 },
6375 "body": {
6376 "payload": [
6377 {
6378 "id": 3,
6379 "merchant_id": 1,
6380 "description": "Get discount of Rp10.000 on buying this! Buy now!",
6381 "name": "KFC Voucher Rp100.000",
6382 "image": "https://firebasestorage.googleapis.com/v0/b/kfcjv-staging.appspot.com/o/Vouchers%2FVoucherImage.png?alt=media&token=7386c1e4-ab09-4bf1-a353-377d02e94fa3",
6383 "voucher_price": 100,
6384 "discount_price": 0
6385 }
6386 ],
6387 "success": true
6388 }
6389 }
6390 }
6391 }
6392 },
6393 "BAD_ERROR": {
6394 "value": {
6395 "result": {
6396 "code": "400",
6397 "message": "Bad request",
6398 "data": []
6399 }
6400 }
6401 },
6402 "LE_DOWN": {
6403 "value": {
6404 "result": {
6405 "code": "503",
6406 "message": "Failed to contact loyalty engine server",
6407 "data": []
6408 }
6409 }
6410 }
6411 }
6412 }
6413 }
6414 },
6415 "401": {
6416 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6417 }
6418 },
6419 "security": [
6420 {
6421 "BackOffice": []
6422 }
6423 ]
6424 }
6425 },
6426 "/sortAlgoliaIndex": {
6427 "post": {
6428 "summary": "Set Algolia index sorting settings.",
6429 "tags": [
6430 "BackOffice"
6431 ],
6432 "operationId": "sortAlgoliaIndex",
6433 "requestBody": {
6434 "content": {
6435 "application/json": {
6436 "schema": {
6437 "required": [
6438 "data"
6439 ],
6440 "type": "object",
6441 "properties": {
6442 "data": {
6443 "type": "object",
6444 "required": [
6445 "algoliaIndex",
6446 "orderBy",
6447 "order"
6448 ],
6449 "properties": {
6450 "algoliaIndex": {
6451 "type": "string",
6452 "example": "Promotion"
6453 },
6454 "orderBy": {
6455 "type": "string",
6456 "example": "CreatedAt"
6457 },
6458 "order": {
6459 "type": "string",
6460 "example": "desc"
6461 }
6462 }
6463 }
6464 }
6465 }
6466 }
6467 },
6468 "required": true
6469 },
6470 "responses": {
6471 "200": {
6472 "description": "",
6473 "content": {
6474 "application/json": {
6475 "schema": {
6476 "type": "object",
6477 "properties": {
6478 "result": {
6479 "type": "object",
6480 "properties": {
6481 "code": {
6482 "type": "string",
6483 "example": "200"
6484 },
6485 "message": {
6486 "type": "string",
6487 "example": "SUCCESS"
6488 },
6489 "data": {
6490 "type": "object",
6491 "properties": {
6492 "updatedAt": {
6493 "type": "string"
6494 },
6495 "taskID": {
6496 "type": "number"
6497 }
6498 }
6499 }
6500 }
6501 }
6502 }
6503 },
6504 "examples": {
6505 "SUCCESS": {
6506 "value": {
6507 "result": {
6508 "code": "200",
6509 "message": "SUCCESS",
6510 "data": {
6511 "updatedAt": "2020-01-10T10:02:10.749Z",
6512 "taskID": 49070526971
6513 }
6514 }
6515 }
6516 },
6517 "BAD_REQUEST": {
6518 "value": {
6519 "result": {
6520 "code": "400",
6521 "message": "error",
6522 "data": [
6523 "orderBy is required"
6524 ]
6525 }
6526 }
6527 },
6528 "ISE": {
6529 "value": {
6530 "result": {
6531 "code": "500",
6532 "message": "error",
6533 "data": [
6534 "Invalid Application-ID or API key"
6535 ]
6536 }
6537 }
6538 }
6539 }
6540 }
6541 }
6542 },
6543 "401": {
6544 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6545 }
6546 },
6547 "security": [
6548 {
6549 "BackOffice": []
6550 }
6551 ]
6552 }
6553 },
6554 "/updateVoucherTerms": {
6555 "post": {
6556 "summary": "Update Voucher terms and conditions",
6557 "tags": [
6558 "BackOffice"
6559 ],
6560 "operationId": "updateVoucherTerms",
6561 "requestBody": {
6562 "content": {
6563 "application/json": {
6564 "schema": {
6565 "required": [
6566 "data"
6567 ],
6568 "type": "object",
6569 "properties": {
6570 "data": {
6571 "type": "object",
6572 "properties": {
6573 "en": {
6574 "type": "object",
6575 "required": [
6576 "filename",
6577 "content"
6578 ],
6579 "properties": {
6580 "filename": {
6581 "type": "string",
6582 "example": "voucher_v1.txt"
6583 },
6584 "content": {
6585 "type": "string",
6586 "example": "Terms and Conditions Content"
6587 }
6588 }
6589 },
6590 "id": {
6591 "type": "object",
6592 "required": [
6593 "filename",
6594 "content"
6595 ],
6596 "properties": {
6597 "filename": {
6598 "type": "string",
6599 "example": "voucher_v1.txt"
6600 },
6601 "content": {
6602 "type": "string",
6603 "example": "Terms and Conditions Content"
6604 }
6605 }
6606 }
6607 }
6608 }
6609 }
6610 }
6611 }
6612 },
6613 "required": true
6614 },
6615 "responses": {
6616 "200": {
6617 "description": "",
6618 "content": {
6619 "application/json": {
6620 "schema": {
6621 "type": "object",
6622 "properties": {
6623 "result": {
6624 "type": "object",
6625 "properties": {
6626 "code": {
6627 "type": "string",
6628 "example": "200"
6629 },
6630 "message": {
6631 "type": "string",
6632 "example": "SUCCESS"
6633 },
6634 "data": {
6635 "type": "array",
6636 "items": {
6637 "type": "string"
6638 }
6639 }
6640 }
6641 }
6642 }
6643 },
6644 "examples": {
6645 "SUCCESS": {
6646 "value": {
6647 "result": {
6648 "code": "200",
6649 "message": "SUCCESS",
6650 "data": []
6651 }
6652 }
6653 },
6654 "BAD_REQUEST": {
6655 "value": {
6656 "result": {
6657 "code": "400",
6658 "message": "error",
6659 "data": [
6660 "At least one language is required for update terms and conditions."
6661 ]
6662 }
6663 }
6664 },
6665 "ISE": {
6666 "value": {
6667 "result": {
6668 "code": "500",
6669 "message": "error",
6670 "data": [
6671 "Some Error message from server"
6672 ]
6673 }
6674 }
6675 }
6676 }
6677 }
6678 }
6679 },
6680 "401": {
6681 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6682 }
6683 },
6684 "security": [
6685 {
6686 "BackOffice": []
6687 }
6688 ]
6689 }
6690 },
6691 "/updateHowToUse": {
6692 "post": {
6693 "summary": "Update How to Use Voucher content",
6694 "tags": [
6695 "BackOffice"
6696 ],
6697 "operationId": "updateHowToUse",
6698 "requestBody": {
6699 "content": {
6700 "application/json": {
6701 "schema": {
6702 "required": [
6703 "data"
6704 ],
6705 "type": "object",
6706 "properties": {
6707 "data": {
6708 "type": "object",
6709 "properties": {
6710 "en": {
6711 "type": "object",
6712 "required": [
6713 "filename",
6714 "content"
6715 ],
6716 "properties": {
6717 "filename": {
6718 "type": "string",
6719 "example": "howtouse_v2.txt"
6720 },
6721 "content": {
6722 "type": "string",
6723 "example": "How to Use Content"
6724 }
6725 }
6726 },
6727 "id": {
6728 "type": "object",
6729 "required": [
6730 "filename",
6731 "content"
6732 ],
6733 "properties": {
6734 "filename": {
6735 "type": "string",
6736 "example": "howtouse_v2.txt"
6737 },
6738 "content": {
6739 "type": "string",
6740 "example": "How to Use Content"
6741 }
6742 }
6743 }
6744 }
6745 }
6746 }
6747 }
6748 }
6749 },
6750 "required": true
6751 },
6752 "responses": {
6753 "200": {
6754 "description": "",
6755 "content": {
6756 "application/json": {
6757 "schema": {
6758 "type": "object",
6759 "properties": {
6760 "result": {
6761 "type": "object",
6762 "properties": {
6763 "code": {
6764 "type": "string",
6765 "example": "200"
6766 },
6767 "message": {
6768 "type": "string",
6769 "example": "SUCCESS"
6770 },
6771 "data": {
6772 "type": "array",
6773 "items": {
6774 "type": "string"
6775 }
6776 }
6777 }
6778 }
6779 }
6780 },
6781 "examples": {
6782 "SUCCESS": {
6783 "value": {
6784 "result": {
6785 "code": "200",
6786 "message": "SUCCESS",
6787 "data": []
6788 }
6789 }
6790 },
6791 "BAD_REQUEST": {
6792 "value": {
6793 "result": {
6794 "code": "400",
6795 "message": "error",
6796 "data": [
6797 "At least one language is required for update \"how to use\"."
6798 ]
6799 }
6800 }
6801 },
6802 "ISE": {
6803 "value": {
6804 "result": {
6805 "code": "500",
6806 "message": "error",
6807 "data": [
6808 "Some Error message from server"
6809 ]
6810 }
6811 }
6812 }
6813 }
6814 }
6815 }
6816 },
6817 "401": {
6818 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6819 }
6820 },
6821 "security": [
6822 {
6823 "BackOffice": []
6824 }
6825 ]
6826 }
6827 },
6828 "/downloadPointsSummary": {
6829 "post": {
6830 "summary": "Download KFC Points Summary Report",
6831 "tags": [
6832 "BackOffice"
6833 ],
6834 "operationId": "downloadPointsSummary",
6835 "requestBody": {
6836 "content": {
6837 "application/json": {
6838 "schema": {
6839 "required": [
6840 "data"
6841 ],
6842 "type": "object",
6843 "properties": {
6844 "data": {
6845 "type": "object",
6846 "properties": {
6847 "from_date": {
6848 "type": "string",
6849 "example": "2019-05-31T18:30:00.000Z"
6850 },
6851 "to_date": {
6852 "type": "string",
6853 "example": "2019-08-17T18:29:59.000Z"
6854 },
6855 "activity_id": {
6856 "type": "array",
6857 "items": {
6858 "type": "number",
6859 "example": 8
6860 }
6861 }
6862 }
6863 }
6864 }
6865 }
6866 }
6867 },
6868 "required": true
6869 },
6870 "responses": {
6871 "200": {
6872 "description": "",
6873 "content": {
6874 "application/json": {
6875 "schema": {
6876 "type": "object",
6877 "properties": {
6878 "result": {
6879 "type": "object",
6880 "properties": {
6881 "code": {
6882 "type": "string",
6883 "example": "200"
6884 },
6885 "message": {
6886 "type": "string",
6887 "example": "SUCCESS"
6888 },
6889 "data": {
6890 "type": "array",
6891 "items": {
6892 "type": "string"
6893 }
6894 }
6895 }
6896 }
6897 }
6898 },
6899 "examples": {
6900 "SUCCESS": {
6901 "value": {
6902 "result": {
6903 "code": "200",
6904 "message": "Successfully exported points summary.",
6905 "data": {
6906 "fileUrl": "https://storage.googleapis.com/kfcjv-development.appspot.com/file_url"
6907 }
6908 }
6909 }
6910 },
6911 "BAD_REQUEST": {
6912 "value": {
6913 "result": {
6914 "result": {
6915 "code": "400",
6916 "message": "error",
6917 "data": [
6918 "activity_id.0 must be a number"
6919 ]
6920 }
6921 }
6922 }
6923 },
6924 "ISE": {
6925 "value": {
6926 "result": {
6927 "code": "500",
6928 "message": "error",
6929 "data": [
6930 "Some Error message from server"
6931 ]
6932 }
6933 }
6934 }
6935 }
6936 }
6937 }
6938 },
6939 "401": {
6940 "$ref": "#/components/responses/UnauthorizedErrorBoth"
6941 }
6942 },
6943 "security": [
6944 {
6945 "BackOffice": []
6946 }
6947 ]
6948 }
6949 }
6950 }
6951}