{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/7-Eleven37/7REWARDS_BE_API/1.0.0"},{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/7-Eleven37/Merge_User_API/1.0.0"}],"info":{"description":"This is a simple API","version":"1.0.0","title":"7REWARDS BACKEND API","contact":{"email":"you@your-company.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"mobile","description":"Mobile API Backend 7REWARDS"},{"name":"payment","description":"Backend API for PaymentGateway"}],"paths":{"/api/mobile/v4/user/login_merged_user":{"post":{"tags":["mobile"],"summary":"Login Merge User API","operationId":"login_merge_user_api","description":"API for user merge another user. User need login to this API for authentication merged user.\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"authenticator_type":{"description":"Authentication type (phone, facebook ...)","type":"string"},"phone_number":{"description":"Phone number of user","type":"string"},"access_token":{"description":"Access token ( when authenticate with facebook)","type":"string"}},"required":["authenticator_type","phone_number","access_token"]}}}},"responses":{"200":{"description":"Return message will be shown on mobile","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Response"}}}}},"400":{"description":"Return message will be shown on mobile and error code","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Response"}}}}}}}},"/api/mobile/v4/user/verify_merge_user":{"post":{"tags":["mobile"],"summary":"Verify and Merge User API","operationId":"verify_merge_user_api","description":"Verify merged user by acccess token ( facebook) or OTP ( phonenumber)\n","parameters":[{"in":"query","name":"authenticator_type","description":"Authentication type (phone, facebook ...)","required":true,"schema":{"type":"string"}},{"in":"query","name":"phone_number","description":"Phone number of user","schema":{"type":"string"},"required":false},{"in":"query","name":"access_token","description":"Access token ( when authenticate with facebook)","schema":{"type":"string"},"required":false},{"in":"query","name":"otp","description":"Code OTP to verify phone login","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Return message will be shown on mobile","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Response"}}}}},"400":{"description":"Return message will be shown on mobile and error code","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Response"}}}}}}}},"/v1/topup/check_info":{"post":{"tags":["payment"],"summary":"Check user info before topup","description":"BE API for check user info by phone or qr code scanning.\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"topup_supplier":{"description":"TopUp service supplier","type":"string","example":"MoMo"},"phone_number":{"description":"Phone number of user with country code","type":"string","example":"+84983165866"},"qr_code":{"description":"QR code of user on 3rd platform","type":"string","example":"QR code ABC"}},"required":["topup_supplier"]}}}},"responses":{"200":{"description":"User info","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/CheckInfoResponse"}}}},"400":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Response"}}}}}}},"/v1/topup/create":{"post":{"tags":["payment"],"summary":"Request create a topup transaction","description":"Topup transaction \n","requestBody":{"content":{"application/json":{"schema":{"properties":{"topup_supplier":{"description":"TopUp service supplier","type":"string","example":"MoMo"},"phone_number":{"description":"Phone number of user with country code","type":"string","example":"+84983165866"},"qr_code":{"description":"QR code of user on 3rd platform","type":"string","example":"QR code ABC"},"transaction_id":{"description":"Transaction ID from POS","type":"string","example":"1011432048230423"},"store_id":{"description":"Store ID","type":"string","example":"1011"},"amount":{"description":"Topup amount","type":"integer","example":100000}},"required":["topup_supplier"]}}}},"responses":{"200":{"description":"User info","content":{"application/json":{"schema":{"type":"object","properties":{"user_name":{"type":"string","format":"text","example":"Nguyen Van A"},"user_phone":{"type":"string","format":"text","example":"+84983165866"},"transaction_id":{"type":"string","format":"text","example":"10113294729423"},"store_id":{"type":"string","format":"text","example":"1011"},"email":{"type":"string","format":"text","example":"vokythoai@gmail.com"},"amount":{"type":"integer","description":"Total amount Topup","example":100000},"message":{"type":"string","description":"Message will be showed on POS","format":"text","example":"TopUp Successfully"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Response"}}}}}}},"/v1/topup/check_status":{"post":{"tags":["payment"],"summary":"Check status of a transaction","description":"Check status of a transaction \n","requestBody":{"content":{"application/json":{"schema":{"properties":{"topup_supplier":{"description":"TopUp service supplier","type":"string","example":"MoMo"},"transaction_id":{"description":"Transaction from user bill","type":"string","example":"1011908766561"}},"required":["topup_supplier"]}}}},"responses":{"200":{"description":"User info","content":{"application/json":{"schema":{"type":"object","properties":{"user_name":{"type":"string","format":"text","example":"Nguyen Van A"},"user_phone":{"type":"string","format":"text","example":"+84983165866"},"email":{"type":"string","format":"text","example":"vokythoai@gmail.com"},"amount":{"type":"integer","example":999999},"status":{"type":"integer","enum":[0,1,2],"description":"Sort order:\n * `0` - Success - Transaction complete successfully\n * `1` - Failed - Transaction failed\n * `2` - InProgress - Transaction processing\n * `3` - Supplier Pending - Transaction processing completed. Waiting for supplier topup\n"},"message":{"type":"string","description":"Message will be showed on POS","format":"text","example":"TopUp Successfully"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Response"}}}}}}},"/v1/topup/confirm_transaction":{"post":{"tags":["payment"],"summary":"Confirm a previous transaction.","description":"Confirm a previous transaction. This API will be used when using mode confirm before topup. \n","requestBody":{"content":{"application/json":{"schema":{"properties":{"topup_supplier":{"description":"TopUp service supplier","type":"string","example":"MoMo"},"total_amount":{"type":"integer","example":100000},"transaction_id":{"description":"Transaction from user bill","type":"string","example":"1011908766561"}},"required":["topup_supplier"]}}}},"responses":{"200":{"description":"User info","content":{"application/json":{"schema":{"type":"object","properties":{"user_name":{"type":"string","format":"text","example":"Nguyen Van A"},"user_phone":{"type":"string","format":"text","example":"+84983165866"},"transaction_id":{"type":"string","format":"text","example":"10113294729423"},"email":{"type":"string","format":"text","example":"vokythoai@gmail.com"},"amount":{"type":"integer","description":"Total amount Topup","example":100000},"message":{"type":"string","description":"Message will be showed on POS","format":"text","example":"TopUp Successfully"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"CheckInfoResponse":{"type":"object","properties":{"user_name":{"type":"string","format":"text","example":"Nguyen Van A"},"user_phone":{"type":"string","format":"text","example":"+84983165866"},"email":{"type":"string","format":"text","example":"vokythoai@gmail.com"},"message":{"type":"string","description":"Message will be showed on POS","format":"text","example":"Check user successfully"}}},"Response":{"type":"object","required":["message","error_code"],"properties":{"message":{"description":"Message will be showed on client device.","type":"string","format":"text","example":"Login succcessfully"},"error_code":{"type":"string","example":"Standard Error"}}}}}}