## Push Notification Register information Details for the push notification register information ## ## ####Endpoint > {warning} Please note that the URI for this endpoint should include api/{$version} before | Method | URI | Headers | | : | :- | : | | POST | `/user/store-device-token` | Authorization : Bearer {token} | ### URL Params ```php None ``` ### Data Params ```php { "os":"android", "device_id":"5449785443479876464346464", "fcm_token":"rda456487sdsaddasda457a8da78ad9a4aew4e6w87eqw9e9qw446qw5e78e9" } ``` > {success} Success Response ####Code `200` ####Content ```php { "message": "Device Token Saved Successfully!" "status": 200, } ``` > {danger} Unauthenticated Response ####Code `403` or `404` ####Content ```php { "message": "Something went wrong!" "status": 403, } ``` ## Delete device token Details for delete device token api ## ## ####Endpoint > {warning} Please note that the URI for this endpoint should include api/{$version} before | Method | URI | Headers | | : | :- | : | | POST | `/user/delete-device-token` | Authorization : Bearer {token} | ### URL Params ```php None ``` ### Data Params ```php { "os":1, //1: Andriod, 2: ios "device_id":"5449785443479876464346464" } ``` > {success} Success Response ####Code `200` ####Content ```php { "message": "Device Token Deleted Successfully!" "status": 200, } ``` > {danger} Unauthenticated Response ####Code `403` or `404` ####Content ```php { "message": "Token not found!" "status": 403, } ``` ## Delete existing device token Details for delete existing device token api ## ## ####Endpoint > {warning} Please note that the URI for this endpoint should include api/{$version} before | Method | URI | Headers | | : | :- | : | | POST | `/user/delete-existing-token` | Default | ### URL Params ```php None ``` ### Data Params ```php { "os": 1, //1: Andriod, 2: ios "device_id": "5449785443479876464346464" } ``` > {success} Success Response ####Code `200` ####Content ```php { "message": "Device Token Deleted Successfully!" "status": 200, } ``` ## Notification list Details for the notification list information ## ## ####Endpoint > {warning} Please note that the URI for this endpoint should include api/{$version} before | Method | URI | Headers | | : | :- | : | | GET | `/user/notification-list` | Authorization : Bearer {token} | ### URL Params ```php None ``` ### Data Params ```php None ``` > {success} Success Response ####Code `200` ####Content ```php { "current_page": 1, "last_page": 1, "per_page": 10, "next_page_url": null, "last_page_url": "http://127.0.0.1:8000/api/v1/user/notification-list?page=1", "total": 5, "count": 5, "prev_page_url": null, "hasMorePages": false, "data": { "current_page": 1, "data": [ { "id": 9, "user_id": 2, "title": "Your friend request has been accepted by Admin!", "type": "FriendRequestAccepted", "message": "Admin accepted your friend request!", "extra_fields": { "name": "Test", "avatar": "http://127.0.0.1:8000/images/misc/placeholder.png", "from_id": 1, "created_at": "2022/02/17 16:15:39" }, "status": "0", "created_at": "2022/02/17 16:15:39", "updated_at": "2022-02-17T10:45:39.000000Z" } ] } "status": 200 } ``` > {danger} Unauthenticated Response ####Code `403` or `404` ####Content ```php { "message": "Something went wrong!" } ``` ## Unread notification & messages count Details for the unread notification & messages count information ## ## ####Endpoint > {warning} Please note that the URI for this endpoint should include api/{$version} before | Method | URI | Headers | | : | :- | : | | GET | `/user/unread-counts` | Authorization : Bearer {token} | ### URL Params ```php None ``` ### Data Params ```php None ``` > {success} Success Response ####Code `200` ####Content ```php { "data": { "unread_message_count": 1, "unread_notification_count": 0 }, "status": 200 } ``` > {danger} Unauthenticated Response ####Code `403` or `404` ####Content ```php { "message": "Something went wrong!" "status": 403 } ``` ## Delete notification information Details for the delete notification information ## ## ####Endpoint > {warning} Please note that the URI for this endpoint should include api/{$version} before | Method | URI | Headers | | : | :- | : | | GET | `/user/delete-notification/{id}` | Authorization : Bearer {token} | ### URL Params ```php 1 //Notification Id ``` ### Data Params ```php None ``` > {success} Success Response ####Code `200` ####Content ```php { "message": "Notification deleted successfully!" } ``` > {danger} Unauthenticated Response ####Code `403` or `404` ####Content ```php { "message": "Something went wrong!" } ```